encoder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: BSD-2-Clause Imports: 13 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

View Source
var (
	ErrConfig    = errors.New("go264/encoder: invalid configuration")
	ErrFrameSize = errors.New("go264/encoder: frame does not match the configured size")
)

Functions

This section is empty.

Types

type Config

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

	BitrateKbps int
}

type Encoder

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

func New

func New(cfg Config) (*Encoder, error)

func (*Encoder) Encode

func (e *Encoder) Encode(yuv []byte) ([]byte, error)

func (*Encoder) Headers

func (e *Encoder) Headers() ([]byte, error)

func (*Encoder) PPS

func (e *Encoder) PPS() *syntax.PPS

func (*Encoder) SPS

func (e *Encoder) SPS() *syntax.SPS

Jump to

Keyboard shortcuts

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