From: Tim-Philipp Müller Date: Sat, 10 Jun 2006 18:52:03 +0000 (+0000) Subject: ext/gnomevfs/gstgnomevfsuri.c: Add support for burn:// URIs (#343385); const-ify... X-Git-Tag: 1.19.3~511^2~11817 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f6413f520c06f590c69fb24248756b11839d66f;p=platform%2Fupstream%2Fgstreamer.git ext/gnomevfs/gstgnomevfsuri.c: Add support for burn:// URIs (#343385); const-ify things a bit, use G_N_ELEMENTS inste... Original commit message from CVS: * ext/gnomevfs/gstgnomevfsuri.c: (gst_gnomevfs_get_supported_uris): Add support for burn:// URIs (#343385); const-ify things a bit, use G_N_ELEMENTS instead of hard-coded array size. --- diff --git a/ChangeLog b/ChangeLog index 90d8f6f..6c22f17 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-06-10 Tim-Philipp Müller + * ext/gnomevfs/gstgnomevfsuri.c: (gst_gnomevfs_get_supported_uris): + Add support for burn:// URIs (#343385); const-ify things a bit, + use G_N_ELEMENTS instead of hard-coded array size. + +2006-06-10 Tim-Philipp Müller + Patch by: Young-Ho Cha * gst/subparse/samiparse.c: (fix_invalid_entities), (parse_sami): diff --git a/ext/gnomevfs/gstgnomevfsuri.c b/ext/gnomevfs/gstgnomevfsuri.c index 4d32137..1ee59d7 100644 --- a/ext/gnomevfs/gstgnomevfsuri.c +++ b/ext/gnomevfs/gstgnomevfsuri.c @@ -30,11 +30,13 @@ #include #include "gstgnomevfsuri.h" +#include + gchar ** gst_gnomevfs_get_supported_uris (void) { GnomeVFSURI *uri; - gchar *uris[] = { + const gchar *uris[] = { "http://localhost/bla", "file:///bla", "smb://localhost/bla", @@ -42,13 +44,13 @@ gst_gnomevfs_get_supported_uris (void) "sftp://localhost/bla", "nfs://localhost/bla", "ssh://localhost/bla", - NULL - } - , **result; + "burn://" + }; + gchar **result; gint n, r = 0; - result = g_new (gchar *, 9); - for (n = 0; uris[n] != NULL; n++) { + result = g_new0 (gchar *, G_N_ELEMENTS (uris) + 1); + for (n = 0; n < G_N_ELEMENTS (uris); n++) { uri = gnome_vfs_uri_new (uris[n]); if (uri != NULL) { gchar *protocol = g_strdup (uris[n]); @@ -62,7 +64,10 @@ gst_gnomevfs_get_supported_uris (void) } } + GST_DEBUG ("adding protocol '%s'", protocol); result[r++] = protocol; + } else { + GST_DEBUG ("could not create GnomeVfsUri from '%s'", uris[n]); } } result[r] = NULL;