Open Source › Lamco Wayland › PipeWire
lamco-pipewire
High-performance PipeWire integration for Wayland screen capture, with DMA-BUF zero-copy
Hardware-accelerated frame transport
Once lamco-portal hands you a PipeWire file descriptor, lamco-pipewire turns it into a stream of frames. DMA-BUF zero-copy where the hardware supports it, software fallback where it doesn’t. Multi-monitor, multi-stream, with damage tracking and cursor extraction so downstream consumers only process what changed.
What’s inside
Hardware-accelerated frame transfer when available
Concurrent handling of multiple monitor streams
Automatic format selection with fallbacks
Built-in NV12, I420, YUY2 → BGRA
Separate cursor tracking for remote desktop
Region-based change detection for efficient encoding
Network-aware bitrate control for streaming
Automatic reconnection and stream recovery
Quick start
use lamco_pipewire::{PipeWireManager, PipeWireConfig, StreamInfo, SourceType};
// Create manager with default configuration
let mut manager = PipeWireManager::with_default()?;
// Connect using the portal-provided file descriptor (from lamco-portal)
manager.connect(fd).await?;
// Create a stream for a monitor
let stream_info = StreamInfo {
node_id: 42,
position: (0, 0),
size: (1920, 1080),
source_type: SourceType::Monitor,
};
let handle = manager.create_stream(&stream_info).await?;
// Receive frames
if let Some(mut rx) = manager.frame_receiver(handle.id).await {
while let Some(frame) = rx.recv().await {
println!("Frame: {}x{}", frame.width, frame.height);
}
}
manager.shutdown().await?;
Feature flags
| Feature | Default | Description |
|---|---|---|
| dmabuf | yes | DMA-BUF zero-copy support |
| yuv | no | YUV format conversion utilities |
| cursor | no | Hardware cursor extraction |
| damage | no | Region damage tracking |
| adaptive | no | Adaptive bitrate control |
| full | no | All features enabled |