diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 14 | ||||
-rw-r--r-- | fix-timestamp.patch | 36 |
3 files changed, 51 insertions, 5 deletions
@@ -1,7 +1,7 @@ pkgbase = obs-xdg-portal-git pkgdesc = OBS Studio plugin using the Desktop portal for Wayland & X11 screencasting pkgver = 0.1.2.r0.gfc5876a - pkgrel = 1 + pkgrel = 2 url = https://gitlab.gnome.org/feaneron/obs-xdg-portal arch = x86_64 license = GPL @@ -13,7 +13,9 @@ pkgbase = obs-xdg-portal-git provides = obs-xdg-portal conflicts = obs-xdg-portal source = git+https://gitlab.gnome.org/feaneron/obs-xdg-portal - md5sums = SKIP + source = fix-timestamp.patch + sha256sums = SKIP + sha256sums = e7fd7d3455a4b73cf750328d47ea3667d576106207a784ab2ce62c99eeb48813 pkgname = obs-xdg-portal-git @@ -3,7 +3,7 @@ _pkgname="obs-xdg-portal" pkgname="${_pkgname}-git" pkgver=0.1.2.r0.gfc5876a -pkgrel=1 +pkgrel=2 pkgdesc="OBS Studio plugin using the Desktop portal for Wayland & X11 screencasting" arch=(x86_64) url="https://gitlab.gnome.org/feaneron/$_pkgname" @@ -12,14 +12,22 @@ depends=('obs-studio' 'gst-plugins-base-libs' 'xdg-desktop-portal') makedepends=('meson' 'git') conflicts=("${_pkgname}") provides=("${_pkgname}") -source=("git+$url") -md5sums=('SKIP') +source=("git+$url" + 'fix-timestamp.patch') +sha256sums=('SKIP' + 'e7fd7d3455a4b73cf750328d47ea3667d576106207a784ab2ce62c99eeb48813') pkgver() { cd "$_pkgname" git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } +prepare() { + cd "$_pkgname" + # https://gitlab.gnome.org/feaneron/obs-xdg-portal/-/merge_requests/4 + git apply "$srcdir/fix-timestamp.patch" +} + build() { arch-meson "${_pkgname}" build meson compile -C build diff --git a/fix-timestamp.patch b/fix-timestamp.patch new file mode 100644 index 000000000000..41eae2db7816 --- /dev/null +++ b/fix-timestamp.patch @@ -0,0 +1,36 @@ +From 8189f99cfbd2dfebee94f37a2e95b9deb320fc9f Mon Sep 17 00:00:00 2001 +From: Zakk <zakk@rsdio.com> +Date: Sun, 5 Jul 2020 01:04:59 -0400 +Subject: [PATCH] Set the OBS frame timestamp to a frame counter. The GST macro + returns an invalid timestamp. This causes display framerate issue in OBS. + +--- + obs-xdg-portal.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/obs-xdg-portal.c b/obs-xdg-portal.c +index 83cdccc..d595365 100644 +--- a/obs-xdg-portal.c ++++ b/obs-xdg-portal.c +@@ -48,6 +48,7 @@ typedef struct + + obs_source_t *source; + obs_data_t *settings; ++ int64_t frame_count; + } obs_xdg_data; + + /* auxiliary methods */ +@@ -187,9 +188,9 @@ new_appsink_sample_cb (GstAppSink *appsink, + .data[0] = info.data + video_info.offset[0], + .data[1] = info.data + video_info.offset[1], + .data[2] = info.data + video_info.offset[2], +- .timestamp = GST_BUFFER_DTS_OR_PTS (buffer), + }; + ++ frame.timestamp = xdg->frame_count++; + switch (video_info.colorimetry.range) + { + case GST_VIDEO_COLOR_RANGE_0_255: +-- +GitLab + |