Documentation ¶
Overview ¶
Package vaapi implements hardware accelerated codecs. This package requires libva headers and libraries to be built. libva requires supported graphic card and its driver.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ParamsVP8 ¶
type ParamsVP8 struct { codec.BaseParams Sequence SequenceParamVP8 RateControlMode RateControlMode RateControl RateControlParam }
ParamsVP8 stores VP8 encoding parameters.
func NewVP8Params ¶
NewVP8Params returns default parameters of VP8 codec.
func (*ParamsVP8) BuildVideoEncoder ¶
func (p *ParamsVP8) BuildVideoEncoder(r video.Reader, property prop.Media) (codec.ReadCloser, error)
BuildVideoEncoder builds VP8 encoder with given params
type ParamsVP9 ¶
type ParamsVP9 struct { codec.BaseParams RateControlMode RateControlMode RateControl RateControlParam }
ParamsVP9 represents VAEncSequenceParameterBufferVP9 and other parameter buffers.
func NewVP9Params ¶
NewVP9Params returns default parameters of VP9 codec.
func (*ParamsVP9) BuildVideoEncoder ¶
func (p *ParamsVP9) BuildVideoEncoder(r video.Reader, property prop.Media) (codec.ReadCloser, error)
BuildVideoEncoder builds VP9 encoder with given params
type RateControlMode ¶
type RateControlMode uint
RateControlMode represents rate control mode. Note that supported mode depends on the codec and acceleration hardware.
const ( RateControlCBR RateControlMode = 0x00000002 RateControlVBR RateControlMode = 0x00000004 RateControlVCM RateControlMode = 0x00000008 RateControlCQP RateControlMode = 0x00000010 RateControlVBRConstrained RateControlMode = 0x00000020 RateControlICQ RateControlMode = 0x00000040 RateControlMB RateControlMode = 0x00000080 RateControlCFS RateControlMode = 0x00000100 RateControlParallel RateControlMode = 0x00000200 RateControlQVBR RateControlMode = 0x00000400 RateControlAVBR RateControlMode = 0x00000800 )
List of the RateControlMode.
type RateControlParam ¶
type RateControlParam struct { // TargetPercentage is a target bit-rate relative to the maximum bit-rate. // BaseParams.BitRate / (TargetPercentage * 0.01) will be the maximum bit-rate. TargetPercentage uint // WindowSize is a rate control window size in milliseconds. WindowSize uint InitialQP uint MinQP uint MaxQP uint // contains filtered or unexported fields }
RateControlParam represents VAEncMiscParameterRateControl.
type SequenceParamVP8 ¶
SequenceParamVP8 represents VAEncSequenceParameterBufferVP8 and other parameter buffers.