RDK Documentation (Open Sourced RDK Components)
Box Class Reference

Base Class for ISO BMFF Box. More...

#include <isobmffbox.h>

Inheritance diagram for Box:
Inheritance graph
Collaboration diagram for Box:
Collaboration graph

Public Member Functions

 Box (uint32_t sz, const char btype[4])
 Box constructor. More...
 
virtual ~Box ()
 Box destructor.
 
void setOffset (uint32_t os)
 Set box's offset from the beginning of the buffer. More...
 
uint32_t getOffset () const
 Get box offset. More...
 
virtual bool hasChildren ()
 To check if box has any child boxes. More...
 
virtual const std::vector< Box * > * getChildren ()
 Get children of this box. More...
 
uint32_t getSize () const
 Get box size. More...
 
const char * getType ()
 Get box type. More...
 
const char * getBoxType () const
 Get box type. More...
 

Static Public Member Functions

static BoxconstructBox (uint8_t *hdr, uint32_t maxSz, AampLogManager *mLOgObj=NULL, bool correctBoxSize=false, int newTrackId=-1)
 

Static Public Attributes

static constexpr const char * FTYP = "ftyp"
 
static constexpr const char * MOOV = "moov"
 
static constexpr const char * MVHD = "mvhd"
 
static constexpr const char * TRAK = "trak"
 
static constexpr const char * MDIA = "mdia"
 
static constexpr const char * MDHD = "mdhd"
 
static constexpr const char * EMSG = "emsg"
 
static constexpr const char * MOOF = "moof"
 
static constexpr const char * TFHD = "tfhd"
 
static constexpr const char * TRAF = "traf"
 
static constexpr const char * TFDT = "tfdt"
 
static constexpr const char * TRUN = "trun"
 
static constexpr const char * MDAT = "mdat"
 
static constexpr const char * TKHD = "tkhd"
 
static constexpr const char * STYP = "styp"
 
static constexpr const char * SIDX = "sidx"
 
static constexpr const char * PRFT = "prft"
 

Private Attributes

uint32_t offset
 
uint32_t size
 
char type [5]
 

yes

Base Class for ISO BMFF Box.

Definition at line 90 of file isobmffbox.h.

Constructor & Destructor Documentation

◆ Box()

Box::Box ( uint32_t  sz,
const char  btype[4] 
)

Box constructor.

Parameters
[in]sz- box size
[in]btype- box type

Definition at line 74 of file isobmffbox.cpp.

Member Function Documentation

◆ setOffset()

Box::setOffset ( uint32_t  os)

Set box's offset from the beginning of the buffer.

Parameters
[in]os- offset
Returns
void

Definition at line 82 of file isobmffbox.cpp.

◆ getOffset()

Box::getOffset ( ) const

Get box offset.

Returns
offset of box

Definition at line 90 of file isobmffbox.cpp.

◆ hasChildren()

Box::hasChildren ( )
virtual

To check if box has any child boxes.

Returns
true if this box has other boxes as children

Reimplemented in GenericContainerBox.

Definition at line 98 of file isobmffbox.cpp.

◆ getChildren()

Box::getChildren ( )
virtual

Get children of this box.

Returns
array of child boxes

Reimplemented in GenericContainerBox.

Definition at line 106 of file isobmffbox.cpp.

◆ getSize()

Box::getSize ( ) const

Get box size.

Returns
box size

Definition at line 114 of file isobmffbox.cpp.

◆ getType()

Box::getType ( )

Get box type.

Returns
box type

Definition at line 122 of file isobmffbox.cpp.

◆ getBoxType()

Box::getBoxType ( ) const

Get box type.

Returns
box type if parsed. "unknown" otherwise

Definition at line 130 of file isobmffbox.cpp.

◆ constructBox()

Box::constructBox ( uint8_t *  hdr,
uint32_t  maxSz,
AampLogManager mLOgObj = NULL,
bool  correctBoxSize = false,
int  newTrackId = -1 
)
static
Parameters
[in]hdr- pointer to box
[in]maxSz- box size
[in]mLOgObj- log object
[in]correctBoxSize- flag to check if box size needs to be corrected
[in]newTrackId- new track id to overwrite the existing track id, when value is -1, it will not override
Returns
newly constructed Box object

Definition at line 161 of file isobmffbox.cpp.

Field Documentation

◆ offset

uint32_t Box::offset
private

Offset from the beginning of the segment

Definition at line 93 of file isobmffbox.h.

◆ size

uint32_t Box::size
private

Box Size

Definition at line 94 of file isobmffbox.h.

◆ type

char Box::type[5]
private

Box Type Including \0

Definition at line 95 of file isobmffbox.h.


The documentation for this class was generated from the following files: