3 ms·
I have struggled a lot with video streams decoding on Android. Every chip manufacturer does things differently. Some have a 11 frame buffer, some a 6 frame buff
by pantelisk 6y ago
I have struggled a lot with video streams decoding on Android. Every chip manufacturer does things differently. Some have a 11 frame buffer, some a 6 frame buffer, some will pipe data out after only a few frames.
Let aside the tens of different YUV formats from diagonally interlaced streams to split-byte ones lest you want to work with the output directly and not let the decoder render to a surface directly (to avoid the latency of reading from the surface).
Back then I ended up doing a lot of crazy things like piping "empty" NAL frames to the decoder, to force a flush among other things. If you really cared for low-latency specific streams it was very difficult to work with the fragmentation of the ecosystem.
That was a few years ago, the versions that came at around 2016++ (after API 23) were the versions that became more stable, and relied less on OEM specific magic.
- jimmySixDOF 6y agoInteresting. Oculus team at FB has been playing with frame timings etc and just released 'Phase Sync' in Quest HMDs (Android) [1] so even though it's a highly customized ROM build, it is likely they face the same type of problems. [1] https://uploadvr.com/facebook-phase-sync-quest-latency/ https://uploadvr.com/facebook-phase-sync-quest-latency/
- soylentgraham 6y agoCan definitely concur with this; decoding on each compatible phone for gearvr was a nightmare, not to mention that decoding to a buffer instead of a texture surface was noticably faster. My code still has enums of magic numbers for S5's and note3 weird yuv formats