Removed the direct-referencing of the Cea608Decoder and Cea708Decoder classes from SubtitleDecoderFactory.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144329795
This commit is contained in:
cdrolle 2017-01-12 08:45:59 -08:00 committed by Oliver Woodman
parent e125ed705e
commit 706a6b83a9

View File

@ -74,7 +74,8 @@ public interface SubtitleDecoderFactory {
if (clazz == null) {
throw new IllegalArgumentException("Attempted to create decoder for unsupported format");
}
if (clazz == Cea608Decoder.class) {
if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608)
|| format.sampleMimeType.equals(MimeTypes.APPLICATION_MP4CEA608)) {
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE)
.newInstance(format.sampleMimeType, format.accessibilityChannel);
} else {