hwaccel

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: BSD-2-Clause Imports: 1 Imported by: 0 modules, 0 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

func Available

func Available() []string

func Disable

func Disable()

func Enable

func Enable()

func Register

func Register(b Backend)

Types

type Backend

type Backend struct {
	Name        string
	ProbeEncode func(EncoderParams) (Encoder, bool)
	ProbeDecode func(DecoderParams) (Decoder, bool)
}

type Decoder

type Decoder interface {
	Decode(annexB []byte) ([]*Picture, error)
	Flush() ([]*Picture, error)
	Close() error
}

func OpenDecoder

func OpenDecoder(p DecoderParams) (Decoder, string, bool)

type DecoderParams added in v1.4.0

type DecoderParams struct {
	Width  int
	Height int
}

type Encoder

type Encoder interface {
	Encode(i420 []byte) ([]byte, error)
	Drain() ([]byte, error)
	Close() error
}

func OpenEncoder

func OpenEncoder(p EncoderParams) (Encoder, string, bool)

type EncoderParams

type EncoderParams struct {
	Width   int
	Height  int
	FPSNum  int
	FPSDen  int
	GOPSize int
	QP      int

	BitrateKbps int
}

type Picture

type Picture struct {
	Y       []byte
	Cb      []byte
	Cr      []byte
	StrideY int
	StrideC int
	Width   int
	Height  int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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