Box Class Reference

#include <IsoFileClasses.hpp>

Inheritance diagram for Box:

DataInformationBox FileTypeBox FreeSpaceBox FullBox MediaBox MediaDataBox MediaInformationBox MovieBox SampleEntry SampleTableBox TrackBox List of all members.

Public Member Functions

 Box ()
 Box (const char *boxtype)
 Box (unsigned_int32 boxtype)
 Box (unsigned_int32 boxtype, unsigned_int8 extended_type[16])
virtual ~Box ()
virtual void decode (Byte *buffer, UInt32 count)
virtual void encode (Byte **buffer, UInt32 *count)
virtual UInt32 estimateSize ()
UInt32 getCurrentWritePointer ()
UInt32 getCurrentReadPointer ()
UInt32 getBuffer (Byte **buffer)
virtual BoxgetBoxRecursive (const char *type)

Static Public Member Functions

static void mapUInt32ToString (unsigned_int32 *src, char *target)
static void mapStringToUInt32 (char *src, unsigned_int32 *target)

Public Attributes

unsigned_int32 size
unsigned_int32 type

Protected Member Functions

void update_size ()
void write_size ()

Protected Attributes

BufferManagerbufManager

Detailed Description

ISO/IEC 14496-12:2005(E) Class Box, for details about all public undocumented data (attributes), see ISO/IEC 14496-12:2005(E). Such attributes are syntax elements documented in standard under same name and class.


Constructor & Destructor Documentation

Box::Box (  ) 

Box Constructor

Box::Box ( const char *  boxtype  ) 

Box Constructor with known boxtype string

Box::Box ( unsigned_int32  boxtype  ) 

Box Constructor with known boxtype

Box::Box ( unsigned_int32  boxtype,
unsigned_int8  extended_type[16] 
)

Box Constructor with known boxtype and extended_type

Box::~Box (  )  [virtual]

Box Distructor


Member Function Documentation

void Box::decode ( Byte *  buffer,
UInt32  count 
) [virtual]

Decodes a buffer encoded according to ISO/IEC 14496-12:2005(E) and puts the data in respective data members of the class.

Parameters:
buffer The location of encoded data
count The amount of data in buffer

Reimplemented in FullBox, FileTypeBox, MovieBox, MediaDataBox, FreeSpaceBox, MovieHeaderBox, TrackBox, TrackHeaderBox, MediaBox, MediaHeaderBox, HandlerBox, MediaInformationBox, VideoMediaHeaderBox, DataInformationBox, DataEntryUrlBox, DataEntryUrnBox, DataReferenceBox, SampleTableBox, TimeToSampleBox, CompositionOffsetBox, VisualSampleEntry, SampleDescriptionBox, SampleSizeBox, SampleToChunkBox, and ChunkOffsetBox.

void Box::encode ( Byte **  buffer,
UInt32 *  count 
) [virtual]

Encodes a buffer encoded according to ISO/IEC 14496-12:2005(E) from the data stored respective data members of the class. A buffer is allocated for this purpose, freed on object destruction.

Parameters:
buffer The location where to put the encoded data
count The amount of data written in buffer

Reimplemented in FullBox, FileTypeBox, MovieBox, MediaDataBox, FreeSpaceBox, MovieHeaderBox, TrackBox, TrackHeaderBox, MediaBox, MediaHeaderBox, HandlerBox, MediaInformationBox, VideoMediaHeaderBox, DataInformationBox, DataEntryUrlBox, DataEntryUrnBox, DataReferenceBox, SampleTableBox, TimeToSampleBox, CompositionOffsetBox, VisualSampleEntry, SampleDescriptionBox, SampleSizeBox, SampleToChunkBox, and ChunkOffsetBox.

UInt32 Box::estimateSize (  )  [virtual]

Returns the estimated size of data in the class

Reimplemented in FullBox, FileTypeBox, MovieBox, MediaDataBox, FreeSpaceBox, MovieHeaderBox, TrackBox, TrackHeaderBox, MediaBox, MediaHeaderBox, HandlerBox, MediaInformationBox, VideoMediaHeaderBox, DataInformationBox, DataEntryUrlBox, DataEntryUrnBox, DataReferenceBox, SampleTableBox, TimeToSampleBox, CompositionOffsetBox, VisualSampleEntry, SampleDescriptionBox, SampleSizeBox, SampleToChunkBox, and ChunkOffsetBox.

virtual Box* Box::getBoxRecursive ( const char *  type  )  [inline, virtual]

Scans the box and contained boxes recursively for a given type. Returns the first occurance of the box encountered that matches the type. Always returns NULL for classes that cannot contain other classes according to ISO/IEC 14496-12:2005(E). Only the implementation in class ClassContainer can return an object.

See also:
ClassContainer
Parameters:
type The type of box to look for
Returns:
Pointer of Box if found, NULL otherwise.

Reimplemented in MovieBox, TrackBox, MediaBox, MediaInformationBox, DataInformationBox, and SampleTableBox.

UInt32 Box::getBuffer ( Byte **  buffer  ) 

Get the buffer written so far.

Parameters:
buffer The buffer pointer will be returned here
Returns:
The current size of stored data

UInt32 Box::getCurrentReadPointer (  ) 

Returns the current read pointer

UInt32 Box::getCurrentWritePointer (  ) 

Returns the current write pointer

void Box::mapStringToUInt32 ( char *  src,
unsigned_int32 *  target 
) [static]

Converts the source 4 characters to a packed 32 bit value.

Parameters:
src The location with 4 characters to pack
target Location to store the packed data

void Box::mapUInt32ToString ( unsigned_int32 *  src,
char *  target 
) [static]

Converts the source bytes to a NULL terminated string.

Parameters:
src An unsigned 32 bit buffer containing 4 characters
target Location where to store the converted string

void Box::update_size (  )  [protected]

void Box::write_size (  )  [protected]


Member Data Documentation

BufferManager* Box::bufManager [protected]

unsigned_int32 Box::size

unsigned_int32 Box::type


The documentation for this class was generated from the following files:
Generated on Sun Aug 20 15:06:40 2006 for ISOCodec by  doxygen 1.4.7