MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Public Member Functions | Protected Member Functions | Protected Attributes
MP4::HVCC Class Reference

#include <mp4_generic.h>

Inheritance diagram for MP4::HVCC:
MP4::Box MP4::Box

Public Member Functions

 HVCC ()
 
 HVCC ()
 
std::string asAnnexB ()
 
std::string asAnnexB ()
 
char * asBox ()
 Returns a copy of the data pointer. More...
 
char * asBox ()
 
uint64_t boxedSize ()
 
uint64_t boxedSize ()
 Returns the total boxed size of this box, including the header. More...
 
void clear ()
 Makes this box managed if it wasn't already, resetting the internal storage to 8 bytes (the minimum). More...
 
void clear ()
 
std::deque< HVCCArrayEntrygetArrays ()
 
std::deque< HVCCArrayEntrygetArrays ()
 
short getAverageFramerate ()
 
short getAverageFramerate ()
 
char getBitDepthChromaMinus8 ()
 
char getBitDepthChromaMinus8 ()
 
char getBitDepthLumaMinus8 ()
 
char getBitDepthLumaMinus8 ()
 
char getChromaFormat ()
 
char getChromaFormat ()
 
char getConfigurationVersion ()
 
char getConfigurationVersion ()
 
char getConstantFramerate ()
 
char getConstantFramerate ()
 
unsigned long long getGeneralConstraintIndicatorFlags ()
 
unsigned long long getGeneralConstraintIndicatorFlags ()
 
char getGeneralLevelIdc ()
 
char getGeneralLevelIdc ()
 
unsigned long getGeneralProfileCompatibilityFlags ()
 
unsigned long getGeneralProfileCompatibilityFlags ()
 
char getGeneralProfileIdc ()
 
char getGeneralProfileIdc ()
 
char getGeneralProfileSpace ()
 
char getGeneralProfileSpace ()
 
char getGeneralTierFlag ()
 
char getGeneralTierFlag ()
 
char getLengthSizeMinus1 ()
 
char getLengthSizeMinus1 ()
 
short getMinSpatialSegmentationIdc ()
 
short getMinSpatialSegmentationIdc ()
 
char getNumberOfTemporalLayers ()
 
char getNumberOfTemporalLayers ()
 
char getParallelismType ()
 
char getParallelismType ()
 
char getTemporalIdNested ()
 
char getTemporalIdNested ()
 
std::string getType ()
 Returns the values at byte positions 4 through 7. More...
 
std::string getType ()
 
bool isType (const char *boxType)
 Returns true if the given 4-byte boxtype is equal to the values at byte positions 4 through 7. More...
 
bool isType (const char *boxType)
 
char * payload ()
 
char * payload ()
 
uint64_t payloadSize ()
 
uint64_t payloadSize ()
 Retruns the size of the payload of thix box, excluding the header. More...
 
bool read (FILE *newData)
 
bool read (FILE *newData)
 
bool read (std::string &newData)
 Reads out a whole box (if possible) from newData, copying to the internal data storage and removing from the input string. More...
 
bool read (std::string &newData)
 
void setArrays (std::deque< HVCCArrayEntry > &arrays)
 
void setArrays (std::deque< HVCCArrayEntry > &arrays)
 
void setAverageFramerate (short newFramerate)
 
void setAverageFramerate (short newFramerate)
 
void setBitDepthChromaMinus8 (char newBitDepthChromaMinus8)
 
void setBitDepthChromaMinus8 (char newBitDepthChromaMinus8)
 
void setBitDepthLumaMinus8 (char newBitDepthLumaMinus8)
 
void setBitDepthLumaMinus8 (char newBitDepthLumaMinus8)
 
void setChromaFormat (char newFormat)
 
void setChromaFormat (char newFormat)
 
void setConfigurationVersion (char newVersion)
 
void setConfigurationVersion (char newVersion)
 
void setConstantFramerate (char newFramerate)
 
void setConstantFramerate (char newFramerate)
 
void setGeneralConstraintIndicatorFlags (unsigned long long newGeneral)
 
void setGeneralConstraintIndicatorFlags (unsigned long long newGeneral)
 
void setGeneralLevelIdc (char newGeneral)
 
void setGeneralLevelIdc (char newGeneral)
 
void setGeneralProfileCompatibilityFlags (unsigned long newGeneral)
 
