7 #ifndef MEDIA_BASE_BUFFER_WRITER_H_
8 #define MEDIA_BASE_BUFFER_WRITER_H_
12 #include "packager/base/macros.h"
13 #include "packager/status.h"
50 void AppendVector(
const std::vector<uint8_t>& v);
51 void AppendArray(
const uint8_t* buf,
size_t size);
54 void Swap(
BufferWriter* buffer) { buf_.swap(buffer->buf_); }
55 void SwapBuffer(std::vector<uint8_t>* buffer) { buf_.swap(*buffer); }
57 void Clear() { buf_.clear(); }
58 size_t Size()
const {
return buf_.size(); }
60 const uint8_t*
Buffer()
const {
return buf_.data(); }
71 void AppendInternal(T v);
73 std::vector<uint8_t> buf_;
81 #endif // MEDIA_BASE_BUFFER_WRITER_H_
Define an abstract file interface.