Question

I was happily improving my C++-program where I read videos via directshow. Now I tried to also write videos which was also nicely working.
Then came the search for an appropriate codec (thought about vob/ogg)...
However, suddenly today the video was displayed really slowly.
And now that I uninstalled any additional codecs I installed before, the video won't play at all.
The reason seems to be CComQIPtr< IMediaSeeking, &IID_IMediaSeeking > pSeeking( pGraph ); and hr = pSeeking->SetPositions( &Startzeit, AM_SEEKING_AbsolutePositioning,NULL, AM_SEEKING_NoPositioning ); gives an error, SetPosition is not supported at that time... acutally at any time.
also hr=pSeeking->GetDuration(&duration) returns 0 and the corresponding AM_MEDIA_TYPE mt; I use to get the framepersecond has an empty format-type. (pbFormat is Null).

Did I unintentionally installed/uninstalled something important?
Have you heard of similar problems?
As I said, some days ago the same video and source-code was working fine (I commented by changes out by now).
I would like to give you more source-code but it is kind of long but if you think it would be helpful I will add it of course.

Regards,
Julian

Here is the source-code: http://pastebin.com/jMdWejH9
It's of course only a part of the whole code, but I think this is the main part as here are all filters inserted.
Keep in mind that this actually worked until some days before!^^
The first part is the variable-deklaration (all important variables as fas as I could tell, the second is the function called)

Was it helpful?

Solution

If you render a file in DirectShow, the framework uses the installed codecs/filters in the system. If you remove some codecs it takes another or breaks because it can't render. To know wich filters the framework uses you can try to render the file in GraphEdit or GraphStudioNext. (Just drop the file on one of these programms and see the filtergraph). We got the best results with the codec pack ffdshow-tryouts and the Haali Media Splitter for our player.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top