mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 15:08:53 +00:00
mmssrc: If the connection fails, emit a redirection msg to the rtsp equivalent.
This should help fix the issue with Windows Media Server using rtsp... but still declaring the stream with mms://
This commit is contained in:
parent
c717af5c0a
commit
a025f156a5
1 changed files with 12 additions and 2 deletions
|
@ -460,8 +460,18 @@ gst_mms_start (GstBaseSrc * bsrc)
|
||||||
GST_DEBUG_OBJECT (mms, "Connect successful");
|
GST_DEBUG_OBJECT (mms, "Connect successful");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
GST_ELEMENT_ERROR (mms, RESOURCE, OPEN_READ,
|
gchar *url, *location;
|
||||||
("Could not connect to this stream"), (NULL));
|
|
||||||
|
GST_ERROR_OBJECT (mms,
|
||||||
|
"Could not connect to this stream, redirecting to rtsp");
|
||||||
|
location = gst_uri_get_location (mms->uri_name);
|
||||||
|
url = g_strdup_printf ("rtsp://%s", location);
|
||||||
|
g_free (location);
|
||||||
|
|
||||||
|
gst_element_post_message (GST_ELEMENT_CAST (mms),
|
||||||
|
gst_message_new_element (GST_OBJECT_CAST (mms),
|
||||||
|
gst_structure_new ("redirect", "new-location", G_TYPE_STRING, url,
|
||||||
|
NULL)));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue