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
I’m having trouble understanding the behavior of enableDecoderFallback and the specific level at which it operates. Essentially, I want to confirm that enableDecoderFallback is functioning as expected.
Here’s what I did:
I customized demos/main with the following classes:
VideoRendererEventListener (from VideoRendererEventListener): to add logs and monitor behavior when exceptions are thrown.
CustomMediaCodecRenderer (from MediaCodecVideoRenderer): to generate exceptions and examine available decoders.
CustomRendererFactory (from DefaultRenderersFactory): to manage both VideoRendererEventListener and CustomMediaCodecRenderer.
With these helper classes, I performed the following tests:
When I add two CustomMediaCodecRenderer instances at indices 0 and 1, and trigger an exception in index 0 (for example, by having getDecoderInfos() return an empty list), playback fails, and there’s no indication that the player attempts to use index 1.
If I use only one CustomMediaCodecRenderer at index 0 while keeping the hardware decoder selected by the player, playback behaves differently depending on where I place the exception. If I place it in onCodecInitialized, playback continues; however, if I place it in onQueueInputBuffer, playback doesn’t recover (see comments error_1, error_2 in the code).
In each case, logs capture the error but don’t indicate any fallback from hardware to software within the same CustomMediaCodecRenderer. This raises some questions:
How can I confirm that CustomMediaCodecRenderer has indeed switched to a fallback decoder?
Am I triggering the exception incorrectly? Where should it be placed, and why do some exceptions (like those in onQueueInputBuffer) remain unhandled, causing playback to fail?
Hello everyone,
I’m having trouble understanding the behavior of
enableDecoderFallback
and the specific level at which it operates. Essentially, I want to confirm thatenableDecoderFallback
is functioning as expected.Here’s what I did:
I customized
demos/main
with the following classes:VideoRendererEventListener
(fromVideoRendererEventListener
): to add logs and monitor behavior when exceptions are thrown.CustomMediaCodecRenderer
(fromMediaCodecVideoRenderer
): to generate exceptions and examine available decoders.CustomRendererFactory
(fromDefaultRenderersFactory
): to manage bothVideoRendererEventListener
andCustomMediaCodecRenderer
.With these helper classes, I performed the following tests:
CustomMediaCodecRenderer
instances at indices 0 and 1, and trigger an exception in index 0 (for example, by havinggetDecoderInfos()
return an empty list), playback fails, and there’s no indication that the player attempts to use index 1.CustomMediaCodecRenderer
at index 0 while keeping the hardware decoder selected by the player, playback behaves differently depending on where I place the exception. If I place it inonCodecInitialized
, playback continues; however, if I place it inonQueueInputBuffer
, playback doesn’t recover (see commentserror_1
,error_2
in the code).In each case, logs capture the error but don’t indicate any fallback from hardware to software within the same
CustomMediaCodecRenderer
. This raises some questions:CustomMediaCodecRenderer
has indeed switched to a fallback decoder?onQueueInputBuffer
) remain unhandled, causing playback to fail?Thank you for any insights!
Here is my fork with the changes I made
utilities classes:
Change in
PlayerActivity.java
The text was updated successfully, but these errors were encountered: