Java 类com.google.android.exoplayer2.metadata.MetadataOutput 实例源码

项目:no-player    文件:SimpleRenderersFactory.java   
@Override
public Renderer[] createRenderers(Handler eventHandler,
                                  VideoRendererEventListener videoRendererEventListener,
                                  AudioRendererEventListener audioRendererEventListener,
                                  TextOutput textRendererOutput,
                                  MetadataOutput metadataRendererOutput) {
    ArrayList<Renderer> renderersList = new ArrayList<>();
    buildVideoRenderers(context, drmSessionManager, allowedVideoJoiningTimeMs,
            eventHandler, videoRendererEventListener, extensionRendererMode, renderersList);
    buildAudioRenderers(context, drmSessionManager, buildAudioProcessors(),
            eventHandler, audioRendererEventListener, extensionRendererMode, renderersList);
    buildTextRenderers(textRendererOutput, eventHandler.getLooper(),
            renderersList);
    buildMetadataRenderers(metadataRendererOutput, eventHandler.getLooper(),
            renderersList);
    buildMiscellaneousRenderers();
    return renderersList.toArray(new Renderer[renderersList.size()]);
}
项目:transistor    文件:DefaultRenderersFactory.java   
@Override
public Renderer[] createRenderers(Handler eventHandler,
    VideoRendererEventListener videoRendererEventListener,
    AudioRendererEventListener audioRendererEventListener,
    TextOutput textRendererOutput, MetadataOutput 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()]);
}
项目:GSYVideoPlayer    文件:SimpleExoPlayer2.java   
@Deprecated
public void setMetadataOutput(MetadataOutput output) {
  metadataOutputs.clear();
  if (output != null) {
    addMetadataOutput(output);
  }
}
项目:ExoMedia    文件:RendererProvider.java   
public RendererProvider(@NonNull Context context, @NonNull Handler handler, @NonNull TextOutput captionListener, @NonNull MetadataOutput metadataListener,
                        @NonNull AudioRendererEventListener audioRendererEventListener, @NonNull VideoRendererEventListener videoRendererEventListener) {
    this.context = context;
    this.handler = handler;
    this.captionListener = captionListener;
    this.metadataListener = metadataListener;
    this.audioRendererEventListener = audioRendererEventListener;
    this.videoRendererEventListener = videoRendererEventListener;
}
项目:transistor    文件:SimpleExoPlayer.java   
/**
 * Sets an output to receive metadata events, removing all existing outputs.
 *
 * @param output The output.
 * @deprecated Use {@link #addMetadataOutput(MetadataOutput)}.
 */
@Deprecated
public void setMetadataOutput(MetadataOutput output) {
  metadataOutputs.clear();
  if (output != null) {
    addMetadataOutput(output);
  }
}
项目:GSYVideoPlayer    文件:SimpleExoPlayer2.java   
@Deprecated
public void clearMetadataOutput(MetadataOutput output) {
  removeMetadataOutput(output);
}
项目:GSYVideoPlayer    文件:SimpleExoPlayer2.java   
@Override
public void onMetadata(Metadata metadata) {
  for (MetadataOutput metadataOutput : metadataOutputs) {
    metadataOutput.onMetadata(metadata);
  }
}
项目:transistor    文件:SimpleExoPlayer.java   
@Override
public void onMetadata(Metadata metadata) {
  for (MetadataOutput metadataOutput : metadataOutputs) {
    metadataOutput.onMetadata(metadata);
  }
}
项目:GSYVideoPlayer    文件:SimpleExoPlayer2.java   
/**
 * Registers an output to receive metadata events.
 *
 * @param listener The output to register.
 */
public void addMetadataOutput(MetadataOutput listener) {
  metadataOutputs.add(listener);
}
项目:GSYVideoPlayer    文件:SimpleExoPlayer2.java   
/**
 * Removes a metadata output.
 *
 * @param listener The output to remove.
 */
public void removeMetadataOutput(MetadataOutput listener) {
  metadataOutputs.remove(listener);
}
项目:no-player    文件:SimpleRenderersFactory.java   
/**
 * Builds metadata renderers for use by 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 outRenderers An array to which the built renderers should be appended.
 */
private void buildMetadataRenderers(MetadataOutput output, Looper outputLooper, List<Renderer> outRenderers) {
    outRenderers.add(new MetadataRenderer(output, outputLooper));
}
项目:transistor    文件:RenderersFactory.java   
/**
 * 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 audioRendererEventListener 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, TextOutput textRendererOutput,
    MetadataOutput metadataRendererOutput);
项目:transistor    文件:DefaultRenderersFactory.java   
/**
 * Builds metadata 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 buildMetadataRenderers(Context context, MetadataOutput output, Looper outputLooper,
    @ExtensionRendererMode int extensionRendererMode, ArrayList<Renderer> out) {
  out.add(new MetadataRenderer(output, outputLooper));
}
项目:transistor    文件:SimpleExoPlayer.java   
/**
 * Registers an output to receive metadata events.
 *
 * @param listener The output to register.
 */
public void addMetadataOutput(MetadataOutput listener) {
  metadataOutputs.add(listener);
}
项目:transistor    文件:SimpleExoPlayer.java   
/**
 * Removes a metadata output.
 *
 * @param listener The output to remove.
 */
public void removeMetadataOutput(MetadataOutput listener) {
  metadataOutputs.remove(listener);
}
项目:transistor    文件:SimpleExoPlayer.java   
/**
 * Equivalent to {@link #removeMetadataOutput(MetadataOutput)}.
 *
 * @param output The output to clear.
 * @deprecated Use {@link #removeMetadataOutput(MetadataOutput)}.
 */
@Deprecated
public void clearMetadataOutput(MetadataOutput output) {
  removeMetadataOutput(output);
}