Skip to content

Add channel

Tom Wagner requested to merge ryuukyu/pipewire-rs:channel into main

This adds

  1. A loop source that reacts to any IO that implements AsRawFd.
  2. A custom channel that can be attached to a loop, calling a callback with each message received. This uses the IoSource with a raw eventfd that is used to signal when messages are waiting.

I did test the channel manually with a couple of debug statements, and it seemed to work really well. The loop was woken exactly once even if multiple messages are queued shortly after another, and never without a message waiting.

WIP because I need to find time to add documentation for everything, but otherwise this is ready.

Edited by Tom Wagner

Merge request reports