forked from google/ExoPlayer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support efficient switching between SimpleExoPlayerView instances
Prior to this change, the only way to switch SimpleExoPlayerView was to do: oldView.setPlayer(null); newView.setPlayer(player); This would cause the video renderer to have to transition through oldSurface->noSurface->newSurface, which is inefficient (noSurface requires platform decoders to be fully released). After this change we support: newView.setPlayer(player); oldView.setPlayer(null); This results in direct oldSurface->newSurface transitions, which are seamless on Android M and above. The change also adds some robustness against developers ending up with strange behavior as a result of clearing the player from a view in a different ordering than we expect w.r.t. registering of other listeners. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154044976
- Loading branch information
Showing
2 changed files
with
132 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters