arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
MP4BoxWriter Class Reference

Minimal ISO-BMFF box builder: appends bytes to an in-memory buffer, with beginBox()/endBox() taking care of the 4-byte size prefix (backpatched once the box's content is known) - used internally by MuxerMP4 to assemble 'moov' once and each 'moof' per fragment. More...

#include <ContainerMP4.h>

Public Member Functions

size_t beginBox (const char *type)
 
void bytes (const uint8_t *data, size_t len)
 
void clear ()
 
void cstr (const char *s)
 
const uint8_t * data ()
 
void endBox (size_t pos)
 
void fourcc (const char *type)
 
size_t size ()
 
void u16 (uint16_t v)
 
void u24 (uint32_t v)
 
void u32 (uint32_t v)
 
void u8 (uint8_t v)
 
void zeros (size_t len)
 

Public Attributes

Vector< uint8_t > buffer
 

Detailed Description

Minimal ISO-BMFF box builder: appends bytes to an in-memory buffer, with beginBox()/endBox() taking care of the 4-byte size prefix (backpatched once the box's content is known) - used internally by MuxerMP4 to assemble 'moov' once and each 'moof' per fragment.

Member Function Documentation

◆ beginBox()

size_t beginBox ( const char *  type)
inline

Writes the 4-byte size placeholder + fourcc, returns the box's start position (pass to endBox() once its content has been written).

◆ bytes()

void bytes ( const uint8_t *  data,
size_t  len 
)
inline

◆ clear()

void clear ( )
inline

◆ cstr()

void cstr ( const char *  s)
inline

◆ data()

const uint8_t * data ( )
inline

◆ endBox()

void endBox ( size_t  pos)
inline

Backpatches the size placeholder from beginBox() with the box's actual total size (header + content), now that it's known.

◆ fourcc()

void fourcc ( const char *  type)
inline

◆ size()

size_t size ( )
inline

◆ u16()

void u16 ( uint16_t  v)
inline

◆ u24()

void u24 ( uint32_t  v)
inline

◆ u32()

void u32 ( uint32_t  v)
inline

◆ u8()

void u8 ( uint8_t  v)
inline

◆ zeros()

void zeros ( size_t  len)
inline

Member Data Documentation

◆ buffer

Vector<uint8_t> buffer

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