Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose MediaCodec metrics #5585

Open
harini113 opened this issue Feb 28, 2019 · 6 comments
Open

Expose MediaCodec metrics #5585

harini113 opened this issue Feb 28, 2019 · 6 comments
Assignees

Comments

@harini113
Copy link

[REQUIRED] Searched documentation and issues

I have searched through the code for on latest v2 release for use of getMetrics() API from MediaCodec and do not see it available.

[REQUIRED] Question

I would like to know if the exoplayer codebase is planning on incorporating the getMetrics api available for mediaCodec
https://developer.android.com/reference/android/media/MediaCodec#getMetrics()

@andrewlewis
Copy link
Collaborator

Looks like Toni is planning to look at this [internal: b/77251770].

It's not the same as MediaCodec metrics, but, for what it's worth, we do already expose some information about decoding metrics already via SimpleExoPlayer.getVideoDecoderCounters (ditto for audio) and the decoder counters are also passed to AnalyticsListener.onDecoderEnabled.

@tonihei
Copy link
Collaborator

tonihei commented Mar 1, 2019

We were particularly working on adding the decoder latency metrics (min/max/average), both overall and for "recent" samples. Would that be sufficient for what you'd like to achieve?

@harini113
Copy link
Author

harini113 commented Mar 1, 2019 via email

@tonihei
Copy link
Collaborator

tonihei commented Mar 4, 2019

I think you can obtain all mentioned information by other means already.

DurationMS - player.getDuration()
Dropped - listen to AnalyticsListener.onDroppedVideoFrames
VideoCodec/AudioCodec - listen to AnalyticsListener.onDecoderInitialized and parameter decoderName.
Width/Height/VideoMime - listen to AnalyticsListener.onVideoSizeChanged or AnalyticsListener.onDownstreamFormatChanged.
Playing - player.getCurrentPosition.
Frames - Read values from the DecoderCounters object passed to AnalyticsListener.onDecoderEnabled or
AnalyticsListener.onDecoderDisabled.

@harini113
Copy link
Author

harini113 commented Mar 5, 2019 via email

@tonihei
Copy link
Collaborator

tonihei commented Mar 6, 2019

We'll post this issue as soon as we are ready.

And if you can share info on all getVideoDecoderCounters apis that are available to use?

Please have a look at the look the documentation to see which values are already reported as part of the DecoderCounters.

@ojw28 ojw28 changed the title is getMetrics() a MediaCodec API available on exoplayer Expose MediaCodec metrics Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants