ext_image_copy_capture_frame_v1¤
wayland.ext_image_copy_capture_frame_v1 ¤
Image capture frame
This object represents an image capture frame.
The client should attach a buffer, damage the buffer, and then send a capture request.
If the capture is successful, the compositor must send the frame metadata (transform, damage, presentation_time in any order) followed by the ready event.
If the capture fails, the compositor must send the failed event.
Methods:
-
destroy
–Destroy this object
-
attach_buffer
–Attach buffer to session
-
damage_buffer
–Damage buffer
-
capture
–Capture a frame
-
on_transform
–Buffer transform.
-
on_damage
–Buffer damaged region.
-
on_presentation_time
–Presentation time of the frame.
-
on_ready
–Frame is available for reading.
-
on_failed
–Capture failed.
error ¤
-
no_buffer
–Capture sent without `attach_buffer` -
invalid_buffer_damage
–Invalid buffer damage -
already_captured
–Capture request has been sent
failure_reason ¤
-
unknown
–Unknown runtime error An unspecified runtime error has occurred. The client may retry. -
buffer_constraints
–Buffer constraints mismatch The buffer submitted by the client doesn't match the latest session constraints. The client should re-allocate its buffers and retry. -
stopped
–Session is no longer available The session has stopped. See ext_image_copy_capture_session_v1.stopped.
events
transform ¤
transform(transform: transform) -> None
Buffer transform
This event is sent before the ready event and holds the transform that the compositor has applied to the buffer contents.
damage ¤
Buffer damaged region
This event is sent before the ready event. It may be generated multiple times to describe a region.
The first captured frame in a session will always carry full damage. Subsequent frames' damaged regions describe which parts of the buffer have changed since the last ready event.
These coordinates originate in the upper left corner of the buffer.
Parameters:
presentation_time ¤
Presentation time of the frame
This event indicates the time at which the frame is presented to the output in system monotonic time. This event is sent before the ready event.
The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec triples, each component being an unsigned 32-bit value. Whole seconds are in tv_sec which is a 64-bit value combined from tv_sec_hi and tv_sec_lo, and the additional fractional part in tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must be in [0, 999999999].
Parameters:
ready ¤
ready() -> None
Frame is available for reading
Called as soon as the frame is copied, indicating it is available for reading.
The buffer may be re-used by the client after this event.
After receiving this event, the client must destroy the object.
failed ¤
failed(reason: failure_reason) -> None
Capture failed
This event indicates that the attempted frame copy has failed.
After receiving this event, the client must destroy the object.
destroy ¤
destroy() -> None
Destroy this object
Destroys the frame. This request can be sent at any time by the client.
attach_buffer ¤
attach_buffer(buffer: wl_buffer) -> None
Attach buffer to session
Attach a buffer to the session.
The wl_buffer.release request is unused.
The new buffer replaces any previously attached buffer.
This request must not be sent after capture, or else the already_captured protocol error is raised.
damage_buffer ¤
Damage buffer
Apply damage to the buffer which is to be captured next. This request may be sent multiple times to describe a region.
The client indicates the accumulated damage since this wl_buffer was last captured. During capture, the compositor will update the buffer with at least the union of the region passed by the client and the region advertised by ext_image_copy_capture_frame_v1.damage.
When a wl_buffer is captured for the first time, or when the client doesn't track damage, the client must damage the whole buffer.
This is for optimisation purposes. The compositor may use this information to reduce copying.
These coordinates originate from the upper left corner of the buffer.
If x or y are strictly negative, or if width or height are negative or zero, the invalid_buffer_damage protocol error is raised.
This request must not be sent after capture, or else the already_captured protocol error is raised.
Parameters:
capture ¤
capture() -> None
Capture a frame
Capture a frame.
Unless this is the first successful captured frame performed in this session, the compositor may wait an indefinite amount of time for the source content to change before performing the copy.
This request may only be sent once, or else the already_captured protocol error is raised. A buffer must be attached before this request is sent, or else the no_buffer protocol error is raised.
on_transform ¤
on_transform(transform: transform) -> None
Buffer transform.
Override to handle wayland.ext_image_copy_capture_frame_v1.events.transform
.
on_damage ¤
Buffer damaged region.
Override to handle wayland.ext_image_copy_capture_frame_v1.events.damage
.
on_presentation_time ¤
Presentation time of the frame.
Override to handle wayland.ext_image_copy_capture_frame_v1.events.presentation_time
.
on_ready ¤
on_ready() -> None
Frame is available for reading.
Override to handle wayland.ext_image_copy_capture_frame_v1.events.ready
.
on_failed ¤
on_failed(reason: failure_reason) -> None
Capture failed.
Override to handle wayland.ext_image_copy_capture_frame_v1.events.failed
.