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

Widevine L1 DRM with GPU processing (Android N 7.1.1) #3373

Closed
RogerDass opened this issue Oct 19, 2017 · 6 comments
Closed

Widevine L1 DRM with GPU processing (Android N 7.1.1) #3373

RogerDass opened this issue Oct 19, 2017 · 6 comments

Comments

@RogerDass
Copy link

RogerDass commented Oct 19, 2017

Hello!

I'm having a hard time finding a working solution for this after a lot of searching...

test device: Samsung Galaxy Note 8 (SM-N950U)
Android version: 7.1.1
ExoPlayer version: 2.5.3

I'm trying to run an OpenGL ES 2.0 shader on WV L1 DRM protected video via SurfaceTexture which should be supported according to: https://source.android.com/devices/graphics/arch-st
I've overridden the context and window surface creation factories for the GLSurfaceView:

public EGLContext createContext(EGL10 egl, EGLDisplay display, EGLConfig eglConfig) {
        Log.v(TAG, "creating OpenGL ES 2.0 context");
        int[] attrib_list = {
                EGL_CONTEXT_CLIENT_VERSION, 2,
                EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE,
                EGL10.EGL_NONE };
        EGLContext context = egl.eglCreateContext(display, eglConfig, EGL10.EGL_NO_CONTEXT, attrib_list);
        if (context == EGL10.EGL_NO_CONTEXT) {
            Log.e(TAG, "Error creating EGL context.");
        }
        checkEglError("eglCreateContext", egl);
        return context;
}
public EGLSurface createWindowSurface(final EGL10 egl, final EGLDisplay display, final EGLConfig config, final Object nativeWindow) {
        final int[] surfaceAttribs = {
                //EGL10.EGL_RENDER_BUFFER, EGL10.EGL_SINGLE_BUFFER,
                EGL_PROTECTED_CONTENT_EXT, EGL14.EGL_TRUE,
                EGL10.EGL_NONE
        };
        try {
            m_surface = egl.eglCreateWindowSurface(display, config, nativeWindow, surfaceAttribs);
            checkEglError("eglCreateWindowSurface", egl);

        } catch (IllegalArgumentException e) {
            Log.e(TAG, "eglCreateWindowSurface ", e);
        }
        return m_surface;
}

the extensions above are defined as:

    public static int EGL_PROTECTED_CONTENT_EXT = 0x32c0;
    public static int EGL_CONTEXT_CLIENT_VERSION = 0x3098;

When the above surface is created (from within onSurfaceChanged()) I create SurfaceTexture using an OpenGL texture marked as protected as follows:

int[] textures = new int[1];

// create video texture
GLES20.glGenTextures(1, textures, 0);
m_videoTexture = textures[0];
Log.v(TAG, "PLAYER onSurfaceChanged(): Video texture id:" + m_videoTexture);
GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, m_videoTexture);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GL_TEXTURE_PROTECTED_EXT, GLES20.GL_TRUE);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S, GLES20.GL_CLAMP_TO_EDGE);
GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T, GLES20.GL_CLAMP_TO_EDGE);
GLES20.glBindTexture(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, 0);

I get this error when trying to play Secure path required content:

E/SurfaceUtils: native window could not be authenticated
10-18 15:26:11.357 20572-21806/com.leialoft.mediaplayer E/ACodec: Failed to allocate buffers after transitioning to IDLE state (error 0xffffffff)
10-18 15:26:11.357 20572-21806/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x80001001, internalError -1)
10-18 15:26:11.358 20572-21805/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0xffffffff, actionCode 0, while in state 5
10-18 15:26:11.361 20572-21729/com.leialoft.mediaplayer E/ExoPlayerImplInternal: Renderer error.
                                                                                 com.google.android.exoplayer2.ExoPlaybackException
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:395)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:382)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:814)
                                                                                     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:435)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:513)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:574)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                     at android.os.Looper.loop(Looper.java:154)
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61)
                                                                                  Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.vp9.secure, Format(1, null, video/x-vnd.on2.vp9, 3904530, null, [1280, 570, 23.809525], [-1, -1])
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:382) 
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:814) 
                                                                                     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:435) 
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:513) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:574) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350) 
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                     at android.os.Looper.loop(Looper.java:154) 
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                                                  Caused by: android.media.MediaCodec$CodecException: start failed
                                                                                     at android.media.MediaCodec.native_start(Native Method)
                                                                                     at android.media.MediaCodec.start(MediaCodec.java:1991)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:374)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:814) 
                                                                                     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:435) 
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:513) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:574) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350) 
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                     at android.os.Looper.loop(Looper.java:154) 
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61) 
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer I/ACodec: [OMX.qcom.video.decoder.vp9.secure] Now Loaded
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x80001012)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x80001012, internalError -2147483648)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-18 15:26:11.362 20572-21806/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)

