From: Jakub Adam Date: Wed, 3 Feb 2021 22:39:00 +0000 (+0100) Subject: srt: preserve ABI compatibility X-Git-Tag: 1.19.3~507^2~837 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c00d261c3c5a6a7298f8c387910ca98d223bbc5;p=platform%2Fupstream%2Fgstreamer.git srt: preserve ABI compatibility Reintroduce socket descriptor parameter removed in 327ad84e to "caller-added" and "caller-removed" signals, just set it always to zero. Part-of: --- diff --git a/ext/srt/gstsrtobject.c b/ext/srt/gstsrtobject.c index a70b3ecd24..3267070a5f 100644 --- a/ext/srt/gstsrtobject.c +++ b/ext/srt/gstsrtobject.c @@ -126,7 +126,7 @@ srt_caller_signal_removed (SRTCaller * caller, GstSRTObject * srtobject) * socket. Deliver the stats to the app before we throw them away. */ gst_structure_free (stats); - g_signal_emit_by_name (srtobject->element, "caller-removed", + g_signal_emit_by_name (srtobject->element, "caller-removed", 0, caller->sockaddr); } @@ -990,7 +990,7 @@ thread_func (gpointer data) g_mutex_unlock (&srtobject->sock_lock); /* notifying caller-added */ - g_signal_emit_by_name (srtobject->element, "caller-added", + g_signal_emit_by_name (srtobject->element, "caller-added", 0, caller->sockaddr); if (gst_uri_handler_get_uri_type (GST_URI_HANDLER (srtobject->element)) == diff --git a/ext/srt/gstsrtsink.c b/ext/srt/gstsrtsink.c index c7e6f2692d..53ef6a13da 100644 --- a/ext/srt/gstsrtsink.c +++ b/ext/srt/gstsrtsink.c @@ -305,6 +305,7 @@ gst_srt_sink_class_init (GstSRTSinkClass * klass) /** * GstSRTSink::caller-added: * @gstsrtsink: the srtsink element that emitted this signal + * @unused: always zero (for ABI compatibility with previous versions) * @addr: the #GSocketAddress of the new caller * * A new caller has connected to @gstsrtsink. @@ -312,11 +313,12 @@ gst_srt_sink_class_init (GstSRTSinkClass * klass) signals[SIG_CALLER_ADDED] = g_signal_new ("caller-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSRTSinkClass, caller_added), - NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_SOCKET_ADDRESS); + NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_SOCKET_ADDRESS); /** * GstSRTSink::caller-removed: * @gstsrtsink: the srtsink element that emitted this signal + * @unused: always zero (for ABI compatibility with previous versions) * @addr: the #GSocketAddress of the caller * * The given caller has disconnected. @@ -325,7 +327,7 @@ gst_srt_sink_class_init (GstSRTSinkClass * klass) g_signal_new ("caller-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSRTSinkClass, caller_added), NULL, NULL, NULL, G_TYPE_NONE, - 1, G_TYPE_SOCKET_ADDRESS); + 2, G_TYPE_INT, G_TYPE_SOCKET_ADDRESS); /** * GstSRTSink::caller-rejected: diff --git a/ext/srt/gstsrtsrc.c b/ext/srt/gstsrtsrc.c index 4e576ad3c5..7e1e6b7c00 100644 --- a/ext/srt/gstsrtsrc.c +++ b/ext/srt/gstsrtsrc.c @@ -362,6 +362,7 @@ gst_srt_src_class_init (GstSRTSrcClass * klass) /** * GstSRTSrc::caller-added: * @gstsrtsrc: the srtsrc element that emitted this signal + * @unused: always zero (for ABI compatibility with previous versions) * @addr: the #GSocketAddress of the new caller * * A new caller has connected to srtsrc. @@ -369,11 +370,12 @@ gst_srt_src_class_init (GstSRTSrcClass * klass) signals[SIG_CALLER_ADDED] = g_signal_new ("caller-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSRTSrcClass, caller_added), - NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_SOCKET_ADDRESS); + NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_SOCKET_ADDRESS); /** * GstSRTSrc::caller-removed: * @gstsrtsrc: the srtsrc element that emitted this signal + * @unused: always zero (for ABI compatibility with previous versions) * @addr: the #GSocketAddress of the caller * * The given caller has disconnected. @@ -382,7 +384,7 @@ gst_srt_src_class_init (GstSRTSrcClass * klass) g_signal_new ("caller-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstSRTSrcClass, caller_added), NULL, NULL, NULL, G_TYPE_NONE, - 1, G_TYPE_SOCKET_ADDRESS); + 2, G_TYPE_INT, G_TYPE_SOCKET_ADDRESS); /** * GstSRTSrc::caller-rejected: