d3d11

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 14 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

Rendered for windows/amd64

Overview

Package d3d11 decodes HEVC and AV1 on the GPU of a Direct3D 11 device through a Media Foundation decoder transform made aware of the device (DXVA). Pictures stay in the decoder's textures on that device.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decoders

func Decoders(codec encode.Codec) ([]string, error)

Decoders lists the names of the decoder transforms registered for codec, best first.

Types

type Decoder

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

Decoder is a hardware decoder on one D3D11 device.

func Open

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

Open makes a decoder for cfg.Codec on dev, whose Handle is an ID3D11Device* made with video support. Decoded textures belong to dev.

func (*Decoder) Close

func (d *Decoder) Close() error

func (*Decoder) Decode

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

Decode copies au into a Media Foundation sample (one CPU copy of the compressed bytes), decodes it, and returns the newest picture ready: when a late picture and the current one are both ready, the late one is released unshown (counted by Dropped).

func (*Decoder) Dropped

func (d *Decoder) Dropped() int

Dropped counts the pictures Decode released unshown because a newer one was ready with them.

func (*Decoder) Name

func (d *Decoder) Name() string

Name is the decoder transform's friendly name.

func (*Decoder) Release

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

Release gives the picture's texture slice back to the decoder.

Jump to

Keyboard shortcuts

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