class AcceleratedVideoDecoder

Defined at line 24 of file ../../src/media/third_party/chromium_media/media/gpu/accelerated_video_decoder.h

An AcceleratedVideoDecoder is a video decoder that requires support from an

external accelerator (typically a hardware accelerator) to partially offload

the decode process after parsing stream headers, and performing reference

frame and state management.

Public Members

static const size_t kVPxMaxNumOfSizeChangeFailures

Public Methods

void AcceleratedVideoDecoder ()

Defined at line 26 of file ../../src/media/third_party/chromium_media/media/gpu/accelerated_video_decoder.h

void SetStream (int32_t id, scoped_refptr<DecoderBuffer> decoder_buffer)

Set the buffer owned by |decoder_buffer| as the current source of encoded

stream data. Pictures produced as a result of this call should be assigned

the passed stream |id|.

bool Flush ()

Have the decoder flush its state and trigger output of all previously

decoded surfaces. Return false on failure.

void Reset ()

Stop (pause) decoding, discarding all remaining inputs and outputs,

but do not flush decoder state, so that playback can be resumed later,

possibly from a different location.

To be called during decoding.

DecodeResult Decode ()

Try to decode more of the stream, returning decoded frames asynchronously.

Return when more stream is needed, when we run out of free surfaces, when

we need a new set of them, or when an error occurs.

gfx::Size GetPicSize ()

Return dimensions/visible rectangle/profile/bit depth/required number of

pictures that client should be ready to provide for the decoder to function

properly (of which up to GetNumReferenceFrames() might be needed for

internal decoding). To be used after Decode() returns kConfigChange.

gfx::Rect GetVisibleRect ()
VideoCodecProfile GetProfile ()
uint8_t GetBitDepth ()
VideoChromaSampling GetChromaSampling ()
VideoColorSpace GetVideoColorSpace ()

Returns the video color space for the in-band metadata / stream

configuration. The returned color space may vary between in-band metadata

and stream config based on video decoder's internal

preferences.

size_t GetRequiredNumOfPictures ()
size_t GetNumReferenceFrames ()
bool IsCurrentFrameKeyframe ()

TODO(https://fxbug.dev/42060469): Exposes if kConfigChange was caused by a

keyframe

void ~AcceleratedVideoDecoder ()

Defined at line 27 of file ../../src/media/third_party/chromium_media/media/gpu/accelerated_video_decoder.h

void AcceleratedVideoDecoder (const AcceleratedVideoDecoder & )

Defined at line 29 of file ../../src/media/third_party/chromium_media/media/gpu/accelerated_video_decoder.h

AcceleratedVideoDecoder & operator= (const AcceleratedVideoDecoder & )

Defined at line 30 of file ../../src/media/third_party/chromium_media/media/gpu/accelerated_video_decoder.h

Enumerations

enum DecodeResult
Name Value Comments
kDecodeError 0

Error while decoding.

kConfigChange 1

This is returned when some configuration (e.g.
profile or picture size) is changed. A client may
need to apply the client side the configuration
properly (e.g. allocate buffers with the new
resolution).

kColorSpaceChange 2

This is returned if the video color space is changed.
Color space changes off of key frames are discarded
only for VP9 decoder. When both ConfigChange and
ColorSpaceChange occur together, ConfigChange is
preferred over ColorSpaceChange. When triggered, it
is used for creating new shared images for the
D3D11VideoDecoder.

kRanOutOfStreamData 3

Need more stream data to proceed.

kRanOutOfSurfaces 4

Waiting for the client to free up output surfaces.

kTryAgain 5

The accelerator needs additional data (independently

Defined at line 48 of file ../../src/media/third_party/chromium_media/media/gpu/accelerated_video_decoder.h