gstreamer: update recipes for R36.3.0

- public_sources archive layout change
- refresh patches where needed

Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
Signed-off-by: Matt Madison <matt@madison.systems>
This commit is contained in:
Matt Madison
2024-05-03 13:09:57 -07:00
parent 5459445460
commit f68de0317d
27 changed files with 238 additions and 205 deletions

View File

@@ -1,11 +1,11 @@
DESCRIPTION = "NVIDIA nvarguscamerasrc GStreamer plugin"
SECTION = "multimedia"
LICENSE = "BSD-3-Clause & Proprietary"
LIC_FILES_CHKSUM = "file://nvbufsurface.h;endline=9;md5=25279494f0285af8ac21bc9d4e679c91 \
LIC_FILES_CHKSUM = "file://nvbufsurface.h;endline=9;md5=15dccc547ee18664b1b6d1ece602942b \
file://README.txt;endline=25;md5=364434949752edc42711344c8401d55b \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvarguscamera_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvarguscamera_src.tbz2"
TEGRA_SRC_SUBARCHIVE_OPTS = "--exclude=3rdpartyheaders.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc

View File

@@ -1,36 +0,0 @@
From 9ed04183d33d37ffe6eaa0e8f9a8696c0dcd3ddc Mon Sep 17 00:00:00 2001
From: Kurt Kiefer <kekiefer@gmail.com>
Date: Tue, 1 Nov 2022 10:47:26 -0700
Subject: [PATCH] Skip map frame in pad prepare to fix spurious warnings
When running with gstreamer message level WARN, the following
message is repeated continuously:
videoaggregator gstvideoaggregator.c:528:gst_video_aggregator_convert_pad_prepare_frame:<comp> Could not map input buffer
This element doesn't need to have video data buffers mapped in
order to do its job. In fact the video data buffers used internally
don't contain video data at all, but instead the nvbuffer pointers,
which are obtained differently.
Signed-off-by: Kurt Kiefer <kekiefer@gmail.com>
---
gstnvcompositor.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gstnvcompositor.c b/gstnvcompositor.c
index 67965b5..26ea1c3 100644
--- a/gstnvcompositor.c
+++ b/gstnvcompositor.c
@@ -526,10 +526,7 @@ gst_nvcompositor_pad_prepare_frame (GstVideoAggregatorPad * pad,
GstVideoAggregator * vagg, GstBuffer * buffer,
GstVideoFrame * prepared_frame)
{
- return
- GST_VIDEO_AGGREGATOR_PAD_CLASS
- (gst_nvcompositor_pad_parent_class)->prepare_frame (pad, vagg, buffer,
- prepared_frame);
+ return TRUE;
}
/**

View File

@@ -5,15 +5,13 @@ LIC_FILES_CHKSUM = "file://gstnvcompositor.h;beginline=64;endline=64;md5=7d1c171
file://README.txt;endline=26;md5=d4da79f8cebc6b73ce481b090afa99ae \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvcompositor_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvcompositor_src.tbz2"
TEGRA_SRC_SUBARCHIVE_OPTS = "--exclude=3rdpartyheaders.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base virtual/egl tegra-mmapi tegra-libraries-multimedia-utils"
SRC_URI += " file://0001-Update-makefile-for-OE-builds.patch \
file://0002-Skip-map-frame-in-pad-prepare-to-fix-spurious-warnin.patch \
"
SRC_URI += " file://0001-Update-makefile-for-OE-builds.patch"
S = "${WORKDIR}/gst-nvcompositor"

View File

@@ -3,7 +3,7 @@ SECTION = "multimedia"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://LICENSE.libgstnvdrmvideosink;md5=674ef4559ff709167b72104cb9814e93"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/libgstnvdrmvideosink_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/libgstnvdrmvideosink_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
SRC_URI += " \

View File

@@ -1,19 +1,22 @@
From 7b3481fd8da2a5de0b5a0fa49ce2c1bb66e4b81e Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ilies.chergui@gmail.com>
Date: Thu, 14 Apr 2022 23:56:59 +0100
From 798d1b634c815f0c64562a373046dd1c112d3103 Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Mon, 6 May 2024 11:53:29 -0700
Subject: [PATCH] Makefile fixes for OE builds
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
Signed-off-by: Matt Madison <matt@madison.systems>
---
Makefile | 45 +++++++++++++------
pre-gen-source_64/config.h | 6 +--
2 files changed, 34 insertions(+), 17 deletions(-)
gst-egl/Makefile | 58 ++++++++++++++++++++++--------
gst-egl/pre-gen-source_64/config.h | 6 ++--
2 files changed, 47 insertions(+), 17 deletions(-)
Index: gst-egl/Makefile
===================================================================
--- gst-egl.orig/Makefile
+++ gst-egl/Makefile
diff --git a/gst-egl/Makefile b/gst-egl/Makefile
index a266201..244ba49 100644
--- a/gst-egl/Makefile
+++ b/gst-egl/Makefile
@@ -16,8 +16,11 @@ ifeq ($(CUDA_VER),)
endif
endif
@@ -27,7 +30,7 @@ Index: gst-egl/Makefile
SRCS := ext/eglgles/gstegladaptation.c \
ext/eglgles/gstegladaptation_egl.c \
@@ -29,33 +32,48 @@ SRCS := ext/eglgles/gstegladaptation.c \
@@ -29,46 +32,73 @@ SRCS := ext/eglgles/gstegladaptation.c \
INCLUDES += -I./pre-gen-source_64/ \
-I./gst-libs \
-I./gst-libs/gst/egl \
@@ -64,11 +67,15 @@ Index: gst-egl/Makefile
- -DUSE_EGL_WAYLAND
+ -DUSE_EGL_TEGRA
+
+EXTRADEPS :=
+ifneq ($(USE_X11),)
+CFLAGS += -DHAVE_X11 -DUSE_EGL_X11
+endif
+ifneq ($(USE_WAYLAND),)
+CFLAGS += -DHAVE_WAYLAND -DUSE_EGL_WAYLAND
+SRCS += ext/eglgles/presentation-time.c
+EXTRADEPS += ext/eglgles/presentation-time-client-protocol.h
+OBJS += ext/eglgles/presentation-time.o
+endif
CFLAGS += `pkg-config --cflags $(PKGS)`
@@ -84,9 +91,21 @@ Index: gst-egl/Makefile
+.PHONY: all
all: $(SO_NAME)
%.o: %.c
@@ -66,9 +84,9 @@ $(SO_NAME): $(OBJS)
-%.o: %.c
+%.o: %.c $(EXTRADEPS)
$(CC) -c $< $(CFLAGS) $(INCLUDES) -o $@
$(SO_NAME): $(OBJS)
$(CC) -shared -o $(SO_NAME) $(OBJS) $(LIBS) $(LDFLAGS)
+ifneq ($(USE_WAYLAND),)
+PT_DESC := $(shell pkg-config --variable=pkgdatadir wayland-protocols)/stable/presentation-time/presentation-time.xml
+ext/eglgles/presentation-time-client-protocol.h: $(PT_DESC)
+ wayland-scanner client-header < $< > $@
+ext/eglgles/presentation-time.c: $(PT_DESC)
+ wayland-scanner private-code < $< > $@
+endif
+
.PHONY: install
install: $(SO_NAME)
- cp -vp $(SO_NAME) $(DEST_DIR)
@@ -95,12 +114,13 @@ Index: gst-egl/Makefile
.PHONY: clean
clean:
rm -rf $(OBJS) $(SO_NAME)
- rm -rf $(OBJS) $(SO_NAME)
-
Index: gst-egl/pre-gen-source_64/config.h
===================================================================
--- gst-egl.orig/pre-gen-source_64/config.h
+++ gst-egl/pre-gen-source_64/config.h
+ rm -rf $(OBJS) $(SO_NAME) $(EXTRADEPS) ext/eglgles/presentation-time.c
diff --git a/gst-egl/pre-gen-source_64/config.h b/gst-egl/pre-gen-source_64/config.h
index d06e1a8..af67714 100644
--- a/gst-egl/pre-gen-source_64/config.h
+++ b/gst-egl/pre-gen-source_64/config.h
@@ -524,7 +524,7 @@
/* #undef HAVE_WASAPI */