void setGeneralProfileCompatibilityFlags (unsigned long newGeneral)
 
void setGeneralProfileIdc (char newGeneral)
 
void setGeneralProfileIdc (char newGeneral)
 
void setGeneralProfileSpace (char newGeneral)
 
void setGeneralProfileSpace (char newGeneral)
 
void setGeneralTierFlag (char newGeneral)
 
void setGeneralTierFlag (char newGeneral)
 
void setLengthSizeMinus1 (char newLengthSizeMinus1)
 
void setLengthSizeMinus1 (char newLengthSizeMinus1)
 
void setMinSpatialSegmentationIdc (short newIdc)
 
void setMinSpatialSegmentationIdc (short newIdc)
 
void setNumberOfTemporalLayers (char newNumber)
 
void setNumberOfTemporalLayers (char newNumber)
 
void setParallelismType (char newType)
 
void setParallelismType (char newType)
 
void setPayload (std::string newPayload)
 
void setPayload (std::string newPayload)
 
void setTemporalIdNested (char newNested)
 
void setTemporalIdNested (char newNested)
 
std::string toPrettyString (uint32_t indent=0)
 
std::string toPrettyString (uint32_t indent=0)
 

Protected Member Functions

BoxgetBox (size_t index)
 Gets a reference to the box at the given index. More...
 
BoxgetBox (size_t index)
 
size_t getBoxLen (size_t index)
 
size_t getBoxLen (size_t index)
 Returns the size of the box at the given position. More...
 
short getInt16 (size_t index)
 
short getInt16 (size_t index)
 Gets the 16 bits integer at the given index. More...
 
uint32_t getInt24 (size_t index)
 Gets the 24 bits integer at the given index. More...
 
uint32_t getInt24 (size_t index)
 
uint32_t getInt32 (size_t index)
 
uint32_t getInt32 (size_t index)
 Gets the 32 bits integer at the given index. More...
 
uint64_t getInt64 (size_t index)
 Gets the 64 bits integer at the given index. More...
 
uint64_t getInt64 (size_t index)
 
char getInt8 (size_t index)
 
char getInt8 (size_t index)
 Gets the 8 bits integer at the given index. More...
 
char * getString (size_t index)
 Gets the NULL-terminated string at the given index. More...
 
char * getString (size_t index)
 
size_t getStringLen (size_t index)
 Returns the length of the NULL-terminated string at the given index. More...
 
size_t getStringLen (size_t index)
 
bool reserve (size_t position, size_t current, size_t wanted)
 Attempts to reserve enough space for wanted bytes of data at given position, where current bytes of data is now reserved. More...
 
bool reserve (size_t position, size_t current, size_t wanted)
 
void setBox (Box &newEntry, size_t index)
 
void setBox (Box &newEntry, size_t index)
 Replaces the existing box at the given index by the new box newEntry. More...
 
void setInt16 (short newData, size_t index)
 Sets the 16 bits integer at the given index. More...
 
void setInt16 (short newData, size_t index)
 
void setInt24 (uint32_t newData, size_t index)
 Sets the 24 bits integer at the given index. More...
 
void setInt24 (uint32_t newData, size_t index)
 
void setInt32 (uint32_t newData, size_t index)
 Sets the 32 bits integer at the given index. More...
 
void setInt32 (uint32_t newData, size_t index)
 
void setInt64 (uint64_t newData, size_t index)
 
void setInt64 (uint64_t newData, size_t index)
 Sets the 64 bits integer at the given index. More...
 
void setInt8 (char newData, size_t index)
 
void setInt8 (char newData, size_t index)
 Sets the 8 bits integer at the given index. More...
 
void setString (std::string newData, size_t index)
 
void setString (std::string newData, size_t index)
 Sets the NULL-terminated string at the given index. More...
 
void setString (char *newData, size_t size, size_t index)
 Sets the NULL-terminated string at the given index. More...
 
void setString (char *newData, size_t size, size_t index)
 

Protected Attributes

char * data
 Holds the data of this box. More...
 
unsigned int data_size
 Currently reserved size. More...
 
bool managed
 If false, will not attempt to resize/free the data pointer. More...
 
unsigned int payloadOffset
 The offset of the payload with regards to the data. More...
 

Constructor & Destructor Documentation

