Mp4Box.ContainerBox


public final class Mp4Box.ContainerBox extends Mp4Box


An MP4 box that has child boxes.

Summary

Public constructors

ContainerBox(int type, long endPosition)

Public methods

void

Adds a child container to this container.

void

Adds a child leaf to this container.

@Nullable Mp4Box.ContainerBox

Returns the child container of the given type.

@Nullable Mp4Box.LeafBox
getLeafBoxOfType(int type)

Returns the child leaf of the given type.

String

Inherited Constants

From androidx.media3.container.Mp4Box
static final int

Value for the size field in a box that defines its size in the largesize field.

static final int

Value for the size field in a box that extends to the end of the file.

static final int

Size of a full box header, in bytes.

static final int

Size of a box header, in bytes.

static final int

Size of a long box header, in bytes.

static final int
TYPE_H263 = 1211250227
static final int
TYPE_Opus = 1332770163
static final int
TYPE_TTML = 1414810956
static final int
TYPE__mp2 = 778924082
static final int
TYPE__mp3 = 778924083
static final int
TYPE_ac_3 = 1633889587
static final int
TYPE_ac_4 = 1633889588
static final int
TYPE_alac = 1634492771
static final int
TYPE_alaw = 1634492791
static final int
TYPE_av01 = 1635135537
static final int
TYPE_av1C = 1635135811
static final int
TYPE_avc1 = 1635148593
static final int
TYPE_avc3 = 1635148595
static final int
TYPE_avcC = 1635148611
static final int
TYPE_c608 = 1664495672
static final int
TYPE_camm = 1667329389
static final int
TYPE_clli = 1668050025
static final int
TYPE_co64 = 1668232756
static final int
TYPE_colr = 1668246642
static final int
TYPE_ctts = 1668576371
static final int
TYPE_d263 = 1681012275
static final int
TYPE_dOps = 1682927731
static final int
TYPE_dac3 = 1684103987
static final int
TYPE_dac4 = 1684103988
static final int
TYPE_data = 1684108385
static final int
TYPE_ddts = 1684305011
static final int
TYPE_dec3 = 1684366131
static final int
TYPE_dfLa = 1684425825
static final int
TYPE_dmlp = 1684892784
static final int
TYPE_dtsc = 1685353315
static final int
TYPE_dtse = 1685353317
static final int
TYPE_dtsh = 1685353320
static final int
TYPE_dtsl = 1685353324
static final int
TYPE_dtsx = 1685353336
static final int
TYPE_dva1 = 1685479729
static final int
TYPE_dvav = 1685479798
static final int
TYPE_dvcC = 1685480259
static final int
TYPE_dvh1 = 1685481521
static final int
TYPE_dvhe = 1685481573
static final int
TYPE_dvvC = 1685485123
static final int
TYPE_ec_3 = 1700998451
static final int
TYPE_edts = 1701082227
static final int
TYPE_edvd = 1701082724
static final int
TYPE_elst = 1701606260
static final int
TYPE_emsg = 1701671783
static final int
TYPE_enca = 1701733217
static final int
TYPE_encv = 1701733238
static final int
TYPE_esds = 1702061171
static final int
TYPE_eyes = 1702454643
static final int
TYPE_fLaC = 1716281667
static final int
TYPE_frma = 1718775137
static final int
TYPE_ftyp = 1718909296
static final int
TYPE_h263 = 1748121139
static final int
TYPE_hdlr = 1751411826
static final int
TYPE_hev1 = 1751479857
static final int
TYPE_hvc1 = 1752589105
static final int
TYPE_hvcC = 1752589123
static final int
TYPE_iacb = 1767990114
static final int
TYPE_iamf = 1767992678
static final int
TYPE_ilst = 1768715124
static final int
TYPE_keys = 1801812339
static final int
TYPE_lhvC = 1818785347
static final int
TYPE_lpcm = 1819304813
static final int
TYPE_m1v_ = 1831958048
static final int
TYPE_mdat = 1835295092
static final int
TYPE_mdcv = 1835295606
static final int
TYPE_mdhd = 1835296868
static final int
TYPE_mdia = 1835297121
static final int
TYPE_mean = 1835360622
static final int
TYPE_mehd = 1835362404
static final int
TYPE_meta = 1835365473
static final int
TYPE_mett = 1835365492
static final int
TYPE_mha1 = 1835557169
static final int
TYPE_mhaC = 1835557187
static final int
TYPE_mhaP = 1835557200
static final int
TYPE_mhm1 = 1835560241
static final int
TYPE_minf = 1835626086
static final int
TYPE_mlpa = 1835823201
static final int
TYPE_moof = 1836019558
static final int
TYPE_moov = 1836019574
static final int
TYPE_mp4a = 1836069985
static final int
TYPE_mp4v = 1836070006
static final int
TYPE_mpvd = 1836086884
static final int
TYPE_mvex = 1836475768
static final int
TYPE_mvhd = 1836476516
static final int
TYPE_name = 1851878757
static final int
TYPE_pasp = 1885434736
static final int
TYPE_proj = 1886547818
static final int
TYPE_pssh = 1886614376
static final int
TYPE_s263 = 1932670515
static final int
TYPE_saio = 1935763823
static final int
TYPE_saiz = 1935763834
static final int
TYPE_samr = 1935764850
static final int
TYPE_saut = 1935766900
static final int
TYPE_sawb = 1935767394
static final int
TYPE_sbgp = 1935828848
static final int
TYPE_schi = 1935894633
static final int
TYPE_schm = 1935894637
static final int
TYPE_senc = 1936027235
static final int
TYPE_sgpd = 1936158820
static final int
TYPE_sidx = 1936286840
static final int
TYPE_sinf = 1936289382
static final int
TYPE_smta = 1936553057
static final int
TYPE_sowt = 1936684916
static final int
TYPE_srfr = 1936877170
static final int
TYPE_st3d = 1936995172
static final int
TYPE_stbl = 1937007212
static final int
TYPE_stco = 1937007471
static final int
TYPE_stpp = 1937010800
static final int
TYPE_stri = 1937011305
static final int
TYPE_stsc = 1937011555
static final int
TYPE_stsd = 1937011556
static final int
TYPE_stss = 1937011571
static final int
TYPE_stsz = 1937011578
static final int
TYPE_stts = 1937011827
static final int
TYPE_stz2 = 1937013298
static final int
TYPE_sv3d = 1937126244
static final int
TYPE_tenc = 1952804451
static final int
TYPE_tfdt = 1952867444
static final int
TYPE_tfhd = 1952868452
static final int
TYPE_tkhd = 1953196132
static final int
TYPE_traf = 1953653094
static final int
TYPE_trak = 1953653099
static final int
TYPE_trex = 1953654136
static final int
TYPE_trun = 1953658222
static final int
TYPE_twos = 1953984371
static final int
TYPE_tx3g = 1954034535
static final int
TYPE_udta = 1969517665
static final int
TYPE_udts = 1969517683
static final int
TYPE_ulaw = 1970037111
static final int
TYPE_uuid = 1970628964
static final int
TYPE_vexu = 1986361461
static final int
TYPE_vp08 = 1987063864
static final int
TYPE_vp09 = 1987063865
static final int
TYPE_vpcC = 1987076931
static final int
TYPE_wave = 2002876005
static final int
TYPE_wvtt = 2004251764
static final int
TYPE_xyz = -1451722374

