MistServer
2.5.3-Pro-19-gf5e75b1 ( Generic_64)
|
#include <mp4_generic.h>
Public Member Functions | |
TKHD (uint32_t trackId, uint64_t duration, uint32_t width, uint32_t height) | |
TKHD (uint32_t trackId, uint64_t duration, uint32_t width, uint32_t height) | |
TKHD (DTSC::Track &track, bool fragmented) | |
TKHD (DTSC::Track &track, bool fragmented) | |
char * | asBox () |
Returns a copy of the data pointer. More... | |
char * | asBox () |
uint64_t | boxedSize () |
Returns the total boxed size of this box, including the header. More... | |
uint64_t | boxedSize () |
void | clear () |
Makes this box managed if it wasn't already, resetting the internal storage to 8 bytes (the minimum). More... | |
void | clear () |
uint16_t | getAlternateGroup () |
uint16_t | getAlternateGroup () |
uint64_t | getCreationTime () |
uint64_t | getCreationTime () |
uint64_t | getDuration () |
uint64_t | getDuration () |
uint32_t | getFlags () |
uint32_t | getFlags () |
double | getHeight () |
double | getHeight () |
uint16_t | getLayer () |
uint16_t | getLayer () |
int32_t | getMatrix (size_t index) |
int32_t | getMatrix (size_t index) |
uint32_t | getMatrixCount () |
uint32_t | getMatrixCount () |
uint64_t | getModificationTime () |
uint64_t | getModificationTime () |
uint32_t | getTrackID () |
uint32_t | getTrackID () |
std::string | getType () |
Returns the values at byte positions 4 through 7. More... | |
std::string | getType () |
char | getVersion () |
char | getVersion () |
uint16_t | getVolume () |
uint16_t | getVolume () |
double | getWidth () |
double | getWidth () |
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 () |
Retruns the size of the payload of thix box, excluding the header. More... | |
uint64_t | payloadSize () |
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 | setAlternateGroup (uint16_t newAlternateGroup) |
void | setAlternateGroup (uint16_t newAlternateGroup) |
void | setCreationTime (uint64_t newCreationTime) |
void | setCreationTime (uint64_t newCreationTime) |
void | setDuration (uint64_t newDuration) |
void | setDuration (uint64_t newDuration) |
void | setFlags (uint32_t newFlags) |
void | setFlags (uint32_t newFlags) |
void | setHeight (double newHeight) |
void | setHeight (double newHeight) |
void | setLayer (uint16_t newLayer) |
void | setLayer (uint16_t newLayer) |
void | setMatrix (int32_t newMatrix, size_t index) |
void | setMatrix (int32_t newMatrix, size_t index) |
void | setModificationTime (uint64_t newModificationTime) |
void | setModificationTime (uint64_t newModificationTime) |
void | setTrackID (uint32_t newTrackID) |
void | setTrackID (uint32_t newTrackID) |
void | setVersion (char newVersion) |
void | setVersion (char newVersion) |
void | setVolume (uint16_t newVolume) |
void | setVolume (uint16_t newVolume) |
void | setWidth (double newWidth) |
void | setWidth (double newWidth) |
std::string | toPrettyString (uint32_t indent=0) |
std::string | toPrettyString (uint32_t indent=0) |
Protected Member Functions | |
Box & | getBox (size_t index) |
Gets a reference to the box at the given index. More... | |
Box & | getBox (size_t index) |
size_t | getBoxLen (size_t index) |
Returns the size of the box at the given position. More... | |
size_t | getBoxLen (size_t index) |
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) |
Gets the 32 bits integer at the given index. More... | |
uint32_t | getInt32 (size_t index) |
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) |
Gets the 8 bits integer at the given index. More... | |
char | getInt8 (size_t index) |
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) |
void | initialize () |
void | initialize () |
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) |
void | setInt16 (short newData, size_t index) |
Sets the 16 bits integer at the given index. More... | |
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) |
void | setInt32 (uint32_t newData, size_t index) |
Sets the 32 bits integer at the given index. More... | |
void | setInt64 (uint64_t newData, size_t index) |
Sets the 64 bits integer at the given index. More... | |
void | setInt64 (uint64_t newData, size_t index) |
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) |
Sets the NULL-terminated string at the given index. More... | |
void | setString (std::string newData, size_t index) |
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... | |
MP4::TKHD::TKHD | ( | uint32_t | trackId, |
uint64_t | duration, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
MP4::TKHD::TKHD | ( | DTSC::Track & | track, |
bool | fragmented | ||
) |
MP4::TKHD::TKHD | ( | uint32_t | trackId, |
uint64_t | duration, | ||
uint32_t | width, | ||
uint32_t | height | ||
) |
MP4::TKHD::TKHD | ( | DTSC::Track & | track, |
bool | fragmented | ||
) |
|
inherited |
Returns a copy of the data pointer.
|
inherited |
|
inherited |
Returns the total boxed size of this box, including the header.
|
inherited |
|
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.
|
inherited |
uint16_t MP4::TKHD::getAlternateGroup | ( | ) |
uint16_t MP4::TKHD::getAlternateGroup | ( | ) |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
uint64_t MP4::TKHD::getCreationTime | ( | ) |
uint64_t MP4::TKHD::getCreationTime | ( | ) |
uint64_t MP4::TKHD::getDuration | ( | ) |
uint64_t MP4::TKHD::getDuration | ( | ) |
|
inherited |
|
inherited |
double MP4::TKHD::getHeight | ( | ) |
double MP4::TKHD::getHeight | ( | ) |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
uint16_t MP4::TKHD::getLayer | ( | ) |
uint16_t MP4::TKHD::getLayer | ( | ) |
int32_t MP4::TKHD::getMatrix | ( | size_t | index | ) |
int32_t MP4::TKHD::getMatrix | ( | size_t | index | ) |
uint32_t MP4::TKHD::getMatrixCount | ( | ) |
uint32_t MP4::TKHD::getMatrixCount | ( | ) |
uint64_t MP4::TKHD::getModificationTime | ( | ) |
uint64_t MP4::TKHD::getModificationTime | ( | ) |
|
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.
|
protectedinherited |
|
protectedinherited |
Returns the length of the NULL-terminated string at the given index.
Returns 0 if out of range.
|
protectedinherited |
uint32_t MP4::TKHD::getTrackID | ( | ) |
uint32_t MP4::TKHD::getTrackID | ( | ) |
|
inherited |
Returns the values at byte positions 4 through 7.
|
inherited |
|
inherited |
|
inherited |
uint16_t MP4::TKHD::getVolume | ( | ) |
uint16_t MP4::TKHD::getVolume | ( | ) |
double MP4::TKHD::getWidth | ( | ) |
double MP4::TKHD::getWidth | ( | ) |
|
protected |
|
protected |
|
inherited |
Returns true if the given 4-byte boxtype is equal to the values at byte positions 4 through 7.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Retruns the size of the payload of thix box, excluding the header.
This value is defined as boxedSize() - 8.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Reads out a whole box (if possible) from newData, copying to the internal data storage and removing from the input string.
|
inherited |
|
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.
|
protectedinherited |
void MP4::TKHD::setAlternateGroup | ( | uint16_t | newAlternateGroup | ) |
void MP4::TKHD::setAlternateGroup | ( | uint16_t | newAlternateGroup | ) |
|
protectedinherited |
|
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::TKHD::setCreationTime | ( | uint64_t | newCreationTime | ) |
void MP4::TKHD::setCreationTime | ( | uint64_t | newCreationTime | ) |
void MP4::TKHD::setDuration | ( | uint64_t | newDuration | ) |
void MP4::TKHD::setDuration | ( | uint64_t | newDuration | ) |
|
inherited |
|
inherited |
void MP4::TKHD::setHeight | ( | double | newHeight | ) |
void MP4::TKHD::setHeight | ( | double | newHeight | ) |
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
|
protectedinherited |
|
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.
|
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.
|
protectedinherited |
|
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.
|
protectedinherited |
void MP4::TKHD::setLayer | ( | uint16_t | newLayer | ) |
void MP4::TKHD::setLayer | ( | uint16_t | newLayer | ) |
void MP4::TKHD::setMatrix | ( | int32_t | newMatrix, |
size_t | index | ||
) |
void MP4::TKHD::setMatrix | ( | int32_t | newMatrix, |
size_t | index | ||
) |
void MP4::TKHD::setModificationTime | ( | uint64_t | newModificationTime | ) |
void MP4::TKHD::setModificationTime | ( | uint64_t | newModificationTime | ) |
|
protectedinherited |
|
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.
|
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.
|
protectedinherited |
void MP4::TKHD::setTrackID | ( | uint32_t | newTrackID | ) |
void MP4::TKHD::setTrackID | ( | uint32_t | newTrackID | ) |
|
inherited |
|
inherited |
void MP4::TKHD::setVolume | ( | uint16_t | newVolume | ) |
void MP4::TKHD::setVolume | ( | uint16_t | newVolume | ) |
void MP4::TKHD::setWidth | ( | double | newWidth | ) |
void MP4::TKHD::setWidth | ( | double | newWidth | ) |
std::string MP4::TKHD::toPrettyString | ( | uint32_t | indent = 0 | ) |
std::string MP4::TKHD::toPrettyString | ( | uint32_t | indent = 0 | ) |
|
protectedinherited |
Holds the data of this box.
|
protectedinherited |
Currently reserved size.
|
protectedinherited |
If false, will not attempt to resize/free the data pointer.
|
protectedinherited |
The offset of the payload with regards to the data.