Commit 706a6b83 by cdrolle Committed by Oliver Woodman

Removed the direct-referencing of the Cea608Decoder and Cea708Decoder classes…

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

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=144329795
parent e125ed70
...@@ -74,7 +74,8 @@ public interface SubtitleDecoderFactory { ...@@ -74,7 +74,8 @@ public interface SubtitleDecoderFactory {
if (clazz == null) { if (clazz == null) {
throw new IllegalArgumentException("Attempted to create decoder for unsupported format"); 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) return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE)
.newInstance(format.sampleMimeType, format.accessibilityChannel); .newInstance(format.sampleMimeType, format.accessibilityChannel);
} else { } else {
......
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