Inherited fields

From androidx.media3.container.Mp4Box
final int

Inherited methods

From androidx.media3.container.Mp4Box
static String
getBoxTypeString(int type)

Converts a numeric box type to the corresponding four character string.

Public fields

containerChildren

public final List<Mp4Box.ContainerBoxcontainerChildren

endPosition

public final long endPosition

leafChildren

public final List<Mp4Box.LeafBoxleafChildren

Public constructors

ContainerBox

public ContainerBox(int type, long endPosition)
Parameters
int type

The type of the box.

long endPosition

The position of the first byte after the end of the box.

Public methods

add

public void add(Mp4Box.ContainerBox box)

Adds a child container to this container.

Parameters
Mp4Box.ContainerBox box

The child to add.

add

public void add(Mp4Box.LeafBox box)

Adds a child leaf to this container.

Parameters
Mp4Box.LeafBox box

The child to add.

getContainerBoxOfType

public @Nullable Mp4Box.ContainerBox getContainerBoxOfType(int type)

Returns the child container of the given type.

If no child exists with the given type then null is returned. If multiple children exist with the given type then the first one to have been added is returned.

Parameters
int type

The container type.

Returns
@Nullable Mp4Box.ContainerBox

The child container of the given type, or null if no such child exists.

getLeafBoxOfType

public @Nullable Mp4Box.LeafBox getLeafBoxOfType(int type)

Returns the child leaf of the given type.

If no child exists with the given type then null is returned. If multiple children exist with the given type then the first one to have been added is returned.

Parameters
int type

The leaf type.

Returns
@Nullable Mp4Box.LeafBox

The child leaf of the given type, or null if no such child exists.

toString

public String toString()