class Vp9Parser

Defined at line 258 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.h

A parser for VP9 bitstream.

Public Methods

void Vp9Parser (const Vp9Parser & )

Defined at line 336 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.h

Vp9Parser & operator= (const Vp9Parser & )

Defined at line 337 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.h

const Context & context ()

Return current parsing context.

Defined at line 377 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.h

bool is_stream_empty ()

Fuchsia change: Allow checking that the parser has consumed all frames and

spans.

Defined at line 381 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.h

void Vp9Parser ()

Defined at line 475 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

void ~Vp9Parser ()

Defined at line 479 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

void SetStream (base::span<const uint8_t> stream, const std::vector<uint32_t> & spatial_layer_frame_size, std::unique_ptr<DecryptConfig> stream_config)

Set a new stream buffer to read from, starting at |stream| and of size

|stream_size| in bytes. |stream| must point to the beginning of a single

frame or a single superframe, is owned by caller and must remain valid

until the next call to SetStream(). |spatial_layer_frame_size| may be

filled if the parsed stream is VP9 SVC. It stands for frame sizes of

spatial layers. SVC frame might have multiple frames without superframe

index. The info helps Vp9Parser detecting the beginning of each frame.

Defined at line 481 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

void SetStream (base::span<const uint8_t> stream, std::unique_ptr<DecryptConfig> stream_config)

Defined at line 490 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

Result ParseNextFrame (Vp9FrameHeader * fhdr, gfx::Size * allocate_size, std::unique_ptr<DecryptConfig> * frame_decrypt_config)

Parse the next frame in the current stream buffer, filling |fhdr| with

the parsed frame header and updating current segmentation and loop filter

state. The necessary frame size to decode |fhdr| fills in |allocate_size|.

The size can be larger than frame size of |fhdr| in the case of SVC stream.

Also fills |frame_decrypt_config| _if_ the parser was set to use a super

frame decrypt config.

Return kOk if a frame has successfully been parsed,

kEOStream if there is no more data in the current stream buffer,

kInvalidStream on error.

Defined at line 545 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

std::unique_ptr<DecryptConfig> NextFrameDecryptContextForTesting ()

Perform the same superframe parsing logic, but don't attempt to parse

the normal frame headers afterwards, and then only return the decrypt

config, since the frame itself isn't useful for the testing.

Returns |true| if a frame would have been sent to |ParseUncompressedHeader|

|false| if there was an error parsing the superframe.

Defined at line 611 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

std::string IncrementIVForTesting (const std::string & iv, uint32_t by)

Defined at line 629 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

void Reset ()

Clear parser state and return to an initialized state.

Defined at line 495 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

bool IsSuperframe (base::span<const uint8_t> stream, const DecryptConfig * decrypt_config)

Determines if the passed in VP9 frame data contains a superframe or not.

Defined at line 635 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

base::circular_deque<FrameInfo> ExtractFrames (base::span<const uint8_t> stream, const DecryptConfig * decrypt_config)

Extracts the frame information for a frame, if this is a superframe then

the returned list will contain each of the frames in decode order. An empty

list will be returned in the error case.

Defined at line 656 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.cc

Enumerations

enum Result
Name Value
kOk 0
kInvalidStream 1
kEOStream 2

ParseNextFrame() return values. See documentation for ParseNextFrame().

Defined at line 261 of file ../../src/media/third_party/chromium_media/media/parsers/vp9_parser.h

Records