Expand description
Surface capture. Config is shared; the implementation is per-platform and
per-source:
- macOS camera -> AVFoundation, screen -> ScreenCaptureKit, both yielding
zero-copy
CVPixelBuffersurfaces straight to VideoToolbox. - Linux camera -> native V4L2 (YUYV / MJPEG -> CPU I420), or a PipeWire
camera node (
pipewirefeature), X11 display and window -> X11, and a system-picked screen or window -> xdg-desktop-portal + PipeWire (pipewirefeature). - Windows camera -> native Media Foundation (
IMFSourceReader), display and window -> Windows.Graphics.Capture (GPU NV12, Windows 10 2004 or newer).
encode::publish_capture consumes Config.
Modules§
- portal
- System-picked screen or window selection and its restore grant. A system-picked source and the grant owned by one logical publication.
Structs§
- App
- An application reported by
apps. - Camera
- A camera reported by
cameras. - Config
- Capture configuration. All fields are hints; the backend picks the closest supported mode.
- Display
- A display reported by
displays. - Display
Selection - Which display
Source::Displaycaptures. - Mode
- A capture mode a source reports: one frame size and its exact frame rates.
- Stream
- A live, async frame source opened via
open. - Window
- A window reported by
windows.
Enums§
- Cursor
- What a screen, window, or app capture does with the mouse cursor.
- Source
- What to capture, selected by a native identifier or the system picker.
Functions§
- apps
- List the applications with at least one on-screen window. macOS only.
- camera_
modes - List the modes a camera reports, largest size first.
- cameras
- List the available cameras and the identifiers
Source::Cameraaccepts. - displays
- List the available displays and the identifiers
Source::Displayaccepts. - open
- Open the capture source described by
config. - windows
- List the on-screen windows.