Set container MIME type for extractors in ts module

PiperOrigin-RevId: 696882489
This commit is contained in:
rohks 2024-11-15 07:34:13 -08:00 committed by Copybara-Service
parent c50867c81d
commit c3d4a3d683
218 changed files with 470 additions and 66 deletions

View File

@ -262,6 +262,7 @@ public final class DtsUtil {
* @param trackId The track identifier to set on the format.
* @param language The language to set on the format.
* @param roleFlags The role flags to set on the format.
* @param containerMimeType The MIME type of the container to set on the format.
* @param drmInitData {@link DrmInitData} to be included in the format.
* @return The DTS format parsed from data in the header.
*/
@ -270,6 +271,7 @@ public final class DtsUtil {
@Nullable String trackId,
@Nullable String language,
@C.RoleFlags int roleFlags,
String containerMimeType,
@Nullable DrmInitData drmInitData) {
ParsableBitArray frameBits = getNormalizedFrame(frame);
frameBits.skipBits(32 + 1 + 5 + 1 + 7 + 14); // SYNC, FTYPE, SHORT, CPF, NBLKS, FSIZE
@ -286,6 +288,7 @@ public final class DtsUtil {
channelCount += frameBits.readBits(2) > 0 ? 1 : 0; // LFF
return new Format.Builder()
.setId(trackId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.AUDIO_DTS)
.setAverageBitrate(bitrate)
.setChannelCount(channelCount)

View File

@ -20,6 +20,7 @@ import static androidx.media3.extractor.metadata.id3.Id3Decoder.ID3_TAG;
import static androidx.media3.extractor.ts.TsPayloadReader.FLAG_DATA_ALIGNMENT_INDICATOR;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import androidx.media3.common.util.ParsableByteArray;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.extractor.Ac3Util;
@ -55,7 +56,7 @@ public final class Ac3Extractor implements Extractor {
/** Creates a new extractor for AC-3 bitstreams. */
public Ac3Extractor() {
reader = new Ac3Reader();
reader = new Ac3Reader(MimeTypes.AUDIO_AC3);
sampleData = new ParsableByteArray(MAX_SYNC_FRAME_SIZE);
}

View File

@ -61,6 +61,7 @@ public final class Ac3Reader implements ElementaryStreamReader {
private final ParsableByteArray headerScratchBytes;
@Nullable private final String language;
private final @C.RoleFlags int roleFlags;
private final String containerMimeType;
private @MonotonicNonNull String formatId;
private @MonotonicNonNull TrackOutput output;
@ -79,9 +80,13 @@ public final class Ac3Reader implements ElementaryStreamReader {
// Used when reading the samples.
private long timeUs;
/** Constructs a new reader for (E-)AC-3 elementary streams. */
public Ac3Reader() {
this(null, /* roleFlags= */ 0);
/**
* Constructs a new reader for (E-)AC-3 elementary streams.
*
* @param containerMimeType The MIME type of the container holding the stream.
*/
public Ac3Reader(String containerMimeType) {
this(null, /* roleFlags= */ 0, containerMimeType);
}
/**
@ -89,14 +94,17 @@ public final class Ac3Reader implements ElementaryStreamReader {
*
* @param language Track language.
* @param roleFlags Track role flags.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public Ac3Reader(@Nullable String language, @C.RoleFlags int roleFlags) {
public Ac3Reader(
@Nullable String language, @C.RoleFlags int roleFlags, String containerMimeType) {
headerScratchBits = new ParsableBitArray(new byte[HEADER_SIZE]);
headerScratchBytes = new ParsableByteArray(headerScratchBits.data);
state = STATE_FINDING_SYNC;
timeUs = C.TIME_UNSET;
this.language = language;
this.roleFlags = roleFlags;
this.containerMimeType = containerMimeType;
}
@Override
@ -215,6 +223,7 @@ public final class Ac3Reader implements ElementaryStreamReader {
Format.Builder formatBuilder =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(frameInfo.mimeType)
.setChannelCount(frameInfo.channelCount)
.setSampleRate(frameInfo.sampleRate)

View File

@ -22,6 +22,7 @@ import static androidx.media3.extractor.metadata.id3.Id3Decoder.ID3_TAG;
import static androidx.media3.extractor.ts.TsPayloadReader.FLAG_DATA_ALIGNMENT_INDICATOR;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import androidx.media3.common.util.ParsableByteArray;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.extractor.Ac4Util;
@ -63,7 +64,7 @@ public final class Ac4Extractor implements Extractor {
/** Creates a new extractor for AC-4 bitstreams. */
public Ac4Extractor() {
reader = new Ac4Reader();
reader = new Ac4Reader(MimeTypes.AUDIO_AC4);
sampleData = new ParsableByteArray(READ_BUFFER_SIZE);
}

View File

@ -58,6 +58,7 @@ public final class Ac4Reader implements ElementaryStreamReader {
private final ParsableByteArray headerScratchBytes;
@Nullable private final String language;
private final @C.RoleFlags int roleFlags;
private final String containerMimeType;
private @MonotonicNonNull String formatId;
private @MonotonicNonNull TrackOutput output;
@ -77,9 +78,13 @@ public final class Ac4Reader implements ElementaryStreamReader {
// Used when reading the samples.
private long timeUs;
/** Constructs a new reader for AC-4 elementary streams. */
public Ac4Reader() {
this(null, /* roleFlags= */ 0);
/**
* Constructs a new reader for AC-4 elementary streams.
*
* @param containerMimeType The MIME type of the container holding the stream.
*/
public Ac4Reader(String containerMimeType) {
this(null, /* roleFlags= */ 0, containerMimeType);
}
/**
@ -87,8 +92,10 @@ public final class Ac4Reader implements ElementaryStreamReader {
*
* @param language Track language.
* @param roleFlags Track role flags.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public Ac4Reader(@Nullable String language, @C.RoleFlags int roleFlags) {
public Ac4Reader(
@Nullable String language, @C.RoleFlags int roleFlags, String containerMimeType) {
headerScratchBits = new ParsableBitArray(new byte[Ac4Util.HEADER_SIZE_FOR_PARSER]);
headerScratchBytes = new ParsableByteArray(headerScratchBits.data);
state = STATE_FINDING_SYNC;
@ -98,6 +105,7 @@ public final class Ac4Reader implements ElementaryStreamReader {
timeUs = C.TIME_UNSET;
this.language = language;
this.roleFlags = roleFlags;
this.containerMimeType = containerMimeType;
}
@Override
@ -216,6 +224,7 @@ public final class Ac4Reader implements ElementaryStreamReader {
format =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.AUDIO_AC4)
.setChannelCount(frameInfo.channelCount)
.setSampleRate(frameInfo.sampleRate)

View File

@ -22,6 +22,7 @@ import static java.lang.annotation.ElementType.TYPE_USE;
import androidx.annotation.IntDef;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import androidx.media3.common.ParserException;
import androidx.media3.common.PlaybackException;
import androidx.media3.common.Player;
@ -133,7 +134,7 @@ public final class AdtsExtractor implements Extractor {
flags |= FLAG_ENABLE_CONSTANT_BITRATE_SEEKING;
}
this.flags = flags;
reader = new AdtsReader(true);
reader = new AdtsReader(true, MimeTypes.AUDIO_AAC);
packetBuffer = new ParsableByteArray(MAX_PACKET_SIZE);
averageFrameSize = C.LENGTH_UNSET;
firstFramePosition = C.INDEX_UNSET;

View File

@ -72,6 +72,7 @@ public final class AdtsReader implements ElementaryStreamReader {
private final ParsableByteArray id3HeaderBuffer;
@Nullable private final String language;
private final @C.RoleFlags int roleFlags;
private final String containerMimeType;
private @MonotonicNonNull String formatId;
private @MonotonicNonNull TrackOutput output;
@ -104,20 +105,25 @@ public final class AdtsReader implements ElementaryStreamReader {
/**
* @param exposeId3 True if the reader should expose ID3 information.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public AdtsReader(boolean exposeId3) {
this(exposeId3, null, /* roleFlags= */ 0);
public AdtsReader(boolean exposeId3, String containerMimeType) {
this(exposeId3, null, /* roleFlags= */ 0, containerMimeType);
}
/**
* @param exposeId3 True if the reader should expose ID3 information.
* @param language Track language.
* @param roleFlags Track role flags.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public AdtsReader(boolean exposeId3, @Nullable String language, @C.RoleFlags int roleFlags) {
public AdtsReader(
boolean exposeId3,
@Nullable String language,
@C.RoleFlags int roleFlags,
String containerMimeType) {
adtsScratch = new ParsableBitArray(new byte[HEADER_SIZE + CRC_SIZE]);
id3HeaderBuffer = new ParsableByteArray(Arrays.copyOf(ID3_IDENTIFIER, ID3_HEADER_SIZE));
setFindingSampleState();
firstFrameVersion = VERSION_UNSET;
firstFrameSampleRateIndex = C.INDEX_UNSET;
sampleDurationUs = C.TIME_UNSET;
@ -125,6 +131,8 @@ public final class AdtsReader implements ElementaryStreamReader {
this.exposeId3 = exposeId3;
this.language = language;
this.roleFlags = roleFlags;
this.containerMimeType = containerMimeType;
setFindingSampleState();
}
/** Returns whether an integer matches an ADTS SYNC word. */
@ -150,6 +158,7 @@ public final class AdtsReader implements ElementaryStreamReader {
id3Output.format(
new Format.Builder()
.setId(idGenerator.getFormatId())
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.APPLICATION_ID3)
.build());
} else {
@ -507,6 +516,7 @@ public final class AdtsReader implements ElementaryStreamReader {
Format format =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.AUDIO_AAC)
.setCodecs(aacConfig.codecs)
.setChannelCount(aacConfig.channelCount)

View File

@ -151,20 +151,26 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
switch (streamType) {
case TsExtractor.TS_STREAM_TYPE_MPA:
case TsExtractor.TS_STREAM_TYPE_MPA_LSF:
return new PesReader(new MpegAudioReader(esInfo.language, esInfo.getRoleFlags()));
return new PesReader(
new MpegAudioReader(esInfo.language, esInfo.getRoleFlags(), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_AAC_ADTS:
return isSet(FLAG_IGNORE_AAC_STREAM)
? null
: new PesReader(new AdtsReader(false, esInfo.language, esInfo.getRoleFlags()));
: new PesReader(
new AdtsReader(
false, esInfo.language, esInfo.getRoleFlags(), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_AAC_LATM:
return isSet(FLAG_IGNORE_AAC_STREAM)
? null
: new PesReader(new LatmReader(esInfo.language, esInfo.getRoleFlags()));
: new PesReader(
new LatmReader(esInfo.language, esInfo.getRoleFlags(), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_AC3:
case TsExtractor.TS_STREAM_TYPE_E_AC3:
return new PesReader(new Ac3Reader(esInfo.language, esInfo.getRoleFlags()));
return new PesReader(
new Ac3Reader(esInfo.language, esInfo.getRoleFlags(), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_AC4:
return new PesReader(new Ac4Reader(esInfo.language, esInfo.getRoleFlags()));
return new PesReader(
new Ac4Reader(esInfo.language, esInfo.getRoleFlags(), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_HDMV_DTS:
if (!isSet(FLAG_ENABLE_HDMV_DTS_AUDIO_STREAMS)) {
return null;
@ -173,15 +179,23 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
case TsExtractor.TS_STREAM_TYPE_DTS:
case TsExtractor.TS_STREAM_TYPE_DTS_HD:
return new PesReader(
new DtsReader(esInfo.language, esInfo.getRoleFlags(), DtsReader.EXTSS_HEADER_SIZE_MAX));
new DtsReader(
esInfo.language,
esInfo.getRoleFlags(),
DtsReader.EXTSS_HEADER_SIZE_MAX,
MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_DTS_UHD:
return new PesReader(
new DtsReader(esInfo.language, esInfo.getRoleFlags(), DtsReader.FTOC_MAX_HEADER_SIZE));
new DtsReader(
esInfo.language,
esInfo.getRoleFlags(),
DtsReader.FTOC_MAX_HEADER_SIZE,
MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_H262:
case TsExtractor.TS_STREAM_TYPE_DC2_H262:
return new PesReader(new H262Reader(buildUserDataReader(esInfo)));
return new PesReader(new H262Reader(buildUserDataReader(esInfo), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_H263:
return new PesReader(new H263Reader(buildUserDataReader(esInfo)));
return new PesReader(new H263Reader(buildUserDataReader(esInfo), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_H264:
return isSet(FLAG_IGNORE_H264_STREAM)
? null
@ -189,21 +203,28 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
new H264Reader(
buildSeiReader(esInfo),
isSet(FLAG_ALLOW_NON_IDR_KEYFRAMES),
isSet(FLAG_DETECT_ACCESS_UNITS)));
isSet(FLAG_DETECT_ACCESS_UNITS),
MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_H265:
return new PesReader(new H265Reader(buildSeiReader(esInfo)));
return new PesReader(new H265Reader(buildSeiReader(esInfo), MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_SPLICE_INFO:
return isSet(FLAG_IGNORE_SPLICE_INFO_STREAM)
? null
: new SectionReader(new PassthroughSectionPayloadReader(MimeTypes.APPLICATION_SCTE35));
: new SectionReader(
new PassthroughSectionPayloadReader(
/* sampleMimeType= */ MimeTypes.APPLICATION_SCTE35,
/* containerMimeType= */ MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_ID3:
return new PesReader(new Id3Reader());
return new PesReader(new Id3Reader(MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_DVBSUBS:
return new PesReader(new DvbSubtitleReader(esInfo.dvbSubtitleInfos));
return new PesReader(new DvbSubtitleReader(esInfo.dvbSubtitleInfos, MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_AIT:
return new SectionReader(new PassthroughSectionPayloadReader(MimeTypes.APPLICATION_AIT));
return new SectionReader(
new PassthroughSectionPayloadReader(
/* sampleMimeType= */ MimeTypes.APPLICATION_AIT,
/* containerMimeType= */ MimeTypes.VIDEO_MP2T));
case TsExtractor.TS_STREAM_TYPE_MHAS:
return new PesReader(new MpeghReader());
return new PesReader(new MpeghReader(MimeTypes.VIDEO_MP2T));
default:
return null;
}
@ -219,7 +240,7 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
* @return A {@link SeiReader} for closed caption tracks.
*/
private SeiReader buildSeiReader(EsInfo esInfo) {
return new SeiReader(getClosedCaptionFormats(esInfo));
return new SeiReader(getClosedCaptionFormats(esInfo), MimeTypes.VIDEO_MP2T);
}
/**
@ -232,7 +253,7 @@ public final class DefaultTsPayloadReaderFactory implements TsPayloadReader.Fact
* @return A {@link UserDataReader} for closed caption tracks.
*/
private UserDataReader buildUserDataReader(EsInfo esInfo) {
return new UserDataReader(getClosedCaptionFormats(esInfo));
return new UserDataReader(getClosedCaptionFormats(esInfo), MimeTypes.VIDEO_MP2T);
}
/**

View File

@ -69,6 +69,7 @@ public final class DtsReader implements ElementaryStreamReader {
@Nullable private final String language;
private final @C.RoleFlags int roleFlags;
private final String containerMimeType;
private @MonotonicNonNull String formatId;
private @MonotonicNonNull TrackOutput output;
@ -96,8 +97,13 @@ public final class DtsReader implements ElementaryStreamReader {
* @param language Track language.
* @param roleFlags Track role flags.
* @param maxHeaderSize Maximum size of the header in a frame.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public DtsReader(@Nullable String language, @C.RoleFlags int roleFlags, int maxHeaderSize) {
public DtsReader(
@Nullable String language,
@C.RoleFlags int roleFlags,
int maxHeaderSize,
String containerMimeType) {
headerScratchBytes = new ParsableByteArray(new byte[maxHeaderSize]);
state = STATE_FINDING_SYNC;
timeUs = C.TIME_UNSET;
@ -106,6 +112,7 @@ public final class DtsReader implements ElementaryStreamReader {
uhdHeaderSize = C.LENGTH_UNSET;
this.language = language;
this.roleFlags = roleFlags;
this.containerMimeType = containerMimeType;
}
@Override
@ -266,7 +273,8 @@ public final class DtsReader implements ElementaryStreamReader {
private void parseCoreHeader() {
byte[] frameData = headerScratchBytes.getData();
if (format == null) {
format = DtsUtil.parseDtsFormat(frameData, formatId, language, roleFlags, null);
format =
DtsUtil.parseDtsFormat(frameData, formatId, language, roleFlags, containerMimeType, null);
output.format(format);
}
sampleSize = DtsUtil.getDtsFrameSize(frameData);
@ -313,6 +321,7 @@ public final class DtsReader implements ElementaryStreamReader {
format =
formatBuilder
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(dtsHeader.mimeType)
.setChannelCount(dtsHeader.channelCount)
.setSampleRate(dtsHeader.sampleRate)

View File

@ -35,6 +35,7 @@ import java.util.List;
public final class DvbSubtitleReader implements ElementaryStreamReader {
private final List<DvbSubtitleInfo> subtitleInfos;
private final String containerMimeType;
private final TrackOutput[] outputs;
private boolean writingSample;
@ -44,9 +45,11 @@ public final class DvbSubtitleReader implements ElementaryStreamReader {
/**
* @param subtitleInfos Information about the DVB subtitles associated to the stream.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public DvbSubtitleReader(List<DvbSubtitleInfo> subtitleInfos) {
public DvbSubtitleReader(List<DvbSubtitleInfo> subtitleInfos, String containerMimeType) {
this.subtitleInfos = subtitleInfos;
this.containerMimeType = containerMimeType;
outputs = new TrackOutput[subtitleInfos.size()];
sampleTimeUs = C.TIME_UNSET;
}
@ -66,6 +69,7 @@ public final class DvbSubtitleReader implements ElementaryStreamReader {
output.format(
new Format.Builder()
.setId(idGenerator.getFormatId())
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.APPLICATION_DVBSUBS)
.setInitializationData(Collections.singletonList(subtitleInfo.initializationData))
.setLanguage(subtitleInfo.language)

View File

@ -52,6 +52,7 @@ public final class H262Reader implements ElementaryStreamReader {
new double[] {24000d / 1001, 24, 25, 30000d / 1001, 30, 50, 60000d / 1001, 60};
@Nullable private final UserDataReader userDataReader;
private final String containerMimeType;
@Nullable private final ParsableByteArray userDataParsable;
// State that should be reset on seek.
@ -74,12 +75,13 @@ public final class H262Reader implements ElementaryStreamReader {
private boolean sampleIsKeyframe;
private boolean sampleHasPicture;
public H262Reader() {
this(null);
public H262Reader(String containerMimeType) {
this(null, containerMimeType);
}
/* package */ H262Reader(@Nullable UserDataReader userDataReader) {
/* package */ H262Reader(@Nullable UserDataReader userDataReader, String containerMimeType) {
this.userDataReader = userDataReader;
this.containerMimeType = containerMimeType;
prefixFlags = new boolean[4];
csdBuffer = new CsdBuffer(128);
if (userDataReader != null) {
@ -162,7 +164,8 @@ public final class H262Reader implements ElementaryStreamReader {
int bytesAlreadyPassed = lengthToStartCode < 0 ? -lengthToStartCode : 0;
if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {
// The csd data is complete, so we can decode and output the media format.
Pair<Format, Long> result = parseCsdBuffer(csdBuffer, checkNotNull(formatId));
Pair<Format, Long> result =
parseCsdBuffer(csdBuffer, checkNotNull(formatId), containerMimeType);
output.format(result.first);
frameDurationUs = result.second;
hasOutputFormat = true;
@ -231,10 +234,12 @@ public final class H262Reader implements ElementaryStreamReader {
*
* @param csdBuffer The csd buffer.
* @param formatId The id for the generated format.
* @param containerMimeType The MIME type of the container for the generated format.
* @return A pair consisting of the {@link Format} and the frame duration in microseconds, or 0 if
* the duration could not be determined.
*/
private static Pair<Format, Long> parseCsdBuffer(CsdBuffer csdBuffer, String formatId) {
private static Pair<Format, Long> parseCsdBuffer(
CsdBuffer csdBuffer, String formatId, String containerMimeType) {
byte[] csdData = Arrays.copyOf(csdBuffer.data, csdBuffer.length);
int firstByte = csdData[4] & 0xFF;
@ -263,6 +268,7 @@ public final class H262Reader implements ElementaryStreamReader {
Format format =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.VIDEO_MPEG2)
.setWidth(width)
.setHeight(height)

View File

@ -65,6 +65,7 @@ public final class H263Reader implements ElementaryStreamReader {
private static final int VIDEO_OBJECT_LAYER_SHAPE_RECTANGULAR = 0;
@Nullable private final UserDataReader userDataReader;
private final String containerMimeType;
@Nullable private final ParsableByteArray userDataParsable;
// State that should be reset on seek.
@ -85,12 +86,13 @@ public final class H263Reader implements ElementaryStreamReader {
private long pesTimeUs;
/** Creates a new reader. */
public H263Reader() {
this(null);
public H263Reader(String containerMimeType) {
this(null, containerMimeType);
}
/* package */ H263Reader(@Nullable UserDataReader userDataReader) {
/* package */ H263Reader(@Nullable UserDataReader userDataReader, String containerMimeType) {
this.userDataReader = userDataReader;
this.containerMimeType = containerMimeType;
prefixFlags = new boolean[4];
csdBuffer = new CsdBuffer(128);
pesTimeUs = C.TIME_UNSET;
@ -178,7 +180,11 @@ public final class H263Reader implements ElementaryStreamReader {
if (csdBuffer.onStartCode(startCodeValue, bytesAlreadyPassed)) {
// The csd data is complete, so we can decode and output the media format.
output.format(
parseCsdBuffer(csdBuffer, csdBuffer.volStartPosition, checkNotNull(formatId)));
parseCsdBuffer(
csdBuffer,
csdBuffer.volStartPosition,
checkNotNull(formatId),
containerMimeType));
hasOutputFormat = true;
}
}
@ -231,9 +237,11 @@ public final class H263Reader implements ElementaryStreamReader {
* @param csdBuffer The buffer to parse.
* @param volStartPosition The byte offset of the start of the video object layer in the buffer.
* @param formatId The ID for the generated format.
* @param containerMimeType The MIME type of the container for the generated format.
* @return The {@link Format} of the media represented in the buffer.
*/
private static Format parseCsdBuffer(CsdBuffer csdBuffer, int volStartPosition, String formatId) {
private static Format parseCsdBuffer(
CsdBuffer csdBuffer, int volStartPosition, String formatId, String containerMimeType) {
byte[] csdData = Arrays.copyOf(csdBuffer.data, csdBuffer.length);
ParsableBitArray buffer = new ParsableBitArray(csdData);
buffer.skipBytes(volStartPosition);
@ -308,6 +316,7 @@ public final class H263Reader implements ElementaryStreamReader {
buffer.skipBit(); // interlaced
return new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.VIDEO_MP4V)
.setWidth(videoObjectLayerWidth)
.setHeight(videoObjectLayerHeight)

View File

@ -48,6 +48,7 @@ public final class H264Reader implements ElementaryStreamReader {
private final SeiReader seiReader;
private final boolean allowNonIdrKeyframes;
private final boolean detectAccessUnits;
private final String containerMimeType;
private final NalUnitTargetBuffer sps;
private final NalUnitTargetBuffer pps;
private final NalUnitTargetBuffer sei;
@ -76,11 +77,17 @@ public final class H264Reader implements ElementaryStreamReader {
* synchronization samples (key-frames).
* @param detectAccessUnits Whether to split the input stream into access units (samples) based on
* slice headers. Pass {@code false} if the stream contains access unit delimiters (AUDs).
* @param containerMimeType The MIME type of the container holding the stream.
*/
public H264Reader(SeiReader seiReader, boolean allowNonIdrKeyframes, boolean detectAccessUnits) {
public H264Reader(
SeiReader seiReader,
boolean allowNonIdrKeyframes,
boolean detectAccessUnits,
String containerMimeType) {
this.seiReader = seiReader;
this.allowNonIdrKeyframes = allowNonIdrKeyframes;
this.detectAccessUnits = detectAccessUnits;
this.containerMimeType = containerMimeType;
prefixFlags = new boolean[3];
sps = new NalUnitTargetBuffer(NalUnitUtil.H264_NAL_UNIT_TYPE_SPS, 128);
pps = new NalUnitTargetBuffer(NalUnitUtil.H264_NAL_UNIT_TYPE_PPS, 128);
@ -216,6 +223,7 @@ public final class H264Reader implements ElementaryStreamReader {
output.format(
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.VIDEO_H264)
.setCodecs(codecs)
.setWidth(spsData.width)

View File

@ -41,6 +41,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
public final class H265Reader implements ElementaryStreamReader {
private final SeiReader seiReader;
private final String containerMimeType;
private @MonotonicNonNull String formatId;
private @MonotonicNonNull TrackOutput output;
@ -66,9 +67,11 @@ public final class H265Reader implements ElementaryStreamReader {
/**
* @param seiReader An SEI reader for consuming closed caption channels.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public H265Reader(SeiReader seiReader) {
public H265Reader(SeiReader seiReader, String containerMimeType) {
this.seiReader = seiReader;
this.containerMimeType = containerMimeType;
prefixFlags = new boolean[3];
vps = new NalUnitTargetBuffer(NalUnitUtil.H265_NAL_UNIT_TYPE_VPS, 128);
sps = new NalUnitTargetBuffer(NalUnitUtil.H265_NAL_UNIT_TYPE_SPS, 128);
@ -202,7 +205,7 @@ public final class H265Reader implements ElementaryStreamReader {
sps.endNalUnit(discardPadding);
pps.endNalUnit(discardPadding);
if (vps.isCompleted() && sps.isCompleted() && pps.isCompleted()) {
Format format = parseMediaFormat(formatId, vps, sps, pps);
Format format = parseMediaFormat(formatId, vps, sps, pps, containerMimeType);
output.format(format);
checkState(format.maxNumReorderSamples != Format.NO_VALUE);
seiReader.setReorderingQueueSize(format.maxNumReorderSamples);
@ -231,7 +234,8 @@ public final class H265Reader implements ElementaryStreamReader {
@Nullable String formatId,
NalUnitTargetBuffer vps,
NalUnitTargetBuffer sps,
NalUnitTargetBuffer pps) {
NalUnitTargetBuffer pps,
String containerMimeType) {
// Build codec-specific data.
byte[] csdData = new byte[vps.nalLength + sps.nalLength + pps.nalLength];
System.arraycopy(vps.nalData, 0, csdData, 0, vps.nalLength);
@ -256,6 +260,7 @@ public final class H265Reader implements ElementaryStreamReader {
}
return new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.VIDEO_H265)
.setCodecs(codecs)
.setWidth(spsData.width)

View File

@ -38,6 +38,7 @@ public final class Id3Reader implements ElementaryStreamReader {
private static final String TAG = "Id3Reader";
private final String containerMimeType;
private final ParsableByteArray id3Header;
private @MonotonicNonNull TrackOutput output;
@ -50,7 +51,8 @@ public final class Id3Reader implements ElementaryStreamReader {
private int sampleSize;
private int sampleBytesRead;
public Id3Reader() {
public Id3Reader(String containerMimeType) {
this.containerMimeType = containerMimeType;
id3Header = new ParsableByteArray(ID3_HEADER_LENGTH);
sampleTimeUs = C.TIME_UNSET;
}
@ -68,6 +70,7 @@ public final class Id3Reader implements ElementaryStreamReader {
output.format(
new Format.Builder()
.setId(idGenerator.getFormatId())
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.APPLICATION_ID3)
.build());
}

View File

@ -50,6 +50,7 @@ public final class LatmReader implements ElementaryStreamReader {
@Nullable private final String language;
private final @C.RoleFlags int roleFlags;
private final String containerMimeType;
private final ParsableByteArray sampleDataBuffer;
private final ParsableBitArray sampleBitArray;
@ -80,10 +81,13 @@ public final class LatmReader implements ElementaryStreamReader {
/**
* @param language Track language.
* @param roleFlags Track role flags.
* @param containerMimeType The MIME type of the container holding the stream.
*/
public LatmReader(@Nullable String language, @C.RoleFlags int roleFlags) {
public LatmReader(
@Nullable String language, @C.RoleFlags int roleFlags, String containerMimeType) {
this.language = language;
this.roleFlags = roleFlags;
this.containerMimeType = containerMimeType;
sampleDataBuffer = new ParsableByteArray(INITIAL_BUFFER_SIZE);
sampleBitArray = new ParsableBitArray(sampleDataBuffer.getData());
timeUs = C.TIME_UNSET;
@ -214,6 +218,7 @@ public final class LatmReader implements ElementaryStreamReader {
Format format =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.AUDIO_AAC)
.setCodecs(codecs)
.setChannelCount(channelCount)

View File

@ -45,6 +45,7 @@ public final class MpegAudioReader implements ElementaryStreamReader {
private final MpegAudioUtil.Header header;
@Nullable private final String language;
private final @C.RoleFlags int roleFlags;
private final String containerMimeType;
private @MonotonicNonNull TrackOutput output;
private @MonotonicNonNull String formatId;
@ -63,11 +64,12 @@ public final class MpegAudioReader implements ElementaryStreamReader {
// The timestamp to attach to the next sample in the current packet.
private long timeUs;
public MpegAudioReader() {
this(null, /* roleFlags= */ 0);
public MpegAudioReader(String containerMimeType) {
this(null, /* roleFlags= */ 0, containerMimeType);
}
public MpegAudioReader(@Nullable String language, @C.RoleFlags int roleFlags) {
public MpegAudioReader(
@Nullable String language, @C.RoleFlags int roleFlags, String containerMimeType) {
state = STATE_FINDING_HEADER;
// The first byte of an MPEG Audio frame header is always 0xFF.
headerScratch = new ParsableByteArray(4);
@ -76,6 +78,7 @@ public final class MpegAudioReader implements ElementaryStreamReader {
timeUs = C.TIME_UNSET;
this.language = language;
this.roleFlags = roleFlags;
this.containerMimeType = containerMimeType;
}
@Override
@ -197,6 +200,7 @@ public final class MpegAudioReader implements ElementaryStreamReader {
Format format =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(header.mimeType)
.setMaxInputSize(MpegAudioUtil.MAX_FRAME_SIZE_BYTES)
.setChannelCount(header.channels)

View File

@ -60,6 +60,7 @@ public final class MpeghReader implements ElementaryStreamReader {
private static final int MIN_MHAS_PACKET_HEADER_SIZE = 2;
private static final int MAX_MHAS_PACKET_HEADER_SIZE = 15;
private final String containerMimeType;
private final ParsableByteArray headerScratchBytes;
private final ParsableBitArray headerScratchBits;
private final ParsableByteArray dataScratchBytes;
@ -89,8 +90,13 @@ public final class MpeghReader implements ElementaryStreamReader {
private long mainStreamLabel;
private boolean configFound;
/** Constructs a new reader for MPEG-H elementary streams. */
public MpeghReader() {
/**
* Constructs a new reader for MPEG-H elementary streams.
*
* @param containerMimeType The MIME type of the container holding the stream.
*/
public MpeghReader(String containerMimeType) {
this.containerMimeType = containerMimeType;
state = STATE_FINDING_SYNC;
headerScratchBytes =
new ParsableByteArray(new byte[MAX_MHAS_PACKET_HEADER_SIZE], MIN_MHAS_PACKET_HEADER_SIZE);
@ -344,6 +350,7 @@ public final class MpeghReader implements ElementaryStreamReader {
Format format =
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(MimeTypes.AUDIO_MPEGH_MHM1)
.setSampleRate(samplingRate)
.setCodecs(codecs)

View File

@ -42,10 +42,17 @@ public final class PassthroughSectionPayloadReader implements SectionPayloadRead
/**
* Create a new PassthroughSectionPayloadReader.
*
* @param mimeType The MIME type set as {@link Format#sampleMimeType} on the created output track.
* @param sampleMimeType The MIME type set as {@link Format#sampleMimeType} on the created output
* track.
* @param containerMimeType The MIME type set as {@link Format#containerMimeType} on the created
* output track.
*/
public PassthroughSectionPayloadReader(String mimeType) {
this.format = new Format.Builder().setSampleMimeType(mimeType).build();
public PassthroughSectionPayloadReader(String sampleMimeType, String containerMimeType) {
this.format =
new Format.Builder()
.setContainerMimeType(containerMimeType)
.setSampleMimeType(sampleMimeType)
.build();
}
@Override

View File

@ -18,6 +18,7 @@ package androidx.media3.extractor.ts;
import android.util.SparseArray;
import androidx.annotation.Nullable;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import androidx.media3.common.ParserException;
import androidx.media3.common.util.Assertions;
import androidx.media3.common.util.ParsableBitArray;
@ -239,15 +240,15 @@ public final class PsExtractor implements Extractor {
// Private stream, used for AC3 audio.
// NOTE: This may need further parsing to determine if its DTS, but that's likely only
// valid for DVDs.
elementaryStreamReader = new Ac3Reader();
elementaryStreamReader = new Ac3Reader(MimeTypes.VIDEO_PS);
foundAudioTrack = true;
lastTrackPosition = input.getPosition();
} else if ((streamId & AUDIO_STREAM_MASK) == AUDIO_STREAM) {
elementaryStreamReader = new MpegAudioReader();
elementaryStreamReader = new MpegAudioReader(MimeTypes.VIDEO_PS);
foundAudioTrack = true;
lastTrackPosition = input.getPosition();
} else if ((streamId & VIDEO_STREAM_MASK) == VIDEO_STREAM) {
elementaryStreamReader = new H262Reader();
elementaryStreamReader = new H262Reader(MimeTypes.VIDEO_PS);
foundVideoTrack = true;
lastTrackPosition = input.getPosition();
}

View File

@ -34,14 +34,17 @@ import java.util.List;
public final class SeiReader {
private final List<Format> closedCaptionFormats;
private final String containerMimeType;
private final TrackOutput[] outputs;
private final ReorderingSeiMessageQueue reorderingSeiMessageQueue;
/**
* @param closedCaptionFormats A list of formats for the closed caption channels to expose.
* @param containerMimeType The MIME type of the container holding the SEI buffers.
*/
public SeiReader(List<Format> closedCaptionFormats) {
public SeiReader(List<Format> closedCaptionFormats, String containerMimeType) {
this.closedCaptionFormats = closedCaptionFormats;
this.containerMimeType = containerMimeType;
outputs = new TrackOutput[closedCaptionFormats.size()];
reorderingSeiMessageQueue =
new ReorderingSeiMessageQueue(
@ -63,6 +66,7 @@ public final class SeiReader {
output.format(
new Format.Builder()
.setId(formatId)
.setContainerMimeType(containerMimeType)
.setSampleMimeType(channelMimeType)
.setSelectionFlags(channelFormat.selectionFlags)
.setLanguage(channelFormat.language)

View File

@ -32,10 +32,12 @@ import java.util.List;
private static final int USER_DATA_START_CODE = 0x0001B2;
private final List<Format> closedCaptionFormats;
private final String containerMimeType;
private final TrackOutput[] outputs;
public UserDataReader(List<Format> closedCaptionFormats) {
public UserDataReader(List<Format> closedCaptionFormats, String containerMimeType) {
this.closedCaptionFormats = closedCaptionFormats;
this.containerMimeType = containerMimeType;
outputs = new TrackOutput[closedCaptionFormats.size()];
}
@ -53,6 +55,7 @@ import java.util.List;
output.format(
new Format.Builder()
.setId(idGenerator.getFormatId())
.setContainerMimeType(containerMimeType)
.setSampleMimeType(channelMimeType)
.setSelectionFlags(channelFormat.selectionFlags)
.setLanguage(channelFormat.language)

View File

@ -19,6 +19,7 @@ import static androidx.media3.extractor.ts.TsPayloadReader.FLAG_DATA_ALIGNMENT_I
import static java.lang.Math.min;
import androidx.media3.common.C;
import androidx.media3.common.MimeTypes;
import androidx.media3.common.ParserException;
import androidx.media3.common.util.ParsableByteArray;
import androidx.media3.extractor.ts.TsPayloadReader.TrackIdGenerator;
@ -74,7 +75,7 @@ public class AdtsReaderTest {
FakeExtractorOutput fakeExtractorOutput = new FakeExtractorOutput();
adtsOutput = fakeExtractorOutput.track(0, C.TRACK_TYPE_AUDIO);
id3Output = fakeExtractorOutput.track(1, C.TRACK_TYPE_METADATA);
adtsReader = new AdtsReader(true);
adtsReader = new AdtsReader(true, MimeTypes.AUDIO_AAC);
TrackIdGenerator idGenerator = new TrackIdGenerator(0, 1);
adtsReader.createTracks(fakeExtractorOutput, idGenerator);
data = new ParsableByteArray(TEST_DATA);

View File

@ -10,6 +10,7 @@ track 0:
averageBitrate = 384000
peakBitrate = 384000
id = 0
containerMimeType = audio/ac3
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -10,6 +10,7 @@ track 0:
averageBitrate = 384000
peakBitrate = 384000
id = 0
containerMimeType = audio/ac3
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -8,6 +8,7 @@ track 0:
sample count = 19
format 0:
id = 0
containerMimeType = audio/ac4
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -8,6 +8,7 @@ track 0:
sample count = 19
format 0:
id = 0
containerMimeType = audio/ac4
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -8,6 +8,7 @@ track 0:
sample count = 144
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -595,5 +596,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -8,6 +8,7 @@ track 0:
sample count = 144
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -595,5 +596,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -9,6 +9,7 @@ track 0:
format 0:
peakBitrate = 6000000
id = 0
containerMimeType = audio/ac3
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 0:
format 0:
peakBitrate = 6000000
id = 0
containerMimeType = audio/ac3
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -13,6 +13,7 @@ track 189:
averageBitrate = 96000
peakBitrate = 96000
id = 189
containerMimeType = video/mp2p
sampleMimeType = audio/ac3
channelCount = 1
sampleRate = 44100

View File

@ -10,6 +10,7 @@ track 189:
averageBitrate = 96000
peakBitrate = 96000
id = 189
containerMimeType = video/mp2p
sampleMimeType = audio/ac3
channelCount = 1
sampleRate = 44100

View File

@ -13,6 +13,7 @@ track 1900:
averageBitrate = 384000
peakBitrate = 384000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -13,6 +13,7 @@ track 1900:
averageBitrate = 384000
peakBitrate = 384000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -13,6 +13,7 @@ track 1900:
averageBitrate = 384000
peakBitrate = 384000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -13,6 +13,7 @@ track 1900:
averageBitrate = 384000
peakBitrate = 384000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -10,6 +10,7 @@ track 1900:
averageBitrate = 384000
peakBitrate = 384000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac3
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 1900:
sample count = 19
format 0:
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 1900:
sample count = 12
format 0:
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 1900:
sample count = 6
format 0:
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 1900:
sample count = 0
format 0:
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -8,6 +8,7 @@ track 1900:
sample count = 19
format 0:
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/ac4
channelCount = 2
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 330:
format 0:
peakBitrate = 128000
id = 1031/330
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 2
sampleRate = 48000
@ -93,6 +94,7 @@ track 370:
total output bytes = 1413
sample count = 3
format 0:
containerMimeType = video/mp2t
sampleMimeType = application/vnd.dvb.ait
subsampleOffsetUs = -43622564033
sample 0:

View File

@ -9,6 +9,7 @@ track 330:
format 0:
peakBitrate = 128000
id = 1031/330
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 2
sampleRate = 48000
@ -93,6 +94,7 @@ track 370:
total output bytes = 1413
sample count = 3
format 0:
containerMimeType = video/mp2t
sampleMimeType = application/vnd.dvb.ait
subsampleOffsetUs = -43622564033
sample 0:

View File

@ -11,6 +11,7 @@ track 0:
sample count = 144
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -598,5 +599,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 94
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -398,5 +399,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 49
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -218,5 +219,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 1
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -26,5 +27,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -8,6 +8,7 @@ track 0:
sample count = 144
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -595,5 +596,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 143
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -594,5 +595,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 93
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -394,5 +395,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 48
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -214,5 +215,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -11,6 +11,7 @@ track 0:
sample count = 0
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -22,5 +23,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -8,6 +8,7 @@ track 0:
sample count = 143
format 0:
id = 0
containerMimeType = audio/mp4a-latm
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
channelCount = 1
@ -591,5 +592,6 @@ track 1:
sample count = 0
format 0:
id = 1
containerMimeType = audio/mp4a-latm
sampleMimeType = application/id3
tracksEnded = true

View File

@ -12,6 +12,7 @@ track 257:
format 0:
averageBitrate = 768000
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 257:
format 0:
averageBitrate = 768000
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 257:
format 0:
averageBitrate = 768000
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 257:
format 0:
averageBitrate = 768000
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts
channelCount = 6
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 257:
format 0:
averageBitrate = 768000
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 11
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.hd;profile=lbr
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 8
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.hd;profile=lbr
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 5
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.hd;profile=lbr
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 0
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.hd;profile=lbr
channelCount = 6
sampleRate = 48000

View File

@ -8,6 +8,7 @@ track 257:
sample count = 11
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.hd;profile=lbr
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 234
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.uhd;profile=p2
channelCount = 2
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 161
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.uhd;profile=p2
channelCount = 2
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 83
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.uhd;profile=p2
channelCount = 2
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 257:
sample count = 5
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.uhd;profile=p2
channelCount = 2
sampleRate = 48000

View File

@ -8,6 +8,7 @@ track 257:
sample count = 234
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/vnd.dts.uhd;profile=p2
channelCount = 2
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 6000000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 6000000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 6000000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 6000000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 1900:
format 0:
peakBitrate = 6000000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3
channelCount = 6
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 0:
format 0:
peakBitrate = 640000
id = 0
containerMimeType = audio/ac3
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 0:
format 0:
peakBitrate = 640000
id = 0
containerMimeType = audio/ac3
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 640000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 640000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 640000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -12,6 +12,7 @@ track 1900:
format 0:
peakBitrate = 640000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -9,6 +9,7 @@ track 1900:
format 0:
peakBitrate = 640000
id = 1/1900
containerMimeType = video/mp2t
sampleMimeType = audio/eac3-joc
channelCount = 6
sampleRate = 48000

View File

@ -11,6 +11,7 @@ track 192:
sample count = 4
format 0:
id = 192
containerMimeType = video/mp2p
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
@ -36,6 +37,7 @@ track 224:
sample count = 2
format 0:
id = 224
containerMimeType = video/mp2p
sampleMimeType = video/mpeg2
width = 640
height = 426

View File

@ -11,6 +11,7 @@ track 192:
sample count = 0
format 0:
id = 192
containerMimeType = video/mp2p
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
@ -20,6 +21,7 @@ track 224:
sample count = 1
format 0:
id = 224
containerMimeType = video/mp2p
sampleMimeType = video/mpeg2
width = 640
height = 426

View File

@ -11,6 +11,7 @@ track 192:
sample count = 0
format 0:
id = 192
containerMimeType = video/mp2p
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
@ -20,6 +21,7 @@ track 224:
sample count = 0
format 0:
id = 224
containerMimeType = video/mp2p
sampleMimeType = video/mpeg2
width = 640
height = 426

View File

@ -11,6 +11,7 @@ track 192:
sample count = 0
format 0:
id = 192
containerMimeType = video/mp2p
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
@ -20,6 +21,7 @@ track 224:
sample count = 0
format 0:
id = 224
containerMimeType = video/mp2p
sampleMimeType = video/mpeg2
width = 640
height = 426

View File

@ -8,6 +8,7 @@ track 192:
sample count = 4
format 0:
id = 192
containerMimeType = video/mp2p
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
@ -33,6 +34,7 @@ track 224:
sample count = 2
format 0:
id = 224
containerMimeType = video/mp2p
sampleMimeType = video/mpeg2
width = 640
height = 426

View File

@ -11,6 +11,7 @@ track 256:
sample count = 2
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mpeg2
width = 640
height = 426
@ -29,6 +30,7 @@ track 257:
sample count = 4
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1

View File

@ -11,6 +11,7 @@ track 256:
sample count = 2
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mpeg2
width = 640
height = 426
@ -29,6 +30,7 @@ track 257:
sample count = 4
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1

View File

@ -11,6 +11,7 @@ track 256:
sample count = 2
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mpeg2
width = 640
height = 426
@ -29,6 +30,7 @@ track 257:
sample count = 4
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1

View File

@ -11,6 +11,7 @@ track 256:
sample count = 0
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mpeg2
width = 640
height = 426
@ -21,6 +22,7 @@ track 257:
sample count = 2
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1

View File

@ -8,6 +8,7 @@ track 256:
sample count = 2
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mpeg2
width = 640
height = 426
@ -26,6 +27,7 @@ track 257:
sample count = 4
format 0:
id = 1/257
containerMimeType = video/mp2t
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1

View File

@ -11,6 +11,7 @@ track 256:
sample count = 25
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mp4v-es
width = 640
height = 360

View File

@ -11,6 +11,7 @@ track 256:
sample count = 19
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mp4v-es
width = 640
height = 360

View File

@ -11,6 +11,7 @@ track 256:
sample count = 9
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mp4v-es
width = 640
height = 360

View File

@ -11,6 +11,7 @@ track 256:
sample count = 0
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mp4v-es
width = 640
height = 360

View File

@ -8,6 +8,7 @@ track 256:
sample count = 25
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/mp4v-es
width = 640
height = 360

View File

@ -11,6 +11,7 @@ track 256:
sample count = 30
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/avc
codecs = avc1.64001F
maxNumReorderSamples = 2

View File

@ -11,6 +11,7 @@ track 256:
sample count = 21
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/avc
codecs = avc1.64001F
maxNumReorderSamples = 2

View File

@ -11,6 +11,7 @@ track 256:
sample count = 12
format 0:
id = 1/256
containerMimeType = video/mp2t
sampleMimeType = video/avc
codecs = avc1.64001F
maxNumReorderSamples = 2

Some files were not shown because too many files have changed in this diff Show More