ext_image_copy_capture_session_v1¤
wayland.ext_image_copy_capture_session_v1 ¤
Image copy capture session
This object represents an active image copy capture session.
After a capture session is created, buffer constraint events will be emitted from the compositor to tell the client which buffer types and formats are supported for reading from the session. The compositor may re-send buffer constraint events whenever they change.
To advertise buffer constraints, the compositor must send in no particular order: zero or more shm_format and dmabuf_format events, zero or one dmabuf_device event, and exactly one buffer_size event. Then the compositor must send a done event.
When the client has received all the buffer constraints, it can create a buffer accordingly, attach it to the capture session using the attach_buffer request, set the buffer damage using the damage_buffer request and then send the capture request.
Methods:
-
create_frame
–Create a frame
-
destroy
–Delete this object
-
on_buffer_size
–Image capture source dimensions.
-
on_shm_format
–Shm buffer format.
-
on_dmabuf_device
–Dma-buf device.
-
on_dmabuf_format
–Dma-buf format.
-
on_done
–All constraints have been sent.
-
on_stopped
–Session is no longer available.
error ¤
-
duplicate_frame
–`create_frame` sent before destroying previous frame
events
buffer_size ¤
shm_format ¤
dmabuf_device ¤
Dma-buf device
This event advertises the device buffers must be allocated on for dma-buf buffers.
In general the device is a DRM node. The DRM node type (primary vs. render) is unspecified. Clients must not rely on the compositor sending a particular node type. Clients cannot check two devices for equality by comparing the dev_t value.
Parameters:
dmabuf_format ¤
Dma-buf format
Provides the format that must be used for dma-buf buffers.
The client may choose any of the modifiers advertised in the array of 64-bit unsigned integers.
This event may be emitted multiple times, in which case the client may choose any given format.
Parameters:
done ¤
done() -> None
All constraints have been sent
This event is sent once when all buffer constraint events have been sent.
The compositor must always end a batch of buffer constraint events with this event, regardless of whether it sends the initial constraints or an update.
stopped ¤
stopped() -> None
Session is no longer available
This event indicates that the capture session has stopped and is no longer available. This can happen in a number of cases, e.g. when the underlying source is destroyed, if the user decides to end the image capture, or if an unrecoverable runtime error has occurred.
The client should destroy the session after receiving this event.
create_frame ¤
create_frame() -> ext_image_copy_capture_frame_v1
Create a frame
Create a capture frame for this session.
At most one frame object can exist for a given session at any time. If a client sends a create_frame request before a previous frame object has been destroyed, the duplicate_frame protocol error is raised.
Returns:
-
ext_image_copy_capture_frame_v1
(ext_image_copy_capture_frame_v1
) –The created object
destroy ¤
destroy() -> None
Delete this object
Destroys the session. This request can be sent at any time by the client.
This request doesn't affect ext_image_copy_capture_frame_v1 objects created by this object.
on_buffer_size ¤
Image capture source dimensions.
Override to handle wayland.ext_image_copy_capture_session_v1.events.buffer_size
.
on_shm_format ¤
on_shm_format(format: format) -> None
Shm buffer format.
Override to handle wayland.ext_image_copy_capture_session_v1.events.shm_format
.
on_dmabuf_device ¤
on_dmabuf_device(device: list) -> None
Dma-buf device.
Override to handle wayland.ext_image_copy_capture_session_v1.events.dmabuf_device
.
on_dmabuf_format ¤
Dma-buf format.
Override to handle wayland.ext_image_copy_capture_session_v1.events.dmabuf_format
.
on_done ¤
on_done() -> None
All constraints have been sent.
Override to handle wayland.ext_image_copy_capture_session_v1.events.done
.
on_stopped ¤
on_stopped() -> None
Session is no longer available.
Override to handle wayland.ext_image_copy_capture_session_v1.events.stopped
.