Commit e88eeba8 by olly Committed by Oliver Woodman

Fix compiler warnings.

- You can't link to a generic type (apparently).
- Suppress unchecked conversion warning.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120817601
parent 7313c26a
...@@ -858,6 +858,7 @@ public abstract class MediaCodecTrackRenderer extends TrackRenderer { ...@@ -858,6 +858,7 @@ public abstract class MediaCodecTrackRenderer extends TrackRenderer {
/** /**
* Processes a change in the output buffers. * Processes a change in the output buffers.
*/ */
@SuppressWarnings("deprecation")
private void processOutputBuffersChanged() { private void processOutputBuffersChanged() {
outputBuffers = codec.getOutputBuffers(); outputBuffers = codec.getOutputBuffers();
codecCounters.outputBuffersChangedCount++; codecCounters.outputBuffersChangedCount++;
......
...@@ -21,29 +21,24 @@ import com.google.android.exoplayer.util.MimeTypes; ...@@ -21,29 +21,24 @@ import com.google.android.exoplayer.util.MimeTypes;
import com.google.android.exoplayer.util.extensions.Decoder; import com.google.android.exoplayer.util.extensions.Decoder;
/** /**
* A factory for {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} * A factory for {@link Decoder} instances that will parse subtitles.
* instances that will parse subtitles.
*/ */
public interface SubtitleParserFactory { public interface SubtitleParserFactory {
/** /**
* Returns whether the factory is able to instantiate a * Returns whether the factory is able to instantiate a {@link Decoder} for the given
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} for the given
* {@link Format}. * {@link Format}.
* *
* @param format The {@link Format}. * @param format The {@link Format}.
* @return True if the factory can instantiate a suitable * @return True if the factory can instantiate a suitable {@link Decoder}. False otherwise.
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>}. False
* otherwise.
*/ */
boolean supportsFormat(Format format); boolean supportsFormat(Format format);
/** /**
* Creates a {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} for * Creates a {@link Decoder} for the given {@link Format}.
* the given {@link Format}.
* *
* @param format The {@link Format}. * @param format The {@link Format}.
* @return A new {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>}. * @return A new {@link Decoder}.
* @throws IllegalArgumentException If the {@link Format} is not supported. * @throws IllegalArgumentException If the {@link Format} is not supported.
*/ */
Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException> createParser(Format format); Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException> createParser(Format format);
...@@ -68,6 +63,7 @@ public interface SubtitleParserFactory { ...@@ -68,6 +63,7 @@ public interface SubtitleParserFactory {
return getParserClass(format.sampleMimeType) != null; return getParserClass(format.sampleMimeType) != null;
} }
@SuppressWarnings("unchecked")
@Override @Override
public Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException> createParser( public Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException> createParser(
Format format) { Format format) {
......
...@@ -39,9 +39,8 @@ import java.util.List; ...@@ -39,9 +39,8 @@ import java.util.List;
/** /**
* A {@link TrackRenderer} for subtitles. * A {@link TrackRenderer} for subtitles.
* <p> * <p>
* Text is parsed from sample data using * Text is parsed from sample data using {@link Decoder} instances obtained from a
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} instances obtained * {@link SubtitleParserFactory}. The actual rendering of each line of text is delegated to a
* from a {@link SubtitleParserFactory}. The actual rendering of each line of text is delegated to a
* {@link TextRenderer}. * {@link TextRenderer}.
*/ */
@TargetApi(16) @TargetApi(16)
...@@ -81,8 +80,7 @@ public final class TextTrackRenderer extends TrackRenderer implements Callback { ...@@ -81,8 +80,7 @@ public final class TextTrackRenderer extends TrackRenderer implements Callback {
* normally be the looper associated with the application's main thread, which can be obtained * normally be the looper associated with the application's main thread, which can be obtained
* using {@link android.app.Activity#getMainLooper()}. Null may be passed if the renderer * using {@link android.app.Activity#getMainLooper()}. Null may be passed if the renderer
* should be invoked directly on the player's internal rendering thread. * should be invoked directly on the player's internal rendering thread.
* @param parserFactory A factory from which to obtain * @param parserFactory A factory from which to obtain {@link Decoder} instances.
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} instances.
*/ */
public TextTrackRenderer(TextRenderer textRenderer, Looper textRendererLooper, public TextTrackRenderer(TextRenderer textRenderer, Looper textRendererLooper,
SubtitleParserFactory parserFactory) { SubtitleParserFactory parserFactory) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment