当前位置: 首页>>代码示例>>Java>>正文


Java PlaybackInfo类代码示例

本文整理汇总了Java中com.google.android.exoplayer2.ExoPlayerImplInternal.PlaybackInfo的典型用法代码示例。如果您正苦于以下问题:Java PlaybackInfo类的具体用法?Java PlaybackInfo怎么用?Java PlaybackInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PlaybackInfo类属于com.google.android.exoplayer2.ExoPlayerImplInternal包,在下文中一共展示了PlaybackInfo类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ExoPlayerImpl

import com.google.android.exoplayer2.ExoPlayerImplInternal.PlaybackInfo; //导入依赖的package包/类
/**
 * Constructs an instance. Must be called from a thread that has an associated {@link Looper}.
 *
 * @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.
 */
@SuppressLint("HandlerLeak")
public ExoPlayerImpl(Renderer[] renderers, TrackSelector trackSelector, LoadControl loadControl) {
  Log.i(TAG, "Init " + ExoPlayerLibraryInfo.VERSION + " [" + Util.DEVICE_DEBUG_INFO + "]");
  Assertions.checkState(renderers.length > 0);
  this.renderers = Assertions.checkNotNull(renderers);
  this.trackSelector = Assertions.checkNotNull(trackSelector);
  this.playWhenReady = false;
  this.playbackState = STATE_IDLE;
  this.listeners = new CopyOnWriteArraySet<>();
  emptyTrackSelections = new TrackSelectionArray(new TrackSelection[renderers.length]);
  timeline = Timeline.EMPTY;
  window = new Timeline.Window();
  period = new Timeline.Period();
  trackGroups = TrackGroupArray.EMPTY;
  trackSelections = emptyTrackSelections;
  eventHandler = new Handler() {
    @Override
    public void handleMessage(Message msg) {
      ExoPlayerImpl.this.handleEvent(msg);
    }
  };
  playbackInfo = new ExoPlayerImplInternal.PlaybackInfo(0, 0);
  internalPlayer = new ExoPlayerImplInternal(renderers, trackSelector, loadControl, playWhenReady,
      eventHandler, playbackInfo, this);
}
 
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:33,代码来源:ExoPlayerImpl.java

示例2: ExoPlayerImpl

import com.google.android.exoplayer2.ExoPlayerImplInternal.PlaybackInfo; //导入依赖的package包/类
/**
 * Constructs an instance. Must be called from a thread that has an associated {@link Looper}.
 *
 * @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.
 */
@SuppressLint("HandlerLeak")
public ExoPlayerImpl(Renderer[] renderers, TrackSelector<?> trackSelector,
    LoadControl loadControl) {
  Log.i(TAG, "Init " + ExoPlayerLibraryInfo.VERSION);
  Assertions.checkNotNull(renderers);
  Assertions.checkState(renderers.length > 0);
  this.playWhenReady = false;
  this.playbackState = STATE_IDLE;
  this.listeners = new CopyOnWriteArraySet<>();
  window = new Timeline.Window();
  period = new Timeline.Period();
  eventHandler = new Handler() {
    @Override
    public void handleMessage(Message msg) {
      ExoPlayerImpl.this.handleEvent(msg);
    }
  };
  playbackInfo = new ExoPlayerImplInternal.PlaybackInfo(0, 0);
  internalPlayer = new ExoPlayerImplInternal<>(renderers, trackSelector, loadControl,
      playWhenReady, eventHandler, playbackInfo);
}
 
开发者ID:zhanglibin123488,项目名称:videoPickPlayer,代码行数:29,代码来源:ExoPlayerImpl.java

示例3: ExoPlayerImpl

import com.google.android.exoplayer2.ExoPlayerImplInternal.PlaybackInfo; //导入依赖的package包/类
/**
 * Constructs an instance. Must be called from a thread that has an associated {@link Looper}.
 *
 * @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.
 */
@SuppressLint("HandlerLeak")
public ExoPlayerImpl(Renderer[] renderers, TrackSelector trackSelector, LoadControl loadControl) {
  Log.i(TAG, "Init " + ExoPlayerLibraryInfo.VERSION_SLASHY + " [" + Util.DEVICE_DEBUG_INFO + "]");
  Assertions.checkState(renderers.length > 0);
  this.renderers = Assertions.checkNotNull(renderers);
  this.trackSelector = Assertions.checkNotNull(trackSelector);
  this.playWhenReady = false;
  this.playbackState = STATE_IDLE;
  this.listeners = new CopyOnWriteArraySet<>();
  emptyTrackSelections = new TrackSelectionArray(new TrackSelection[renderers.length]);
  timeline = Timeline.EMPTY;
  window = new Timeline.Window();
  period = new Timeline.Period();
  trackGroups = TrackGroupArray.EMPTY;
  trackSelections = emptyTrackSelections;
  playbackParameters = PlaybackParameters.DEFAULT;
  Looper eventLooper = Looper.myLooper() != null ? Looper.myLooper() : Looper.getMainLooper();
  eventHandler = new Handler(eventLooper) {
    @Override
    public void handleMessage(Message msg) {
      ExoPlayerImpl.this.handleEvent(msg);
    }
  };
  playbackInfo = new ExoPlayerImplInternal.PlaybackInfo(0, 0);
  internalPlayer = new ExoPlayerImplInternal(renderers, trackSelector, loadControl, playWhenReady,
      eventHandler, playbackInfo, this);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:35,代码来源:ExoPlayerImpl.java


注:本文中的com.google.android.exoplayer2.ExoPlayerImplInternal.PlaybackInfo类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。