diff --git a/ChangeLog b/ChangeLog index 4886af4d66..10258da208 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2008-03-22 Sebastian Dröge + + * ext/gio/gstgio.c: (gst_gio_get_supported_protocols): + Filter http and https protocols. GIO/GVfs handles them but it's + impossible to implement iradio/icecast with it. Better use + souphttpsrc or something else for this. + + * ext/gio/gstgiobasesrc.c: (gst_gio_base_src_get_size): + If getting the file informations by a query fails try it with the + seek-to-end trick too. + 2008-03-21 Sebastian Dröge * gst/volume/gstvolume.c: (gst_volume_interface_supported), diff --git a/ext/gio/gstgio.c b/ext/gio/gstgio.c index 6420d536e2..1b48bf2981 100644 --- a/ext/gio/gstgio.c +++ b/ext/gio/gstgio.c @@ -29,6 +29,8 @@ #include "gstgiostreamsink.h" #include "gstgiostreamsrc.h" +#include + GST_DEBUG_CATEGORY_STATIC (gst_gio_debug); #define GST_CAT_DEFAULT gst_gio_debug @@ -94,8 +96,27 @@ gst_gio_seek (gpointer element, GSeekable * stream, guint64 offset, static gchar ** gst_gio_get_supported_protocols (void) { - return g_strdupv ((gchar **) - g_vfs_get_supported_uri_schemes (g_vfs_get_default ())); + const gchar *const *schemes; + gchar **our_schemes; + guint num; + gint i; + + schemes = g_vfs_get_supported_uri_schemes (g_vfs_get_default ()); + num = g_strv_length ((gchar **) schemes); + + our_schemes = g_new0 (gchar *, num + 1); + + /* Filter http/https as we can't support the icy stuff with GIO. + * Use souphttpsrc if you need that! + */ + for (i = 0; i < num; i++) { + if (strcmp (schemes[i], "http") == 0 || strcmp (schemes[i], "https") == 0) + continue; + + our_schemes[i] = g_strdup (schemes[i]); + } + + return our_schemes; } static GstURIType diff --git a/ext/gio/gstgiobasesrc.c b/ext/gio/gstgiobasesrc.c index 777d7de1d9..5842cbd596 100644 --- a/ext/gio/gstgiobasesrc.c +++ b/ext/gio/gstgiobasesrc.c @@ -189,7 +189,9 @@ gst_gio_base_src_get_size (GstBaseSrc * base_src, guint64 * size) g_clear_error (&err); } - } else if (GST_GIO_STREAM_IS_SEEKABLE (src->stream)) { + } + + if (GST_GIO_STREAM_IS_SEEKABLE (src->stream)) { goffset old; goffset stream_size; gboolean ret;