• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java RandomTrackSelection类的典型用法和代码示例

java 2次浏览

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

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

示例1: updateViews

点赞 3

import com.google.android.exoplayer2.trackselection.RandomTrackSelection; //导入依赖的package包/类
private void updateViews() {
  disableView.setChecked(isDisabled);
  defaultView.setChecked(!isDisabled && override == null);
  for (int i = 0; i < trackViews.length; i++) {
    for (int j = 0; j < trackViews[i].length; j++) {
      trackViews[i][j].setChecked(override != null && override.groupIndex == i
          && override.containsTrack(j));
    }
  }
  if (enableRandomAdaptationView != null) {
    boolean enableView = !isDisabled && override != null && override.length > 1;
    enableRandomAdaptationView.setEnabled(enableView);
    enableRandomAdaptationView.setFocusable(enableView);
    if (enableView) {
      enableRandomAdaptationView.setChecked(!isDisabled
          && override.factory instanceof RandomTrackSelection.Factory);
    }
  }
}
 

开发者ID:ashwanijanghu,
项目名称:ExoPlayer-Offline,
代码行数:20,
代码来源:TrackSelectionHelper.java

示例2: selectTracks

点赞 3

import com.google.android.exoplayer2.trackselection.RandomTrackSelection; //导入依赖的package包/类
@Override
protected TrackSelection[] selectTracks(RendererCapabilities[] rendererCapabilities,
    TrackGroupArray[] rendererTrackGroupArrays, int[][][] rendererFormatSupports)
    throws ExoPlaybackException {
  Assertions.checkState(rendererCapabilities[VIDEO_RENDERER_INDEX].getTrackType()
      == C.TRACK_TYPE_VIDEO);
  Assertions.checkState(rendererCapabilities[AUDIO_RENDERER_INDEX].getTrackType()
      == C.TRACK_TYPE_AUDIO);
  Assertions.checkState(rendererTrackGroupArrays[VIDEO_RENDERER_INDEX].length == 1);
  Assertions.checkState(rendererTrackGroupArrays[AUDIO_RENDERER_INDEX].length == 1);
  TrackSelection[] selections = new TrackSelection[rendererCapabilities.length];
  selections[VIDEO_RENDERER_INDEX] = new RandomTrackSelection(
      rendererTrackGroupArrays[VIDEO_RENDERER_INDEX].get(0),
      getVideoTrackIndices(rendererTrackGroupArrays[VIDEO_RENDERER_INDEX].get(0),
          rendererFormatSupports[VIDEO_RENDERER_INDEX][0], videoFormatIds,
          canIncludeAdditionalVideoFormats),
      0 /* seed */);
  selections[AUDIO_RENDERER_INDEX] = new FixedTrackSelection(
      rendererTrackGroupArrays[AUDIO_RENDERER_INDEX].get(0),
      getTrackIndex(rendererTrackGroupArrays[AUDIO_RENDERER_INDEX].get(0), audioFormatId));
  includedAdditionalVideoFormats =
      selections[VIDEO_RENDERER_INDEX].length() > videoFormatIds.length;
  return selections;
}
 

开发者ID:ashwanijanghu,
项目名称:ExoPlayer-Offline,
代码行数:25,
代码来源:DashTest.java

示例3: updateViews

点赞 3

import com.google.android.exoplayer2.trackselection.RandomTrackSelection; //导入依赖的package包/类
private void updateViews() {
    disableView.setChecked(isDisabled);
    defaultView.setChecked(!isDisabled && override == null);
    for (int i = 0; i < trackViews.length; i++) {
        for (int j = 0; j < trackViews[i].length; j++) {
            trackViews[i][j].setChecked(override != null && override.groupIndex == i
                    && override.containsTrack(j));
        }
    }
    if (enableRandomAdaptationView != null) {
        boolean enableView = !isDisabled && override != null && override.length > 1;
        enableRandomAdaptationView.setEnabled(enableView);
        enableRandomAdaptationView.setFocusable(enableView);
        if (enableView) {
            enableRandomAdaptationView.setChecked(!isDisabled
                    && override.factory instanceof RandomTrackSelection.Factory);
        }
    }
}
 

开发者ID:AndroidTips,
项目名称:MDVideo,
代码行数:20,
代码来源:TrackSelectionHelper.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)