payload

package
v0.3.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: 1 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

Overview

Package payload turns what a codec, filter, or demuxer wrote into its caller-owned result into payload a stage may publish: the stage's own header over buffers it holds a reference to.

An adapter result is scratch the adapter may rewrite on its next call. A buffer in it that has an Owner is pooled, and its one reference passes to the stage as is. A buffer without one aliases adapter memory (reused output capacity, a decoder's reference pictures), so it is copied once into a pooled buffer. Either way the published bytes are never written again, which is what lets every downstream branch share them by reference.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DropFrames

func DropFrames(frames []av.Frame)

DropFrames releases the pooled references still left in result frames a stage did not publish (an emit failed midway), keeping scratch bytes.

func DropPacket

func DropPacket(packet *av.Packet)

DropPacket is DropFrames for one result packet.

func DropPackets

func DropPackets(packets []av.Packet)

DropPackets is DropFrames for result packets.

func TakeFrame

func TakeFrame(dst *av.Frame, planes []av.Plane, src *av.Frame) []av.Plane

TakeFrame fills dst with src's header and plane references dst holds, leaving src without them. planes is dst's reusable plane storage; the storage dst ends up using is returned for the next call.

func TakePacket

func TakePacket(dst *av.Packet, src *av.Packet)

TakePacket fills dst with src's header and a payload reference dst holds, leaving src without it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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