webrtcbin: Post error message when a RTP session ssrc timeout happens 56/288456/1 accepted/tizen/7.0/unified/20230220.064524
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 23:15:22 +0000 (08:15 +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 cc470632d8368624c5cf1ade557bfadb2dab77b1..bb723079658bd1a85aebccf9cc355519803f903e 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.20.0
-Release:        41
+Release:        42
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 45bce86af2d53f88a3d7df5135f1c469884f7a72..c57d6b3a5b97eef0e26f8deb97937eb1702ff567 100644 (file)
@@ -6920,11 +6920,31 @@ 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)
 {
   GST_INFO_OBJECT (webrtc, "session %u ssrc %u timeout", session_id, ssrc);
+
+#ifdef TIZEN_FEATURE_WEBRTC_SSRC_TIMEOUT_NOTIFICATION
+  PC_LOCK (webrtc);
+  post_ssrc_timeout_error_msg (webrtc, ssrc);
+  PC_UNLOCK (webrtc);
+#endif
 }
 
 static void
index a8dd0119d688f086db4c9397d03141b275e3ffd2..ce51ef496c9e0beec0ac7a1a1e13435a6e30e74c 100644 (file)
@@ -456,6 +456,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')