Skip to content

Stream is not playing with tunneling mode enabled #9661

Closed

Description

@mayurk2

Tunneled video playback is not working on my Android TV (Mi 108cm LED TV 4A PRO).
Screen remains black and sometimes audio plays in the background.

The hardware HEVC decoder (OMX.amlogic.hevc.decoder.awesome.secure) supports tunneling. I added some debug logs in MediaCodecUtil.getDecoderInfosInternal() and verified that CodecCapabilities.FEATURE_TunneledPlayback feature is supported.

I checked #2761 but it does not look like the same.

Steps to reproduce the issue:

  1. Enable tunneling in exoplayer.
    In PlayerActivity.java, I enabled tunnelling as below.
      trackSelectionParameters =
          new DefaultTrackSelector.ParametersBuilder(/* context= */ this).setTunnelingEnabled(true).build();
  1. Build and launch the demo app.
  2. Play Widevine DASH (MP4, H265) > HD (cenc)

I see the below logs and I think tunneled mode is enabled correctly.

11-08 14:53:06.073 I/ACodec  ( 7849): Configuring TUNNELED video playback.
11-08 14:53:06.073 D/OmxComponent( 3229): getExtensionIndex 1123 name="OMX.google.android.index.configureVideoTunnelMode"
11-08 14:53:06.073 D/OmxVideoDecoder( 3229): setParameter 921 0x7f000008
11-08 14:53:06.073 I/OmxVideoDecoder( 3229): OmxVideoDecoder::setParameter OMX_IndexAndroidConfigureVideoTunnelMode, enable=1
.
.
.
11-08 14:53:06.126 I/OmxVideoDecoder( 3229): Component Name OMX.amlogic.hevc.decoder.awesome.secure, width 1920, height 856
11-08 14:53:06.127 D/AmlogicVideoDecoderAwesome( 3229): codecInit done
11-08 14:53:06.127 D/OmxComponent( 3229): getExtensionIndex 1123 name="OMX.google.android.index.AndroidNativeBufferConsumerUsage"
11-08 14:53:06.127 D/AmlogicVideoDecoderAwesome( 3229): media.omx.videopeek 0
11-08 14:53:06.127 I/AmlogicVideoDecoderAwesome( 3229): video layer sync version is 3
11-08 14:53:06.127 I/AmlogicVideoDecoderAwesome( 3229): DisplayThread created for tunnel mode

At the beginning of the playback, I see the below error message.

11-08 14:53:06.573 V/AmlogicVideoDecoderAwesome( 3229): csdsize=72
11-08 14:53:06.577 W/        ( 3229): dst is NULL.
11-08 14:53:06.578 E/AmlogicVideoDecoderAwesome( 3229): prepareEsData failed !!!
11-08 14:53:06.580 D/AmlogicVideoDecoderAwesome( 3229): raw data buf is too small, 0 -> 1100
11-08 14:53:06.589 E/secmem_tz( 3229): [Secure_V2_MemFree:829] error return ffff0000

I am not sure if this is the cause of the playback failure. Also I see the below message very frequently in the log.

11-08 14:53:07.232 E/secmem_tz( 3229): [Secure_V2_MemFree:829] error return ffff0000

Here is the complete log: log28_exo_16_tunnel_hevc.txt

Version details:

I would like to know if this is a configuration issue. Also, is there a way to resolve it.

Activity

  1. moneytoo commented on Nov 8, 2021

    @moneytoo
    Contributor

    Possibly related issue about tunneling (H265 content) on Xiaomi device: #9133

  2. christosts commented on Nov 10, 2021

    @christosts
    Contributor

    @krocard can you take a look?

  3. krocard commented on Nov 18, 2021

    @krocard
    Contributor

    Tunneling is known to have many device specific issues and it is rarely possible to work around them. As you pointed out, there seems to be a low level error message.

    Unfortunately, it is risky to use tunneling if the device has not been tested to work with the media. You could keep it as an advance option of your app.

  4. assigned and unassigned on May 12, 2022
  5. tonihei commented on May 13, 2022

    @tonihei
    Collaborator

    As @krocard pointed out above, it's infeasible for us to workaround device-specific tunneling issues, so I'll close this issue. You may want to report this to Xiaomi in case they are interested in fixing this.

  6. locked and limited conversation to collaborators on Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ Proxy