Record MediaCodec video playback duration
The algorithm accumulates the duration of time each frame is active for the attached surface using the onFrameRendered timestamps. It ignores counting duration where the attached surface is not being sent to the screen. It also ignores counting frames that are active for a long period of time (e.g. pauses, rebuffers, etc.). Test: Tested manually across a variety of apps by comparing the dumpsys metrics with the duration displayed in the app UI. The results were accurate to the second, even with multiple fast-forwards, rewinds, rebufferings and pauses for both tunnel mode and non-tunnel mode. Bug: 184112407 Change-Id: Ib0e6154583e53774f3da862f432ff83bcc0ada5d
Loading
Please register or sign in to comment