View File

@@ -1,25 +1,27 @@
From f8603aa8b513452ea5a8c196557b8ac6ad770915 Mon Sep 17 00:00:00 2001
From 83dbf24399c5b25ea5667c16d1125de4a875750b Mon Sep 17 00:00:00 2001
From: Kurt Kiefer <kurt.kiefer@arthrex.com>
Date: Tue, 23 Aug 2022 10:17:08 -0700
Date: Mon, 6 May 2024 11:53:44 -0700
Subject: [PATCH] Fix builds without x11
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Kurt Kiefer <kurt.kiefer@arthrex.com>
Signed-off-by: Matt Madison <matt@madison.systems>
---
gst-egl/ext/eglgles/gsteglglessink.c | 2 ++
1 file changed, 2 additions(+)
1 file changed, 2 insertions(+)
diff --git a/ext/eglgles/gsteglglessink.c b/ext/eglgles/gsteglglessink.c
index 87ee57a..6713923 100644
--- a/ext/eglgles/gsteglglessink.c
+++ b/ext/eglgles/gsteglglessink.c
@@ -107,8 +107,10 @@
diff --git a/gst-egl/ext/eglgles/gsteglglessink.c b/gst-egl/ext/eglgles/gsteglglessink.c
index 44eeba7..4e1139a 100644
--- a/gst-egl/ext/eglgles/gsteglglessink.c
+++ b/gst-egl/ext/eglgles/gsteglglessink.c
@@ -107,7 +107,9 @@
#include <gst/video/gstvideopool.h>
#include <gst/video/videooverlay.h>
+#ifdef USE_EGL_X11
#include <X11/Xlib.h>
+#endif
#include "gstegladaptation.h"
#include "video_platform_wrapper.h"

