Update usage of gs_texture_create_from_dmabuf v1 APPLIED

Tobias Langendorf: 1
 Update usage of gs_texture_create_from_dmabuf

 2 files changed, 3 insertions(+), 2 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~scoopta/wlrobs/patches/21693/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] Update usage of gs_texture_create_from_dmabuf Export this patch

# HG changeset patch
# User Tobias Langendorf <junglerobba@jngl.one>
# Date 1617224387 -7200
#      Wed Mar 31 22:59:47 2021 +0200
# Node ID 5d4e20e25f23a5d93adc831ab3dfad15869aa1fd
# Parent  fa1757e6ba0b2ae93b8202992184c3e8f766ca7e
Update usage of gs_texture_create_from_dmabuf

As of obs commit 705a47b0e439f649af8a81d0a68d03f3b83ea314 it also
requires a `drm_format` parameter

diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
This plugin only records wayland desktops, it does not make OBS run wayland native. If you're not using a version of OBS with an EGL backend you need to set `QT_QPA_PLATFORM=xcb` or else OBS does not work.

## dmabuf backend
Please note that in order to use the dmabuf backend you have to update to OBS master commit 7867d16e6b1d1c66913e3f1acb079cef44a1204f or later
Please note that in order to use the dmabuf backend you have to update to OBS master commit 705a47b0e439f649af8a81d0a68d03f3b83ea314 or later

As of wlrobs 5f1c794e4614 the dmabuf backend will not work on older OBS EGL forks which do not support `gs_texture_create_from_dmabuf()`

diff --git a/src/dmabuf_source.c b/src/dmabuf_source.c
--- a/src/dmabuf_source.c
+++ b/src/dmabuf_source.c
@@ -228,7 +228,8 @@
	(void) tv_nsec;
	struct wlr_source* this = data;

	this->next_frame->texture = gs_texture_create_from_dmabuf(this->next_frame->width, this->next_frame->height, GS_BGRA,
	this->next_frame->texture = gs_texture_create_from_dmabuf(this->next_frame->width, this->next_frame->height,
								this->next_frame->format, GS_BGRA,
								this->next_frame->obj_count, this->next_frame->fds,
								this->next_frame->strides, this->next_frame->offsets, NULL);