webrtcbin: Post error message when a RTP session ssrc timeout happens 98/288398/1
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Feb 2023 06:14:33 +0000 (15:14 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Feb 2023 06:21:12 +0000 (15:21 +0900)
If rtp session emits this notification with session_id and ssrc, forwards it
to let a user know this situation via message.

Change-Id: I49b63f34f6ea4033e6d63f6b5bfc80ed2123ffc5

packaging/gstreamer.spec
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c
subprojects/gst-plugins-bad/meson.build

index 0543f4a..9d4ffc9 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.22.0
-Release:        12
+Release:        13
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 607195f..b7054fd 100644 (file)
@@ -7759,6 +7759,20 @@ on_rtpbin_ssrc_validated (GstElement * rtpbin, guint session_id, guint ssrc,
   GST_INFO_OBJECT (webrtc, "session %u ssrc %u validated", session_id, ssrc);
 }
 
+#ifdef TIZEN_FEATURE_WEBRTC_SSRC_TIMEOUT_NOTIFICATION
+static void
+post_ssrc_timeout_error_msg (GstWebRTCBin *webrtc, guint ssrc)
+{
+  GError *err = g_error_new (GST_RESOURCE_ERROR, GST_RESOURCE_ERROR_TOO_LAZY, "RTP session ssrc timeout happened");
+  gchar *debug = g_strdup_printf("timeout on ssrc %u", ssrc);
+  GstMessage *msg = gst_message_new_error (GST_OBJECT_CAST (webrtc), err, debug);
+  g_free (debug);
+  g_error_free (err);
+
+  gst_element_post_message (GST_ELEMENT_CAST (webrtc), msg);
+}
+#endif
+
 static void
 on_rtpbin_timeout (GstElement * rtpbin, guint session_id, guint ssrc,
     GstWebRTCBin * webrtc)
@@ -7767,6 +7781,9 @@ on_rtpbin_timeout (GstElement * rtpbin, guint session_id, guint ssrc,
 
   PC_LOCK (webrtc);
   remove_ssrc_entry_by_ssrc (webrtc, session_id, ssrc);
+#ifdef TIZEN_FEATURE_WEBRTC_SSRC_TIMEOUT_NOTIFICATION
+  post_ssrc_timeout_error_msg (webrtc, ssrc);
+#endif
   PC_UNLOCK (webrtc);
 }
 
index 815dbb8..d85ead2 100644 (file)
@@ -503,6 +503,7 @@ cdata.set('TIZEN_FEATURE_HLSDEMUX_LANG_TAG', true)
 cdata.set('TIZEN_FEATURE_HLSDEMUX_DISCONT', true)
 cdata.set('TIZEN_FEATURE_WEBRTC_MODIFICATION', true)
 cdata.set('TIZEN_FEATURE_WEBRTC_IMPORT_NETSIM', true)
+cdata.set('TIZEN_FEATURE_WEBRTC_SSRC_TIMEOUT_NOTIFICATION', true)
 cdata.set('TIZEN_FEATURE_PITCH_AUDIO_META', true)
 cdata.set('TIZEN_FEATURE_SRT_LATENCY', true)
 if get_option('tv-profile')