MP4::HVCC::HVCC ( )
MP4::HVCC::HVCC ( )

Member Function Documentation

std::string MP4::HVCC::asAnnexB ( )
std::string MP4::HVCC::asAnnexB ( )
char * MP4::Box::asBox ( )
inherited

Returns a copy of the data pointer.

char* MP4::Box::asBox ( )
inherited
uint64_t MP4::Box::boxedSize ( )
inherited
uint64_t MP4::Box::boxedSize ( )
inherited

Returns the total boxed size of this box, including the header.

void MP4::Box::clear ( )
inherited

Makes this box managed if it wasn't already, resetting the internal storage to 8 bytes (the minimum).

If this box wasn't managed, the original data is left intact - otherwise it is free'd. If it was somehow impossible to allocate 8 bytes (should never happen), this will cause segfaults later.

void MP4::Box::clear ( )
inherited
std::deque< HVCCArrayEntry > MP4::HVCC::getArrays ( )
std::deque<HVCCArrayEntry> MP4::HVCC::getArrays ( )
short MP4::HVCC::getAverageFramerate ( )
short MP4::HVCC::getAverageFramerate ( )
char MP4::HVCC::getBitDepthChromaMinus8 ( )
char MP4::HVCC::getBitDepthChromaMinus8 ( )
char MP4::HVCC::getBitDepthLumaMinus8 ( )
char MP4::HVCC::getBitDepthLumaMinus8 ( )
Box & MP4::Box::getBox ( size_t  index)
protectedinherited

Gets a reference to the box at the given index.

Do not store or copy this reference, for there will be raptors. Will attempt to resize if out of range. Returns an 8-byte error box if resizing failed.

Box& MP4::Box::getBox ( size_t  index)
protectedinherited
size_t MP4::Box::getBoxLen ( size_t  index)
protectedinherited
size_t MP4::Box::getBoxLen ( size_t  index)
protectedinherited

Returns the size of the box at the given position.

Returns undefined values if there is no box at the given position. Returns 0 if out of range.

char MP4::HVCC::getChromaFormat ( )
char MP4::HVCC::getChromaFormat ( )
char MP4::HVCC::getConfigurationVersion ( )
char MP4::HVCC::getConfigurationVersion ( )
char MP4::HVCC::getConstantFramerate ( )
char MP4::HVCC::getConstantFramerate ( )
unsigned long long MP4::HVCC::getGeneralConstraintIndicatorFlags ( )
unsigned long long MP4::HVCC::getGeneralConstraintIndicatorFlags ( )
char MP4::HVCC::getGeneralLevelIdc ( )
char MP4::HVCC::getGeneralLevelIdc ( )
unsigned long MP4::HVCC::getGeneralProfileCompatibilityFlags ( )
unsigned long MP4::HVCC::getGeneralProfileCompatibilityFlags ( )
char MP4::HVCC::getGeneralProfileIdc ( )
char MP4::HVCC::getGeneralProfileIdc ( )
char MP4::HVCC::getGeneralProfileSpace ( )
char MP4::HVCC::getGeneralProfileSpace ( )
char MP4::HVCC::getGeneralTierFlag ( )
char MP4::HVCC::getGeneralTierFlag ( )
short MP4::Box::getInt16 ( size_t  index)
protectedinherited

Gets the 16 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Returns zero if resizing failed.

short MP4::Box::getInt16 ( size_t  index)
protectedinherited
uint32_t MP4::Box::getInt24 ( size_t  index)
protectedinherited

Gets the 24 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Returns zero if resizing failed.

uint32_t MP4::Box::getInt24 ( size_t  index)
protectedinherited
uint32_t MP4::Box::getInt32 ( size_t  index)
protectedinherited

Gets the 32 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Returns zero if resizing failed.

uint32_t MP4::Box::getInt32 ( size_t  index)
protectedinherited
uint64_t MP4::Box::getInt64 ( size_t  index)
protectedinherited

Gets the 64 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Returns zero if resizing failed.

uint64_t MP4::Box::getInt64 ( size_t  index)
protectedinherited
char MP4::Box::getInt8 ( size_t  index)
protectedinherited

Gets the 8 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Returns zero if resizing failed.

