Commit ccd05cbd by tonihei Committed by Oliver Woodman

Add fake simple exo player.

This implementation runs as fast as possible by triggering a simplified
playback loop continuously without waiting. The class only supports a basic
use case with a single-period timeline, no timeline update, no seeks or other
user-initiated actions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164120420
parent 6f7dc974
...@@ -141,7 +141,7 @@ public class SimpleExoPlayer implements ExoPlayer { ...@@ -141,7 +141,7 @@ public class SimpleExoPlayer implements ExoPlayer {
videoScalingMode = C.VIDEO_SCALING_MODE_DEFAULT; videoScalingMode = C.VIDEO_SCALING_MODE_DEFAULT;
// Build the player and associated objects. // Build the player and associated objects.
player = new ExoPlayerImpl(renderers, trackSelector, loadControl); player = createExoPlayerImpl(renderers, trackSelector, loadControl);
} }
/** /**
...@@ -722,6 +722,19 @@ public class SimpleExoPlayer implements ExoPlayer { ...@@ -722,6 +722,19 @@ public class SimpleExoPlayer implements ExoPlayer {
// Internal methods. // Internal methods.
/**
* Creates the ExoPlayer implementation used by this {@link SimpleExoPlayer}.
*
* @param renderers The {@link Renderer}s that will be used by the instance.
* @param trackSelector The {@link TrackSelector} that will be used by the instance.
* @param loadControl The {@link LoadControl} that will be used by the instance.
* @return A new {@link ExoPlayer} instance.
*/
protected ExoPlayer createExoPlayerImpl(Renderer[] renderers, TrackSelector trackSelector,
LoadControl loadControl) {
return new ExoPlayerImpl(renderers, trackSelector, loadControl);
}
private void removeSurfaceCallbacks() { private void removeSurfaceCallbacks() {
if (textureView != null) { if (textureView != null) {
if (textureView.getSurfaceTextureListener() != componentListener) { if (textureView.getSurfaceTextureListener() != componentListener) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment