Java 类com.google.android.exoplayer2.util.StandaloneMediaClock 实例源码

项目:Exoplayer2Radio    文件:ExoPlayerImplInternal.java   
public ExoPlayerImplInternal(Renderer[] renderers, TrackSelector trackSelector,
    LoadControl loadControl, boolean playWhenReady, Handler eventHandler,
    PlaybackInfo playbackInfo, ExoPlayer player) {
  this.renderers = renderers;
  this.trackSelector = trackSelector;
  this.loadControl = loadControl;
  this.playWhenReady = playWhenReady;
  this.eventHandler = eventHandler;
  this.state = ExoPlayer.STATE_IDLE;
  this.playbackInfo = playbackInfo;
  this.player = player;

  rendererCapabilities = new RendererCapabilities[renderers.length];
  for (int i = 0; i < renderers.length; i++) {
    renderers[i].setIndex(i);
    rendererCapabilities[i] = renderers[i].getCapabilities();
  }
  standaloneMediaClock = new StandaloneMediaClock();
  enabledRenderers = new Renderer[0];
  window = new Timeline.Window();
  period = new Timeline.Period();
  trackSelector.init(this);
  playbackParameters = PlaybackParameters.DEFAULT;

  // Note: The documentation for Process.THREAD_PRIORITY_AUDIO that states "Applications can
  // not normally change to this priority" is incorrect.
  internalPlaybackThread = new HandlerThread("ExoPlayerImplInternal:Handler",
      Process.THREAD_PRIORITY_AUDIO);
  internalPlaybackThread.start();
  handler = new Handler(internalPlaybackThread.getLooper(), this);
}
项目:K-Sonic    文件:ExoPlayerImplInternal.java   
public ExoPlayerImplInternal(Renderer[] renderers, TrackSelector trackSelector,
    LoadControl loadControl, boolean playWhenReady, Handler eventHandler,
    PlaybackInfo playbackInfo, ExoPlayer player) {
  this.renderers = renderers;
  this.trackSelector = trackSelector;
  this.loadControl = loadControl;
  this.playWhenReady = playWhenReady;
  this.eventHandler = eventHandler;
  this.state = ExoPlayer.STATE_IDLE;
  this.playbackInfo = playbackInfo;
  this.player = player;

  rendererCapabilities = new RendererCapabilities[renderers.length];
  for (int i = 0; i < renderers.length; i++) {
    renderers[i].setIndex(i);
    rendererCapabilities[i] = renderers[i].getCapabilities();
  }
  standaloneMediaClock = new StandaloneMediaClock();
  enabledRenderers = new Renderer[0];
  window = new Timeline.Window();
  period = new Timeline.Period();
  trackSelector.init(this);

  // Note: The documentation for Process.THREAD_PRIORITY_AUDIO that states "Applications can
  // not normally change to this priority" is incorrect.
  internalPlaybackThread = new PriorityHandlerThread("ExoPlayerImplInternal:Handler",
      Process.THREAD_PRIORITY_AUDIO);
  internalPlaybackThread.start();
  handler = new Handler(internalPlaybackThread.getLooper(), this);
}
项目:videoPickPlayer    文件:ExoPlayerImplInternal.java   
public ExoPlayerImplInternal(Renderer[] renderers, TrackSelector<T> trackSelector,
    LoadControl loadControl, boolean playWhenReady, Handler eventHandler,
    PlaybackInfo playbackInfo) {
  this.renderers = renderers;
  this.trackSelector = trackSelector;
  this.loadControl = loadControl;
  this.playWhenReady = playWhenReady;
  this.eventHandler = eventHandler;
  this.state = ExoPlayer.STATE_IDLE;
  this.playbackInfo = playbackInfo;

  rendererCapabilities = new RendererCapabilities[renderers.length];
  for (int i = 0; i < renderers.length; i++) {
    renderers[i].setIndex(i);
    rendererCapabilities[i] = renderers[i].getCapabilities();
  }
  standaloneMediaClock = new StandaloneMediaClock();
  enabledRenderers = new Renderer[0];
  window = new Timeline.Window();
  period = new Timeline.Period();
  trackSelector.init(this);

  // Note: The documentation for Process.THREAD_PRIORITY_AUDIO that states "Applications can
  // not normally change to this priority" is incorrect.
  internalPlaybackThread = new PriorityHandlerThread("ExoPlayerImplInternal:Handler",
      Process.THREAD_PRIORITY_AUDIO);
  internalPlaybackThread.start();
  handler = new Handler(internalPlaybackThread.getLooper(), this);
}
项目:transistor    文件:ExoPlayerImplInternal.java   
public ExoPlayerImplInternal(Renderer[] renderers, TrackSelector trackSelector,
    LoadControl loadControl, boolean playWhenReady, @Player.RepeatMode int repeatMode,
    boolean shuffleModeEnabled, Handler eventHandler, ExoPlayer player) {
  this.renderers = renderers;
  this.trackSelector = trackSelector;
  this.loadControl = loadControl;
  this.playWhenReady = playWhenReady;
  this.repeatMode = repeatMode;
  this.shuffleModeEnabled = shuffleModeEnabled;
  this.eventHandler = eventHandler;
  this.state = Player.STATE_IDLE;
  this.player = player;

  playbackInfo = new PlaybackInfo(null, null, 0, C.TIME_UNSET);
  rendererCapabilities = new RendererCapabilities[renderers.length];
  for (int i = 0; i < renderers.length; i++) {
    renderers[i].setIndex(i);
    rendererCapabilities[i] = renderers[i].getCapabilities();
  }
  standaloneMediaClock = new StandaloneMediaClock();
  enabledRenderers = new Renderer[0];
  window = new Timeline.Window();
  period = new Timeline.Period();
  mediaPeriodInfoSequence = new MediaPeriodInfoSequence();
  trackSelector.init(this);
  playbackParameters = PlaybackParameters.DEFAULT;

  // Note: The documentation for Process.THREAD_PRIORITY_AUDIO that states "Applications can
  // not normally change to this priority" is incorrect.
  internalPlaybackThread = new HandlerThread("ExoPlayerImplInternal:Handler",
      Process.THREAD_PRIORITY_AUDIO);
  internalPlaybackThread.start();
  handler = new Handler(internalPlaybackThread.getLooper(), this);
}