Re: Easy way to play specified time

From: Michael Mattsson (
Date: 08/24/04

Date: Tue, 24 Aug 2004 12:18:33 -0400

"Kirsten" wrote:
> Well, as I said, after I called the method and checked the capabilites, it
> DOES NOT show "The stream can report its current
> position." (or AM_SEEKING_CanGetCurrentPos).
> It DOES show
> AM_SEEKING_CanSeekAbsolute
> AM_SEEKING_CanSeekForwards
> AM_SEEKING_CanSeekBackwards
> AM_SEEKING_CanGetStopPos
> AM_SEEKING_CanGetDuration
> First I thought: Ok, MP3 streaming, perhaps it really cannot report its
> current position! But IMediaSeeking:GetCurrentPosition
> works!
> BTW: I tried loading WAV files (WAV streaming)... Checking
> AM_SEEKING_CanGetCurrentPos fails there, too! Anything buggy?

Because you are using DirectShow, I'm assuming that your are not creating
the graph yourself, but using RenderFile() to create it for you.
You can check a few things that might affect the
AM_SEEKING_CanGetCurrentPos. First, check the filters that actually get
loaded in your graph. You can do this by running the SDK's graphedt.exe
utility, rendering your file, and seeing which filters get loaded. Perhaps
there is a filter being loaded in the graph that doesnt properly report it's

Seeking also depends on the TimeFormat you are using. Check the
IMediaSeeking::GetTimeFormat() & IMediaSeeking::SetTimeFormat() methods and

What are you using to render the file? Some renderers do not fully support
the IMediaSeeking interface. Some renderers like the IFileWriter do not
support it at all.