I suspect the Surface/SurfaceTexture isn't being created with the GRALLOC_USAGE_PROTECTED bit set. I'm not sure if this is needed, or how to have the Surface or GLSurfaceView created that way. What am I doing wrong?

@ojw28
Copy link
Contributor

ojw28 commented Oct 19, 2017

Can you try outputting to a secure DummySurface (this is a class in the ExoPlayer library) on this device. If that gives you the same error, then I think it's a platform issue. We disabled DummySurface on Samsung devices for API level 24 because we saw this, but I think your device is API level 25. If it's still broken we might need to disable it there too.

If playback to a secure DummySurface doesn't give you the error, then it's likely something your code is doing wrong. You might find some inspiration in the DummySurface code, if that's the case.

Please let us know what you find out!

[Internal ref: 67367376]

@RogerDass
Copy link
Author

Hello again and thanks a lot for your quick response!

I tried to replace my SurfaceTexture, which I supply to ExoPlayer, with a secure DummySurface, but it seems I get the same error...

Do you think creating my own native subclass of SurfaceTexture where I set the GRALLOC secure bit myself will help? I will be testing with a Pixel 2 starting Monday. Hopefully that will get me past this.

10-20 10:32:18.410 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: CODEC: codec name: OMX.qcom.video.decoder.vp9.secure
10-20 10:32:18.410 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: CODEC: secure support: true
10-20 10:32:18.410 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: CODEC: tunneling support: false
10-20 10:32:18.537 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: DRM: Security property string:L1
10-20 10:32:18.539 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: DRM: using widevine L1 DRM Scheme.
10-20 10:32:18.660 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: PLAYER loadURI(): creating OpenGL surface
10-20 10:32:18.672 15629-17223/com.leialoft.mediaplayer V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
10-20 10:32:18.672 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: Dummy Surface - isSecureSupported:true
10-20 10:32:18.684 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: PLAYER loadURI(): creating player instance
10-20 10:32:18.706 15629-17077/com.leialoft.mediaplayer I/ExoPlayerImpl: Init 1f2a87f [ExoPlayerLib/2.5.3] [greatqlte, SM-N950U, samsung, 25]
10-20 10:32:18.711 15629-17077/com.leialoft.mediaplayer V/VideoSurfaceRenderer: PLAYER loadURI(): playing...
10-20 10:32:18.723 15629-17229/com.leialoft.mediaplayer D/NetworkSecurityConfig: No Network Security Config specified, using platform default
10-20 10:32:18.727 15629-15629/com.leialoft.mediaplayer D/ViewRootImpl@463ce9b[MainActivity]: MSG_RESIZED_REPORT: frame=Rect(0, 0 - 2960, 1440) ci=Rect(0, 84 - 0, 0) vi=Rect(0, 84 - 0, 0) or=2
10-20 10:32:18.727 15629-15629/com.leialoft.mediaplayer D/ViewRootImpl@463ce9b[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1
10-20 10:32:18.727 15629-15629/com.leialoft.mediaplayer D/ViewRootImpl@463ce9b[MainActivity]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true 548367893504}
10-20 10:32:18.728 15629-15629/com.leialoft.mediaplayer V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@3dc2903 nm : com.leialoft.mediaplayer ic=null
10-20 10:32:18.728 15629-15629/com.leialoft.mediaplayer I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
10-20 10:32:18.729 15629-17229/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:18.730 15629-17229/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:18.736 15629-17229/com.leialoft.mediaplayer D/TcpOptimizer: TcpOptimizer-ON
10-20 10:32:18.741 15629-15642/com.leialoft.mediaplayer D/InputTransport: Input channel constructed: fd=110
10-20 10:32:18.750 15629-15629/com.leialoft.mediaplayer V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@6e525f nm : com.leialoft.mediaplayer ic=null
10-20 10:32:19.182 15629-15634/com.leialoft.mediaplayer I/art: Do partial code cache collection, code=29KB, data=28KB
10-20 10:32:19.182 15629-15634/com.leialoft.mediaplayer I/art: After code cache collection, code=29KB, data=28KB
10-20 10:32:19.182 15629-15634/com.leialoft.mediaplayer I/art: Increasing code cache capacity to 128KB
10-20 10:32:19.290 15629-17247/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.290 15629-17247/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.292 15629-17246/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.292 15629-17246/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.448 15629-17246/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.448 15629-17246/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.495 15629-17247/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.496 15629-17247/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.659 15629-15634/com.leialoft.mediaplayer I/art: Do partial code cache collection, code=61KB, data=52KB
10-20 10:32:19.659 15629-15634/com.leialoft.mediaplayer I/art: After code cache collection, code=61KB, data=52KB
10-20 10:32:19.660 15629-15634/com.leialoft.mediaplayer I/art: Increasing code cache capacity to 256KB
10-20 10:32:19.793 15629-17265/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.793 15629-17228/com.leialoft.mediaplayer I/ACodec:  [] Now uninitialized
10-20 10:32:19.793 15629-17265/com.leialoft.mediaplayer I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
10-20 10:32:19.794 15629-17277/com.leialoft.mediaplayer I/ACodec: [] onAllocateComponent
10-20 10:32:19.796 15629-17277/com.leialoft.mediaplayer I/OMXClient: MuxOMX ctor
10-20 10:32:19.798 15629-17277/com.leialoft.mediaplayer I/ACodec: [OMX.google.vorbis.decoder] Now Loaded
10-20 10:32:19.800 15629-17277/com.leialoft.mediaplayer I/ACodec: [OMX.google.vorbis.decoder] Now Loaded->Idle
10-20 10:32:19.810 15629-17277/com.leialoft.mediaplayer I/ACodec: [OMX.google.vorbis.decoder] Now Idle->Executing
10-20 10:32:19.811 15629-17277/com.leialoft.mediaplayer I/ACodec: [OMX.google.vorbis.decoder] Now Executing
10-20 10:32:19.817 15629-17277/com.leialoft.mediaplayer I/ACodec: [OMX.google.vorbis.decoder] Now handling output port settings change
10-20 10:32:19.823 15629-17277/com.leialoft.mediaplayer I/ACodec: [OMX.google.vorbis.decoder] Now Executing
10-20 10:32:19.826 15629-17228/com.leialoft.mediaplayer I/ACodec:  [] Now uninitialized
10-20 10:32:19.826 15629-17283/com.leialoft.mediaplayer I/ACodec: [] onAllocateComponent
10-20 10:32:19.827 15629-17283/com.leialoft.mediaplayer I/OMXClient: MuxOMX ctor
10-20 10:32:19.855 15629-17283/com.leialoft.mediaplayer I/ACodec: [OMX.qcom.video.decoder.vp9.secure] Now Loaded
10-20 10:32:19.857 15629-17228/com.leialoft.mediaplayer V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
10-20 10:32:19.857 15629-17228/com.leialoft.mediaplayer I/MediaCodec: [15629] init()
10-20 10:32:19.857 15629-17228/com.leialoft.mediaplayer I/MediaCodec: new RemoteDisplayInterface(mReflector)++
10-20 10:32:19.859 15629-17228/com.leialoft.mediaplayer I/MediaCodec: new RemoteDisplayInterface(mReflector)--
10-20 10:32:19.859 15629-17282/com.leialoft.mediaplayer I/MediaCodec: [OMX.qcom.video.decoder.vp9.secure] setting surface generation to 16004097
10-20 10:32:19.859 15629-17283/com.leialoft.mediaplayer I/ACodec: get current pid
10-20 10:32:19.860 15629-17283/com.leialoft.mediaplayer I/ACodec: app-pid : 15629
10-20 10:32:19.866 15629-17283/com.leialoft.mediaplayer I/ACodec: [OMX.qcom.video.decoder.vp9.secure] OMX_QCOM_FramePacking_OnlyOneCompleteFrame is setting
10-20 10:32:19.867 15629-17283/com.leialoft.mediaplayer I/SmartFittingClass: Create SmartFitting Version 1.0
10-20 10:32:19.867 15629-17283/com.leialoft.mediaplayer I/SmartFittingClass: Init!!
10-20 10:32:19.872 15629-17283/com.leialoft.mediaplayer I/ACodec: [OMX.qcom.video.decoder.vp9.secure] Now Loaded->Idle
10-20 10:32:19.887 15629-17288/com.leialoft.mediaplayer I/CodecSolutionManager: startSmartFittingService
10-20 10:32:20.003 15629-17283/com.leialoft.mediaplayer I/SurfaceUtils: setNativeWindowSizeFormatAndUsage isNormalDrm 0 value 0
10-20 10:32:20.003 15629-17283/com.leialoft.mediaplayer E/SurfaceUtils: native window could not be authenticated
10-20 10:32:20.003 15629-17283/com.leialoft.mediaplayer E/ACodec: Failed to allocate buffers after transitioning to IDLE state (error 0xffffffff)
10-20 10:32:20.003 15629-17283/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x80001001, internalError -1)
10-20 10:32:20.003 15629-17282/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0xffffffff, actionCode 0, while in state 5
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer I/ACodec: [OMX.qcom.video.decoder.vp9.secure] Now Loaded
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x80001012)
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x80001012, internalError -2147483648)
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-20 10:32:20.005 15629-17282/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0x80001012, actionCode 0, while in state 0
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)
10-20 10:32:20.005 15629-17282/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0x8000101c, actionCode 0, while in state 0
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: [OMX.qcom.video.decoder.vp9.secure] ERROR(0x8000101c)
10-20 10:32:20.005 15629-17282/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0x8000101c, actionCode 0, while in state 0
10-20 10:32:20.005 15629-17283/com.leialoft.mediaplayer E/ACodec: signalError(omxError 0x8000101c, internalError -2147483648)
10-20 10:32:20.005 15629-17282/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0x8000101c, actionCode 0, while in state 0
10-20 10:32:20.005 15629-17282/com.leialoft.mediaplayer E/MediaCodec: Codec reported err 0x8000101c, actionCode 0, while in state 0
10-20 10:32:20.012 15629-17228/com.leialoft.mediaplayer E/ExoPlayerImplInternal: Renderer error.
                                                                                 com.google.android.exoplayer2.ExoPlaybackException
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:395)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:382)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:814)
                                                                                     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:435)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:513)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:574)
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98)
                                                                                     at android.os.Looper.loop(Looper.java:154)
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61)
                                                                                  Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.vp9.secure, Format(1, null, video/x-vnd.on2.vp9, 3904530, null, [1280, 570, 23.809525], [-1, -1])
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:382) 
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:814) 
                                                                                     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:435) 
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:513) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:574) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350) 
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                     at android.os.Looper.loop(Looper.java:154) 
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61) 
                                                                                  Caused by: android.media.MediaCodec$CodecException: start failed
                                                                                     at android.media.MediaCodec.native_start(Native Method)
                                                                                     at android.media.MediaCodec.start(MediaCodec.java:1991)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:374)
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:814) 
                                                                                     at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:435) 
                                                                                     at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:513) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:574) 
                                                                                     at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:350) 
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:98) 
                                                                                     at android.os.Looper.loop(Looper.java:154) 
                                                                                     at android.os.HandlerThread.run(HandlerThread.java:61) 
10-20 10:32:20.013 15629-17283/com.leialoft.mediaplayer I/SmartFittingClass: ShutDownSmartFitting!!```

@ojw28
Copy link
Contributor

ojw28 commented Oct 20, 2017

I'm not sure! I somewhat doubt it though; I suspect the platform needs to be the one setting the bit. Please let us know what you find out. Including whether your existing code works on Pixel, which would help confirm this as a device specific issue.

@RogerDass
Copy link
Author

Hello again,

I can now confirm that my protected GPU video rendering path does work on a Google Pixel 2 XL, but not on the Samsung Galaxy Note 8. I haven't tested on more Google and Samsung devices, but this leads me to believe that Samsung doesn't fully support the protected GPU path.

@ojw28
Copy link
Contributor

ojw28 commented Oct 25, 2017

Thanks for the update. I think you're right. We'll disable use of DummySurface for Samsung devices running API level 25 as well.

ojw28 added a commit that referenced this issue Oct 27, 2017
Issue: #3373

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=173381588
@ojw28
Copy link
Contributor

ojw28 commented Nov 1, 2017

This is a device specific issue not under our control, so closing.

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

2 participants