Ejemplo n.º 1
0
 public void prepare() {
   if (rendererBuildingState == RENDERER_BUILDING_STATE_BUILT) {
     player.stop();
   }
   rendererBuilder.cancel();
   videoFormat = null;
   videoRenderer = null;
   rendererBuildingState = RENDERER_BUILDING_STATE_BUILDING;
   maybeReportPlayerState();
   rendererBuilder.buildRenderers(this);
 }
 @Override
 public void onPause() {
   super.onPause();
   if (mPlayer != null) {
     mPlayer.stop();
     mPlayerPosition = mPlayer.getCurrentPosition();
     mPlayer.release();
     mPlayer = null;
   }
   mCallback = null;
   mVideoRenderer = null;
   mShutter.setVisibility(View.VISIBLE);
 }
Ejemplo n.º 3
0
  public void prepare() {
    if (prepared || rendererBuilder == null) {
      return;
    }

    if (rendererBuildingState == RenderBuildingState.BUILT) {
      player.stop();
    }

    if (builderCallback != null) {
      builderCallback.cancel();
    }

    rendererBuildingState = RenderBuildingState.BUILDING;
    reportPlayerState();
    builderCallback = new InternalRendererBuilderCallback();
    rendererBuilder.buildRenderers(this, builderCallback);

    prepared = true;
  }
Ejemplo n.º 4
0
 @Override
 protected void doActionImpl(ExoPlayer player) {
   player.stop();
 }