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.
This commit is contained in:
parent
a5668b5418
commit
4f6413f520
@ -1,3 +1,9 @@
|
|||||||
|
2006-06-10 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* 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 <tim at centricular dot net>
|
2006-06-10 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
Patch by: Young-Ho Cha <ganadist at chollian net>
|
Patch by: Young-Ho Cha <ganadist at chollian net>
|
||||||
|
@ -30,11 +30,13 @@
|
|||||||
#include <libgnomevfs/gnome-vfs.h>
|
#include <libgnomevfs/gnome-vfs.h>
|
||||||
#include "gstgnomevfsuri.h"
|
#include "gstgnomevfsuri.h"
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
gchar **
|
gchar **
|
||||||
gst_gnomevfs_get_supported_uris (void)
|
gst_gnomevfs_get_supported_uris (void)
|
||||||
{
|
{
|
||||||
GnomeVFSURI *uri;
|
GnomeVFSURI *uri;
|
||||||
gchar *uris[] = {
|
const gchar *uris[] = {
|
||||||
"http://localhost/bla",
|
"http://localhost/bla",
|
||||||
"file:///bla",
|
"file:///bla",
|
||||||
"smb://localhost/bla",
|
"smb://localhost/bla",
|
||||||
@ -42,13 +44,13 @@ gst_gnomevfs_get_supported_uris (void)
|
|||||||
"sftp://localhost/bla",
|
"sftp://localhost/bla",
|
||||||
"nfs://localhost/bla",
|
"nfs://localhost/bla",
|
||||||
"ssh://localhost/bla",
|
"ssh://localhost/bla",
|
||||||
NULL
|
"burn://"
|
||||||
}
|
};
|
||||||
, **result;
|
gchar **result;
|
||||||
gint n, r = 0;
|
gint n, r = 0;
|
||||||
|
|
||||||
result = g_new (gchar *, 9);
|
result = g_new0 (gchar *, G_N_ELEMENTS (uris) + 1);
|
||||||
for (n = 0; uris[n] != NULL; n++) {
|
for (n = 0; n < G_N_ELEMENTS (uris); n++) {
|
||||||
uri = gnome_vfs_uri_new (uris[n]);
|
uri = gnome_vfs_uri_new (uris[n]);
|
||||||
if (uri != NULL) {
|
if (uri != NULL) {
|
||||||
gchar *protocol = g_strdup (uris[n]);
|
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;
|
result[r++] = protocol;
|
||||||
|
} else {
|
||||||
|
GST_DEBUG ("could not create GnomeVfsUri from '%s'", uris[n]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result[r] = NULL;
|
result[r] = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user