mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-12 19:14:16 +00:00
ext/gnomevfs/: Get the list of supported URI schemes in a threadsafe way and use the same list for the source and sink.
Original commit message from CVS: * ext/gnomevfs/gstgnomevfssink.c: (gst_gnome_vfs_sink_uri_get_protocols): * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnome_vfs_src_uri_get_protocols): * ext/gnomevfs/gstgnomevfsuri.c: (_internal_get_supported_uris), (gst_gnomevfs_get_supported_uris): Get the list of supported URI schemes in a threadsafe way and use the same list for the source and sink.
This commit is contained in:
parent
9f83e90909
commit
fb2dc81a97
4 changed files with 24 additions and 14 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2008-04-20 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/gnomevfs/gstgnomevfssink.c:
|
||||
(gst_gnome_vfs_sink_uri_get_protocols):
|
||||
* ext/gnomevfs/gstgnomevfssrc.c:
|
||||
(gst_gnome_vfs_src_uri_get_protocols):
|
||||
* ext/gnomevfs/gstgnomevfsuri.c: (_internal_get_supported_uris),
|
||||
(gst_gnomevfs_get_supported_uris):
|
||||
Get the list of supported URI schemes in a threadsafe way and use the
|
||||
same list for the source and sink.
|
||||
|
||||
2008-04-20 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* ext/gio/gstgio.c: (_internal_get_supported_protocols),
|
||||
|
|
|
@ -596,12 +596,7 @@ gst_gnome_vfs_sink_uri_get_type (void)
|
|||
static gchar **
|
||||
gst_gnome_vfs_sink_uri_get_protocols (void)
|
||||
{
|
||||
static gchar **protocols = NULL;
|
||||
|
||||
if (!protocols)
|
||||
protocols = gst_gnomevfs_get_supported_uris ();
|
||||
|
||||
return protocols;
|
||||
return gst_gnomevfs_get_supported_uris ();
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
|
|
@ -350,12 +350,7 @@ gst_gnome_vfs_src_uri_get_type (void)
|
|||
static gchar **
|
||||
gst_gnome_vfs_src_uri_get_protocols (void)
|
||||
{
|
||||
static gchar **protocols = NULL;
|
||||
|
||||
if (!protocols)
|
||||
protocols = gst_gnomevfs_get_supported_uris ();
|
||||
|
||||
return protocols;
|
||||
return gst_gnomevfs_get_supported_uris ();
|
||||
}
|
||||
|
||||
static const gchar *
|
||||
|
|
|
@ -32,8 +32,8 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
gchar **
|
||||
gst_gnomevfs_get_supported_uris (void)
|
||||
static gpointer
|
||||
_internal_get_supported_uris (gpointer data)
|
||||
{
|
||||
/* no dav/davs in the list, because they don't appear to be reliable enough */
|
||||
const gchar *uris[] = {
|
||||
|
@ -76,3 +76,12 @@ gst_gnomevfs_get_supported_uris (void)
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
gchar **
|
||||
gst_gnomevfs_get_supported_uris (void)
|
||||
{
|
||||
static GOnce once = G_ONCE_INIT;
|
||||
|
||||
g_once (&once, _internal_get_supported_uris, NULL);
|
||||
return (gchar **) once.retval;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue