Skip to main content

Module capture

Module capture 

Source
Expand description

Surface capture. Config is shared; the implementation is per-platform and per-source:

  • macOS camera -> AVFoundation, screen -> ScreenCaptureKit, both yielding zero-copy CVPixelBuffer surfaces straight to VideoToolbox.
  • Linux camera -> native V4L2 (YUYV / MJPEG -> CPU I420), or a PipeWire camera node (pipewire feature), X11 display and window -> X11, and a system-picked screen or window -> xdg-desktop-portal + PipeWire (pipewire feature).
  • 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.
DisplaySelection
Which display Source::Display captures.
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::Camera accepts.
displays
List the available displays and the identifiers Source::Display accepts.
open
Open the capture source described by config.
windows
List the on-screen windows.