char MP4::Box::getInt8 ( size_t  index)
protectedinherited
char MP4::HVCC::getLengthSizeMinus1 ( )
char MP4::HVCC::getLengthSizeMinus1 ( )
short MP4::HVCC::getMinSpatialSegmentationIdc ( )
short MP4::HVCC::getMinSpatialSegmentationIdc ( )
char MP4::HVCC::getNumberOfTemporalLayers ( )
char MP4::HVCC::getNumberOfTemporalLayers ( )
char MP4::HVCC::getParallelismType ( )
char MP4::HVCC::getParallelismType ( )
char * MP4::Box::getString ( size_t  index)
protectedinherited

Gets the NULL-terminated string at the given index.

Will attempt to resize if the string is out of range. Returns null if resizing failed.

char* MP4::Box::getString ( size_t  index)
protectedinherited
size_t MP4::Box::getStringLen ( size_t  index)
protectedinherited
size_t MP4::Box::getStringLen ( size_t  index)
protectedinherited

Returns the length of the NULL-terminated string at the given index.

Returns 0 if out of range.

char MP4::HVCC::getTemporalIdNested ( )
char MP4::HVCC::getTemporalIdNested ( )
std::string MP4::Box::getType ( )
inherited

Returns the values at byte positions 4 through 7.

std::string MP4::Box::getType ( )
inherited
bool MP4::Box::isType ( const char *  boxType)
inherited

Returns true if the given 4-byte boxtype is equal to the values at byte positions 4 through 7.

bool MP4::Box::isType ( const char *  boxType)
inherited
char * MP4::Box::payload ( )
inherited
char* MP4::Box::payload ( )
inherited
uint64_t MP4::Box::payloadSize ( )
inherited

Retruns the size of the payload of thix box, excluding the header.

This value is defined as boxedSize() - 8.

uint64_t MP4::Box::payloadSize ( )
inherited
bool MP4::Box::read ( FILE *  newData)
inherited
bool MP4::Box::read ( FILE *  newData)
inherited
bool MP4::Box::read ( std::string &  newData)
inherited

Reads out a whole box (if possible) from newData, copying to the internal data storage and removing from the input string.

Returns
True on success, false otherwise.
bool MP4::Box::read ( std::string &  newData)
inherited
bool MP4::Box::reserve ( size_t  position,
size_t  current,
size_t  wanted 
)
protectedinherited

Attempts to reserve enough space for wanted bytes of data at given position, where current bytes of data is now reserved.

This will move any existing data behind the currently reserved space to the proper location after reserving.

Returns
True on success, false otherwise.
bool MP4::Box::reserve ( size_t  position,
size_t  current,
size_t  wanted 
)
protectedinherited
void MP4::HVCC::setArrays ( std::deque< HVCCArrayEntry > &  arrays)
Todo:
Add setter for the array entries
void MP4::HVCC::setArrays ( std::deque< HVCCArrayEntry > &  arrays)
Todo:
Add setter for the array entries
void MP4::HVCC::setAverageFramerate ( short  newFramerate)
void MP4::HVCC::setAverageFramerate ( short  newFramerate)
void MP4::HVCC::setBitDepthChromaMinus8 ( char  newBitDepthChromaMinus8)
void MP4::HVCC::setBitDepthChromaMinus8 ( char  newBitDepthChromaMinus8)
void MP4::HVCC::setBitDepthLumaMinus8 ( char  newBitDepthLumaMinus8)
void MP4::HVCC::setBitDepthLumaMinus8 ( char  newBitDepthLumaMinus8)
void MP4::Box::setBox ( Box newEntry,
size_t  index 
)
protectedinherited

Replaces the existing box at the given index by the new box newEntry.

Will resize if needed, will reserve new space if out of range.

