Thanks for the answer!
I have live stream and I am saving it using writestreamsample in onstreamsample method. everything works fine when I use sampletime parameter except the cases when the stream breaks and the reader is restarted. let say, if i have a gap from 3:30 to 3:40 in the incoming stream, in saved stream i should have the same 10 minutes gap. i wanted to set the sample time according to the system time when the sample is written to solve this issue. I didn't plan to use the system time as is, but some calculation based on it.
Thanks!
"Alessandro Angeli" wrote:
[Quoted Text] > From: "oan" > > > How can I calculate cnsSampleTime for WriteStreamSample > > method using current system time? > > Unless your source is a constant rate live source, > cnsSampleTime is not related to the system time at all. > cnsSampleTime is the zer-based position of the sample in the > stream timeline. How to calculate the value depends on how > you produce the sample and how they are positioned in the > stream. > > -- > // Alessandro Angeli > // MVP :: DirectShow / MediaFoundation > // mvpnews at riseoftheants dot com > // http://www.riseoftheants.com/mmx/faq.htm > > >
|