Expand description
PipeWire sink: the camera as a Video/Source node.
Where a PipeWire daemon is reachable, the same frames that feed the interposer ring are also
offered as a PipeWire camera node, which PipeWire-native consumers (GStreamer pipewiresrc,
portal-aware applications) link to directly and which pipewire-v4l2 exposes as a V4L2 device
to plain libc consumers. libpipewire-0.3 is loaded at run time and the SPA pods are built by
hand, so pixelflux keeps no build-time or load-time dependency on PipeWire and the sink simply
stays off where the library or the daemon is absent.
The stream is the graph driver: every published frame is copied into the nodeβs latest-frame
slot and one graph cycle is triggered; the process callback then fills whatever buffer the
consumers negotiated (memfd-backed, mapped for us) from that slot. The library binding and the
pod encoding live in crate::pipewire, shared with the portal screen capture.
StructsΒ§
- Pipe
Wire Sink - Shared π
- State shared with the stream callbacks (handed to PipeWire as the listenerβs user data).
FunctionsΒ§
- buffers_
pod π SPA_PARAM_Buffersanswered once the format is chosen: memfd (or plain memory) buffers of exactly one frame.- format_
pod π SPA_PARAM_EnumFormat: one video format at the device size and rate β raw with the given SPA pixel format, orvideo/mjpgfor the MJPEG device (spa_formatNone).- meta_
pod π - on_
param_ π βchanged - on_
process π β - on_
state_ π βchanged - spa_
video_ πformat