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


Java DummyTrackRenderer类代码示例

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


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

示例1: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
   * Invoked with the results from a {@link RendererBuilder}.
   *
   * @param renderers      Renderers indexed by {@link DemoPlayer} TYPE_* constants. An individual
   *                       element may be null if there do not exist tracks of the corresponding
   *                       type.
   * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be
   *                       null.
   */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
      for (int i = 0; i < RENDERER_COUNT; i++) {
          if (renderers[i] == null) {
              // Convert a null renderer to a dummy renderer.
              renderers[i] = new DummyTrackRenderer();
          }
      }
      // Complete preparation.
      this.videoRenderer = renderers[TYPE_VIDEO];
      this.audioRenderer = renderers[TYPE_AUDIO];
      this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
              : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
      this.bandwidthMeter = bandwidthMeter;
      pushSurface(false);
      player.prepare(renderers);
      rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
  }
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:29,代码来源:DemoPlayer.java

示例2: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
   * Invoked with the results from a {@link RendererBuilder}.
   *
   * @param renderers      Renderers indexed by {@link VideoPlayer} TYPE_* constants. An
   *                       individual element may be null if there do not exist tracks of the
   *                       corresponding type.
   * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be
   *                       null.
   */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
      for (int i = 0; i < RENDERER_COUNT; i++) {
          if (renderers[i] == null) {
              // Convert a null renderer to a dummy renderer.
              renderers[i] = new DummyTrackRenderer();
          }
      }
      // Complete preparation.
      this.videoRenderer = renderers[TYPE_VIDEO];
      this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
              : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
      this.bandwidthMeter = bandwidthMeter;
      pushSurface(false);
      player.prepare(renderers);
      rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
  }
 
开发者ID:nejtv,项目名称:androidtv-sample,代码行数:28,代码来源:VideoPlayer.java

示例3: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
 * Invoked with the results from a {link RendererBuilder}.
 *
 * @param renderers Renderers indexed by {link DemoPlayer} TYPE_* constants. An individual
 *     element may be null if there do not exist tracks of the corresponding type.
 * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
 */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
  for (int i = 0; i < RENDERER_COUNT; i++) {
    if (renderers[i] == null) {
      // Convert a null renderer to a dummy renderer.
      renderers[i] = new DummyTrackRenderer();
    }
  }
  // Complete preparation.
  this.videoRenderer = renderers[TYPE_VIDEO];
  this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
      ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
      : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
      ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
  this.bandwidthMeter = bandwidthMeter;
  pushSurface(false);
  player.prepare(renderers);
  rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
}
 
开发者ID:Dreamxiaoxuan,项目名称:AndroidTvDemo,代码行数:26,代码来源:DemoPlayer.java

示例4: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
   * Invoked with the results from a {@link RendererBuilder}.
   *
   * @param renderers      Renderers indexed by {@link ExoPlayerHelper} TYPE_* constants. An individual
   *                       element may be null if there do not exist tracks of the corresponding type.
   * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
   */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
      for (int i = 0; i < RENDERER_COUNT; i++) {
          if (renderers[i] == null) {
              // Convert a null renderer to a dummy renderer.
              renderers[i] = new DummyTrackRenderer();
          }
      }
      // Complete preparation.
      this.videoRenderer = renderers[TYPE_VIDEO];
      this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
              : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
      this.bandwidthMeter = bandwidthMeter;
      pushSurface(false);
      player.prepare(renderers);
      rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
  }
 
开发者ID:MimiReader,项目名称:mimi-reader,代码行数:26,代码来源:ExoPlayerHelper.java

示例5: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
 * Invoked with the results from a {@link RendererBuilder}.
 *
 * @param renderers Renderers indexed by {@link DemoPlayer} TYPE_* constants. An individual
 *     element may be null if there do not exist tracks of the corresponding type.
 * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
 */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
  for (int i = 0; i < RENDERER_COUNT; i++) {
    if (renderers[i] == null) {
      // Convert a null renderer to a dummy renderer.
      renderers[i] = new DummyTrackRenderer();
    }
  }
  // Complete preparation.
  this.videoRenderer = renderers[TYPE_VIDEO];
  this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
      ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
      : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
      ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
  this.bandwidthMeter = bandwidthMeter;
  pushSurface(false);
  player.prepare(renderers);
  rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
}
 
开发者ID:vuthanhict,项目名称:ExoPlayerController,代码行数:26,代码来源:DemoPlayer.java

