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

Video block when switch between two textureViews on Redmi Note 4 #4166

Closed
tuesda opened this issue Apr 23, 2018 · 4 comments
Closed

Video block when switch between two textureViews on Redmi Note 4 #4166

tuesda opened this issue Apr 23, 2018 · 4 comments
Assignees

Comments

@tuesda
Copy link

tuesda commented Apr 23, 2018

Issue description

Video block when switch between two texture views on Redmi Note 4

Reproduction steps

  1. Setup two texture views in a activity
  2. Start play a video with first texture view
  3. Set second texture view as video display view when click second texture view
  4. You will find that audio is normal but frame block for a few seconds

Link to test content

This issue is not related with video content

Version of ExoPlayer being used

ExoPlayer version: 2.7.2 and 2.7.3
but 2.7.1 doesn't have this issue, so I think this issue occur with 2.7.2 firstly

Device(s) and version(s) of Android being used

Redmi Note 4

A full bug report captured from the device

@ojw28
Copy link
Contributor

ojw28 commented Apr 23, 2018

We disabled seamless surface switching on Redmi Note 4 because others were reporting that it caused ANR issues. See #4006 for details. Did surface switching always work reliably for you, on this device?

It may be that we need to target the workaround more specifically to cases where DummySurface is being used, since perhaps that's the only case to which the ANR issue applies.

@ojw28 ojw28 self-assigned this Apr 23, 2018
@tuesda
Copy link
Author

tuesda commented Apr 27, 2018

Thanks for your reply!
Is there a api for checking if the device can seamless switching?
We don't find ANR issues for now.

@tuesda
Copy link
Author

tuesda commented Apr 27, 2018

Is better dispatching a buffer state for devices like Redmi Note 4 when switching surfaces, rather than frame block while audio is normal playing.

Thanks

@ojw28
Copy link
Contributor

ojw28 commented Jul 13, 2018

Is there a api for checking if the device can seamless switching?

No, however:

  • It's not available on any device where Util.SDK_INT < 23.
  • You can look at MediaCodecVideoRenderer.codecNeedsSetOutputSurfaceWorkaround to see where we're disabling it on devices for wihch Util.SDK_INT >= 23.

Is better dispatching a buffer state for devices like Redmi Note 4 when switching surfaces, rather than frame block while audio is normal playing.

You can do this by triggering a seek call on the player at the same time as you swap the surface (the seek call should occur immediately afterwards).

@ojw28 ojw28 closed this as completed Jul 13, 2018
@google google locked and limited conversation to collaborators Nov 23, 2018
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