Shaka Player Embedded
|
#include <buffer_writer.h>
Public Member Functions | |
BufferWriter (uint8_t *data, size_t data_size) | |
bool | empty () const |
size_t | BytesRemaining () const |
void | WriteByte (uint8_t byte) |
void | WriteTag (const char(&tag)[5]) |
template<typename T , typename = typename std::enable_if< std::is_integral<T>::value>::type> | |
void | Write (T value, Endianness endian=kBigEndian) |
void | Write (const std::vector< uint8_t > &data) |
void | Write (const void *src, size_t src_size) |
A simple utility class to write bytes to a buffer. This does not own the data and is not thread safe.
This will fail a CHECK if a write would extend past the end of the buffer.
Definition at line 35 of file buffer_writer.h.
shaka::util::BufferWriter::BufferWriter | ( | uint8_t * | data, |
size_t | data_size | ||
) |
Definition at line 24 of file buffer_writer.cc.
|
inline |
Definition at line 44 of file buffer_writer.h.
|
inline |
Definition at line 39 of file buffer_writer.h.
|
inline |
Writes the given number.
Definition at line 62 of file buffer_writer.h.
|
inline |
Writes the given vector.
Definition at line 76 of file buffer_writer.h.
void shaka::util::BufferWriter::Write | ( | const void * | src, |
size_t | src_size | ||
) |
Writes |src_size| bytes and copies them from |src|.
src | The buffer to copy the data from. |
src_size | The number of bytes in |src|. |
Definition at line 27 of file buffer_writer.cc.
|
inline |
Writes a single byte.
Definition at line 49 of file buffer_writer.h.
|
inline |
Writes the given big-endian MP4 tag.
Definition at line 54 of file buffer_writer.h.