示例6: onRenderers

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
private void onRenderers(TrackRenderer[] renderers) {
    mBuilderCallback = null;
    for (int i = 0; i < RENDERER_COUNT; i++) {
        if (renderers[i] == null) {
            // Convert a null renderer to a dummy renderer.
            renderers[i] = new DummyTrackRenderer();
        }
    }
    mVideoRenderer = renderers[TRACK_TYPE_VIDEO];
    mAudioRenderer = renderers[TRACK_TYPE_AUDIO];
    mTextRenderer = (Cea708TextTrackRenderer) renderers[TRACK_TYPE_TEXT];
    mTextRenderer.setCcListener(mCcListener);
    mPlayer.sendMessage(
            mTextRenderer, Cea708TextTrackRenderer.MSG_SERVICE_NUMBER, mCaptionServiceNumber);
    mRendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
    pushSurface(false);
    mPlayer.prepare(renderers);
    pushTrackSelection(TRACK_TYPE_VIDEO, true);
    pushTrackSelection(TRACK_TYPE_AUDIO, true);
    pushTrackSelection(TRACK_TYPE_TEXT, true);
}
 
开发者ID:trevd,项目名称:android_packages_apps_tv,代码行数:22,代码来源:MpegTsPlayer.java

示例7: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
   * Invoked with the results from a {@link RendererBuilder}.
   *
   * @param renderers Renderers indexed by {@link Player} TYPE_* constants. An individual
   *     element may be null if there do not exist tracks of the corresponding type.
   * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
   */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
      for (int i = 0; i < RENDERER_COUNT; i++) {
          if (renderers[i] == null) {
              // Convert a null renderer to a dummy renderer.
              renderers[i] = new DummyTrackRenderer();
          }
      }
      // Complete preparation.
      this.videoRenderer = renderers[TYPE_VIDEO];
      this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
              : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
      this.bandwidthMeter = bandwidthMeter;
      pushSurface(false);
      player.prepare(renderers);
      rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
  }
 
开发者ID:PJakcson,项目名称:Mediathek,代码行数:26,代码来源:Player.java

示例8: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
 * Invoked with the results from a {@link RendererBuilder}.
 *
 * @param renderers      Renderers indexed by {@link DemoPlayer} TYPE_* constants. An individual
 *                       element may be null if there do not exist tracks of the corresponding
 *                       type.
 * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
 */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
  for (int i = 0; i < RENDERER_COUNT; i++) {
    if (renderers[i] == null) {
      // Convert a null renderer to a dummy renderer.
      renderers[i] = new DummyTrackRenderer();
    }
  }
  // Complete preparation.
  this.videoRenderer = renderers[TYPE_VIDEO];
  this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
      ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
      : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
      ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
  this.bandwidthMeter = bandwidthMeter;
  pushSurface(false);
  player.prepare(renderers);
  rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
}
 
开发者ID:mkjensen,项目名称:danish-media-license,代码行数:27,代码来源:DemoPlayer.java

示例9: onRenderers

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
public void onRenderers(TrackRenderer[] renderers, @Nullable BandwidthMeter bandwidthMeter) {
    for (int i = 0; i < RENDER_COUNT; i++) {
        if (renderers[i] == null) {
            // Convert a null renderer to a dummy renderer.
            renderers[i] = new DummyTrackRenderer();
        }
    }

    // Complete preparation.
    this.videoRenderer = renderers[RENDER_VIDEO];
    this.audioRenderer = renderers[RENDER_AUDIO];

    pushSurface(false);
    player.prepare(renderers);
    rendererBuildingState = RenderBuildingState.BUILT;
}
 
开发者ID:ayaseruri,项目名称:luxunPro,代码行数:17,代码来源:EMExoPlayer.java

示例10: onRenderers

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
 * Invoked with the results from a {@link RendererBuilder}.
 *
 * @param renderers      Renderers indexed by {@link ExoPlayerWrapper} TYPE_* constants. An individual
 *                       element may be null if there do not exist tracks of the corresponding type.
 * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
 */
protected void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
    for (int i = 0; i < RENDERER_COUNT; i++) {
        if (renderers[i] == null) {
            // Convert a null renderer to a dummy renderer.
            renderers[i] = new DummyTrackRenderer();
        }
    }
    // Complete preparation.
    this.videoRenderer = renderers[TYPE_VIDEO];
    this.audioRenderer = renderers[TYPE_AUDIO];
    this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
            ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
            : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
            ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
    this.bandwidthMeter = bandwidthMeter;
    pushSurface(false);
    player.prepare(renderers);
    rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
}
 
开发者ID:cklar,项目名称:ExoPlayerWrapper,代码行数:27,代码来源:ExoPlayerWrapper.java

