I check AM_SEEKING_CanSeekAbsolute capability with following code:
bool CVideoPlayer::CanMove(void)
{
HRESULT hr = S_OK;
DWORD dwCaps = AM_SEEKING_CanSeekAbsolute;
if ( !m_cpMediaSeeking )
{
return false;
}
hr = m_cpMediaSeeking->CheckCapabilities(&dwCaps);
#define USE_LOG
#undef USE_LOG
#ifdef USE_LOG
{
HANDLE local_file_handle = CreateFileW(L"d:\\VME.log.txt",GENERIC_WRITE,0,NULL,OPEN_ALWAYS,0,0);
wchar_t local_string_input[] = L"\r\nhr = %d\r\n";
wchar_t local_string_output[500];
wsprintfW(local_string_output,local_string_input, (int)hr);
ULONG local_byte_written = 0;
SetFilePointer(local_file_handle,0,0,FILE_END);
WriteFile(local_file_handle,local_string_output,wcslen(local_string_output)*sizeof(wchar_t),&local_byte_written,NULL);
CloseHandle(local_file_handle);
}
#endif
if (hr==S_FALSE)
{
if (dwCaps & AM_SEEKING_CanSeekAbsolute)
{
}
}
return ( hr == S_OK );
}
For some Video files like flv, mp4 i get following result, when converting to avi or wmv.
It get in to line, where
is.
It is fail, because of checking only 1 capability.
Producers of flv splitters said, that it is Microsoft's muxer directshow filters bug (Avi Muxer, File Writer and WMV Asf writer).
I tryed get IMediaSeeking interface on differend Pins and filters. Same result.
Can it be Microsoft's muxer filters bug? Can you belive that?
I should get S_OK from check call to work good.
If i assume that it works, when uncommenting line with return true, than no image get from splitter.
Same situation (no image), when i use Directshow Editing Services.
For some files it work, for some it does not work.
I need to know, why is it, to solve the problem.
Splitter producers said, that they checked it in 1 hour! And said, that their splitters work.
But i do not belive, because i have the code of my program, and it is impassable to write it in 1 hour and get results.
Is it Microsoft filters bug or splitters bug?
What should i do?