Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile-dev-downloaded.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM restreamio/gstreamer:$TARGET_ARCH-dev-dependencies

ARG GSTREAMER_VERSION=1.24.11
ARG GSTREAMER_VERSION=1.22.12

ARG GSTREAMER_CEF_REPOSITORY=https://github.com/centricular/gstcefsrc
ARG GSTREAMER_CEF_CHECKOUT=cce144d984e70cc88f4624390419171fea6ca8ee
Expand Down
7 changes: 4 additions & 3 deletions docker/build-gstreamer/compile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ else
fi

git apply /compile-patch/0001-baseparse-always-update-the-input-pts-if-available-from.patch
git apply /compile-patch/0002-Reduce-logs-verbosity-in-webrtcbin-when-a-FEC-decode.patch
git apply /compile-patch/0003-compositor-add-rounded-corners-property-for-sink-pad.patch
git apply /compile-patch/0004-compositor-add-box-shadow-property-for-sink-pads.patch
git apply /compile-patch/0001-compositor-add-rounded-corners-property-for-sink-pad.patch
git apply /compile-patch/0001-pad-Check-data-NULL-ness-when-probes-are-stopped-fixed-in-1.24.8.patch
git apply /compile-patch/0001-Reduce-logs-verbosity-in-webrtcbin-when-a-FEC-decode.patch
git apply /compile-patch/0001-glvideomixer-update-API-to-be-compatible-with-versio.patch

# This is needed for other plugins to be built properly
ninja -C build install
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From 7fb01ba1afb499d12497c8b7ab10df7befb690cf Mon Sep 17 00:00:00 2001
From 5a70b3c8d4f4c1213064d372ee48069bf957c80a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= <llepage@igalia.com>
Date: Mon, 2 Dec 2024 12:25:42 +0100
Subject: [PATCH 2/4] Reduce logs verbosity in webrtcbin when a FEC decoder
cannot be found
Subject: [PATCH] Reduce logs verbosity in webrtcbin when a FEC decoder cannot
be found

---
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
index bf0bc5b3f6..9eb253a283 100644
index 0e315ac466..3acae76b6f 100644
--- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
+++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
@@ -5094,7 +5094,7 @@ try_match_transceiver_with_fec_decoder (GstWebRTCBin * webrtc,
@@ -5013,7 +5013,7 @@ try_match_transceiver_with_fec_decoder (GstWebRTCBin * webrtc,
if (original_pt == item->pt && item->media_idx != -1
&& item->media_idx == trans->parent.mline) {
if (trans->ulpfecdec) {
Expand All @@ -21,7 +21,7 @@ index bf0bc5b3f6..9eb253a283 100644
gst_clear_object (&trans->ulpfecdec);
}
trans->ulpfecdec = gst_object_ref (fecdec);
@@ -5104,7 +5104,7 @@ try_match_transceiver_with_fec_decoder (GstWebRTCBin * webrtc,
@@ -5023,7 +5023,7 @@ try_match_transceiver_with_fec_decoder (GstWebRTCBin * webrtc,
}

if (!found_transceiver) {
Expand All @@ -32,3 +32,4 @@ index bf0bc5b3f6..9eb253a283 100644
}
--
2.43.0

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From e3ef323fda57a4b4e604820f8e183fea97892acd Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Tue, 29 Sep 2020 14:51:54 +1000
Subject: [PATCH 1/4] baseparse: always update the input pts if available from
Subject: [PATCH] baseparse: always update the input pts if available from
upstream

We were not which could lead to output buffers having a pts of NONE even
Expand All @@ -12,10 +12,10 @@ muxers would reject the buffer without a pts and fail.
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/subprojects/gstreamer/libs/gst/base/gstbaseparse.c b/subprojects/gstreamer/libs/gst/base/gstbaseparse.c
index 422e489c32..382f8a9757 100644
index 660439bacfa..04d400604ca 100644
--- a/subprojects/gstreamer/libs/gst/base/gstbaseparse.c
+++ b/subprojects/gstreamer/libs/gst/base/gstbaseparse.c
@@ -3284,9 +3284,10 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
@@ -3281,9 +3281,10 @@ gst_base_parse_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)
* but interpolate in between */
pts = gst_adapter_prev_pts (parse->priv->adapter, NULL);
dts = gst_adapter_prev_dts (parse->priv->adapter, NULL);
Expand All @@ -29,4 +29,5 @@ index 422e489c32..382f8a9757 100644

if (GST_CLOCK_TIME_IS_VALID (dts) && (parse->priv->prev_dts != dts)) {
--
2.43.0
GitLab

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 1c2f202fb910c0db0a7311597e484962bf199be6 Mon Sep 17 00:00:00 2001
From dd260de0def61760196b76cf33a7bda62280db40 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= <llepage@igalia.com>
Date: Wed, 17 Jul 2024 12:53:20 +0200
Subject: [PATCH 3/4] compositor: add rounded corners property for sink pads
Date: Thu, 18 Jul 2024 18:34:55 +0200
Subject: [PATCH] compositor: add rounded corners property for sink pads

---
.../gst/compositor/compositor.c | 239 +++++++++++++++++-
Expand Down Expand Up @@ -360,4 +360,5 @@ index c3d2998422..1b48c1b035 100644
GstCompositorOperator op;

--
2.43.0
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
From dd1d86caefe98550f3abff0bd018c5f449eda90b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Le=20Page?= <llepage@igalia.com>
Date: Mon, 31 Mar 2025 17:54:51 +0200
Subject: [PATCH] glvideomixer: update API to be compatible with version 1.24

---
.../gst-plugins-base/ext/gl/gstglmixerbin.c | 74 +++++++++++++++++++
.../gst-plugins-base/ext/gl/gstglmixerbin.h | 7 ++
.../gst-plugins-base/ext/gl/gstglvideomixer.c | 15 +++-
3 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.c b/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.c
index 4e8d045e57..5b55a051b3 100644
--- a/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.c
+++ b/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.c
@@ -31,9 +31,11 @@
#define GST_CAT_DEFAULT gst_gl_mixer_bin_debug
GST_DEBUG_CATEGORY (gst_gl_mixer_bin_debug);

+#define DEFAULT_FORCE_LIVE FALSE
#define DEFAULT_LATENCY 0
#define DEFAULT_START_TIME_SELECTION 0
#define DEFAULT_START_TIME (-1)
+#define DEFAULT_MIN_UPSTREAM_LATENCY (0)

typedef enum
{
@@ -124,6 +126,8 @@ enum
PROP_START_TIME_SELECTION,
PROP_START_TIME,
PROP_CONTEXT,
+ PROP_FORCE_LIVE,
+ PROP_MIN_UPSTREAM_LATENCY,
};

enum
@@ -215,6 +219,44 @@ gst_gl_mixer_bin_class_init (GstGLMixerBinClass * klass)
"Get OpenGL context",
GST_TYPE_GL_CONTEXT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));

+ /**
+ * GstGLMixerBin:force-live:
+ *
+ * Causes the element to aggregate on a timeout even when no live source is
+ * connected to its sinks. See #GstGLMixerBin:min-upstream-latency for a
+ * companion property: in the vast majority of cases where you plan to plug in
+ * live sources with a non-zero latency, you should set it to a non-zero value.
+ *
+ * Since: 1.24
+ */
+ g_object_class_install_property (gobject_class, PROP_FORCE_LIVE,
+ g_param_spec_boolean ("force-live",
+ "Force Live",
+ "Always operate in live mode and aggregate on timeout regardless of whether any live sources are linked upstream",
+ DEFAULT_FORCE_LIVE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY));
+
+ /**
+ * GstGLMixerBin:min-upstream-latency:
+ *
+ * Force minimum upstream latency (in nanoseconds). When sources with a
+ * higher latency are expected to be plugged in dynamically after the
+ * aggregator has started playing, this allows overriding the minimum
+ * latency reported by the initial source(s). This is only taken into
+ * account when larger than the actually reported minimum latency.
+ *
+ * Since: 1.24
+ */
+ g_object_class_install_property (gobject_class, PROP_MIN_UPSTREAM_LATENCY,
+ g_param_spec_uint64 ("min-upstream-latency", "Buffer latency",
+ "When sources with a higher latency are expected to be plugged "
+ "in dynamically after the aggregator has started playing, "
+ "this allows overriding the minimum latency reported by the "
+ "initial source(s). This is only taken into account when larger "
+ "than the actually reported minimum latency. (nanoseconds)",
+ 0, G_MAXUINT64,
+ DEFAULT_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
/**
* GstMixerBin::create-element:
* @object: the #GstGLMixerBin
@@ -270,6 +312,12 @@ gst_gl_mixer_bin_init (GstGLMixerBin * self)

if (!res)
GST_ERROR_OBJECT (self, "failed to create output chain");
+
+ self->force_live = DEFAULT_FORCE_LIVE;
+ self->latency = DEFAULT_LATENCY;
+ self->start_time_selection = DEFAULT_START_TIME_SELECTION;
+ self->start_time = DEFAULT_START_TIME;
+ self->min_upstream_latency = DEFAULT_MIN_UPSTREAM_LATENCY;
}

static void
@@ -448,6 +496,9 @@ gst_gl_mixer_bin_get_property (GObject * object,
case PROP_MIXER:
g_value_set_object (value, self->mixer);
break;
+ case PROP_FORCE_LIVE:
+ g_value_set_boolean (value, self->force_live);
+ break;
default:
if (self->mixer)
g_object_get_property (G_OBJECT (self->mixer), pspec->name, value);
@@ -474,6 +525,29 @@ gst_gl_mixer_bin_set_property (GObject * object,
}
break;
}
+ case PROP_FORCE_LIVE:
+ self->force_live = g_value_get_boolean (value);
+ break;
+ case PROP_LATENCY:
+ self->latency = g_value_get_uint64 (value);
+ if (self->mixer)
+ g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
+ break;
+ case PROP_START_TIME_SELECTION:
+ self->start_time_selection = g_value_get_enum (value);
+ if (self->mixer)
+ g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
+ break;
+ case PROP_START_TIME:
+ self->start_time = g_value_get_uint64 (value);
+ if (self->mixer)
+ g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
+ break;
+ case PROP_MIN_UPSTREAM_LATENCY:
+ self->min_upstream_latency = g_value_get_uint64 (value);
+ if (self->mixer)
+ g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
+ break;
default:
if (self->mixer)
g_object_set_property (G_OBJECT (self->mixer), pspec->name, value);
diff --git a/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.h b/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.h
index 5e5bb60b43..06491b7247 100644
--- a/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.h
+++ b/subprojects/gst-plugins-base/ext/gl/gstglmixerbin.h
@@ -53,6 +53,13 @@ struct _GstGLMixerBin
GstElement *download;
GstPad *srcpad;

+ gboolean force_live;
+
+ GstClockTime latency;
+ guint start_time_selection;
+ GstClockTime start_time;
+ GstClockTime min_upstream_latency;
+
GstGLMixerBinPrivate *priv;
};

diff --git a/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c b/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c
index de08888095..f61f09fc01 100644
--- a/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c
+++ b/subprojects/gst-plugins-base/ext/gl/gstglvideomixer.c
@@ -462,11 +462,23 @@ GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (glvideomixer, "glvideomixer",

static void
gst_gl_video_mixer_bin_init (GstGLVideoMixerBin * self)
+{
+}
+
+static void
+gst_gl_video_mixer_bin_constructed (GObject * self)
{
GstGLMixerBin *mix_bin = GST_GL_MIXER_BIN (self);

+ G_OBJECT_CLASS (gst_gl_video_mixer_bin_parent_class)->constructed (self);
+
gst_gl_mixer_bin_finish_init_with_element (mix_bin,
- g_object_new (GST_TYPE_GL_VIDEO_MIXER, NULL));
+ g_object_new (GST_TYPE_GL_VIDEO_MIXER,
+ "force-live", mix_bin->force_live,
+ "latency", mix_bin->latency,
+ "start-time-selection", mix_bin->start_time_selection,
+ "start-time", mix_bin->start_time,
+ "min-upstream-latency", mix_bin->min_upstream_latency, NULL));
}

static void
@@ -479,6 +491,7 @@ gst_gl_video_mixer_bin_class_init (GstGLVideoMixerBinClass * klass)

mixer_class->create_input_pad = _create_video_mixer_input;

+ gobject_class->constructed = gst_gl_video_mixer_bin_constructed;
gobject_class->set_property = gst_gl_video_mixer_bin_set_property;
gobject_class->get_property = gst_gl_video_mixer_bin_get_property;

--
2.43.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
From 78635ce0cd981f4086d254901547ae97caa5e256 Mon Sep 17 00:00:00 2001
From: Arun Raghavan <arun@asymptotic.io>
Date: Tue, 10 Sep 2024 16:03:05 -0400
Subject: [PATCH] pad: Check data NULL-ness when probes are stopped

We were correctly handling this for buffers, but not events and queries.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7506>
---
subprojects/gstreamer/gst/gstpad.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/subprojects/gstreamer/gst/gstpad.c b/subprojects/gstreamer/gst/gstpad.c
index 276c733c97..355ab9500a 100644
--- a/subprojects/gstreamer/gst/gstpad.c
+++ b/subprojects/gstreamer/gst/gstpad.c
@@ -4562,7 +4562,7 @@ probe_handled:
probe_stopped:
{
/* We unref the buffer, except if the probe handled it (CUSTOM_SUCCESS_1) */
- if (!handled)
+ if (data && !handled)
gst_mini_object_unref (GST_MINI_OBJECT_CAST (data));

switch (ret) {
@@ -5630,7 +5630,7 @@ inactive:
probe_stopped:
{
GST_OBJECT_FLAG_SET (pad, GST_PAD_FLAG_PENDING_EVENTS);
- if (ret != GST_FLOW_CUSTOM_SUCCESS_1)
+ if (event && ret != GST_FLOW_CUSTOM_SUCCESS_1)
gst_event_unref (event);

switch (ret) {
@@ -6039,7 +6039,7 @@ probe_stopped:
if (need_unlock)
GST_PAD_STREAM_UNLOCK (pad);
/* Only unref if unhandled */
- if (ret != GST_FLOW_CUSTOM_SUCCESS_1)
+ if (event && ret != GST_FLOW_CUSTOM_SUCCESS_1)
gst_event_unref (event);

switch (ret) {
--
2.43.0

Loading