View Full Version : Start time of video event?

July 21, 2006, 17:45:14

Is there an event or way to obtain the time of the first frame? For example if a video uses text overlay to place the computer's time on the video image I'd like a way to have a seperate clock match that time. My player uses the start time of the file and checks the time lapse to create this seperate clock.

The problem is that the start time is off by up to 5 seconds so the video clock and my derived clock are not in sync.

The start time is set in an OnOutputPinConnectedMvsmartcontrol function that sets the URL of the MV IP filter and I'm using the WM ASF Writer. Is there a way to know when the first sample is actually written to the file so the clocks can be in sync?



July 24, 2006, 16:14:36
I've found that the IWMStatusCallback interface has an OnStatus function that gets called with an WMT_STARTED event. This could work to get the actual time of the first frame written to the file.

The IWMStatusCallback interface must be registered with the IWMRegisterCallback interface which is created with a IWMWriterFileSink interface. (And I hoped this library would keep me out of this stuff)

Since I'm using the IMVSCSetFile to set the name of the video file is there a way to access the underling IWMWriterFileSink interface?

Is there a better way?