What is the API contract for CDVDClock:GetClock() supposed to be?
#1
Within CDVDPlayer there is a member variable m_clock that is a DVDClock.

I assumed that m_clock.GetClock() would return the length of time since the start of playback. This works for the majority of playback so is all good, and is what much of the code assumes, e.g. for calculating the seek bar position on screen.

However, for a bunch of mpegts files that I'm playing back, m_clock.GetClock() is returning a massive number that's not even close to the duration since the start of playback. This affects the EDL and commercial skip code (which assumes playback starts at 0), the display on screen (duration shows as 11:54:16) immediately after the video starts, and also affects seeking somehow (some videos just stop as soon as any seeking is done).

So, is the API for CDVDClock:GetClock() indeed supposed to be the playback duration since the beginning of the file?

If so, why would some mpegts files be breaking this? Is it because mpegts files can use any arbitrary timestamp in the audio and video packets, e.g. they don't have to start at 0?

If not, how can I get the length of time since the start of playback so I can get the EDL and commercial skip code using that instead?
Reply

Logout Mark Read Team Forum Stats Members Help
What is the API contract for CDVDClock:GetClock() supposed to be?0