void MP4::Box::setBox ( Box newEntry,
size_t  index 
)
protectedinherited
void MP4::HVCC::setChromaFormat ( char  newFormat)
void MP4::HVCC::setChromaFormat ( char  newFormat)
void MP4::HVCC::setConfigurationVersion ( char  newVersion)
void MP4::HVCC::setConfigurationVersion ( char  newVersion)
void MP4::HVCC::setConstantFramerate ( char  newFramerate)
void MP4::HVCC::setConstantFramerate ( char  newFramerate)
void MP4::HVCC::setGeneralConstraintIndicatorFlags ( unsigned long long  newGeneral)
void MP4::HVCC::setGeneralConstraintIndicatorFlags ( unsigned long long  newGeneral)
void MP4::HVCC::setGeneralLevelIdc ( char  newGeneral)
void MP4::HVCC::setGeneralLevelIdc ( char  newGeneral)
void MP4::HVCC::setGeneralProfileCompatibilityFlags ( unsigned long  newGeneral)
void MP4::HVCC::setGeneralProfileCompatibilityFlags ( unsigned long  newGeneral)
void MP4::HVCC::setGeneralProfileIdc ( char  newGeneral)
void MP4::HVCC::setGeneralProfileIdc ( char  newGeneral)
void MP4::HVCC::setGeneralProfileSpace ( char  newGeneral)
void MP4::HVCC::setGeneralProfileSpace ( char  newGeneral)
void MP4::HVCC::setGeneralTierFlag ( char  newGeneral)
void MP4::HVCC::setGeneralTierFlag ( char  newGeneral)
void MP4::Box::setInt16 ( short  newData,
size_t  index 
)
protectedinherited
void MP4::Box::setInt16 ( short  newData,
size_t  index 
)
protectedinherited

Sets the 16 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Fails silently if resizing failed.

void MP4::Box::setInt24 ( uint32_t  newData,
size_t  index 
)
protectedinherited
void MP4::Box::setInt24 ( uint32_t  newData,
size_t  index 
)
protectedinherited

Sets the 24 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Fails silently if resizing failed.

void MP4::Box::setInt32 ( uint32_t  newData,
size_t  index 
)
protectedinherited

Sets the 32 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Fails silently if resizing failed.

void MP4::Box::setInt32 ( uint32_t  newData,
size_t  index 
)
protectedinherited
void MP4::Box::setInt64 ( uint64_t  newData,
size_t  index 
)
protectedinherited
void MP4::Box::setInt64 ( uint64_t  newData,
size_t  index 
)
protectedinherited

Sets the 64 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Fails silently if resizing failed.

void MP4::Box::setInt8 ( char  newData,
size_t  index 
)
protectedinherited
void MP4::Box::setInt8 ( char  newData,
size_t  index 
)
protectedinherited

Sets the 8 bits integer at the given index.

Attempts to resize the data pointer if the index is out of range. Fails silently if resizing failed.

void MP4::HVCC::setLengthSizeMinus1 ( char  newLengthSizeMinus1)
void MP4::HVCC::setLengthSizeMinus1 ( char  newLengthSizeMinus1)
void MP4::HVCC::setMinSpatialSegmentationIdc ( short  newIdc)
void MP4::HVCC::setMinSpatialSegmentationIdc ( short  newIdc)
void MP4::HVCC::setNumberOfTemporalLayers ( char  newNumber)
void MP4::HVCC::setNumberOfTemporalLayers ( char  newNumber)
void MP4::HVCC::setParallelismType ( char  newType)
void MP4::HVCC::setParallelismType ( char  newType)
void MP4::HVCC::setPayload ( std::string  newPayload)
void MP4::HVCC::setPayload ( std::string  newPayload)
void MP4::Box::setString ( std::string  newData,
size_t  index 
)
protectedinherited
void MP4::Box::setString ( std::string  newData,
size_t  index 
)
protectedinherited

Sets the NULL-terminated string at the given index.

Will attempt to resize if the string doesn't fit. Fails silently if resizing failed.

void MP4::Box::setString ( char *  newData,
size_t  size,
size_t  index 
)
protectedinherited
void MP4::Box::setString ( char *  newData,
size_t  size,
size_t  index 
)
protectedinherited

Sets the NULL-terminated string at the given index.

Will attempt to resize if the string doesn't fit. Fails silently if resizing failed.

void MP4::HVCC::setTemporalIdNested ( char  newNested)
void MP4::HVCC::setTemporalIdNested ( char  newNested)
std::string MP4::HVCC::toPrettyString ( uint32_t  indent = 0)
std::string MP4::HVCC::toPrettyString ( uint32_t  indent = 0)

Field Documentation

char * MP4::Box::data
protectedinherited

Holds the data of this box.

unsigned int MP4::Box::data_size
protectedinherited

Currently reserved size.

bool MP4::Box::managed
protectedinherited

If false, will not attempt to resize/free the data pointer.

unsigned int MP4::Box::payloadOffset
protectedinherited

The offset of the payload with regards to the data.


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