vaapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 16 Imported by: ? 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

Overview

Package vaapi decodes HEVC on Linux with VA-API (Intel, AMD, and NVIDIA through nvidia-vaapi-driver), through libva.so.2 and libva-drm.so.2 loaded with purego (no cgo). VA-API takes parsed parameters, which package codec/hevc reads from the stream.

A picture leaves the decoder as DMA-BUFs (vaExportSurfaceHandle, one composed layer), which a Wayland compositor shows as they are, or, where the presenting surface does not take them, copied into memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HEVCProfiles

func HEVCProfiles() (main, main10 bool)

HEVCProfiles reports whether a render node decodes HEVC Main, and Main 10.

Types

type HEVCDecoder

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

HEVCDecoder decodes Main and Main 10 HEVC with VA-API.

func OpenHEVC

func OpenHEVC(t decode.Target, cfg decode.Config) (*HEVCDecoder, error)

OpenHEVC makes an HEVC decoder on the first render node that takes HEVC, preferring t.Adapter's vendor.

func (*HEVCDecoder) Close

func (v *HEVCDecoder) Close() error

Close frees the decoder; every picture must be released.

func (*HEVCDecoder) Decode

func (v *HEVCDecoder) Decode(au []byte, pts int64) (decode.Frame, error)

Decode decodes one access unit.

func (*HEVCDecoder) Release

func (v *HEVCDecoder) Release(f decode.Frame)

Release gives a picture back.

func (*HEVCDecoder) Vendor

func (v *HEVCDecoder) Vendor() string

Vendor is the VA driver's vendor string.

Jump to

Keyboard shortcuts

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