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


Java TextRenderer.Output方法代码示例

本文整理汇总了Java中com.google.android.exoplayer2.text.TextRenderer.Output方法的典型用法代码示例。如果您正苦于以下问题:Java TextRenderer.Output方法的具体用法?Java TextRenderer.Output怎么用?Java TextRenderer.Output使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.android.exoplayer2.text.TextRenderer的用法示例。


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

示例1: createRenderers

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
@Override
public Renderer[] createRenderers(Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextRenderer.Output textRendererOutput, MetadataRenderer.Output metadataRendererOutput) {
  ArrayList<Renderer> renderersList = new ArrayList<>();
  buildVideoRenderers(context, drmSessionManager, allowedVideoJoiningTimeMs,
      eventHandler, videoRendererEventListener, extensionRendererMode, renderersList);
  buildAudioRenderers(context, drmSessionManager, buildAudioProcessors(),
      eventHandler, audioRendererEventListener, extensionRendererMode, renderersList);
  buildTextRenderers(context, textRendererOutput, eventHandler.getLooper(),
      extensionRendererMode, renderersList);
  buildMetadataRenderers(context, metadataRendererOutput, eventHandler.getLooper(),
      extensionRendererMode, renderersList);
  buildMiscellaneousRenderers(context, eventHandler, extensionRendererMode, renderersList);
  return renderersList.toArray(new Renderer[renderersList.size()]);
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:18,代码来源:DefaultRenderersFactory.java

示例2: output

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
TextRenderer.Output output() {
    return new TextRenderer.Output() {
        @Override
        public void onCues(List<Cue> cues) {
            TextCues textCues = ExoPlayerCueMapper.map(cues);
            playerView.setSubtitleCue(textCues);
        }
    };
}
 
开发者ID:novoda,项目名称:no-player,代码行数:10,代码来源:TextRendererOutput.java

示例3: clearTextOutput

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
/**
 * Clears the output receiving text events if it matches the one passed. Else does nothing.
 *
 * @param output The output to clear.
 */
public void clearTextOutput(TextRenderer.Output output) {
  if (textOutput == output) {
    textOutput = null;
  }
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:11,代码来源:SimpleExoPlayer.java

示例4: createRenderers

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
/**
 * Builds the {@link Renderer} instances for a {@link SimpleExoPlayer}.
 *
 * @param eventHandler A handler to use when invoking event listeners and outputs.
 * @param videoRendererEventListener An event listener for video renderers.
 * @param videoRendererEventListener An event listener for audio renderers.
 * @param textRendererOutput An output for text renderers.
 * @param metadataRendererOutput An output for metadata renderers.
 * @return The {@link Renderer instances}.
 */
Renderer[] createRenderers(Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextRenderer.Output textRendererOutput, MetadataRenderer.Output metadataRendererOutput);
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:15,代码来源:RenderersFactory.java

示例5: buildTextRenderers

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
/**
 * Builds text renderers for use by the player.
 *
 * @param context The {@link Context} associated with the player.
 * @param output An output for the renderers.
 * @param outputLooper The looper associated with the thread on which the output should be
 *     called.
 * @param extensionRendererMode The extension renderer mode.
 * @param out An array to which the built renderers should be appended.
 */
protected void buildTextRenderers(Context context, TextRenderer.Output output,
    Looper outputLooper, @ExtensionRendererMode int extensionRendererMode,
    ArrayList<Renderer> out) {
  out.add(new TextRenderer(output, outputLooper));
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:16,代码来源:DefaultRenderersFactory.java

示例6: setTextOutput

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
/**
 * Sets an output to receive text events.
 *
 * @param output The output.
 */
public void setTextOutput(TextRenderer.Output output) {
  textOutput = output;
}
 
开发者ID:sanjaysingh1990,项目名称:Exoplayer2Radio,代码行数:9,代码来源:SimpleExoPlayer.java

示例7: buildTextRenderers

import com.google.android.exoplayer2.text.TextRenderer; //导入方法依赖的package包/类
/**
 * Builds text renderers for use by the player.
 *
 * @param context The {@link Context} associated with the player.
 * @param mainHandler A handler associated with the main thread's looper.
 * @param extensionRendererMode The extension renderer mode.
 * @param output An output for the renderers.
 * @param out An array to which the built renderers should be appended.
 */
protected void buildTextRenderers(Context context, Handler mainHandler,
    @ExtensionRendererMode int extensionRendererMode, TextRenderer.Output output,
    ArrayList<Renderer> out) {
  out.add(new TextRenderer(output, mainHandler.getLooper()));
}
 
开发者ID:jcodeing,项目名称:K-Sonic,代码行数:15,代码来源:SimpleExoPlayer.java


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