wlr_export_dmabuf_unstable_v1
-
# zwlr_export_dmabuf_manager_v1
This object is a manager with which to start capturing from sources.Requests
-
struct zwlr_export_dmabuf_frame_v1* zwlr_export_dmabuf_manager_v1_capture_output(struct zwlr_export_dmabuf_manager_v1* zwlr_export_dmabuf_manager_v1,int32_t overlay_cursor, /* include custom client hardware cursor on top of the frame */struct wl_output* output)Capture the next frame of an entire output.
-
void zwlr_export_dmabuf_manager_v1_destroy(struct zwlr_export_dmabuf_manager_v1* zwlr_export_dmabuf_manager_v1)All objects created by the manager will still remain valid, until their appropriate destroy request has been called.
-
-
# zwlr_export_dmabuf_frame_v1
This object represents a single DMA-BUF frame. If the capture is successful, the compositor will first send a "frame" event, followed by one or several "object". When the frame is available for readout, the "ready" event is sent. If the capture failed, the "cancel" event is sent. This can happen anytime before the "ready" event. Once either a "ready" or a "cancel" event is received, the client should destroy the frame. Once an "object" event is received, the client is responsible for closing the associated file descriptor. All frames are read-only and may not be written into or altered.Requests
-
void zwlr_export_dmabuf_frame_v1_destroy(struct zwlr_export_dmabuf_frame_v1* zwlr_export_dmabuf_frame_v1)Unreferences the frame. This request must be called as soon as its no longer used. It can be called at any time by the client. The client will still have to close any FDs it has been given.
Events
-
uint32_t width /* frame width in pixels */uint32_t height /* frame height in pixels */uint32_t offset_x /* crop offset for the x axis */uint32_t offset_y /* crop offset for the y axis */uint32_t buffer_flags /* flags which indicate properties (invert, interlacing), has the same values as zwp_linux_buffer_params_v1:flags */uint32_t flags /* indicates special frame features */uint32_t format /* format of the frame (DRM_FORMAT_*) */uint32_t mod_high /* drm format modifier, high */uint32_t mod_low /* drm format modifier, low */uint32_t num_objects /* indicates how many objects (FDs) the frame has (max 4) */Main event supplying the client with information about the frame. If the capture didn't fail, this event is always emitted first before any other events. This event is followed by a number of "object" as specified by the "num_objects" argument.
-
uint32_t index /* index of the current object */int32_t fd /* fd of the current object */uint32_t size /* size in bytes for the current object */uint32_t offset /* starting point for the data in the object's fd */uint32_t stride /* line size in bytes */uint32_t plane_index /* index of the plane the data in the object applies to */Event which serves to supply the client with the file descriptors containing the data for each object. After receiving this event, the client must always close the file descriptor as soon as they're done with it and even if the frame fails.
-
uint32_t tv_sec_hi /* high 32 bits of the seconds part of the timestamp */uint32_t tv_sec_lo /* low 32 bits of the seconds part of the timestamp */uint32_t tv_nsec /* nanoseconds part of the timestamp */This event is sent as soon as the frame is presented, indicating it is available for reading. This event includes the time at which presentation happened at. 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]. The seconds part may have an arbitrary offset at start. After receiving this event, the client should destroy this object.
-
uint32_t reason /* indicates a reason for cancelling this frame capture */If the capture failed or if the frame is no longer valid after the "frame" event has been emitted, this event will be used to inform the client to scrap the frame. If the failure is temporary, the client may capture again the same source. If the failure is permanent, any further attempts to capture the same source will fail again. After receiving this event, the client should destroy this object.
Enums
-
ZWLR_EXPORT_DMABUF_FRAME_V1_FLAGS_TRANSIENT /* clients should copy frame before processing */Special flags that should be respected by the client.
-
ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_TEMPORARY /* temporary error, source will produce more frames */ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERMANENT /* fatal error, source will not produce frames */ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_RESIZING /* temporary error, source will produce more frames */Indicates reason for cancelling the frame.
-
Copyright Info
Copyright © 2018 Rostislav Pehlivanov
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.