View File

@@ -0,0 +1,29 @@
From 6c4c9109d9c342bdb5eb58fff62f24357723077a Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Mon, 6 May 2024 11:54:08 -0700
Subject: [PATCH] Fix builds without wayland
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Ilies CHERGUI <ichergui@nvidia.com>
Signed-off-by: Matt Madison <matt@madison.systems>
---
gst-egl/ext/eglgles/gstegladaptation_egl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gst-egl/ext/eglgles/gstegladaptation_egl.c b/gst-egl/ext/eglgles/gstegladaptation_egl.c
index 3d1ceb6..81e244e 100644
--- a/gst-egl/ext/eglgles/gstegladaptation_egl.c
+++ b/gst-egl/ext/eglgles/gstegladaptation_egl.c
@@ -268,9 +268,11 @@ gboolean
gst_egl_adaptation_context_swap_buffers (GstEglAdaptationContext * ctx, gchar* winsys,
gpointer * own_window_data, GstBuffer * buf, gboolean show_latency)
{
+#ifdef USE_EGL_WAYLAND
if (g_strcmp0(winsys, "wayland") == 0 && show_latency) {
register_presentation_feedback(own_window_data, buf);
}
+#endif
gboolean ret = eglSwapBuffers (gst_egl_display_get (ctx->display),
ctx->eglglesctx->surface);

View File

@@ -0,0 +1,49 @@
From 037229f4e618fa74189f8311272ec86ba025a83c Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Mon, 6 May 2024 11:48:24 -0700
Subject: [PATCH] Fix builds without wayland IVI extensions
Upstream-Status: Inappropriate [OE specific]
Signed-off-by: Matt Madison <matt@madison.systems>
---
gst-egl/ext/eglgles/video_platform_wrapper.c | 2 ++
gst-egl/ext/eglgles/video_platform_wrapper.h | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/gst-egl/ext/eglgles/video_platform_wrapper.c b/gst-egl/ext/eglgles/video_platform_wrapper.c
index 769e99a..fd88a5e 100644
--- a/gst-egl/ext/eglgles/video_platform_wrapper.c
+++ b/gst-egl/ext/eglgles/video_platform_wrapper.c
@@ -175,10 +175,12 @@ void global_registry_handler (void *data, struct wl_registry *registry, uint32_t
wp_presentation_add_listener (wayland_display->presentation,
&presentation_listener, NULL);
}
+#ifdef HAVE_WAYLAND_IVI_APPLICATION
else if (strcmp (interface, "ivi_application") == 0) {
wayland_display->ivi_application = wl_registry_bind (registry, id,
&ivi_application_interface, 1);
}
+#endif
}
void global_registry_remover (void *data, struct wl_registry *registry, uint32_t id)
diff --git a/gst-egl/ext/eglgles/video_platform_wrapper.h b/gst-egl/ext/eglgles/video_platform_wrapper.h
index 23f6904..594b9a2 100644
--- a/gst-egl/ext/eglgles/video_platform_wrapper.h
+++ b/gst-egl/ext/eglgles/video_platform_wrapper.h
@@ -52,7 +52,14 @@ gboolean platform_destroy_native_window_x11 (EGLNativeDisplayType display,
#include "wayland-client-protocol.h"
#include "wayland-egl.h"
#include "presentation-time-client-protocol.h"
+#ifdef HAVE_WAYLAND_IVI_APPLICATION
#include "ivi-application-client-protocol.h"
+#else
+struct ivi_surface;
+struct ivi_application;
+static inline __attribute__((unused)) void *ivi_application_surface_create(void *a, guint id, void *surface) { return NULL; }
+static inline __attribute__((unused)) void ivi_application_destroy(struct ivi_application *a) { };
+#endif
typedef struct
{
struct wl_egl_window *egl_window;

View File

@@ -4,19 +4,21 @@ LICENSE = "LGPL-2.0-or-later & MIT"
LIC_FILES_CHKSUM = "file://gst-libs/gst/egl/LICENSE.libgstnvegl-1.0;md5=de0f9dfa389a77a904a5a2919a9e6b08 \
file://LICENSE.libgstnveglglessink;md5=5cf2b0235eb3cb8f4073a66ecb29212a"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gstegl_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gstegl_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
SRC_URI += " file://0001-Makefile-fixes-for-OE-builds.patch \
file://0002-Fix-builds-without-x11.patch \
"
SRC_URI += "file://0001-Makefile-fixes-for-OE-builds.patch;patchdir=.. \
file://0002-Fix-builds-without-x11.patch;patchdir=.. \
file://0003-Fix-builds-without-wayland.patch;patchdir=.. \
file://0004-Fix-builds-without-wayland-IVI-extensions.patch;patchdir=.. \
"
DEPENDS = "tegra-mmapi gstreamer1.0 glib-2.0-native gstreamer1.0-plugins-base virtual/egl virtual/libgles2 cuda-cudart cuda-driver"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11 wayland', d)}"
PACKAGECONFIG[x11] = "USE_X11=yes,,libx11"
PACKAGECONFIG[wayland] = "USE_WAYLAND=yes,,wayland"
PACKAGECONFIG[wayland] = "USE_WAYLAND=yes,,wayland wayland-protocols wayland-native"
EXTRA_OEMAKE = "CUDA_VER=${CUDA_VERSION} ${PACKAGECONFIG_CONFARGS}"

View File

@@ -3,7 +3,7 @@ SECTION = "multimedia"
LICENSE = "LGPL-2.0-only"
LIC_FILES_CHKSUM = "file://gst-jpeg/gst-jpeg-1.0/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gstjpeg_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gstjpeg_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
SRC_URI += "file://use-nvjpeg-for-plugin-name.patch"

View File

@@ -3,7 +3,7 @@ SECTION = "multimedia"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://README.txt;endline=26;md5=d4da79f8cebc6b73ce481b090afa99ae"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvtee_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvtee_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
DEPENDS = "gstreamer1.0 glib-2.0 gstreamer1.0-plugins-base"

View File

@@ -1,13 +1,13 @@
DESCRIPTION = "NVIDIA v4l2camerasrc GStreamer plugin"
SECTION = "multimedia"
LICENSE = "BSD-3-Clause & Proprietary"
LIC_FILES_CHKSUM = "file://nvbufsurface.h;endline=9;md5=25279494f0285af8ac21bc9d4e679c91 \
LIC_FILES_CHKSUM = "file://nvbufsurface.h;endline=9;md5=15dccc547ee18664b1b6d1ece602942b \
file://README.txt;endline=25;md5=afc286435ccd143c9a10b5d7a8c1dee1 \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvv4l2camera_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvv4l2camera_src.tbz2"
TEGRA_SRC_SUBARCHIVE_OPTS = "--exclude=3rdpartyheaders.tbz2"
TEGRA_SRC_EXTRA_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvarguscamera_src.tbz2"
TEGRA_SRC_EXTRA_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvarguscamera_src.tbz2"
TEGRA_SRC_EXTRA_SUBARCHIVE_OPTS = "-C ${UNPACKDIR}/gst-nvv4l2camera --strip-components=1 gst-nvarguscamera/nvbufsurface.h"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc

View File

@@ -13,7 +13,7 @@ Index: gst-nvvidconv/gstnvvconv.c
===================================================================
--- gst-nvvidconv.orig/gstnvvconv.c
+++ gst-nvvidconv/gstnvvconv.c
@@ -1916,6 +1916,23 @@ gst_nvvconv_get_unit_size (GstBaseTransf
@@ -2058,6 +2058,23 @@ gst_nvvconv_get_unit_size (GstBaseTransf
return ret;
}
@@ -37,7 +37,7 @@ Index: gst-nvvidconv/gstnvvconv.c
/**
* Given the pad in direction and the given caps,
* fixate the caps on the other pad.
@@ -1943,29 +1960,13 @@ gst_nvvconv_fixate_caps (GstBaseTransfor
@@ -2085,29 +2102,13 @@ gst_nvvconv_fixate_caps (GstBaseTransfor
gboolean have_nvfeature = FALSE;
space = GST_NVVCONV (btrans);
@@ -74,8 +74,8 @@ Index: gst-nvvidconv/gstnvvconv.c
GST_DEBUG_OBJECT (space, "trying to fixate othercaps %" GST_PTR_FORMAT
" based on caps %" GST_PTR_FORMAT, othercaps, caps);
@@ -2038,7 +2039,10 @@ gst_nvvconv_fixate_caps (GstBaseTransfor
gint numerator, denominator;
@@ -2180,7 +2181,10 @@ gst_nvvconv_fixate_caps (GstBaseTransfor
gint numerator = 0, denominator = 0;
/* from_pix_ar should be fixed */
- g_return_val_if_fail (gst_value_is_fixed (from_pix_ar), othercaps);

View File

@@ -1,11 +1,11 @@
DESCRIPTION = "NVIDIA video converter GStreamer plugin"
SECTION = "multimedia"
LICENSE = "BSD-3-Clause & Proprietary"
LIC_FILES_CHKSUM = "file://nvbufsurface.h;endline=9;md5=25279494f0285af8ac21bc9d4e679c91 \
LIC_FILES_CHKSUM = "file://nvbufsurface.h;endline=9;md5=15dccc547ee18664b1b6d1ece602942b \
file://README.txt;endline=26;md5=d4da79f8cebc6b73ce481b090afa99ae \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvvidconv_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvvidconv_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
DEPENDS = "gstreamer1.0 glib-2.0 gstreamer1.0-plugins-base tegra-libraries-multimedia tegra-mmapi cuda-driver cuda-cudart"

View File

@@ -1,6 +1,6 @@
From 5f263d373442ae6636c5f533ce192c6e1a06f781 Mon Sep 17 00:00:00 2001
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date: Thu, 25 Jun 2020 16:46:23 -0400
From 0ca96379fb73fb0635fb8459de447133767bcc02 Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:50:56 +0000
Subject: [PATCH 1/7] v4l2videoenc: Fix negotiation caps leak
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/649>
@@ -8,14 +8,14 @@ Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requ
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/gstv4l2videoenc.c | 3 +++
gstv4l2videoenc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gstv4l2videoenc.c b/gstv4l2videoenc.c
index 232521d..9b1a5c7 100644
index e4b59bb..76a1062 100644
--- a/gstv4l2videoenc.c
+++ b/gstv4l2videoenc.c
@@ -1180,6 +1180,9 @@ gst_v4l2_video_enc_negotiate (GstVideoEncoder * encoder)
@@ -1248,6 +1248,9 @@ gst_v4l2_video_enc_negotiate (GstVideoEncoder * encoder)
if (gst_caps_foreach (allowed_caps, negotiate_profile_and_level, &ctx)) {
goto no_profile_level;
}

View File

@@ -1,6 +1,6 @@
From 114ca7843aea535a1621518f4f392a40109568e6 Mon Sep 17 00:00:00 2001
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date: Fri, 26 Jun 2020 09:53:13 -0400
From 80d2084fe66e603fdb224eb06551b5ed61f05a3a Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:51:45 +0000
Subject: [PATCH 2/7] v4l2allocator: Fix data offset / bytesused size
validation
@@ -12,7 +12,7 @@ Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requ
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/gstv4l2allocator.c | 2 +-
gstv4l2allocator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gstv4l2allocator.c b/gstv4l2allocator.c

View File

@@ -1,6 +1,6 @@
From e44664958ad6154c95d559011bc33c38751f9932 Mon Sep 17 00:00:00 2001
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date: Fri, 26 Jun 2020 11:05:25 -0400
From 3502b229347c8afff015d309614aa76bba4e83b9 Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:56:24 +0000
Subject: [PATCH 3/7] v4l2bufferpool: Avoid set_flushing warning
The gst_buffer_pool_set_flushing() warns when that function is called
@@ -12,7 +12,7 @@ Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requ
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/gstv4l2bufferpool.c | 4 ++--
gstv4l2bufferpool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gstv4l2bufferpool.c b/gstv4l2bufferpool.c

View File

@@ -1,20 +1,20 @@
From 362866771c3adfeba0d81c3983d389da48d1494e Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 8 Nov 2020 01:53:55 +0000
From 5089ddc47eb05ce6d2ed09bd71e58def50160f8b Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:57:10 +0000
Subject: [PATCH 4/7] gstv4l2videodec: use ifdef macro for consistency with the
rest of the code
rest of the code
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/gstv4l2videodec.c | 4 ++--
gstv4l2videodec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gstv4l2videodec.c b/gstv4l2videodec.c
index e0fb5ce..d044897 100644
index cab3cbd..39afc70 100644
--- a/gstv4l2videodec.c
+++ b/gstv4l2videodec.c
@@ -683,7 +683,7 @@ gst_v4l2_video_dec_start (GstVideoDecoder * decoder)
@@ -679,7 +679,7 @@ gst_v4l2_video_dec_start (GstVideoDecoder * decoder)
gst_v4l2_object_unlock (self->v4l2output);
g_atomic_int_set (&self->active, TRUE);
self->output_flow = GST_FLOW_OK;
@@ -23,7 +23,7 @@ index e0fb5ce..d044897 100644
self->decoded_picture_cnt = 0;
#endif
@@ -1329,7 +1329,7 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
@@ -1279,7 +1279,7 @@ gst_v4l2_video_dec_loop (GstVideoDecoder * decoder)
gst_caps_unref(reference);
}

View File

@@ -1,6 +1,6 @@
From d7ad6c853a9df7fec6472b02ba3129054624c117 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Sun, 8 Nov 2020 12:49:03 +0000
From cdc5b344ff32cd0c0beef5ca99852c7f82a48d9e Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:57:58 +0000
Subject: [PATCH 5/7] gstv4l2videodec: check if we have a pool before the
locking in video decoder set format
@@ -20,37 +20,37 @@ otherwise nvv4l2decoder will hang forever waiting for capture_plane_stopped.
Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/gstv4l2videodec.c | 15 +++++++++------
gstv4l2videodec.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/gstv4l2videodec.c b/gstv4l2videodec.c
index d044897..f19bd71 100644
index 39afc70..aa0ef4f 100644
--- a/gstv4l2videodec.c
+++ b/gstv4l2videodec.c
@@ -914,14 +914,17 @@ gst_v4l2_video_dec_set_format (GstVideoDecoder * decoder,
if (is_cuvid == FALSE) {
if (self->is_drc == TRUE)
{
- g_mutex_lock(&self->v4l2capture->cplane_stopped_lock);
- while (self->v4l2capture->capture_plane_stopped != TRUE)
+ if (self->v4l2capture->pool )
{
- g_cond_wait(&self->v4l2capture->cplane_stopped_cond,
- &self->v4l2capture->cplane_stopped_lock);
+ g_mutex_lock (&self->v4l2capture->cplane_stopped_lock);
+ while (self->v4l2capture->capture_plane_stopped != TRUE)
+ {
+ g_cond_wait (&self->v4l2capture->cplane_stopped_cond,
+ &self->v4l2capture->cplane_stopped_lock);
+ }
+ self->v4l2capture->capture_plane_stopped = FALSE;
+ g_mutex_unlock (&self->v4l2capture->cplane_stopped_lock);
}
- self->v4l2capture->capture_plane_stopped = FALSE;
- g_mutex_unlock(&self->v4l2capture->cplane_stopped_lock);
gst_v4l2_object_close(self->v4l2output);
gst_v4l2_object_close(self->v4l2capture);
gst_v4l2_object_open(self->v4l2output);
@@ -1714,14 +1714,17 @@ gst_v4l2_video_dec_handle_frame (GstVideoDecoder * decoder,
gst_v4l2_object_stop(self->v4l2capture);
self->output_flow = GST_FLOW_OK;
- g_mutex_lock(&self->v4l2capture->cplane_stopped_lock);
- while (self->v4l2capture->capture_plane_stopped != TRUE)
+ if (self->v4l2capture->pool)
{
- g_cond_wait(&self->v4l2capture->cplane_stopped_cond,
- &self->v4l2capture->cplane_stopped_lock);
+ g_mutex_lock(&self->v4l2capture->cplane_stopped_lock);
+ while (self->v4l2capture->capture_plane_stopped != TRUE)
+ {
+ g_cond_wait(&self->v4l2capture->cplane_stopped_cond,
+ &self->v4l2capture->cplane_stopped_lock);
+ }
+ self->v4l2capture->capture_plane_stopped = FALSE;
+ g_mutex_unlock(&self->v4l2capture->cplane_stopped_lock);
}
- self->v4l2capture->capture_plane_stopped = FALSE;
- g_mutex_unlock(&self->v4l2capture->cplane_stopped_lock);
gst_v4l2_object_close(self->v4l2output);
gst_v4l2_object_close(self->v4l2capture);
--
2.25.1

View File

@@ -1,6 +1,6 @@
From 6812a3e081d5ec48d4881c626c532333d2c48d92 Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Mon, 27 Sep 2021 05:22:43 -0700
From 39539edc19d65a5f237e455a1ce83c97e39e40b7 Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:59:14 +0000
Subject: [PATCH 6/7] Fix resource leak in nvv4l2decoder
See: https://forums.developer.nvidia.com/t/175198/11
@@ -8,15 +8,15 @@ See: https://forums.developer.nvidia.com/t/175198/11
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/gstv4l2object.c | 7 +++++++
gst-v4l2/gstv4l2videodec.c | 4 +++-
gstv4l2object.c | 7 +++++++
gstv4l2videodec.c | 4 +++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/gstv4l2object.c b/gstv4l2object.c
index aa83a1b..51d0c2f 100644
index bf42f15..dd98510 100644
--- a/gstv4l2object.c
+++ b/gstv4l2object.c
@@ -3789,6 +3789,13 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps,
@@ -3802,6 +3802,13 @@ gst_v4l2_object_set_format_full (GstV4l2Object * v4l2object, GstCaps * caps,
(v4l2object->open_mjpeg_block == TRUE) &&
(g_str_equal(gst_structure_get_name(gst_caps_get_structure (caps, 0)), "image/jpeg")))
format.fmt.pix_mp.pixelformat = pixelformat = V4L2_PIX_FMT_MJPEG;
@@ -31,10 +31,10 @@ index aa83a1b..51d0c2f 100644
#ifdef USE_V4L2_TARGET_NV
diff --git a/gstv4l2videodec.c b/gstv4l2videodec.c
index f19bd71..09c243b 100644
index aa0ef4f..2b80a38 100644
--- a/gstv4l2videodec.c
+++ b/gstv4l2videodec.c
@@ -944,8 +944,10 @@ gst_v4l2_video_dec_set_format (GstVideoDecoder * decoder,
@@ -891,8 +891,10 @@ gst_v4l2_video_dec_set_format (GstVideoDecoder * decoder,
if (ret)
self->input_state = gst_video_codec_state_ref (state);

View File

@@ -1,16 +1,16 @@
From bf7357bdaaa920a0e9d5f229fcb3f6060f1615d8 Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ilies.chergui@gmail.com>
Date: Thu, 26 Jan 2023 00:06:19 +0000
From b7a7f55f9a864edd8d4f935e403c94ec7253f8ac Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 13:00:06 +0000
Subject: [PATCH 7/7] Makefile fixes for OE builds
Signed-off-by: Matt Madison <matt@madison.systems>
Signed-off-by: Ilies CHERGUI <ilies.chergui@gmail.com>
---
gst-v4l2/Makefile | 43 ++++++++++++++++++++-----------------------
Makefile | 43 ++++++++++++++++++++-----------------------
1 file changed, 20 insertions(+), 23 deletions(-)
diff --git a/Makefile b/Makefile
index 6621c04..2102dd1 100644
index 522a1f5..2102dd1 100644
--- a/Makefile
+++ b/Makefile
@@ -10,49 +10,45 @@
@@ -29,6 +29,7 @@ index 6621c04..2102dd1 100644
-ifeq ($(TARGET_DEVICE),aarch64)
- GST_INSTALL_DIR?=/usr/lib/aarch64-linux-gnu/gstreamer-1.0/
- LIB_INSTALL_DIR?=/usr/lib/aarch64-linux-gnu/tegra/
- INCLUDES += -I/usr/src/jetson_multimedia_api/include/
- CFLAGS:=
-else
- GST_INSTALL_DIR?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/lib/gst-plugins/
@@ -41,7 +42,6 @@ index 6621c04..2102dd1 100644
SRCS := $(wildcard *.c)
-INCLUDES += -I./ -I../
-INCLUDES += -I/usr/src/jetson_multimedia_api/include/
+INCLUDES += -I./
PKGS := gstreamer-1.0 \

View File

@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.gst-nvvideo4linux2;md5=457fb5d7ae2d8cd8cabcc2
file://README.txt;endline=11;md5=71af624b03396c4f2c70c9c8684ff3d2 \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/gst-nvvideo4linux2_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/gst-nvvideo4linux2_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
SRC_URI += "\

View File

@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.libgstnvvideosinks;md5=86ed1f32df3aaa376956e4
file://README.txt;endline=11;md5=3670d068ae876bb6ea4c18beae2397ff \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/libgstnvvideosinks_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/libgstnvvideosinks_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
SRC_URI += "file://0001-build-fixups.patch"

View File

@@ -1,20 +1,20 @@
From 3ca17db9635a7e9f682c7d4870684fab44ff8e5a Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Wed, 9 Aug 2023 08:42:41 -0700
From e979a1e5646ff1b7cf0cb3cb6c79b71aafa99232 Mon Sep 17 00:00:00 2001
From: Ilies CHERGUI <ichergui@nvidia.com>
Date: Fri, 17 Nov 2023 12:37:46 +0000
Subject: [PATCH] Makefile fixups for OE builds
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Matt Madison <matt@madison.systems>
---
Makefile.public | 28 ++++++++--------------------
1 file changed, 8 insertions(+), 20 deletions(-)
Makefile.public | 26 +++++++-------------------
1 file changed, 7 insertions(+), 19 deletions(-)
diff --git a/Makefile.public b/Makefile.public
index 6b97891..cd858fb 100644
--- a/Makefile.public
+++ b/Makefile.public
Index: gst-nvcustomhelper/Makefile.public
===================================================================
--- gst-nvcustomhelper.orig/Makefile.public
+++ gst-nvcustomhelper/Makefile.public
@@ -21,8 +21,8 @@
# DEALINGS IN THE SOFTWARE.
# DEALINGS IN THE SOFTWARE.
################################################################################
-CXX:= gcc
@@ -32,19 +32,18 @@ index 6b97891..cd858fb 100644
- LIB_INSTALL_DIR?=/usr/lib/aarch64-linux-gnu/tegra/
- CFLAGS:=
-else
- NVDS_VERSION ?=6.2
- NVDS_VERSION ?=7.0
- LIB_INSTALL_DIR ?=/opt/nvidia/deepstream/deepstream-$(NVDS_VERSION)/lib/
- CFLAGS:= -DDS_VERSION=\"6.2.1\"
- CFLAGS:= -DDS_VERSION=\"7.0.0\"
-endif
-
CFLAGS+= -fPIC
-
+
LIBS := -shared -Wl,-no-undefined
-
-LIBS+= -L$(LIB_INSTALL_DIR) -ldl\
- -Wl,-rpath,$(LIB_INSTALL_DIR)
-
-PKGS:= gstreamer-1.0 gstreamer-base-1.0 gstreamer-video-1.0
+PKGS:= gstreamer-1.0
CFLAGS+= $(shell pkg-config --cflags $(PKGS))
@@ -69,6 +68,3 @@ index 6b97891..cd858fb 100644
clean:
rm -rf $(OBJS) $(LIB)
--
2.34.1

View File

@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.libgstnvcustomhelper;md5=9e0fe9cd844e2cba9b43
file://README;endline=11;md5=8a55074f13f4cdb3c9966343177e1f9e \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/libgstnvcustomhelper_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/libgstnvcustomhelper_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc

View File

@@ -1,24 +0,0 @@
From f207b5c31868837bbf8fa36c46bd02980c169278 Mon Sep 17 00:00:00 2001
From: Matt Madison <matt@madison.systems>
Date: Mon, 13 Dec 2021 05:47:45 -0800
Subject: [PATCH] Fix indentation in nvgstplayer.c
---
nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c b/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c
index eb0b086..3b7e7e8 100644
--- a/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c
+++ b/nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer.c
@@ -903,8 +903,8 @@ goto_next_track (gpointer data)
destroy_current_track ();
}
-if(app->stats)
- stats_func(app->pfData.average_fps, app->pfData.frames_rendered, app->pfData.frames_dropped);
+ if(app->stats)
+ stats_func(app->pfData.average_fps, app->pfData.frames_rendered, app->pfData.frames_dropped);
NVGST_INFO_MESSAGE_V ("uriCount: %d, uriTotal: %d", (gint) app->uriCount,
(gint) app->uriTotal);

View File

@@ -5,16 +5,13 @@ LIC_FILES_CHKSUM = "file://nvgst_sample_apps/nvgstcapture-1.0/nvgstcapture-1.0_R
file://nvgst_sample_apps/nvgstplayer-1.0/nvgstplayer-1.0_README.txt;endline=21;md5=694cc29d69c54345f88511643308aae5 \
"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/public/nvgstapps_src.tbz2"
TEGRA_SRC_SUBARCHIVE = "Linux_for_Tegra/source/nvgstapps_src.tbz2"
require recipes-bsp/tegra-sources/tegra-sources-36.3.0.inc
DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base virtual/egl libx11 libxext"
SRC_URI += "\
file://0002-Fix-stringop-truncation-warning.patch \
file://0003-Fix-indentation-in-nvgstplayer.c.patch \
"
SRC_URI += "file://0002-Fix-stringop-truncation-warning.patch"
S = "${WORKDIR}/nvgstapps_src"
B = "${WORKDIR}/build"