mirror of
https://github.com/samsonjs/media.git
synced 2026-04-16 13:05:46 +00:00
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
This commit is contained in:
parent
7313c26a56
commit
e88eeba859
3 changed files with 10 additions and 15 deletions
|
|
@ -858,6 +858,7 @@ public abstract class MediaCodecTrackRenderer extends TrackRenderer {
|
|||
/**
|
||||
* Processes a change in the output buffers.
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
private void processOutputBuffersChanged() {
|
||||
outputBuffers = codec.getOutputBuffers();
|
||||
codecCounters.outputBuffersChangedCount++;
|
||||
|
|
|
|||
|
|
@ -21,29 +21,24 @@ import com.google.android.exoplayer.util.MimeTypes;
|
|||
import com.google.android.exoplayer.util.extensions.Decoder;
|
||||
|
||||
/**
|
||||
* A factory for {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>}
|
||||
* instances that will parse subtitles.
|
||||
* A factory for {@link Decoder} instances that will parse subtitles.
|
||||
*/
|
||||
public interface SubtitleParserFactory {
|
||||
|
||||
/**
|
||||
* Returns whether the factory is able to instantiate a
|
||||
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} for the given
|
||||
* Returns whether the factory is able to instantiate a {@link Decoder} for the given
|
||||
* {@link Format}.
|
||||
*
|
||||
* @param format The {@link Format}.
|
||||
* @return True if the factory can instantiate a suitable
|
||||
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>}. False
|
||||
* otherwise.
|
||||
* @return True if the factory can instantiate a suitable {@link Decoder}. False otherwise.
|
||||
*/
|
||||
boolean supportsFormat(Format format);
|
||||
|
||||
/**
|
||||
* Creates a {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} for
|
||||
* the given {@link Format}.
|
||||
* Creates a {@link Decoder} for the given {@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.
|
||||
*/
|
||||
Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException> createParser(Format format);
|
||||
|
|
@ -68,6 +63,7 @@ public interface SubtitleParserFactory {
|
|||
return getParserClass(format.sampleMimeType) != null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException> createParser(
|
||||
Format format) {
|
||||
|
|
|
|||
|
|
@ -39,9 +39,8 @@ import java.util.List;
|
|||
/**
|
||||
* A {@link TrackRenderer} for subtitles.
|
||||
* <p>
|
||||
* Text is parsed from sample data using
|
||||
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} instances obtained
|
||||
* from a {@link SubtitleParserFactory}. The actual rendering of each line of text is delegated to a
|
||||
* Text is parsed from sample data using {@link Decoder} instances obtained from a
|
||||
* {@link SubtitleParserFactory}. The actual rendering of each line of text is delegated to a
|
||||
* {@link TextRenderer}.
|
||||
*/
|
||||
@TargetApi(16)
|
||||
|
|
@ -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
|
||||
* using {@link android.app.Activity#getMainLooper()}. Null may be passed if the renderer
|
||||
* should be invoked directly on the player's internal rendering thread.
|
||||
* @param parserFactory A factory from which to obtain
|
||||
* {@link Decoder<SubtitleInputBuffer, SubtitleOutputBuffer, ParserException>} instances.
|
||||
* @param parserFactory A factory from which to obtain {@link Decoder} instances.
|
||||
*/
|
||||
public TextTrackRenderer(TextRenderer textRenderer, Looper textRendererLooper,
|
||||
SubtitleParserFactory parserFactory) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue