Expand description
Run-time libpipewire binding and SPA pod encoding shared by the webcam sink and host capture.
Run-time binding to libpipewire-0.3 and the SPA pod encoding shared by every PipeWire user
in pixelflux: the webcam sink (a Video/Source node) and the portal screen capture (a
Video/Input stream). The library is loaded with dlopen, so pixelflux keeps no build-time or
load-time dependency on PipeWire and each user simply stays off where the library or the
daemon is absent. Pods are built and read by hand against the SPA wire layout: 8-byte aligned
size, type, payload cells, objects carrying key, flags, cell properties, and a choice
cell whose first value is the default (and, once fixated, the only) value.
Structs§
- Api
- Entry points resolved from
libpipewire-0.3.so.0. - PodProp
- One property of an object pod: its key, flags, and value cell.
- PwBuffer
- PwStream
Events - SpaBuffer
- SpaChunk
- SpaData
- SpaMeta
- SpaMeta
Bitmap - SpaMeta
Cursor - SpaMeta
Header - SpaMeta
Region spa_meta_region: one damage or crop rectangle; a zero-sized one ends a damage array.
Constants§
- PW_
DIRECTION_ INPUT - PW_
DIRECTION_ OUTPUT - PW_
ID_ ANY - PW_
STREAM_ FLAG_ AUTOCONNECT - PW_
STREAM_ FLAG_ DRIVER - PW_
STREAM_ FLAG_ MAP_ BUFFERS - PW_
STREAM_ STATE_ ERROR - PW_
STREAM_ STATE_ PAUSED - PW_
STREAM_ STATE_ STREAMING - PW_
STREAM_ STATE_ UNCONNECTED - PW_
VERSION_ STREAM_ EVENTS - SPA_
CHOICE_ ENUM - SPA_
CHOICE_ FLAGS - SPA_
CHOICE_ NONE - SPA_
CHOICE_ RANGE - SPA_
CHUNK_ FLAG_ CORRUPTED - SPA_
DATA_ DMABUF - SPA_
DATA_ MEMFD - SPA_
DATA_ MEMPTR - SPA_
FORMAT_ MEDIA_ SUBTYPE - SPA_
FORMAT_ MEDIA_ TYPE - SPA_
FORMAT_ VIDEO_ FORMAT - SPA_
FORMAT_ VIDEO_ FRAMERATE - SPA_
FORMAT_ VIDEO_ MAX_ FRAMERATE - SPA_
FORMAT_ VIDEO_ MODIFIER - SPA_
FORMAT_ VIDEO_ SIZE - SPA_
MEDIA_ SUBTYPE_ MJPG - SPA_
MEDIA_ SUBTYPE_ RAW - SPA_
MEDIA_ TYPE_ VIDEO - SPA_
META_ CURSOR - SPA_
META_ HEADER - SPA_
META_ HEADER_ SIZE - SPA_
META_ REGION_ SIZE - SPA_
META_ VIDEO_ CROP - SPA_
META_ VIDEO_ DAMAGE - SPA_
PARAM_ BUFFERS - SPA_
PARAM_ BUFFERS_ ALIGN - SPA_
PARAM_ BUFFERS_ BLOCKS - SPA_
PARAM_ BUFFERS_ BUFFERS - SPA_
PARAM_ BUFFERS_ DATATYPE - SPA_
PARAM_ BUFFERS_ SIZE - SPA_
PARAM_ BUFFERS_ STRIDE - SPA_
PARAM_ ENUM_ FORMAT - SPA_
PARAM_ FORMAT - SPA_
PARAM_ META - SPA_
PARAM_ META_ SIZE - SPA_
PARAM_ META_ TYPE - SPA_
POD_ PROP_ FLAG_ DONT_ FIXATE - SPA_
POD_ PROP_ FLAG_ MANDATORY - SPA_
TYPE_ CHOICE - SPA_
TYPE_ FRACTION - SPA_
TYPE_ ID - SPA_
TYPE_ INT - SPA_
TYPE_ LONG - SPA_
TYPE_ OBJECT - SPA_
TYPE_ OBJECT_ FORMAT - SPA_
TYPE_ OBJECT_ PARAM_ BUFFERS - SPA_
TYPE_ OBJECT_ PARAM_ META - SPA_
TYPE_ RECTANGLE - SPA_
VIDEO_ FORMAT_ ABGR - SPA_
VIDEO_ FORMAT_ ARGB - SPA_
VIDEO_ FORMAT_ BGRA - SPA_
VIDEO_ FORMAT_ BGRX - SPA_
VIDEO_ FORMAT_ I420 - SPA_
VIDEO_ FORMAT_ NV12 - SPA_
VIDEO_ FORMAT_ RGBA - SPA_
VIDEO_ FORMAT_ RGBX - SPA_
VIDEO_ FORMAT_ YUY2
Functions§
- api
- The library handle is kept for the life of the process: PipeWire’s own globals (pw_init) make unloading it unsafe, and every later user reuses it.
- cursor_
meta_ size - Bytes a cursor meta needs to carry a
wxhsprite (CURSOR_META_SIZE). - find_
prop - The property
keyof an object pod’s property list. - object
- An object pod of type
tycarrying paramidand the propertiespropsappends. - object_
props - Walk an object pod:
(object type, param id, properties);Nonefor anything else. - pod_
bytes ⚠ - The bytes of the pod a PipeWire callback points at: its header names the payload size.
- pod_
choice_ frac - A fraction choice;
valuesare(num, den)pairs, default first. - pod_
choice_ id - pod_
choice_ int - pod_
choice_ long - pod_
choice_ rect - A rectangle choice;
valuesare(w, h)pairs, default first. - pod_
frac - pod_id
- pod_int
- pod_
prim - One
size, type, payloadcell, padded to 8 bytes. - pod_
rect - pod_
value - A cell’s first value: a plain cell as it is, a choice cell’s default (its only value once fixated). Returns the value type and bytes.
- prop
- prop_
flags - One object property: key, flags, then the value cell
valueappends. - push_
u32