srtobject: post a message on the bus when broken socket is detected

So that the application gets notified may react to it.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1935>
This commit is contained in:
Jakub Adam 2020-08-25 19:12:13 +02:00 committed by GStreamer Merge Bot
parent 4c66a0265c
commit 00e44e8ed7

View file

@ -1638,8 +1638,9 @@ gst_srt_object_write_one (GstSRTObject * srtobject,
case SRTS_BROKEN:
case SRTS_NONEXIST:
case SRTS_CLOSED:
GST_WARNING_OBJECT (srtobject->element,
"Invalid SRT socket. Trying to reconnect");
GST_ELEMENT_WARNING (srtobject->element, RESOURCE, WRITE, NULL,
("Invalid SRT socket. Trying to reconnect. (%s)",
srt_getlasterror_str ()));
gst_srt_object_close (srtobject);
if (!gst_srt_object_open_internal (srtobject, cancellable, error)) {
return -1;