[gnome-build-meta/alatiera/h264: 2/2] Attempt to fix openh264 gstreamer plugin
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/alatiera/h264: 2/2] Attempt to fix openh264 gstreamer plugin
- Date: Sat, 3 Sep 2022 21:29:50 +0000 (UTC)
commit 5b5364df70f498c27031f2d2890c857e13ec6d5e
Author: Jordan Petridis <jordan centricular com>
Date: Sun Sep 4 00:09:33 2022 +0300
Attempt to fix openh264 gstreamer plugin
https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/merge_requests/9566
See #507
elements/freedesktop-sdk.bst | 2 +
files/freedesktop-sdk/9566.patch | 160 +++++++++++++++++++++++++++++++++++++++
2 files changed, 162 insertions(+)
---
diff --git a/elements/freedesktop-sdk.bst b/elements/freedesktop-sdk.bst
index 9de5b8b42..9a92b706c 100644
--- a/elements/freedesktop-sdk.bst
+++ b/elements/freedesktop-sdk.bst
@@ -6,6 +6,8 @@ sources:
track-tags: true
- kind: patch
path: files/freedesktop-sdk/9564.patch
+- kind: patch
+ path: files/freedesktop-sdk/9566.patch
config:
options:
target_arch: '%{arch}'
diff --git a/files/freedesktop-sdk/9566.patch b/files/freedesktop-sdk/9566.patch
new file mode 100644
index 000000000..4eb2d92f4
--- /dev/null
+++ b/files/freedesktop-sdk/9566.patch
@@ -0,0 +1,160 @@
+From 0ec8df2339232ea4417d4302273d7f3659840d28 Mon Sep 17 00:00:00 2001
+From: Jordan Petridis <jordan centricular com>
+Date: Sat, 3 Sep 2022 23:57:27 +0300
+Subject: [PATCH] gstreamer: Backport patch for the openh264 plugin
+
+Also backport patch to sync the noh264 headers
+
+Upstream patches:
+
+https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2918
+
+https://github.com/endlessm/noopenh264/pull/10
+---
+ elements/components/noopenh264.bst | 2 +
+ patches/gstreamer/2924.patch | 84 ++++++++++++++++++++++++++++++
+ patches/noopenh264/10.patch | 31 +++++++++++
+ 3 files changed, 117 insertions(+)
+ create mode 100644 patches/gstreamer/2924.patch
+ create mode 100644 patches/noopenh264/10.patch
+
+diff --git a/elements/components/noopenh264.bst b/elements/components/noopenh264.bst
+index b66046fe6e..b7c4f770e0 100644
+--- a/elements/components/noopenh264.bst
++++ b/elements/components/noopenh264.bst
+@@ -46,3 +46,5 @@ sources:
+ ref: Version_2.3.0-0-g750147f1e5af5cd9f47ffabef996c335b1ba0481
+ exclude:
+ - Release*
++- kind: patch_queue
++ path: patches/noopenh264
+diff --git a/patches/gstreamer/2924.patch b/patches/gstreamer/2924.patch
+new file mode 100644
+index 0000000000..e39650619b
+--- /dev/null
++++ b/patches/gstreamer/2924.patch
+@@ -0,0 +1,84 @@
++From d2110dfe1d8824c4137c7169f4d560fcf78fa024 Mon Sep 17 00:00:00 2001
++From: Philippe Normand <philn igalia com>
++Date: Sat, 20 Aug 2022 16:15:15 +0100
++Subject: [PATCH] openh264: Register debug categories earlier
++
++Otherwise the GST_ERROR message logged in case of ABI mismatch would be done on
++an uninitialized category.
++
++Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2924>
++---
++ .../ext/openh264/gstopenh264dec.cpp | 11 +++++------
++ .../ext/openh264/gstopenh264enc.cpp | 14 +++++++-------
++ 2 files changed, 12 insertions(+), 13 deletions(-)
++
++diff --git a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
++index e42dc093b70..6d3464628f8 100644
++--- a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
+++++ b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264dec.cpp
++@@ -86,10 +86,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
++
++ /* class initialization */
++
++-G_DEFINE_TYPE_WITH_CODE (GstOpenh264Dec, gst_openh264dec,
++- GST_TYPE_VIDEO_DECODER,
++- GST_DEBUG_CATEGORY_INIT (gst_openh264dec_debug_category, "openh264dec", 0,
++- "debug category for openh264dec element"));
+++G_DEFINE_TYPE (GstOpenh264Dec, gst_openh264dec, GST_TYPE_VIDEO_DECODER);
++ GST_ELEMENT_REGISTER_DEFINE_CUSTOM (openh264dec, openh264dec_element_init);
++
++ static void
++@@ -455,10 +452,12 @@ gst_openh264dec_decide_allocation (GstVideoDecoder * decoder, GstQuery * query)
++ static gboolean
++ openh264dec_element_init (GstPlugin * plugin)
++ {
+++ GST_DEBUG_CATEGORY_INIT (gst_openh264dec_debug_category, "openh264dec", 0,
+++ "debug category for openh264dec element");
++ if (openh264_element_init (plugin))
++ return gst_element_register (plugin, "openh264dec", GST_RANK_MARGINAL,
++ GST_TYPE_OPENH264DEC);
++
++- GST_ERROR ("Incorrect library version loaded, expecting %s", g_strCodecVer);
++- return FALSE;
+++ GST_ERROR ("Incorrect library version loaded, expecting %s", g_strCodecVer);
+++ return FALSE;
++ }
++diff --git a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
++index 3328d01d99b..00ad6b1d650 100644
++--- a/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
+++++ b/subprojects/gst-plugins-bad/ext/openh264/gstopenh264enc.cpp
++@@ -234,10 +234,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
++ /* class initialization */
++
++ G_DEFINE_TYPE_WITH_CODE (GstOpenh264Enc, gst_openh264enc,
++- GST_TYPE_VIDEO_ENCODER,
++- G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL);
++- GST_DEBUG_CATEGORY_INIT (gst_openh264enc_debug_category, "openh264enc", 0,
++- "debug category for openh264enc element"));
+++ GST_TYPE_VIDEO_ENCODER, G_IMPLEMENT_INTERFACE (GST_TYPE_PRESET, NULL));
++ GST_ELEMENT_REGISTER_DEFINE_CUSTOM (openh264enc, openh264enc_element_init);
++
++ static void
++@@ -1057,13 +1054,16 @@ gst_openh264enc_finish (GstVideoEncoder * encoder)
++
++ return GST_FLOW_OK;
++ }
+++
++ static gboolean
++ openh264enc_element_init (GstPlugin * plugin)
++ {
+++ GST_DEBUG_CATEGORY_INIT (gst_openh264enc_debug_category, "openh264enc", 0,
+++ "debug category for openh264enc element");
++ if (openh264_element_init (plugin))
++ return gst_element_register (plugin, "openh264enc", GST_RANK_MARGINAL,
++- GST_TYPE_OPENH264ENC);
+++ GST_TYPE_OPENH264ENC);
++
++- GST_ERROR ("Incorrect library version loaded, expecting %s", g_strCodecVer);
++- return FALSE;
+++ GST_ERROR ("Incorrect library version loaded, expecting %s", g_strCodecVer);
+++ return FALSE;
++ }
++--
++GitLab
++
+diff --git a/patches/noopenh264/10.patch b/patches/noopenh264/10.patch
+new file mode 100644
+index 0000000000..ef04bc69f6
+--- /dev/null
++++ b/patches/noopenh264/10.patch
+@@ -0,0 +1,31 @@
++From c0c59756f78c46953484cf5de9af1e2e24d64002 Mon Sep 17 00:00:00 2001
++From: Jordan Petridis <jordan centricular com>
++Date: Sat, 3 Sep 2022 23:44:33 +0300
++Subject: [PATCH] codec_ver.h: Sync for 2.3.0
++
++---
++ codec/api/svc/codec_ver.h | 10 +++++-----
++ 1 file changed, 5 insertions(+), 5 deletions(-)
++
++diff --git a/codec/api/svc/codec_ver.h b/codec/api/svc/codec_ver.h
++index f45ab3f..0944109 100644
++--- a/codec/api/svc/codec_ver.h
+++++ b/codec/api/svc/codec_ver.h
++@@ -4,12 +4,12 @@
++
++ #include "codec_app_def.h"
++
++-static const OpenH264Version g_stCodecVersion = {2, 1, 1, 2005};
++-static const char* const g_strCodecVer = "OpenH264 version:2.1.1.2005";
+++static const OpenH264Version g_stCodecVersion = {2, 3, 0, 2206};
+++static const char* const g_strCodecVer = "OpenH264 version:2.3.0.2206";
++
++ #define OPENH264_MAJOR (2)
++-#define OPENH264_MINOR (1)
++-#define OPENH264_REVISION (1)
++-#define OPENH264_RESERVED (2005)
+++#define OPENH264_MINOR (3)
+++#define OPENH264_REVISION (0)
+++#define OPENH264_RESERVED (2206)
++
++ #endif // CODEC_VER_H
+--
+GitLab
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]