示例11: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
 * Invoked with the results from a {@link RendererBuilder}.
 *
 * @param renderers Renderers indexed by {@link FlyingPlayer} TYPE_* constants. An individual
 *     element may be null if there do not exist tracks of the corresponding type.
 * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
 */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
  for (int i = 0; i < RENDERER_COUNT; i++) {
    if (renderers[i] == null) {
      // Convert a null renderer to a dummy renderer.
      renderers[i] = new DummyTrackRenderer();
    }
  }
  // Complete preparation.
  this.videoRenderer = renderers[TYPE_VIDEO];
  this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
          ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
          : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
          ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
  this.bandwidthMeter = bandwidthMeter;
  pushSurface(false);
  player.prepare(renderers);
  rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
}
 
开发者ID:birdcopy,项目名称:Android-Birdcopy-Application,代码行数:26,代码来源:FlyingPlayer.java

示例12: for

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
   * Invoked with the results from a {@link RendererBuilder}.
   *
   * @param renderers Renderers indexed by {@link DemoPlayer} TYPE_* constants. An individual
   *     element may be null if there do not exist tracks of the corresponding type.
   * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
   */
/* package */ void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
      for (int i = 0; i < RENDERER_COUNT; i++) {
          if (renderers[i] == null) {
              // Convert a null renderer to a dummy renderer.
              renderers[i] = new DummyTrackRenderer();
          }
      }
      // Complete preparation.
      this.videoRenderer = renderers[TYPE_VIDEO];
      this.audioRenderer = renderers[TYPE_AUDIO];
      this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
              : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
              ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
      this.bandwidthMeter = bandwidthMeter;
      pushSurface(false);
      player.prepare(renderers);
      rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
  }
 
开发者ID:HugoGresse,项目名称:SimpleExoPlayer,代码行数:27,代码来源:DemoPlayer.java

示例13: onRenderers

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
public void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
    for (int i = 0; i < RENDERER_COUNT; i++) {
        if (renderers[i] == null) {
            //如果没有注入视频音频渲染器,则放入虚拟的渲染器(无作用)
            renderers[i] = new DummyTrackRenderer();
        }
    }
    // 播放器准备完成
    this.videoRenderer = renderers[TYPE_VIDEO];
    this.audioRenderer = renderers[TYPE_AUDIO];

    pushSurface(false);
    //注入渲染器
    player.prepare(renderers);
    //改变渲染器状态
    rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
}
 
开发者ID:succlz123,项目名称:OkPlayer,代码行数:18,代码来源:OkPlayer.java

示例14: onRenderers

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
/**
 * Invoked with the results from a {@link RendererBuilder}.
 *
 * @param renderers Renderers indexed by {@link ExoplayerWrapper} TYPE_* constants. An
 *                  individual element may be null if there do not exist tracks of the
 *                  corresponding type.
 * @param bandwidthMeter Provides an estimate of the currently available bandwidth. May be null.
 */
public void onRenderers(TrackRenderer[] renderers,  BandwidthMeter bandwidthMeter) {
  // Normalize the results.
  if (trackNames == null) {
    trackNames = new String[RENDERER_COUNT][];
  }

  for (int i = 0; i < RENDERER_COUNT; i++) {
    if (renderers[i] == null) {
      // Convert a null renderer to a dummy renderer.
      renderers[i] = new DummyTrackRenderer();
    }
  }

  // Complete preparation.
  this.videoRenderer = renderers[TYPE_VIDEO];
  this.codecCounters = videoRenderer instanceof MediaCodecTrackRenderer
          ? ((MediaCodecTrackRenderer) videoRenderer).codecCounters
          : renderers[TYPE_AUDIO] instanceof MediaCodecTrackRenderer
          ? ((MediaCodecTrackRenderer) renderers[TYPE_AUDIO]).codecCounters : null;
  rendererBuildingState = RENDERER_BUILDING_STATE_BUILT;
  this.bandwidthMeter = bandwidthMeter;
  maybeReportPlayerState();
  pushSurfaceAndVideoTrack(false);
  player.prepare(renderers);
}
 
开发者ID:googleads,项目名称:google-media-framework-android,代码行数:34,代码来源:ExoplayerWrapper.java

示例15: onRenderers

import com.google.android.exoplayer.DummyTrackRenderer; //导入依赖的package包/类
public void onRenderers(TrackRenderer[] renderers, BandwidthMeter bandwidthMeter) {
  for (int i = 0; i < renderers.length; i++) {
    if (renderers[i] == null) {
      renderers[i] = new DummyTrackRenderer();
    }
  }
  // Complete preparation.
  this.videoRenderer = renderers[TYPE_VIDEO];
  pushSurface(false);
  player.prepare(renderers);
  player.setPlayWhenReady(true);
}
 
开发者ID:karanvs,项目名称:ExVidPlayer,代码行数:13,代码来源:ExVidPlayerImp.java


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