mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
rtspsrc: improve error and warning message
Improve error and warning message. Fixes #622577
This commit is contained in:
parent
0a9a3e4b26
commit
e39d7f7359
1 changed files with 11 additions and 8 deletions
|
@ -3703,12 +3703,6 @@ gst_rtspsrc_loop_udp (GstRTSPSrc * src)
|
|||
if (!restart)
|
||||
goto done;
|
||||
|
||||
/* We post a warning message now to inform the user
|
||||
* that nothing happened. It's most likely a firewall thing. */
|
||||
GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL),
|
||||
("Could not receive any UDP packets for %.4f seconds, maybe your "
|
||||
"firewall is blocking it. Retrying using a TCP connection.",
|
||||
gst_guint64_to_gdouble (src->udp_timeout / 1000000.0)));
|
||||
/* we can try only TCP now */
|
||||
src->cur_protocols = GST_RTSP_LOWER_TRANS_TCP;
|
||||
|
||||
|
@ -3730,6 +3724,13 @@ gst_rtspsrc_loop_udp (GstRTSPSrc * src)
|
|||
if (!(src->protocols & GST_RTSP_LOWER_TRANS_TCP))
|
||||
goto no_protocols;
|
||||
|
||||
/* We post a warning message now to inform the user
|
||||
* that nothing happened. It's most likely a firewall thing. */
|
||||
GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL),
|
||||
("Could not receive any UDP packets for %.4f seconds, maybe your "
|
||||
"firewall is blocking it. Retrying using a TCP connection.",
|
||||
gst_guint64_to_gdouble (src->udp_timeout / 1000000.0)));
|
||||
|
||||
/* open new connection using tcp */
|
||||
if (!gst_rtspsrc_open (src))
|
||||
goto open_failed;
|
||||
|
@ -3781,8 +3782,10 @@ no_protocols:
|
|||
{
|
||||
src->cur_protocols = 0;
|
||||
/* no transport possible, post an error and stop */
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ_WRITE, (NULL),
|
||||
("Could not connect to server, no protocols left"));
|
||||
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
|
||||
("Could not receive any UDP packets for %.4f seconds, maybe your "
|
||||
"firewall is blocking it. No other protocols to try.",
|
||||
gst_guint64_to_gdouble (src->udp_timeout / 1000000.0)));
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
open_failed:
|
||||
|
|
Loading…
Reference in a new issue