tags:

views:

951

answers:

1

I'm using DirectShow to play audio/video files in my application. I use IGraphBuilder::RenderFile() to build the filter graph and the IMediaControl interface to play/pause/stop the media. This works fine for local media files, but causes problems with live mms streams.

If I call IMediaControl::Stop() on a live stream, the stream will stop playing as expected. However, if I call IMediaControl::Run() to resume the stream, nothing happens. The graph generates an EC_COMPLETE event, but the video does not play anymore.

Calling IMediaControl::Pause() followed by IMediaControl::Run() will resume the stream where it left off, but will eventually stop. It seems to just playback the data that was in the buffer when IMediaControl::Pause() was called, instead of re-syncing with the live stream.

Does anybody know how to resume playing a live stream without destroying and rebuilding the filter graph?

A: 
  1. Why are you calling Stop()? you should call Pause()
  2. The DirectShow Filters for MMS are know to have problems with MMS, for starters they don't support the latest MMS 9 (that comes with Win 2003) protocol. You should use the Media Player Control or the Format SDK if you want proper support for MMS.
Shay Erlichmen
1) I tried this out but it doesn't work as expected. I edited my question to explain this.2) I'd prefer to continue using DirectShow, since it works fine for all other media types. I'll have a look at the other SDK you mentioned though. Thanks.
flashk