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

Tunneling: Support selection of non-primary tunneling video codecs #3100

Closed
alfonsoramosa opened this issue Jul 26, 2017 · 5 comments
Closed
Assignees
Labels

Comments

@alfonsoramosa
Copy link

I'm trying to enable tunneling on an Android Tv device.

As i know enabling it should be just setting the audio session id with: trackSelector.setTunnelingAudioSessionId(C.generateAudioSessionIdV21(this));
but unfortunately, it won't start the tunneling just by setting this id in this device.

I can find the video_decoder.tunnel.secure decoder when debugging the MediaCodecUtil class. But when requesting the info at: mediacodec.MediaCodecUtil#getDecoderInfo it always returns the first item/decoder from the list which in my case will be video_decoder.secure (not the tunneling one, because it is on the index 1 in the list).

If I force it to use the tunneled one the playback starts.

Is it possible to improve Exoplayer algorithm to select the codec and go through the list of codecs until it finds a codec that supports tunneling instead of supposing that the first one supports tunneling?

The codec that supports tunneling has this tag on the media_codecs.xml file
<Feature name="tunneled-playback" required="true" />

Thanks!

Exoplayer version: 2.2.0
Android version: 7.0

@andrewlewis
Copy link
Collaborator

As a workaround, you can implement a custom MediaCodecSelector that picks the codec you want to use and pass that to the video renderer's constructor.

Please could you attach the media_codecs.xml file so we can take a look? I think normally the tunneling codec is most preferred (and the MediaCodec list should be sorted with the best decoder first). We might want to follow up with the OEM if the order is wrong, so a bug report would also be useful. Thanks!

@alfonsoramosa
Copy link
Author

Here you have the media_codecs.xml

We are trying to play secure avc, so you can see that there are 2 different codecs that support it. Only the second one supports tunneling.

That's the order required by the OEM because it seems that the tunneled codec don't support non tinneling playback. Then if they move it to the first position, the apps that don't use tunneling are not going to work
media_codecs.zip

@ojw28 ojw28 changed the title Tunneling issue - wrong codec selected by Exoplayer Tunneling: Support selection of non-primary tunneled video codecs Jul 31, 2017
@ojw28 ojw28 changed the title Tunneling: Support selection of non-primary tunneled video codecs Tunneling: Support selection of non-primary tunneling video codecs Jul 31, 2017
@andrewlewis andrewlewis assigned ojw28 and unassigned andrewlewis Jan 2, 2018
@ojw28 ojw28 assigned andrewlewis and unassigned ojw28 Jun 6, 2018
@andrewlewis
Copy link
Collaborator

Marking as a bug as it's allowed for decoders to support only tunneled playback.

@GensaGames
Copy link

GensaGames commented Feb 13, 2019

Any updates here? It effects a lot of internal projects to switch from ExoPlayer, or use customized version. Thanks.

@andrewlewis
Copy link
Collaborator

We're hoping to push a fix over the next few weeks.

ojw28 pushed a commit that referenced this issue Apr 13, 2019
Issue: #3100
Issue: #5547
PiperOrigin-RevId: 243181217
@google google locked and limited conversation to collaborators Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants