-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
Issue description
In our particular device which has media tunneling support, ExoPlayer is unable to list and select the tunneling decoder properly. For example, the device advertises these two components supporting avc, one without and one with tunneling support:
omx.oem.avc.decoder
and
omx.oem.avc.decoder.tunneled
ExoPlayer isn't able to select the tunneled version of the decoder but can only detect the non-tunneled version.
We believe there are two issues with the current selection logic in ExoPlayer:
- ExoPlayer lists by default the codecs using the 'REGULAR_CODECS' filter and tunneled decoders have to be queried with 'ALL_CODECS' filter. See this in "frameworks/base/media/java/android/media/MediaCodecList.java"
/**
* Use in {@link #MediaCodecList} to enumerate all codecs, even ones that are
* not suitable for regular (buffer-to-buffer) decoding or encoding. These
* include codecs, for example, that only work with special input or output
* surfaces, such as secure-only or tunneled-only codecs.
* /
public static final int ALL_CODECS = 1;
- When more than one decoder supporting the given mime-type is returned in the media codec list, ExoPlayer needs to iterate through the list and pick the one with the tunneling feature enabled. In our devices, the non-tunneled version decoder will be listed first so additional logic needs to be added to pick the tunneled version.
I guess another problem with the existing implementation is that there doesn't seem to be a way to tell ExoPlayer that the app prefers a tunneling decoder if the platform supports it. Having this ability would make it easier for ExoPlayer to adjust the codec selection logic as suggested above.
Reproduction steps
Play any stream with demo app on ExoPlayer v2.9.x
Link to test content
Any content, including the sample streams in the demo app
Version of ExoPlayer being used
ExoPlayer v2.9.x
Device(s) and version(s) of Android being used
Android-P on broadcom reference designs
A full bug report captured from the device
N/A ?