|
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 28 of file box_buffer.h.
|
inlineexplicit |
Create a reader version of the BoxBuffer.
| reader | should not be NULL. |
Definition at line 32 of file box_buffer.h.
|
inlineexplicit |
Create a writer version of the BoxBuffer.
| writer | should not be NULL. |
Definition at line 37 of file box_buffer.h.
|
inline |
Definition at line 40 of file box_buffer.h.
|
inline |
Definition at line 65 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 202 of file box_buffer.h.
|
inline |
Definition at line 47 of file box_buffer.h.
|
inline |
Prepare child boxes for reading/writing.
Definition at line 170 of file box_buffer.h.
|
inline |
Definition at line 211 of file box_buffer.h.
|
inline |
Definition at line 43 of file box_buffer.h.
|
inline |
Read/write child box.
Definition at line 179 of file box_buffer.h.
|
inline |
Definition at line 151 of file box_buffer.h.
|
inline |
Definition at line 161 of file box_buffer.h.
|
inline |
Definition at line 97 of file box_buffer.h.
|
inline |
Definition at line 103 of file box_buffer.h.
|
inline |
Definition at line 109 of file box_buffer.h.
|
inline |
Definition at line 126 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 142 of file box_buffer.h.
|
inline |
Definition at line 79 of file box_buffer.h.
|
inline |
Definition at line 85 of file box_buffer.h.
|
inline |
Definition at line 91 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 120 of file box_buffer.h.
|
inline |
Definition at line 73 of file box_buffer.h.
|
inline |
Definition at line 132 of file box_buffer.h.
|
inline |
Definition at line 57 of file box_buffer.h.
|
inline |
Read/write child box if exists.
Definition at line 190 of file box_buffer.h.
|
inline |
Definition at line 213 of file box_buffer.h.