class H264BitReader

Defined at line 22 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.h

A class to provide bit-granularity reading of H.264 streams.

This is not a generic bit reader class, as it takes into account

H.264 stream-specific constraints, such as skipping emulation-prevention

bytes and stop bits. See spec for more details.

Public Methods

void H264BitReader ()

Defined at line 11 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc

void ~H264BitReader ()

Defined at line 19 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc

bool Initialize (const uint8_t * data, off_t size)

Initialize the reader to start reading at |data|, |size| being size

of |data| in bytes.

Return false on insufficient size of stream..

TODO(posciak,fischman): consider replacing Initialize() with

heap-allocating and creating bit readers on demand instead.

Defined at line 21 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc

void H264BitReader (const H264BitReader & )

Defined at line 26 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.h

H264BitReader & operator= (const H264BitReader & )

Defined at line 27 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.h

bool ReadBits (int num_bits, int * out)

Read |num_bits| next bits from stream and return in |*out|, first bit

from the stream starting at |num_bits| position in |*out|.

|num_bits| may be 1-32, inclusive.

Return false if the given number of bits cannot be read (not enough

bits in the stream), true otherwise.

Defined at line 71 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc

off_t NumBitsLeft ()

Return the number of bits left in the stream.

Defined at line 92 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc

bool HasMoreRBSPData ()

See the definition of more_rbsp_data() in spec.

Defined at line 96 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc

size_t NumEmulationPreventionBytesRead ()

Return the number of emulation prevention bytes already read.

Defined at line 122 of file ../../src/media/third_party/chromium_media/media/video/h264_bit_reader.cc