Skip to main content

Module pipewire

Module pipewire 

Source
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
PwStreamEvents
SpaBuffer
SpaChunk
SpaData
SpaMeta
SpaMetaBitmap
SpaMetaCursor
SpaMetaHeader
SpaMetaRegion
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 wxh sprite (CURSOR_META_SIZE).
find_prop
The property key of an object pod’s property list.
object
An object pod of type ty carrying param id and the properties props appends.
object_props
Walk an object pod: (object type, param id, properties); None for 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; values are (num, den) pairs, default first.
pod_choice_id
pod_choice_int
pod_choice_long
pod_choice_rect
A rectangle choice; values are (w, h) pairs, default first.
pod_frac
pod_id
pod_int
pod_prim
One size, type, payload cell, 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 value appends.
push_u32