Commit 141568ab by Julian Cable

better merge

parent 6ec840cc
...@@ -84,20 +84,13 @@ public interface SubtitleDecoderFactory { ...@@ -84,20 +84,13 @@ 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");
} }
<<<<<<< HEAD if (format.sampleMimeType.equals(MimeTypes.TEXT_SSA)) {
if(clazz == SSADecoder.class) {
byte[] header = format.initializationData.get(1); byte[] header = format.initializationData.get(1);
String dlgfmt = new String(format.initializationData.get(0), "UTF-8"); String dlgfmt = new String(format.initializationData.get(0), "UTF-8");
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(byte[].class, String.class) return clazz.asSubclass(SubtitleDecoder.class).getConstructor(byte[].class, String.class)
.newInstance(header, dlgfmt); .newInstance(header, dlgfmt);
} }
if (clazz == Cea608Decoder.class) { else if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608)
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(String.class, Integer.TYPE)
.newInstance(format.sampleMimeType, format.accessibilityChannel);
}
else {
=======
if (format.sampleMimeType.equals(MimeTypes.APPLICATION_CEA608)
|| format.sampleMimeType.equals(MimeTypes.APPLICATION_MP4CEA608)) { || 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);
...@@ -105,7 +98,6 @@ public interface SubtitleDecoderFactory { ...@@ -105,7 +98,6 @@ public interface SubtitleDecoderFactory {
return clazz.asSubclass(SubtitleDecoder.class).getConstructor(Integer.TYPE) return clazz.asSubclass(SubtitleDecoder.class).getConstructor(Integer.TYPE)
.newInstance(format.accessibilityChannel); .newInstance(format.accessibilityChannel);
} else { } else {
>>>>>>> upstream/dev-v2
return clazz.asSubclass(SubtitleDecoder.class).getConstructor().newInstance(); return clazz.asSubclass(SubtitleDecoder.class).getConstructor().newInstance();
} }
} catch (Exception e) { } catch (Exception e) {
......
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