|
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 31 of file box_buffer.h.
|
inlineexplicit |
Create a reader version of the BoxBuffer.
| reader | should not be NULL. |
Definition at line 35 of file box_buffer.h.
|
inlineexplicit |
Create a writer version of the BoxBuffer.
| writer | should not be NULL. |
Definition at line 40 of file box_buffer.h.
|
inline |
Definition at line 43 of file box_buffer.h.
|
inline |
Definition at line 68 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 205 of file box_buffer.h.
|
inline |
Definition at line 50 of file box_buffer.h.
|
inline |
Prepare child boxes for reading/writing.
Definition at line 173 of file box_buffer.h.
|
inline |
Definition at line 214 of file box_buffer.h.
|
inline |
Definition at line 46 of file box_buffer.h.
|
inline |
Read/write child box.
Definition at line 182 of file box_buffer.h.
|
inline |
Definition at line 154 of file box_buffer.h.
|
inline |
Definition at line 164 of file box_buffer.h.
|
inline |
Definition at line 100 of file box_buffer.h.
|
inline |
Definition at line 106 of file box_buffer.h.
|
inline |
Definition at line 112 of file box_buffer.h.
|
inline |
Definition at line 129 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 145 of file box_buffer.h.
|
inline |
Definition at line 82 of file box_buffer.h.
|
inline |
Definition at line 88 of file box_buffer.h.
|
inline |
Definition at line 94 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 123 of file box_buffer.h.
|
inline |
Definition at line 76 of file box_buffer.h.
|
inline |
Definition at line 135 of file box_buffer.h.
|
inline |
Definition at line 60 of file box_buffer.h.
|
inline |
Read/write child box if exists.
Definition at line 193 of file box_buffer.h.
|
inline |
Definition at line 216 of file box_buffer.h.