View Full Version : Question about synchronization of a hard- and a software filter in DirectShow


FatBastard
20th June 2003, 16:26
Hi!

I am writing a DirectShow filter for MPEG2/DVD-Video decoding over a hardware board.
The filter works fine, but the problem is that I have to use a software decoder/renderer for audio.
So audio and video is out of synchronization in most cases.

My Question is:
Where can i get information about syncro mechanisms in DirectShow or sample code where someone used hard- and software renderers in the same filter graph/DirectShow-based application?

Or does someone in here have experience with DirectShow filter programming and is willing to help me?

Every hint is welcome.

Bye FatBastard

Blight
21st June 2003, 09:37
Your filter needs to support IRefrenceClock and then set the graph to use that. No sample code I'm afraid, haven't done anything like that myself.

FatBastard
23rd June 2003, 12:21
Thanks for the hint, Blight!

I will try to implement this, but i think this will not help me with my problem because my hardware decoder board has a large buffer for video and the software audio decoder not.
This is the reason why audio playback is in front of the video playback.
The asynchronous playback is IMO not caused by wrong reference clock values.
With the IReferenceClock interface i will be able to set a delay to the rest of the filter graph but the delay is not constant. it differs from DVD to DVD and sometimes from chapter to chapter.
I donīt find a way to get the delay of the video and this is my first great problem.

But i will try a bit with the refclock and then tell what happend.

Bye FatBastard