com.google.android.exoplayer.text.TextRenderer Java Examples

The following examples show how to use com.google.android.exoplayer.text.TextRenderer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Eia608TrackRenderer.java    From Exoplayer_VLC with Apache License 2.0 5 votes vote down vote up
/**
 * @param source A source from which samples containing EIA-608 closed captions can be read.
 * @param textRenderer The text renderer.
 * @param textRendererLooper The looper associated with the thread on which textRenderer should be
 *     invoked. If the renderer makes use of standard Android UI components, then this should
 *     normally be the looper associated with the applications' main thread, which can be
 *     obtained using {@link android.app.Activity#getMainLooper()}. Null may be passed if the
 *     renderer should be invoked directly on the player's internal rendering thread.
 */
public Eia608TrackRenderer(SampleSource source, TextRenderer textRenderer,
    Looper textRendererLooper) {
  this.source = Assertions.checkNotNull(source);
  this.textRenderer = Assertions.checkNotNull(textRenderer);
  textRendererHandler = textRendererLooper == null ? null : new Handler(textRendererLooper, this);
  eia608Parser = new Eia608Parser();
  formatHolder = new MediaFormatHolder();
  sampleHolder = new SampleHolder(SampleHolder.BUFFER_REPLACEMENT_MODE_NORMAL);
  captionStringBuilder = new StringBuilder();
  pendingCaptionLists = new TreeSet<ClosedCaptionList>();
}