Versions in this module Expand all Collapse all v0 v0.2.1 Nov 28, 2026 v0.2.0 Nov 27, 2026 v0.1.0 Nov 26, 2026 Changes in this version + var ErrDropped = errors.New("encode: frame dropped by the encoder") + var ErrUnsupported = errors.New("encode: unsupported by this encoder") + var HDR10Color = ColorDescription + func Register(b Backend) + func RegisterCodec(b CodecBackend) + type Backend struct + Name string + Open func(dev gpu.Device, cfg Config) (Encoder, error) + Vendor gpu.Vendor + func BackendFor(vendor gpu.Vendor) (Backend, bool) + type Caps struct + Adapter gpu.Adapter + Chroma map[Codec][]Chroma + Codecs []Codec + Engines int + IntraRefresh bool + MaxHeight int + MaxWidth int + RefInvalidation bool + SubFrame bool + type Chroma uint8 + const NV12 + const P010 + const YUV444 + const YUV444P10 + func (c Chroma) Full() bool + func (c Chroma) String() string + func (c Chroma) TenBit() bool + type Codec uint8 + const AV1 + const H264 + const HEVC + const PyroWave + func (c Codec) String() string + type CodecBackend struct + Codec Codec + Name string + Open func(dev gpu.Device, cfg Config) (Encoder, error) + type ColorDescription struct + Matrix uint8 + Primaries uint8 + Transfer uint8 + type Config struct + Adapter gpu.LUID + BitrateKbps int + Chroma Chroma + ChunkLen int + Codec Codec + FPS int + HDR10 bool + Height int + IntraRefreshPeriod int + Slices int + Source capture.Format + Split Split + SubFrame bool + Width int + func (c Config) SplitFrame() bool + func (c Config) Validate() error + type Encoder interface + Caps func() Caps + Close func() error + Encode func(frame capture.Frame, forceKey bool, dst []byte) (Packet, error) + SetBitrate func(kbps int) error + func Open(cfg Config, devices ...gpu.Device) (Encoder, error) + type Packet struct + Critical int + Data []byte + Keyframe bool + PTS int64 + SliceEnds []int + type RefInvalidator interface + InvalidateRefs func(pts int64) error + type SliceEncoder interface + EncodeSlices func(frame capture.Frame, forceKey bool, dst []byte, ...) (Packet, error) + type Split uint8 + const SplitAuto + const SplitOff + const SplitOn + func (s Split) String() string