From 20e80f1473b1e3e0abe439c38a07f6c4135f5390 Mon Sep 17 00:00:00 2001 From: Alba Mendez Date: Thu, 18 Mar 2021 17:42:02 +0000 Subject: [PATCH] rtspsrc: Fix more signals Behaviour change in GLib causes select-stream signal to discard the value returned by handlers. See !909 for more info. Part-of: --- docs/gst_plugins_cache.json | 2 +- gst/rtsp/gstrtspsrc.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/gst_plugins_cache.json b/docs/gst_plugins_cache.json index f82d7ed..d757acb 100644 --- a/docs/gst_plugins_cache.json +++ b/docs/gst_plugins_cache.json @@ -20267,7 +20267,7 @@ } ], "return-type": "gboolean", - "when": "first" + "when": "last" }, "set-parameter": { "action": true, diff --git a/gst/rtsp/gstrtspsrc.c b/gst/rtsp/gstrtspsrc.c index eff02fc..e4e966e 100644 --- a/gst/rtsp/gstrtspsrc.c +++ b/gst/rtsp/gstrtspsrc.c @@ -1062,7 +1062,7 @@ gst_rtspsrc_class_init (GstRTSPSrcClass * klass) */ gst_rtspsrc_signals[SIGNAL_SELECT_STREAM] = g_signal_new_class_handler ("select-stream", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_CLEANUP, + G_SIGNAL_RUN_LAST, (GCallback) default_select_stream, select_stream_accum, NULL, NULL, G_TYPE_BOOLEAN, 2, G_TYPE_UINT, GST_TYPE_CAPS); /** @@ -1077,8 +1077,7 @@ gst_rtspsrc_class_init (GstRTSPSrcClass * klass) */ gst_rtspsrc_signals[SIGNAL_NEW_MANAGER] = g_signal_new_class_handler ("new-manager", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_FIRST | G_SIGNAL_RUN_CLEANUP, 0, NULL, NULL, NULL, - G_TYPE_NONE, 1, GST_TYPE_ELEMENT); + 0, 0, NULL, NULL, NULL, G_TYPE_NONE, 1, GST_TYPE_ELEMENT); /** * GstRTSPSrc::request-rtcp-key: @@ -1093,7 +1092,7 @@ gst_rtspsrc_class_init (GstRTSPSrcClass * klass) */ gst_rtspsrc_signals[SIGNAL_REQUEST_RTCP_KEY] = g_signal_new ("request-rtcp-key", G_TYPE_FROM_CLASS (klass), - G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, GST_TYPE_CAPS, 1, G_TYPE_UINT); + 0, 0, NULL, NULL, NULL, GST_TYPE_CAPS, 1, G_TYPE_UINT); /** * GstRTSPSrc::accept-certificate: -- 2.7.4