mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Add codecs argument to createContainerFormat
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=131398162
This commit is contained in:
parent
d72e26ff35
commit
e48462d564
4 changed files with 6 additions and 7 deletions
|
|
@ -297,9 +297,9 @@ public final class Format implements Parcelable {
|
|||
|
||||
// Generic.
|
||||
|
||||
public static Format createContainerFormat(String id, String containerMimeType,
|
||||
public static Format createContainerFormat(String id, String containerMimeType, String codecs,
|
||||
String sampleMimeType, int bitrate) {
|
||||
return new Format(id, containerMimeType, sampleMimeType, null, bitrate, NO_VALUE, NO_VALUE,
|
||||
return new Format(id, containerMimeType, sampleMimeType, codecs, bitrate, NO_VALUE, NO_VALUE,
|
||||
NO_VALUE, NO_VALUE, NO_VALUE, NO_VALUE, null, NO_VALUE, NO_VALUE, NO_VALUE, NO_VALUE,
|
||||
NO_VALUE, NO_VALUE, 0, null, OFFSET_SAMPLE_RELATIVE, null, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -425,10 +425,10 @@ public class DashManifestParser extends DefaultHandler
|
|||
return Format.createTextContainerFormat(id, containerMimeType, sampleMimeType, codecs,
|
||||
bitrate, 0, language);
|
||||
} else {
|
||||
return Format.createContainerFormat(id, containerMimeType, sampleMimeType, bitrate);
|
||||
return Format.createContainerFormat(id, containerMimeType, codecs, sampleMimeType, bitrate);
|
||||
}
|
||||
} else {
|
||||
return Format.createContainerFormat(id, containerMimeType, sampleMimeType, bitrate);
|
||||
return Format.createContainerFormat(id, containerMimeType, codecs, sampleMimeType, bitrate);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ import java.util.List;
|
|||
String baseUri = playlist.baseUri;
|
||||
|
||||
if (playlist instanceof HlsMediaPlaylist) {
|
||||
Format format = Format.createContainerFormat("0", MimeTypes.APPLICATION_M3U8, null,
|
||||
Format format = Format.createContainerFormat("0", MimeTypes.APPLICATION_M3U8, null, null,
|
||||
Format.NO_VALUE);
|
||||
Variant[] variants = new Variant[] {new Variant(playlist.baseUri, format, null)};
|
||||
sampleStreamWrappers.add(buildSampleStreamWrapper(C.TRACK_TYPE_DEFAULT, baseUri, variants,
|
||||
|
|
|
|||
|
|
@ -457,7 +457,6 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||
private static final String KEY_TYPE_TEXT = "text";
|
||||
private static final String KEY_SUB_TYPE = "Subtype";
|
||||
private static final String KEY_NAME = "Name";
|
||||
private static final String KEY_QUALITY_LEVELS = "QualityLevels";
|
||||
private static final String KEY_URL = "Url";
|
||||
private static final String KEY_MAX_WIDTH = "MaxWidth";
|
||||
private static final String KEY_MAX_HEIGHT = "MaxHeight";
|
||||
|
|
@ -645,7 +644,7 @@ public class SsManifestParser implements ParsingLoadable.Parser<SsManifest> {
|
|||
format = Format.createTextContainerFormat(id, MimeTypes.APPLICATION_MP4, sampleMimeType,
|
||||
null, bitrate, 0, language);
|
||||
} else {
|
||||
format = Format.createContainerFormat(id, MimeTypes.APPLICATION_MP4, sampleMimeType,
|
||||
format = Format.createContainerFormat(id, MimeTypes.APPLICATION_MP4, null, sampleMimeType,
|
||||
bitrate);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue