Skip to content

[video_player_android] Modify to use handlesCropAndRotation to detect the SurfaceTexture Impeller backend #9107

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

camsim99
Copy link
Contributor

@camsim99 camsim99 commented Apr 17, 2025

Changes SDK version check to a call to SurfaceProducer.handlesCropAndRotation to determine which Impeller backend is used for the Texture based video player and thus, what rotation correction to apply to correct the rotation of the video.

Fixes flutter/flutter#157198.

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@camsim99 camsim99 marked this pull request as ready for review April 28, 2025 18:49
@camsim99 camsim99 requested a review from a team April 28, 2025 18:50
@camsim99 camsim99 changed the title [video_player_android] Modify to use handlesCropAndRotation to detect the SurfaceTexture Impeller backend [video_player_android] Modify to use handlesCropAndRotation to detect the SurfaceTexture Impeller backend Apr 28, 2025
Copy link
Member

@gmackall gmackall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/ nits

eventListener = new TextureExoPlayerEventListener(mockExoPlayer, mockCallbacks);
@Test
@Config(maxSdk = 21)
public void onPlaybackStateChangedReadySendInitialized_belowAndroid21() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this is actually exactly Android21 right, not below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is right because we are testing the sdk <= 21 case, but if I'm missing something, let me know!

…va/io/flutter/plugins/videoplayer/texture/TextureVideoPlayer.java

Co-authored-by: Gray Mackall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[video_player_android] Use handlesCropAndRotation to detect the SurfaceTexture Impeller backend
2 participants