-
Notifications
You must be signed in to change notification settings - Fork 6k
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 on API >= 23 does not start renderer #2985
Comments
Quick addition, an alternative patch might be to include
|
got the same problem on some android tv devices using MStar6A938 chip |
I've been experiencing the same issue on Sony and Philips TVs running Android TV 6.0. Funnily enough, it worked on Nvidia Shield TV, both the 2015 and 2017 versions. |
Thanks for reporting this. Your suggested fix to |
Issue: #2985 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=160827532
We've merged a fix into |
Issue description
Tunneled playback does not start on (at least some) API >= 23 Devices and the player stays in buffering state.
It looks to me like the
MediaCodec.OnFrameRenderedListener
that is used on API >=23 to triggermaybeNotifyRenderedFirstFrame()
is not triggered if theAudioTrack
is not started. That in turn causes video render to report that it is not ready sinceisReady()
relies on therenderedFirstFrame
when in tunneling mode, causing the renders not to be enabled, which means theAudioTrack
is never started and the player stays in buffering state.An easy fix to confirm the issue was to use the < 23 behaviour and call
maybeNotifyRenderedFirstFrame()
inonQueueInputBuffer
of theMediaCodecVideoRenderer
, i.e:Please note that with the fix above, the attached
OnFrameRenderedListener
is indeed triggered, so it's not that the listener is not working at all, it just seems that on the devices I tested, the tunneling implementation is indeed waiting for the first AV sync header on the AudioTrack before rendering the first frame and triggering the listener, hence it seems like this can not be used reliably as a first frame indicator.Maybe I missed something or maybe there is a better workaround, but to me it would make sense to remove the listener approach and fallback to the <23 behaviour and trigger the first frame notification when input is queued and tunneling is enabled. I'd appreciate any thoughts on this and I'm happy to prepare a PR for any potential fix.
Reproduction steps
Enable tunneling in the Demo Application and try to play any of the demo content on an API >= 23 device.
Link to test content
Can be reproduced with any of the demo content
Version of ExoPlayer being used
Tested and reproduces with 2.4.2 and dev-v2 commit 8af77ac
Device(s) and version(s) of Android being used
The devices I could reproduce this with is a Sony Bravia 4K 2015 (API 23) and a Technicolor Skipper (API 23).
A full bug report captured from the device
Happy to send one if it is required for this issue
The text was updated successfully, but these errors were encountered: