srt: preserve ABI compatibility
authorJakub Adam <jakub.adam@collabora.com>
Wed, 3 Feb 2021 22:39:00 +0000 (23:39 +0100)
committerJakub Adam <jakub.adam@collabora.com>
Wed, 3 Feb 2021 22:39:00 +0000 (23:39 +0100)
Reintroduce socket descriptor parameter removed in 327ad84e to
"caller-added" and "caller-removed" signals, just set it always to zero.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2004>

ext/srt/gstsrtobject.c
ext/srt/gstsrtsink.c
ext/srt/gstsrtsrc.c

index a70b3ecd2438ffb59b41544b5718c37bc3025859..3267070a5fb292db12df59e837a1cb7e569187bb 100644 (file)
@@ -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)) ==
index c7e6f2692d4b6e5aba9432ce6eb8722fa169ed8f..53ef6a13da61477d2d2b74a9e827f3c03250aafb 100644 (file)
@@ -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:
index 4e576ad3c514966b34a2d0e87dd0139f01417c06..7e1e6b7c001ecdbf5c5727abc347ba272c894fd6 100644 (file)
@@ -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: