Measure currently playing content frame rate
Hi!
Is it possible (or a feature for the future updates) to measure currently playing content frame rate?
This can be done by measuring time between several consequent rendered frames.
Possibly, by allowing access to onFrameRendered(...) in OnFrameRenderedListenerV23.
This seems to be more precise method, then mentioned in https://github.com/google/ExoPlayer/issues/2563 by counting amount of renderedBuffers in SimpleExoplayer.getVideoDecoderCounters().
To get an accurate estimate of the rate at which frames are being rendered, you could subclass MediaCodecVideoRenderer and override renderOutputBuffer (used before API 21) and renderOutputBufferV21 (used from API 21) and use the information passed in to do the calculation. If you want to take into account dropped frames you'd also need to override dropOutputBuffer.
@andrewlewis it's worked quite well. Thanks!