mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
plugins/elements/: Special case the "file://" URI as as this is used by some applications to test with gst_element_ma...
Original commit message from CVS: * plugins/elements/gstfilesink.c: (gst_file_sink_uri_set_uri): * plugins/elements/gstfilesrc.c: (gst_file_src_uri_set_uri): Special case the "file://" URI as as this is used by some applications to test with gst_element_make_from_uri if there's an element that supports the URI protocol. Also move the g_path_is_absolute() check for the location part of the URI to also check this for "file://localhost/bla" URIs.
This commit is contained in:
parent
2c5a8cdb31
commit
ce4da7c661
3 changed files with 34 additions and 12 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2007-04-27 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* plugins/elements/gstfilesink.c: (gst_file_sink_uri_set_uri):
|
||||||
|
* plugins/elements/gstfilesrc.c: (gst_file_src_uri_set_uri):
|
||||||
|
Special case the "file://" URI as as this is used by some
|
||||||
|
applications to test with gst_element_make_from_uri if there's
|
||||||
|
an element that supports the URI protocol.
|
||||||
|
Also move the g_path_is_absolute() check for the location part
|
||||||
|
of the URI to also check this for "file://localhost/bla" URIs.
|
||||||
|
|
||||||
2007-04-26 Tim-Philipp Müller <tim at centricular dot net>
|
2007-04-26 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
* docs/gst/gstreamer-sections.txt:
|
* docs/gst/gstreamer-sections.txt:
|
||||||
|
|
|
@ -554,15 +554,21 @@ gst_file_sink_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
* "location" with uri + 16 because it provides unescaping */
|
* "location" with uri + 16 because it provides unescaping */
|
||||||
location = gst_uri_get_location (tmp);
|
location = gst_uri_get_location (tmp);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
|
} else if (strcmp (uri, "file://") == 0) {
|
||||||
|
/* Special case for "file://" as this is used by some applications
|
||||||
|
* to test with gst_element_make_from_uri if there's an element
|
||||||
|
* that supports the URI protocol. */
|
||||||
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
location = gst_uri_get_location (uri);
|
location = gst_uri_get_location (uri);
|
||||||
|
}
|
||||||
|
|
||||||
if (!location)
|
if (!location)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!g_path_is_absolute (location)) {
|
if (!g_path_is_absolute (location)) {
|
||||||
g_free (location);
|
g_free (location);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ret = gst_file_sink_set_location (sink, location);
|
ret = gst_file_sink_set_location (sink, location);
|
||||||
g_free (location);
|
g_free (location);
|
||||||
|
|
|
@ -1074,15 +1074,21 @@ gst_file_src_uri_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
* "location" with uri + 16 because it provides unescaping */
|
* "location" with uri + 16 because it provides unescaping */
|
||||||
location = gst_uri_get_location (tmp);
|
location = gst_uri_get_location (tmp);
|
||||||
g_free (tmp);
|
g_free (tmp);
|
||||||
|
} else if (strcmp (uri, "file://") == 0) {
|
||||||
|
/* Special case for "file://" as this is used by some applications
|
||||||
|
* to test with gst_element_make_from_uri if there's an element
|
||||||
|
* that supports the URI protocol. */
|
||||||
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
location = gst_uri_get_location (uri);
|
location = gst_uri_get_location (uri);
|
||||||
|
}
|
||||||
|
|
||||||
if (!location)
|
if (!location)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!g_path_is_absolute (location)) {
|
if (!g_path_is_absolute (location)) {
|
||||||
g_free (location);
|
g_free (location);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ret = gst_file_src_set_location (src, location);
|
ret = gst_file_src_set_location (src, location);
|
||||||
g_free (location);
|
g_free (location);
|
||||||
|
|
Loading…
Reference in a new issue