Missing damage event for driving consumer
For a video stream where the consumer is the driver (calls pw_stream_trigger_process()
to get a new frame) but the producer is the one one that knows when any content should trigger an update, we're currently missing a way for the passive producer to let the driving consumer know when it should trigger a new frame.
A use case for this is a Wayland compositor connected to a PipeWire stream consumer of some kind, where the by the compositor composited buffers should e.g. be vsync:ed to the consumers refresh rate. In this situation, an update looks like this:
- New stream is created, with a Wayland compositor as producer, and an application as consumer
- Consumer becomes the driver, producer becomes passive
- Producer knows it needs to update (e.g. Wayland client updated itself, or something else)
- Send 'damage event' to consumer
- Consumer calls
pw_stream_trigger_process()
- Producer composites a new buffer
- Consumer receives buffer
Here, step 2 isn't currently possible.