vpx

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package vpx implements VP8 and VP9 encoder. This package requires libvpx headers and libraries to be built.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResilientMode

type ErrorResilientMode int

ErrorResilientMode represents error resilient mode.

const (
	ErrorResilientDefault    ErrorResilientMode = 0x01
	ErrorResilientPartitions ErrorResilientMode = 0x02
)

ErrorResilientMode values.

type Params

type Params struct {
	codec.BaseParams
	Deadline                     time.Duration
	RateControlEndUsage          RateControlMode
	RateControlUndershootPercent uint
	RateControlOvershootPercent  uint
	RateControlMinQuantizer      uint
	RateControlMaxQuantizer      uint
	LagInFrames                  uint
	ErrorResilient               ErrorResilientMode
}

Params stores libvpx specific encoding parameters. Value range is codec (VP8/VP9) specific.

type RateControlMode

type RateControlMode int

RateControlMode represents rate control mode.

const (
	RateControlVBR RateControlMode = iota
	RateControlCBR
	RateControlCQ
)

RateControlMode values.

type VP8Params

type VP8Params struct {
	Params
}

VP8Params is codec specific paramaters

func NewVP8Params

func NewVP8Params() (VP8Params, error)

NewVP8Params returns default VP8 codec specific parameters.

func (*VP8Params) BuildVideoEncoder

func (p *VP8Params) BuildVideoEncoder(r video.Reader, property prop.Media) (codec.ReadCloser, error)

BuildVideoEncoder builds VP8 encoder with given params

func (*VP8Params) RTPCodec

func (p *VP8Params) RTPCodec() *codec.RTPCodec

RTPCodec represents the codec metadata

type VP9Params

type VP9Params struct {
	Params
}

VP9Params is codec specific paramaters

func NewVP9Params

func NewVP9Params() (VP9Params, error)

NewVP9Params returns default VP9 codec specific parameters.

func (*VP9Params) BuildVideoEncoder

func (p *VP9Params) BuildVideoEncoder(r video.Reader, property prop.Media) (codec.ReadCloser, error)

BuildVideoEncoder builds VP9 encoder with given params

func (*VP9Params) RTPCodec

func (p *VP9Params) RTPCodec() *codec.RTPCodec

RTPCodec represents the codec metadata

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL