class VaapiVideoEncoderDelegate
Defined at line 53 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.h
An VaapiVideoEncoderDelegate performs high-level, platform-independent
encoding process tasks, such as managing codec state, reference frames, etc.,
but may require support from an external accelerator (typically a hardware
accelerator) to offload some stages of the actual encoding process, using
the parameters that the Delegate prepares beforehand.
For each frame to be encoded, clients provide an EncodeJob object to be set
up by a Delegate subclass with job parameters, and execute the job
afterwards. Any resources required for the job are also provided by the
clients, and associated with the EncodeJob object.
Protected Members
shared_ptr vaapi_wrapper_
function_impl error_cb_
bool native_input_mode_
Public Methods
void VaapiVideoEncoderDelegate (scoped_refptr<VaapiWrapper> vaapi_wrapper, base::RepeatingClosure error_cb)
Defined at line 88 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.cc
void ~VaapiVideoEncoderDelegate ()
Defined at line 94 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.cc
bool Initialize (const VideoEncodeAccelerator::Config & config, const VaapiVideoEncoderDelegate::Config & ave_config)
Initializes the encoder with requested parameter set |config| and
|ave_config|. Returns false if the requested set of parameters is not
supported, true on success.
bool UpdateRates (const VideoBitrateAllocation & bitrate_allocation, uint32_t framerate)
Updates current framerate and/or bitrate to |framerate| in FPS
and the specified video bitrate allocation.
gfx::Size GetCodedSize ()
Returns coded size for the input buffers required to encode, in pixels;
typically visible size adjusted to match codec alignment requirements.
size_t GetBitstreamBufferSize ()
Returns minimum size in bytes for bitstream buffers required to fit output
stream buffers produced.
Defined at line 96 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.cc
size_t GetMaxNumOfRefFrames ()
Returns maximum number of reference frames that may be used by the
encoder to encode one frame. The client should be able to provide up to
at least this many frames simultaneously for encode to make progress.
bool Encode (EncodeJob & encode_job)
Prepares and submits the encode operation to underlying driver for an
EncodeJob for one frame and returns true on success.
Defined at line 114 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.cc
std::unique_ptr<EncodeResult> GetEncodeResult (std::unique_ptr<EncodeJob> encode_job)
Creates and returns the encode result for specified EncodeJob by
synchronizing the corresponding encode operation.
Defined at line 136 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.cc
std::vector<gfx::Size> GetSVCLayerResolutions ()
Gets the active spatial layer resolutions for K-SVC encoding, VaapiVEA
can get this info from the encoder delegate. Returns empty vector on
failure.
Protected Methods
BitstreamBufferMetadata GetMetadata (const EncodeJob & encode_job, size_t payload_size)
Defined at line 106 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.cc
Enumerations
enum BitrateControl
| Name | Value |
|---|---|
| kConstantBitrate | 0 |
| kConstantQuantizationParameter | 1 |
Defined at line 59 of file ../../src/media/codec/codecs/vaapi/third_party/chromium/vaapi_video_encoder_delegate.h