swc_snap
- external
swc_snap
version 2
raw screen capture into client buffers
gives a screen capture capability where the client supplies a wl_shm buffer and the compositor fills it with a raw frame.
Argument | Type | Description |
|---|---|---|
| buffer | object<wl_buffer> | client-provided wl_shm buffer to fill |
| flags | uint | bitmask of swc_snap.flags |
capture a frame into a client buffer
captures the current primary screen into the supplied wl_shm buffer. The compositor writes raw pixels and reports ready or failed state
current capture frame metadata
describes the current frame geometry and pixel format expected by the capture stream
capture complete
the requested buffer has been filled and is ready for client
failed(reason: uint)
Argument | Type | Description |
|---|---|---|
| reason | uint | swc_snap.failure_reason value |
capture failed
the capture request failed, the object still usable and the client may retry with another buffer or after a mode change
swc_snap::flags
bitfield
flags { overlay_cursor }
Argument | Value | Description |
|---|---|---|
| overlay_cursor | 1 | composite the current cursor into the frame |
failure_reason { no_screen, unsupported_buffer, size_mismatch, internal }
Argument | Value | Description |
|---|---|---|
| no_screen | 0 | no captureable screen is available |
| unsupported_buffer | 1 | buffer is not a wl_shm xrgb/argb8888 buffer |
| size_mismatch | 2 | buffer dimensions are too small for the screen |
| internal | 3 | compositor capture failed |
Compositor Support
No compositor support found