#include <IsoFileClasses.hpp>
Inheritance diagram for Box:
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 Box * | getBoxRecursive (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 | |
BufferManager * | bufManager |
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
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.
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.
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.
type | The type of box to look for |
Reimplemented in MovieBox, TrackBox, MediaBox, MediaInformationBox, DataInformationBox, and SampleTableBox.
UInt32 Box::getBuffer | ( | Byte ** | buffer | ) |
Get the buffer written so far.
buffer | The buffer pointer will be returned here |
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.
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.
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] |
BufferManager* Box::bufManager [protected] |
unsigned_int32 Box::size |
unsigned_int32 Box::type |