Documentation
¶
Overview ¶
Package hostbuf keeps decoded Linux pictures in memory: NV12 or P010 planes in memfd-backed mappings, which a Wayland compositor maps as wl_shm buffers with no copy, described by capture.DMABuf with Memory set.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrExhausted = errors.New("hostbuf: every picture buffer is in use")
ErrExhausted is Get's error when every buffer is out.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
DMABuf capture.DMABuf
// Luma and Chroma are the planes, rows of Pitch bytes.
Luma, Chroma []byte
Pitch int
// contains filtered or unexported fields
}
Buffer is one picture's memory. Its DMABuf stays valid, and its planes unchanged, until the pool gets it back.
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool hands out buffers of one size and layout, making more as all are out, up to its most.
func New ¶
New makes a pool of width x height pictures of fourcc (NV12 or P010) of at most most buffers.