class H264BitReader

Defined at line 23 of file ../../src/media/third_party/chromium_media/media/parsers/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 12 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc

void ~H264BitReader ()

Defined at line 13 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc

bool Initialize (base::span<const uint8_t> data)

Initialize the reader to start reading at |data|.

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 15 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc

void H264BitReader (const H264BitReader & )

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

H264BitReader & operator= (const H264BitReader & )

Defined at line 28 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.h

bool ReadBits (size_t num_bits, uint32_t * 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-31, inclusive.

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

bits in the stream), true otherwise.

Defined at line 61 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc

size_t NumBitsLeft ()

Return the number of bits left in the stream.

Defined at line 84 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc

bool HasMoreRBSPData ()

See the definition of more_rbsp_data() in spec.

Defined at line 88 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc

size_t NumEmulationPreventionBytesRead ()

Return the number of emulation prevention bytes already read.

Defined at line 117 of file ../../src/media/third_party/chromium_media/media/parsers/h264_bit_reader.cc