Screen share 14: Linux stream audio capture (PipeWire) #161

Closed
opened 2026-11-12 02:06:57 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-capture/src/pipewire_audio/{mod.rs,routing.rs,self_identity.rs}, crates/fluxer-capture/tests/pipewire_real.rs
  • Modify: crates/fluxer-capture/{Cargo.toml,README.md,src/lib.rs}, workspace Cargo.toml (pipewire), deny.toml if needed, CI workflow only if a package (libclang for bindgen) is missing
  • Test: unit tests of routing.rs; real tests with FLUXER_CAPTURE_TESTS=1

Interfaces:

  • Produces: PipeWireAudioCapturer: StreamAudioCapturer (spec §9): hidden private null sink, passive links from nodes matching AudioRule, F32 → i16 10 ms stereo frames at 48 kHz; self-exclusion by PID tree (from /proc), binary name and application name; list_applications() -> Vec<AudioApp { name, pid, binary }> for the "Audio sources" submenu. Ported from desk/native/linux-audio-capture (routing.rs, self_identity.rs, pipewire_bridge.rs, stream_ops.rs) with an attribution header; no napi.

  • Also check what fluxer-audio's cpal/ALSA playback stream reports as application.name / application.process.id and record it in the README.

  • Step 1: Write failing tests: unit rule_matches_like_the_fork (table from the fork's routing.rs tests and defaults), self_identity_excludes_own_tree_and_names, input_media_and_devices_ignored_by_default; CI no_pipewire_daemon_is_an_error; real system_capture_hears_a_test_tone_from_another_process, own_playback_not_captured.

  • Step 2–5: FAIL → implement → PASS → commit feat(capture): Linux stream audio.

Depends on: Screen share 3 (#150)

Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-screenshare.md
Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-screenshare-design.md

**Files:** - Create: `crates/fluxer-capture/src/pipewire_audio/{mod.rs,routing.rs,self_identity.rs}`, `crates/fluxer-capture/tests/pipewire_real.rs` - Modify: `crates/fluxer-capture/{Cargo.toml,README.md,src/lib.rs}`, workspace `Cargo.toml` (`pipewire`), `deny.toml` if needed, CI workflow only if a package (libclang for bindgen) is missing - Test: unit tests of `routing.rs`; real tests with `FLUXER_CAPTURE_TESTS=1` **Interfaces:** - Produces: `PipeWireAudioCapturer: StreamAudioCapturer` (spec §9): hidden private null sink, passive links from nodes matching `AudioRule`, F32 → `i16` 10 ms stereo frames at 48 kHz; self-exclusion by PID tree (from `/proc`), binary name and application name; `list_applications() -> Vec<AudioApp { name, pid, binary }>` for the "Audio sources" submenu. Ported from `desk/native/linux-audio-capture` (`routing.rs`, `self_identity.rs`, `pipewire_bridge.rs`, `stream_ops.rs`) with an attribution header; no napi. - Also check what `fluxer-audio`'s cpal/ALSA playback stream reports as `application.name` / `application.process.id` and record it in the README. - [ ] **Step 1: Write failing tests**: unit `rule_matches_like_the_fork` (table from the fork's `routing.rs` tests and defaults), `self_identity_excludes_own_tree_and_names`, `input_media_and_devices_ignored_by_default`; CI `no_pipewire_daemon_is_an_error`; real `system_capture_hears_a_test_tone_from_another_process`, `own_playback_not_captured`. - [ ] **Step 2–5:** FAIL → implement → PASS → commit `feat(capture): Linux stream audio`. Depends on: Screen share 3 (#150) Plan: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/plans/2026-11-11-screenshare.md Spec: https://git.forked.io/charles/fluxer-native/src/branch/main/docs/superpowers/specs/2026-11-11-fluxer-native-screenshare-design.md
charles added this to the Screen share milestone 2026-11-12 02:06:57 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#161
No description provided.