mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Make Extractor/Mp4 Atom Parsing code reusable by external custom mp4 extractors
This commit is contained in:
parent
266f16823f
commit
0b5443c450
3 changed files with 5 additions and 5 deletions
|
|
@ -62,7 +62,7 @@ import java.util.Objects;
|
||||||
|
|
||||||
/** Utility methods for parsing MP4 format atom payloads according to ISO/IEC 14496-12. */
|
/** Utility methods for parsing MP4 format atom payloads according to ISO/IEC 14496-12. */
|
||||||
@SuppressWarnings("ConstantField")
|
@SuppressWarnings("ConstantField")
|
||||||
/* package */ final class AtomParsers {
|
public final class AtomParsers {
|
||||||
|
|
||||||
private static final String TAG = "AtomParsers";
|
private static final String TAG = "AtomParsers";
|
||||||
|
|
||||||
|
|
@ -317,7 +317,7 @@ import java.util.Objects;
|
||||||
* @throws ParserException Thrown if the trak atom can't be parsed.
|
* @throws ParserException Thrown if the trak atom can't be parsed.
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
private static Track parseTrak(
|
public static Track parseTrak(
|
||||||
Mp4Box.ContainerBox trak,
|
Mp4Box.ContainerBox trak,
|
||||||
LeafBox mvhd,
|
LeafBox mvhd,
|
||||||
long duration,
|
long duration,
|
||||||
|
|
@ -401,7 +401,7 @@ import java.util.Objects;
|
||||||
* @return Sample table described by the stbl atom.
|
* @return Sample table described by the stbl atom.
|
||||||
* @throws ParserException Thrown if the stbl atom can't be parsed.
|
* @throws ParserException Thrown if the stbl atom can't be parsed.
|
||||||
*/
|
*/
|
||||||
private static TrackSampleTable parseStbl(
|
public static TrackSampleTable parseStbl(
|
||||||
Track track, Mp4Box.ContainerBox stblAtom, GaplessInfoHolder gaplessInfoHolder)
|
Track track, Mp4Box.ContainerBox stblAtom, GaplessInfoHolder gaplessInfoHolder)
|
||||||
throws ParserException {
|
throws ParserException {
|
||||||
SampleSizeBox sampleSizeBox;
|
SampleSizeBox sampleSizeBox;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import java.io.IOException;
|
||||||
* Provides methods that peek data from an {@link ExtractorInput} and return whether the input
|
* Provides methods that peek data from an {@link ExtractorInput} and return whether the input
|
||||||
* appears to be in MP4 format.
|
* appears to be in MP4 format.
|
||||||
*/
|
*/
|
||||||
/* package */ final class Sniffer {
|
public final class Sniffer {
|
||||||
|
|
||||||
/** Brand stored in the ftyp atom for QuickTime media. */
|
/** Brand stored in the ftyp atom for QuickTime media. */
|
||||||
public static final int BRAND_QUICKTIME = 0x71742020;
|
public static final int BRAND_QUICKTIME = 0x71742020;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import androidx.media3.common.util.Assertions;
|
||||||
import androidx.media3.common.util.Util;
|
import androidx.media3.common.util.Util;
|
||||||
|
|
||||||
/** Sample table for a track in an MP4 file. */
|
/** Sample table for a track in an MP4 file. */
|
||||||
/* package */ final class TrackSampleTable {
|
public final class TrackSampleTable {
|
||||||
|
|
||||||
/** The track corresponding to this sample table. */
|
/** The track corresponding to this sample table. */
|
||||||
public final Track track;
|
public final Track track;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue