I am using GMFBridge to include capture/pause functionality. I need to be able to determine the 'logical' media sample time (i.e. not stream time). By logical time, I am referring to time measured relative to the start of the first
media sample and that includes all pause intervals. Stream time, in contrast, excludes all pause intervals.
My question is, when capturing/recording media data, what is the best way to determine the logical time of a media sample?
The approach I am considering is as follows:
1) pause the graph and wait for it to cue
2) call IReferenceClock::GetTime() to get the start time
3) call IMediaControl::Run () to start capturing media
4) in ISampleGrabberCB::BufferCB(), compute the logical time by calling IReferenceClock::GetTime() and subtracting the start time obtained in step 2
In using this approach, I am not certain of how accurate the computed logical time is. There may be better ways to do this, hence my question.
Thanks