Open j-santander opened 3 years ago
I haven't actually looked into their decompiled code, so I can only guess myself. But I came to the same conclusion as you did, I think the clock_ref is just a unique ID pointing to a CMClock instance
Interesting for the FPS part! Thanks for these observations. I will add them to my documentation. In general I also wanted to review my implementation of timing in general. I think I have especially the Clock Skew part wrong.
This should probably not be an issue, as they just a few observations and questions. I wonder if you have more information on the handling of clocks and timing (specially the samples PTS).
From what I've gathered, 6 clock refs appear in the messages. To tell the truth I'm not entirely sure what is a "clock ref", so probably that's the first question.
So far I'm assuming that they're unique identifier (0x1 indicating an invalid reference) that represent a source of timing information. Messages in the exchange seem to be "addressed" to a clock_ref and in some cases there seem to be timing information sent.
Regarding the PTS:
Now, it seems that Audio PTS and Video PTS work differently. Quick Time seems to assume that first audio sample and first video sample are in the same PTS (and if you look at the MOV produced from a capture both streams start in CTS=0). I'm not sure how it solves when we start recording with a blank screen in the device (where we do receive EAT! but we don't receive FEED).
One final observation. The device does not keep the promised 60 FPS, in many cases it just skip one, two or event three frames. The duration of the frame is still 1/60, but the PTS are correct. Sending frequent NEED messages does not help (but if you send NEED less frequently you will get less frequent frames).
In general, when you start, the first burst of FEED you will get at the right rate (even without sending NEED), after that it is likely that you will get less than the 60 FPS.