You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is tricky because I think VideoDecoderGLSurfaceView will only receive data from extension video renderers (the vp9 and av1 extensions) as they take a VideoDecoderOutputBufferRenderer, unlike MediaCodecVideoRenderer which just wants a Surface. This is probably why in the second scenario under 'observed behavior' you don't get any output for the first and third videos in the playlist.
For the first scenario, I expect this is running into the limitation quoted on #9459 -- after the extension renderer has rendered via ANativeWindow_lock, MediaCodec can no longer use the output surface.
We heard that the VideoDecoderGLSurfaceView approach gives better performance for the av1 extension so it seems best to try to keep using that for the av1 extension, and find a way to make this work in conjunction with normal SurfaceView rendering with the other playlist items. As an experiment I'd try creating two separate output views, a VideoDecoderGLSurfaceView and a normal SurfaceView then passing the relevant one to the MediaCodecVideoRenderer and the Libgav1VideoRenderer separately (so they each have a different output), then updating the view hierarchy z-order when transitioning between videos. SimpleExoPlayer has code to listen to the surface lifecycle (for surface views) and pass the output Surface to the video renderers, and that needs not to run because it will "overwrite" any surface you've set yourself.
I'll mark this as an enhancement (though I guess it could be considered a bug), to find a way to handle this in the PlayerView but as it's quite a niche use case so I doubt we will get round to it soon.
versions used in tests:
av1
extension compiled on 2021-05-22observed behavior:
using
SimpleExoPlayer
<com.google.android.exoplayer2.ui.PlayerView app:surface_type="surface_view" />
ConcatenatingMediaSource
av1
extension, using:DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON
ConcatenatingMediaSource
playlist contains:av1
extensionav1
extensionav1
extensionSurfaceView
ANativeWindow
using
SimpleExoPlayer
<com.google.android.exoplayer2.ui.PlayerView app:surface_type="video_decoder_gl_surface_view" />
ConcatenatingMediaSource
av1
extension, using:DefaultRenderersFactory.EXTENSION_RENDERER_MODE_ON
ConcatenatingMediaSource
playlist contains:av1
extensionav1
extensionav1
extensionVideoDecoderGLSurfaceView
VideoDecoderGLSurfaceView
VideoDecoderGLSurfaceView
VideoDecoderGLSurfaceView
seems to:ANativeWindow
with theav1
extensionquestion:
ConcatenatingMediaSource
playlist?SurfaceView
for all video formats that don't require theav1
extensionVideoDecoderGLSurfaceView
for video formats that do require theav1
extensionThe text was updated successfully, but these errors were encountered: