Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I check AM_SEEKING_CanSeekAbsolute capability with following code:
C++
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)
		{
			// The stream can seek to an absolute position.
//			return true;
	    }
	}

//	return SUCCEEDED(hr);
	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
C++
//			return true;

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?
Posted
Updated 17-Oct-11 21:44pm
v3
Comments
Sandeep Mewara 6-Oct-10 5:49am    
Update from OP: After pressing Stop button the method Pause is called, returns success. But before calling the method Stop Graph Edit hungs.
Why is it?
Can you help me?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900