vpx

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2020 License: Apache-2.0 Imports: 14 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecodedImage

type DecodedImage struct {
	// contains filtered or unexported fields
}

func (*DecodedImage) Height

func (f *DecodedImage) Height() uint32

func (*DecodedImage) IsKeyFrame

func (f *DecodedImage) IsKeyFrame() bool

func (*DecodedImage) Plane

func (f *DecodedImage) Plane(n int) []byte

func (*DecodedImage) Stride

func (f *DecodedImage) Stride(n int) int

func (*DecodedImage) ToBytes

func (f *DecodedImage) ToBytes(format decoder.ColorFormat) []uint8

func (*DecodedImage) ToRGBA

func (f *DecodedImage) ToRGBA() *image.RGBA

func (*DecodedImage) Width

func (f *DecodedImage) Width() uint32

type VP8Decoder

type VP8Decoder struct {
	// contains filtered or unexported fields
}

func NewVP8Decoder

func NewVP8Decoder() (*VP8Decoder, error)

func (*VP8Decoder) Close

func (d *VP8Decoder) Close() error

func (*VP8Decoder) NewFrameBuilder

func (d *VP8Decoder) NewFrameBuilder() *decoder.FrameBuilder

func (*VP8Decoder) Process

func (d *VP8Decoder) Process(src <-chan *decoder.Frame, out chan<- decoder.DecodedImage)

type VP9Decoder

type VP9Decoder struct {
	// contains filtered or unexported fields
}

func NewVP9Decoder

func NewVP9Decoder() (*VP9Decoder, error)

func (*VP9Decoder) Close

func (d *VP9Decoder) Close() error

func (*VP9Decoder) NewFrameBuilder

func (d *VP9Decoder) NewFrameBuilder() *decoder.FrameBuilder

func (*VP9Decoder) Process

func (d *VP9Decoder) Process(src <-chan *decoder.Frame, out chan<- decoder.DecodedImage)

type VP9FrameBuffer

type VP9FrameBuffer struct {
	// contains filtered or unexported fields
}

func (*VP9FrameBuffer) AddRef

func (p *VP9FrameBuffer) AddRef() int

func (*VP9FrameBuffer) GetData

func (p *VP9FrameBuffer) GetData() *C.uint8_t

func (*VP9FrameBuffer) GetDataSize

func (p *VP9FrameBuffer) GetDataSize() C.size_t

func (*VP9FrameBuffer) HasOneRef

func (p *VP9FrameBuffer) HasOneRef() bool

func (*VP9FrameBuffer) Release

func (p *VP9FrameBuffer) Release()

func (*VP9FrameBuffer) SetSize

func (p *VP9FrameBuffer) SetSize(size C.size_t)

type VP9FrameBufferPool

type VP9FrameBufferPool struct {
	// contains filtered or unexported fields
}

func (*VP9FrameBufferPool) Clear

func (p *VP9FrameBufferPool) Clear()

func (*VP9FrameBufferPool) GetFrameBuffer

func (p *VP9FrameBufferPool) GetFrameBuffer(minSize C.size_t) (*VP9FrameBuffer, error)

func (*VP9FrameBufferPool) GetNumBuffersInUse

func (p *VP9FrameBufferPool) GetNumBuffersInUse() int

func (*VP9FrameBufferPool) Init

func (p *VP9FrameBufferPool) Init(ctx *C.vpx_codec_ctx_t) error

type VP9Packet

type VP9Packet struct {
	// Required header
	I bool // PictureID is present
	P bool // Inter-picture predicted frame
	L bool // Layer indices is present
	F bool // Flexible mode
	B bool // Start of a frame
	E bool // End of a frame
	V bool // Scalability structure (SS) data present

	// Recommended headers
	PictureID int16 // 7 or 16 bits, picture ID

	// Conditionally recommended headers
	TID uint8 // Temporal layer ID
	U   bool  // Switching up point
	SID uint8 // Spatial layer ID
	D   bool  // Inter-layer dependency used

	// Conditionally required headers
	PDiff     []uint8 // Reference index (F=1)
	TL0PICIDX uint8   // Temporal layer zero index (F=0)

	// Scalability structure headers
	N_S    uint8
	Y      bool
	G      bool
	N_G    uint8
	Width  []uint16
	Height []uint16

	Payload []byte
}

VP9Packet represents the VP9 header that is stored in the payload of an RTP Packet

func (*VP9Packet) Unmarshal

func (p *VP9Packet) Unmarshal(packet []byte) ([]byte, error)

Unmarshal parses the passed byte slice and stores the result in the VP9Packet this method is called upon

type VP9PartitionHeadChecker

type VP9PartitionHeadChecker struct{}

VP9PartitionHeadChecker checks VP9 partition head

func (*VP9PartitionHeadChecker) IsPartitionHead

func (*VP9PartitionHeadChecker) IsPartitionHead(packet []byte) bool

IsPartitionHead checks whether if this is a head of the VP9 partition

type VP9Payloader

type VP9Payloader struct {
	Rand *rand.Rand
	// contains filtered or unexported fields
}

VP9Payloader payloads VP9 packets

func (*VP9Payloader) Payload

func (p *VP9Payloader) Payload(mtu int, payload []byte) [][]byte

Payload fragments an VP9 packet across one or more byte arrays

Jump to

Keyboard shortcuts

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