mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
312cc7ec64
Original commit message from CVS: * ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_uri_get_protocols): * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_uri_get_protocols): * ext/gnomevfs/gstgnomevfsuri.c: (gst_gnomevfs_get_supported_uris): * ext/gnomevfs/gstgnomevfsuri.h: Use _uri_new() instead of _open(), so it doesn't take as long and Christophe's computer won't hang. * gst/playback/gstplaybasebin.c: (unknown_type): Throw error on unknown media type, so apps actually display it.
71 lines
1.9 KiB
C
71 lines
1.9 KiB
C
/* GStreamer
|
|
* Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
|
|
* 2000 Wim Taymans <wtay@chello.be>
|
|
* 2001 Bastien Nocera <hadess@hadess.net>
|
|
* 2003 Colin Walters <walters@verbum.org>
|
|
*
|
|
* gstgnomevfssink.c:
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Library General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Library General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Library General Public
|
|
* License along with this library; if not, write to the
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
* Boston, MA 02111-1307, USA.
|
|
*/
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#include <libgnomevfs/gnome-vfs.h>
|
|
#include "gstgnomevfsuri.h"
|
|
|
|
gchar **
|
|
gst_gnomevfs_get_supported_uris (void)
|
|
{
|
|
GnomeVFSURI *uri;
|
|
gchar *uris[] = {
|
|
"http://localhost/bla",
|
|
"file:///bla",
|
|
"smb://localhost/bla",
|
|
"ftp://localhost/bla",
|
|
"sftp://localhost/bla",
|
|
"nfs://localhost/bla",
|
|
"ssh://localhost/bla",
|
|
NULL
|
|
}
|
|
, **result;
|
|
gint n, r = 0;
|
|
|
|
result = g_new (gchar *, 9);
|
|
for (n = 0; uris[n] != NULL; n++) {
|
|
uri = gnome_vfs_uri_new (uris[n]);
|
|
if (uri != NULL) {
|
|
gchar *protocol = g_strdup (uris[n]);
|
|
gint n;
|
|
|
|
gnome_vfs_uri_unref (uri);
|
|
for (n = 0; protocol[n] != '\0'; n++) {
|
|
if (protocol[n] == ':') {
|
|
protocol[n] = '\0';
|
|
break;
|
|
}
|
|
}
|
|
|
|
result[r++] = protocol;
|
|
}
|
|
}
|
|
result[r] = NULL;
|
|
|
|
return result;
|
|
}
|