public final class

Mp4Box.ContainerBox

extends Mp4Box

 java.lang.Object

androidx.media3.container.Mp4Box

↳androidx.media3.container.Mp4Box.ContainerBox

Overview

An MP4 box that has child boxes.

Summary

Fields
public final java.util.List<Mp4Box.ContainerBox>containerChildren

public final longendPosition

public final java.util.List<Mp4Box.LeafBox>leafChildren

from Mp4BoxDEFINES_LARGE_SIZE, EXTENDS_TO_END_SIZE, FULL_HEADER_SIZE, HEADER_SIZE, LONG_HEADER_SIZE, type, TYPE__mp2, TYPE__mp3, TYPE_ac_3, TYPE_ac_4, TYPE_alac, TYPE_alaw, TYPE_av01, TYPE_av1C, TYPE_avc1, TYPE_avc3, TYPE_avcC, TYPE_c608, TYPE_camm, TYPE_clli, TYPE_co64, TYPE_colr, TYPE_ctts, TYPE_d263, TYPE_dac3, TYPE_dac4, TYPE_data, TYPE_ddts, TYPE_dec3, TYPE_dfLa, TYPE_dmlp, TYPE_dOps, TYPE_dtsc, TYPE_dtse, TYPE_dtsh, TYPE_dtsl, TYPE_dtsx, TYPE_dva1, TYPE_dvav, TYPE_dvcC, TYPE_dvh1, TYPE_dvhe, TYPE_dvvC, TYPE_ec_3, TYPE_edts, TYPE_edvd, TYPE_elst, TYPE_emsg, TYPE_enca, TYPE_encv, TYPE_esds, TYPE_eyes, TYPE_fLaC, TYPE_frma, TYPE_ftyp, TYPE_H263, TYPE_hdlr, TYPE_hev1, TYPE_hvc1, TYPE_hvcC, TYPE_iacb, TYPE_iamf, TYPE_ilst, TYPE_keys, TYPE_lhvC, TYPE_lpcm, TYPE_m1v_, TYPE_mdat, TYPE_mdcv, TYPE_mdhd, TYPE_mdia, TYPE_mean, TYPE_mehd, TYPE_meta, TYPE_mett, TYPE_mha1, TYPE_mhaC, TYPE_mhaP, TYPE_mhm1, TYPE_minf, TYPE_mlpa, TYPE_moof, TYPE_moov, TYPE_mp4a, TYPE_mp4v, TYPE_mpvd, TYPE_mvex, TYPE_mvhd, TYPE_name, TYPE_Opus, TYPE_pasp, TYPE_proj, TYPE_pssh, TYPE_s263, TYPE_saio, TYPE_saiz, TYPE_samr, TYPE_saut, TYPE_sawb, TYPE_sbgp, TYPE_schi, TYPE_schm, TYPE_senc, TYPE_sgpd, TYPE_sidx, TYPE_sinf, TYPE_smta, TYPE_sowt, TYPE_srfr, TYPE_st3d, TYPE_stbl, TYPE_stco, TYPE_stpp, TYPE_stri, TYPE_stsc, TYPE_stsd, TYPE_stss, TYPE_stsz, TYPE_stts, TYPE_stz2, TYPE_sv3d, TYPE_tenc, TYPE_tfdt, TYPE_tfhd, TYPE_tkhd, TYPE_traf, TYPE_trak, TYPE_trex, TYPE_trun, TYPE_TTML, TYPE_twos, TYPE_tx3g, TYPE_udta, TYPE_udts, TYPE_ulaw, TYPE_uuid, TYPE_vexu, TYPE_vp08, TYPE_vp09, TYPE_vpcC, TYPE_wave, TYPE_wvtt, TYPE_xyz
Constructors
publicContainerBox(int type, long endPosition)

Methods
public voidadd(Mp4Box.ContainerBox box)

Adds a child container to this container.

public voidadd(Mp4Box.LeafBox box)

Adds a child leaf to this container.

public Mp4Box.ContainerBoxgetContainerBoxOfType(int type)

Returns the child container of the given type.

public Mp4Box.LeafBoxgetLeafBoxOfType(int type)

Returns the child leaf of the given type.

public java.lang.StringtoString()

from Mp4BoxgetBoxTypeString
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Fields

public final long endPosition

public final java.util.List<Mp4Box.LeafBox> leafChildren

public final java.util.List<Mp4Box.ContainerBox> containerChildren

Constructors

public ContainerBox(int type, long endPosition)

Parameters:

type: The type of the box.
endPosition: The position of the first byte after the end of the box.

Methods

public void add(Mp4Box.LeafBox box)

Adds a child leaf to this container.

Parameters:

box: The child to add.

public void add(Mp4Box.ContainerBox box)

Adds a child container to this container.

Parameters:

box: The child to add.

public 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:

type: The leaf type.

Returns:

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

public 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:

type: The container type.

Returns:

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

public java.lang.String toString()