mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
ext/gio/gstgio.c: Filter http and https protocols. GIO/GVfs handles them but it's impossible to implement iradio/icec...
Original commit message from CVS: * 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.
This commit is contained in:
parent
2034387d4d
commit
80d17e6e6f
3 changed files with 37 additions and 3 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-03-22 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* 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 <slomo@circular-chaos.org>
|
||||
|
||||
* gst/volume/gstvolume.c: (gst_volume_interface_supported),
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include "gstgiostreamsink.h"
|
||||
#include "gstgiostreamsrc.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue