locked
PTS & DTS timestamp information using sourceReader RRS feed

  • Question

  • Hi,

    using the sourceReader, I read out the encoded video samples. Additional to the IMFSample I get also the DTS timestamp information. In a second step I will send these samples to the decoder.

    For example, my video player application wants to show frame 55 (in pts order of course) - in a longGOP video file. How and where can I get the information how many frames I have to load by the sourceReader to get frame 55 in PTS order????

    Using SetCurrenPosition should be the key to get the previous sync frame. To be honest I do not know if SetCurrentPositon needs the DTS time information or the PTS time information.Is there anywhere in the www a hint?

    After using SetCurrentPosition, I should have the sync frame - how many frames are needed to get the requested frame 55 (in pts order)? ReadSample returns no information about PTS - it only returns the DTS timestamp and the IMFSample, including the encoded video samples.....

    Moreover both timestamps DTS and PTS can have different offset values - values of the first frame in DTS as well as PTS order. At the moment, the first call of ReadSample returns the dts offset, if you SetCurrentPosition to zero.

    I hope someone of you could help me to get the required number of frames (in dts order) from the sourceReader to get the requested video frame by the decoder.

    best regards

    saoirse

    Thursday, August 6, 2015 3:10 PM