nvdec

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 10 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 nvdec decodes HEVC and AV1 on NVIDIA GPUs under Linux with NVDEC, through libcuda.so.1 and libnvcuvid.so.1 loaded with purego (no cgo). NVDEC's own parser reads the bitstream; each picture is copied from the GPU into a memfd-backed buffer, which a Wayland compositor maps as wl_shm with no further copy and a picture-mode surface reads as it is.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Available

func Available() error

Available reports whether NVDEC loads, with an error saying why not.

Types

type Decoder

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

Decoder is an NVDEC decoder of one stream.

func Open

func Open(cfg decode.Config) (*Decoder, error)

Open makes a decoder for cfg.Codec, HEVC or AV1, on the first CUDA device.

func (*Decoder) Close

func (d *Decoder) Close() error

Close frees the decoder and its pictures, which must all be released.

func (*Decoder) Decode

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

Decode parses one access unit and returns its picture, copied into memory.

func (*Decoder) Release

func (d *Decoder) Release(f decode.Frame)

Release gives a picture's buffer back.

Jump to

Keyboard shortcuts

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