Seeking in Direct Show

Started by
3 comments, last by Muzzy A 11 years, 9 months ago
I originally posted asking about how to loop in direct show, but got no response. I looked more and couldn't find anything useful. Then i figured if i can figure how to SEEK through a video, i can just restart the video like that. But this too, I can't figure out how to do either.

MSDN showed something that i couldn't get my head around for some reason and other places i cant find anything useful.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd758085%28v=vs.85%29.aspx

Is this the only way to do it in direct show?
Advertisement
No, that's not what you want at all. You aren't writing your own filter, just using existing filters.

The documentation isn't great, but this topic "Seeking the Filter Graph" should help:

http://msdn.microsoft.com/en-us/library/windows/desktop/dd377561(v=vs.85).aspx

It's the IMediaSeeking interface that you want.

Good luck!
Geoff
oh wow that's much better! Thank you dunbar =)

EDIT: Just one question, do I need to add anything special when running this with direct x? D3D9 to be exact. I've got it working perfectly with seeking and such, but when i run it with D3D9 in debug, there's a flicker, and in release mode you dont see it at all.

It seems to me that direct x is clearing it, and thus it never gets seen, or in debug mode where there's fewer fps, you see a flicker.
With the flicker - hard to say.

I would try testing release mode on a few different machines, if it looks ok then you are probably ok.

There is alot that goes on under the hood when an app is running in debug.

Good luck :)
i stopped directX from drawing anything and stopped it from clearing the screen, but yet it still flickers. and in release mode i've got it working the same as in debug mode.

my teacher said it is possible to make it draw on top of everything, but he doesn't know how. I know you can draw it in a seperate window and remove the borders to make it look like it's in the window. But i'm actually going to be scrolling the video so that wont work well with the way im scrolling it.

This topic is closed to new replies.

Advertisement