What clock does IMFSourceReader::ReadSample use for the time stamp?

Elias Guestrin 0 Reputation points


I need to know what clock IMFSourceReader::ReadSample uses for the time stamp that it provides (argument pllTimestamp in https://learn.microsoft.com/en-us/windows/win32/api/mfreadwrite/nf-mfreadwrite-imfsourcereader-readsample). Is it a monotonic / steady clock or a non-monotonic / system / wall clock? How does it relate to std::chrono::steady_clock or std::chrono::system_clock?

Thank you very much!

A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
280 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 15,521 Reputation points

    Hello there,

    This can be of any source but it must meet the below conditions.

    An application that uses the Media Session should never start, stop, or pause the presentation clock; change the clock rate; or shut down the clock.

    To get a pointer to the presentation clock, call IMFMediaSession::GetClock on the Media Session. The presentation clock does not return a valid time until the Media Session sends the MESessionTopologyStatus event with the MF_TOPOSTATUS_READY flag. Until then, GetClock returns MF_E_CLOCK_NO_TIME_SOURCE.

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer–