Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/gst
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2020-07-09 00:28:31 +0300
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2020-10-06 23:57:49 +0300
commit7c9a5e86fe3a504811aad9af7c86b64d7ea5a8d7 (patch)
tree8d0e99e28708a7cab00c5e44729cae0c739493a8 /gst
parent6eef0967b91adab74e8e18e3624faee5418db222 (diff)
rtpfunnel: Also forward custom sticky event
This is useful to track metadata about each group of packets Also include a unit test Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/666>
Diffstat (limited to 'gst')
-rw-r--r--gst/rtpmanager/gstrtpfunnel.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gst/rtpmanager/gstrtpfunnel.c b/gst/rtpmanager/gstrtpfunnel.c
index 7638b3497..6bd86b034 100644
--- a/gst/rtpmanager/gstrtpfunnel.c
+++ b/gst/rtpmanager/gstrtpfunnel.c
@@ -189,18 +189,28 @@ done:
static void
gst_rtp_funnel_forward_segment (GstRtpFunnel * funnel, GstPad * pad)
{
- GstEvent *segment;
+ GstEvent *event;
+ guint i;
if (pad == funnel->current_pad) {
goto done;
}
- segment = gst_pad_get_sticky_event (pad, GST_EVENT_SEGMENT, 0);
- if (segment && !gst_pad_push_event (funnel->srcpad, segment)) {
+ event = gst_pad_get_sticky_event (pad, GST_EVENT_SEGMENT, 0);
+ if (event && !gst_pad_push_event (funnel->srcpad, event)) {
GST_ERROR_OBJECT (funnel, "Could not push segment");
goto done;
}
+ for (i = 0;; i++) {
+ event = gst_pad_get_sticky_event (pad, GST_EVENT_CUSTOM_DOWNSTREAM_STICKY,
+ i);
+ if (event == NULL)
+ break;
+ if (!gst_pad_push_event (funnel->srcpad, event))
+ GST_ERROR_OBJECT (funnel, "Could not push custom event");
+ }
+
funnel->current_pad = pad;
done: