Listener state for Wayland screencopy frames backed by DMA-BUFs.
More...
#include <src/platform/linux/wayland.h>
|
| void | buffer (zwlr_screencopy_frame_v1 *frame, std::uint32_t format, std::uint32_t width, std::uint32_t height, std::uint32_t stride) |
| | Record DMA-BUF buffer parameters from the compositor.
|
| |
| void | buffer_done (zwlr_screencopy_frame_v1 *frame) |
| | Allocate or import the buffer once the compositor finished describing it.
|
| |
| void | damage (zwlr_screencopy_frame_v1 *frame, std::uint32_t x, std::uint32_t y, std::uint32_t width, std::uint32_t height) |
| | Record damaged frame bounds reported by the compositor.
|
| |
|
| dmabuf_t (const dmabuf_t &)=delete |
| |
|
| dmabuf_t (dmabuf_t &&)=delete |
| |
| void | failed (zwlr_screencopy_frame_v1 *frame) |
| | Mark the frame capture as failed.
|
| |
| void | flags (zwlr_screencopy_frame_v1 *frame, std::uint32_t flags) |
| | Record frame flags reported by the compositor.
|
| |
| frame_t * | get_next_frame () |
| | Select the inactive frame slot for the next screencopy request.
|
| |
| void | linux_dmabuf (zwlr_screencopy_frame_v1 *frame, std::uint32_t format, std::uint32_t width, std::uint32_t height) |
| | Record Linux DMA-BUF parameters advertised for the frame.
|
| |
| void | listen (zwlr_screencopy_manager_v1 *screencopy_manager, zwp_linux_dmabuf_v1 *dmabuf_interface, const std::map< std::uint32_t, std::vector< std::uint64_t > > *supported_modifiers, wl_output *output, bool blend_cursor=false) |
| | Start a screencopy request and attach the DMA-BUF listener callbacks.
|
| |
|
dmabuf_t & | operator= (const dmabuf_t &)=delete |
| |
|
dmabuf_t & | operator= (dmabuf_t &&)=delete |
| |
| void | ready (zwlr_screencopy_frame_v1 *frame, std::uint32_t tv_sec_hi, std::uint32_t tv_sec_lo, std::uint32_t tv_nsec) |
| | Mark the current screencopy frame as ready and store its timestamp.
|
| |
|
| static void | buffer_params_created (void *data, struct zwp_linux_buffer_params_v1 *params, struct wl_buffer *wl_buffer) |
| | Store the Wayland buffer created for a DMA-BUF parameter request.
|
| |
| static void | buffer_params_failed (void *data, struct zwp_linux_buffer_params_v1 *params) |
| | Mark DMA-BUF buffer creation as failed.
|
| |
|
|
frame_t * | current_frame |
| | Frame descriptor currently being filled by the compositor.
|
| |
|
std::array< frame_t, 2 > | frames |
| | Double-buffered frame descriptors.
|
| |
|
zwlr_screencopy_frame_v1_listener | listener |
| | Callback table registered on screencopy frames.
|
| |
|
status_e | status |
| | Current state of the active screencopy request.
|
| |
Listener state for Wayland screencopy frames backed by DMA-BUFs.
◆ status_e
Capture state for the active screencopy request.
| Enumerator |
|---|
| WAITING | Waiting for a frame.
|
| READY | Frame is ready.
|
| REINIT | Reinitialize the frame.
|
◆ buffer()
| void wl::dmabuf_t::buffer |
( |
zwlr_screencopy_frame_v1 * | frame, |
|
|
std::uint32_t | format, |
|
|
std::uint32_t | width, |
|
|
std::uint32_t | height, |
|
|
std::uint32_t | stride ) |
Record DMA-BUF buffer parameters from the compositor.
- Parameters
-
| frame | Screencopy frame that advertised shared-memory fallback data. |
| format | DRM pixel format for the shared-memory buffer. |
| width | Frame width in pixels. |
| height | Frame height in pixels. |
| stride | Number of bytes per row in the buffer. |
◆ buffer_done()
| void wl::dmabuf_t::buffer_done |
( |
zwlr_screencopy_frame_v1 * | frame | ) |
|
Allocate or import the buffer once the compositor finished describing it.
- Parameters
-
| frame | Screencopy frame whose buffer description is complete. |
◆ buffer_params_created()
| void wl::dmabuf_t::buffer_params_created |
( |
void * | data, |
|
|
struct zwp_linux_buffer_params_v1 * | params, |
|
|
struct wl_buffer * | wl_buffer ) |
|
static |
Store the Wayland buffer created for a DMA-BUF parameter request.
- Parameters
-
| data | Pointer to the dmabuf_t instance associated with the callback. |
| params | DMA-BUF parameter object that completed buffer creation. |
| wl_buffer | Wayland buffer created from the DMA-BUF planes. |
◆ buffer_params_failed()
| void wl::dmabuf_t::buffer_params_failed |
( |
void * | data, |
|
|
struct zwp_linux_buffer_params_v1 * | params ) |
|
static |
Mark DMA-BUF buffer creation as failed.
- Parameters
-
| data | Pointer to the dmabuf_t instance associated with the callback. |
| params | DMA-BUF parameter object that failed buffer creation. |
◆ damage()
| void wl::dmabuf_t::damage |
( |
zwlr_screencopy_frame_v1 * | frame, |
|
|
std::uint32_t | x, |
|
|
std::uint32_t | y, |
|
|
std::uint32_t | width, |
|
|
std::uint32_t | height ) |
Record damaged frame bounds reported by the compositor.
- Parameters
-
| frame | Screencopy frame that reported damage. |
| x | Left edge of the damaged rectangle. |
| y | Top edge of the damaged rectangle. |
| width | Damaged rectangle width in pixels. |
| height | Damaged rectangle height in pixels. |
◆ failed()
| void wl::dmabuf_t::failed |
( |
zwlr_screencopy_frame_v1 * | frame | ) |
|
Mark the frame capture as failed.
- Parameters
-
| frame | Screencopy frame that failed. |
◆ flags()
| void wl::dmabuf_t::flags |
( |
zwlr_screencopy_frame_v1 * | frame, |
|
|
std::uint32_t | flags ) |
Record frame flags reported by the compositor.
- Parameters
-
| frame | Screencopy frame that reported flags. |
| flags | Wayland screencopy flags such as vertical inversion. |
◆ get_next_frame()
| frame_t * wl::dmabuf_t::get_next_frame |
( |
| ) |
|
|
inline |
Select the inactive frame slot for the next screencopy request.
- Returns
- Inactive frame buffer that can receive the next capture.
◆ linux_dmabuf()
| void wl::dmabuf_t::linux_dmabuf |
( |
zwlr_screencopy_frame_v1 * | frame, |
|
|
std::uint32_t | format, |
|
|
std::uint32_t | width, |
|
|
std::uint32_t | height ) |
Record Linux DMA-BUF parameters advertised for the frame.
- Parameters
-
| frame | Screencopy frame that advertised DMA-BUF data. |
| format | DRM pixel format for the DMA-BUF. |
| width | Frame width in pixels. |
| height | Frame height in pixels. |
◆ listen()
| void wl::dmabuf_t::listen |
( |
zwlr_screencopy_manager_v1 * | screencopy_manager, |
|
|
zwp_linux_dmabuf_v1 * | dmabuf_interface, |
|
|
const std::map< std::uint32_t, std::vector< std::uint64_t > > * | supported_modifiers, |
|
|
wl_output * | output, |
|
|
bool | blend_cursor = false ) |
Start a screencopy request and attach the DMA-BUF listener callbacks.
- Parameters
-
| screencopy_manager | Compositor screencopy manager used to request frames. |
| dmabuf_interface | Compositor DMA-BUF interface used to allocate buffers. |
| supported_modifiers | DMA-BUF format modifiers supported by the compositor. |
| output | Wayland output to capture. |
| blend_cursor | Whether the compositor should include the cursor in the frame. |
◆ ready()
| void wl::dmabuf_t::ready |
( |
zwlr_screencopy_frame_v1 * | frame, |
|
|
std::uint32_t | tv_sec_hi, |
|
|
std::uint32_t | tv_sec_lo, |
|
|
std::uint32_t | tv_nsec ) |
Mark the current screencopy frame as ready and store its timestamp.
- Parameters
-
| frame | Screencopy frame that completed. |
| tv_sec_hi | High 32 bits of the compositor-provided seconds value. |
| tv_sec_lo | Low 32 bits of the compositor-provided seconds value. |
| tv_nsec | Nanosecond component of the compositor-provided timestamp. |
The documentation for this class was generated from the following files: