mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-25 08:32:30 +00:00
export-dmabuf: update protocol
This commit is contained in:
parent
9eddcbc376
commit
bd0c1b7949
@ -415,7 +415,7 @@ static void frame_cancel(void *data, struct zwlr_export_dmabuf_frame_v1 *frame,
|
|||||||
struct capture_context *ctx = data;
|
struct capture_context *ctx = data;
|
||||||
av_log(ctx, AV_LOG_WARNING, "Frame cancelled!\n");
|
av_log(ctx, AV_LOG_WARNING, "Frame cancelled!\n");
|
||||||
av_frame_free(&ctx->current_frame);
|
av_frame_free(&ctx->current_frame);
|
||||||
if (reason == ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERNAMENT) {
|
if (reason == ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERMANENT) {
|
||||||
av_log(ctx, AV_LOG_ERROR, "Permanent failure, exiting\n");
|
av_log(ctx, AV_LOG_ERROR, "Permanent failure, exiting\n");
|
||||||
ctx->err = 1;
|
ctx->err = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,7 +93,7 @@ static void manager_handle_capture_output(struct wl_client *client,
|
|||||||
|
|
||||||
if (!output->impl->export_dmabuf) {
|
if (!output->impl->export_dmabuf) {
|
||||||
zwlr_export_dmabuf_frame_v1_send_cancel(frame->resource,
|
zwlr_export_dmabuf_frame_v1_send_cancel(frame->resource,
|
||||||
ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERNAMENT);
|
ZWLR_EXPORT_DMABUF_FRAME_V1_CANCEL_REASON_PERMANENT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -110,16 +110,13 @@ static void manager_handle_capture_output(struct wl_client *client,
|
|||||||
|
|
||||||
zwlr_export_dmabuf_frame_v1_send_frame(frame->resource,
|
zwlr_export_dmabuf_frame_v1_send_frame(frame->resource,
|
||||||
output->width, output->height, 0, 0, attribs->flags, frame_flags,
|
output->width, output->height, 0, 0, attribs->flags, frame_flags,
|
||||||
attribs->format, mod_high, mod_low, attribs->n_planes,
|
attribs->format, mod_high, mod_low, attribs->n_planes);
|
||||||
attribs->n_planes);
|
|
||||||
|
|
||||||
for (int i = 0; i < attribs->n_planes; ++i) {
|
for (int i = 0; i < attribs->n_planes; ++i) {
|
||||||
off_t size = lseek(attribs->fd[i], 0, SEEK_END);
|
off_t size = lseek(attribs->fd[i], 0, SEEK_END);
|
||||||
|
|
||||||
zwlr_export_dmabuf_frame_v1_send_object(frame->resource, i,
|
zwlr_export_dmabuf_frame_v1_send_object(frame->resource, i,
|
||||||
attribs->fd[i], size);
|
attribs->fd[i], size, attribs->offset[i], attribs->stride[i], i);
|
||||||
zwlr_export_dmabuf_frame_v1_send_plane(frame->resource, i, i,
|
|
||||||
attribs->offset[i], attribs->stride[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_list_remove(&frame->output_swap_buffers.link);
|
wl_list_remove(&frame->output_swap_buffers.link);
|
||||||
|
Loading…
Reference in New Issue
Block a user