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

Allow pre-warming decoders ahead of time if app provides format hints #5795

Closed
ojw28 opened this issue Apr 23, 2019 · 2 comments
Closed

Allow pre-warming decoders ahead of time if app provides format hints #5795

ojw28 opened this issue Apr 23, 2019 · 2 comments
Assignees

Comments

@ojw28
Copy link
Contributor

ojw28 commented Apr 23, 2019

[REQUIRED] Use case description

This enhancement is aimed at reducing the startup latency of the first playback, specifically when the application is able to provide hints as to the expected format of the content ahead of time. This is normally possible for applications where the app developer controls the content being played.

Proposed solution

Provide a mechanism for the app to hint to a player instance what format(s) it will be used to play, in advance of starting the first playback. When such a hint is received, the player instance can setup the required decoders ahead of the first playback.

Alternatives considered

N/A

@PratimMallick
Copy link

Hi @ojw28 . This really makes sense to have and can greatly benefit any app using exoplayer. Additionally another thing which can be done is setting up both video and audio decoders in parallel instead of sequential as it is now.

When can we expect the release for pre warming of decoder to happen?

@ojw28
Copy link
Contributor Author

ojw28 commented Jul 7, 2022

I'm fairly sure it's possible for an app developer to pre-warm codecs now, if they have the necessary information. This can be done by injecting a custom MediaCodecAdapter.Factory into the MediaCodec-based renderers at construction time, where the factory can provide a pre-initialized decoder the first time it's asked for one.

@christosts may be able to provide further information.

@ojw28 ojw28 closed this as completed Jul 7, 2022
@ojw28 ojw28 assigned christosts and unassigned ojw28 Jul 7, 2022
@google google locked and limited conversation to collaborators Sep 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants