class H264BitstreamBuffer
Defined at line 32 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.h
Holds one or more NALUs as a raw bitstream buffer in H.264 Annex-B format.
Note that this class currently does NOT insert emulation prevention
three-byte sequences (spec 7.3.1).
Refcounted as these buffers may be used as arguments to multiple codec jobs
(e.g. a buffer containing an H.264 SPS NALU may be used as an argument to all
jobs that use parameters contained in that SPS).
Public Methods
void H264BitstreamBuffer ()
Defined at line 12 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void Reset ()
Discard all data and reset the buffer for reuse.
Defined at line 21 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void H264BitstreamBuffer (const H264BitstreamBuffer & )
Defined at line 36 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.h
H264BitstreamBuffer & operator= (const H264BitstreamBuffer & )
Defined at line 37 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.h
template <typename T>
void AppendBits (size_t num_bits, T val)
Append |num_bits| bits to the stream from |val|.
|val| is interpreted in the host endianness.
Defined at line 45 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.h
void AppendBits (size_t num_bits, bool val)
Defined at line 49 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.h
void AppendBool (bool val)
Append a one-bit bool/flag value |val| to the stream.
Defined at line 85 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void AppendSE (int val)
Append a signed value in |val| in Exp-Golomb code.
Defined at line 94 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void AppendUE (unsigned int val)
Append an unsigned value in |val| in Exp-Golomb code.
Defined at line 101 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void BeginNALU (H264NALU::Type nalu_type, int nal_ref_idc)
Start a new NALU of type |nalu_type| and with given |nal_ref_idc|
(see spec). Note, that until FinishNALU() is called, some of the bits
may not be flushed into the buffer and the data will not be correctly
aligned with trailing bits.
Defined at line 119 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void FinishNALU ()
Finish current NALU. This will flush any cached bits and correctly align
the buffer with RBSP trailing bits. This MUST be called for the stream
returned by data() to be correct.
Defined at line 132 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void Flush ()
Finishes current bit stream. This will flush any cached bits in the reg
without RBSP trailing bits alignment. e.g. for packed slice header, it is
not a complete NALU, the slice data and RBSP trailing will be filled by
user mode driver. This MUST be called for the stream returned by data() to
be correct.
Defined at line 142 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
size_t BytesInBuffer ()
Return number of full bytes in the stream. Note that FinishNALU() has to
be called to flush cached bits, or the return value will not include them.
Defined at line 151 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
size_t BitsInBuffer ()
Returns number of bits in the stream. Note that FinishNALU() or Flush() has
to be called to flush cached bits, or the return value will not include
them.
Defined at line 147 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
const uint8_t * data ()
Return a pointer to the stream. FinishNALU() must be called before
accessing the stream, otherwise some bits may still be cached and not
in the buffer.
Defined at line 156 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc
void ~H264BitstreamBuffer ()
Defined at line 16 of file ../../src/media/third_party/chromium_media/media/filters/h264_bitstream_buffer.cc