Shaka Packager SDK
|
#include <box_buffer.h>
Public Member Functions | |
BoxBuffer (BoxReader *reader) | |
BoxBuffer (BufferWriter *writer) | |
bool | Reading () const |
size_t | Pos () const |
size_t | Size () const |
size_t | BytesLeft () const |
bool | ReadWriteUInt64NBytes (uint64_t *v, size_t num_bytes) |
bool | ReadWriteInt64NBytes (int64_t *v, size_t num_bytes) |
bool | ReadWriteVector (std::vector< uint8_t > *vector, size_t count) |
bool | ReadWriteString (std::string *str, size_t size) |
bool | ReadWriteCString (std::string *str) |
bool | ReadWriteFourCC (FourCC *fourcc) |
bool | PrepareChildren () |
bool | ReadWriteChild (Box *box) |
bool | TryReadWriteChild (Box *box) |
bool | IgnoreBytes (size_t num_bytes) |
BoxReader * | reader () |
BufferWriter * | writer () |
Read/write integers of various sizes and signedness. | |
bool | ReadWriteUInt8 (uint8_t *v) |
bool | ReadWriteUInt16 (uint16_t *v) |
bool | ReadWriteUInt32 (uint32_t *v) |
bool | ReadWriteUInt64 (uint64_t *v) |
bool | ReadWriteInt16 (int16_t *v) |
bool | ReadWriteInt32 (int32_t *v) |
bool | ReadWriteInt64 (int64_t *v) |
Class for MP4 box I/O. Box I/O is symmetric and exclusive, so we can define a single method to do either reading or writing box objects. BoxBuffer wraps either BoxReader for reading or BufferWriter for writing. Thus it is capable of doing either reading or writing, but not both.
Definition at line 27 of file box_buffer.h.
|
inlineexplicit |
Create a reader version of the BoxBuffer.
reader | should not be NULL. |
Definition at line 31 of file box_buffer.h.
|
inlineexplicit |
Create a writer version of the BoxBuffer.
writer | should not be NULL. |
Definition at line 36 of file box_buffer.h.
|
inline |
Definition at line 64 of file box_buffer.h.
|
inline |
num_bytes | specifies number of bytes to skip in read mode or number of bytes to be padded with zero in write mode. |
Definition at line 201 of file box_buffer.h.
|
inline |
Definition at line 46 of file box_buffer.h.
|
inline |
Prepare child boxes for reading/writing.
Definition at line 169 of file box_buffer.h.
|
inline |
Definition at line 210 of file box_buffer.h.
|
inline |
Definition at line 42 of file box_buffer.h.
|
inline |
Read/write child box.
Definition at line 178 of file box_buffer.h.
|
inline |
Reads size characters from the buffer and sets it to str. Writes str to the buffer. Write mode ignores size.
Definition at line 141 of file box_buffer.h.
|
inline |
Read/write the least significant |num_bytes| of |v| from/to the buffer.
num_bytes | should not be larger than sizeof(v), i.e. 8. |
Definition at line 119 of file box_buffer.h.
|
inline |
Definition at line 56 of file box_buffer.h.
|
inline |
Read/write child box if exists.
Definition at line 189 of file box_buffer.h.
|
inline |
Definition at line 212 of file box_buffer.h.