Commit a9e49492 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

gnomevfs: remove GnomeVFS plugin

The gio plugin replaces it.
parent 6b332262
......@@ -632,22 +632,6 @@ dnl FIXME : add second check somehow if that is necessary
dnl AC_CHECK_LIB(cdda_paranoia, paranoia_init, : , HAVE_CDPARANOIA=no, -lcdda_interface )
dnl AC_CHECK_HEADER(cdda_paranoia.h, :, HAVE_CDPARANOIA=no)
dnl *** GNOME VFS ***
translit(dnm, m, l) AM_CONDITIONAL(USE_GNOME_VFS, true)
AG_GST_CHECK_FEATURE(GNOME_VFS, [GNOME VFS], gnomevfs, [
PKG_CHECK_MODULES(GNOME_VFS, gnome-vfs-2.0, [
HAVE_GNOME_VFS="yes"
AC_SUBST(GNOME_VFS_CFLAGS)
AC_SUBST(GNOME_VFS_LIBS)
GNOME_VFS_MODULES_DIR="`$PKG_CONFIG --variable=modulesdir gnome-vfs-2.0`"
AC_DEFINE_UNQUOTED(GNOME_VFS_MODULES_DIR, "$GNOME_VFS_MODULES_DIR",
[The GnomeVFS modules directory.])
],[
HAVE_GNOME_VFS="no"
]
)
])
dnl *** ivorbis ***
dnl AM_PATH_IVORBIS only takes two options
translit(dnm, m, l) AM_CONDITIONAL(USE_IVORBIS, true)
......@@ -776,7 +760,6 @@ dnl but we still need to set the conditionals
AM_CONDITIONAL(USE_ALSA, false)
AM_CONDITIONAL(USE_CDPARANOIA, false)
AM_CONDITIONAL(USE_GIO, false)
AM_CONDITIONAL(USE_GNOME_VFS, false)
AM_CONDITIONAL(USE_IVORBIS, false)
AM_CONDITIONAL(USE_LIBVISUAL, false)
AM_CONDITIONAL(USE_OGG, false)
......@@ -896,7 +879,6 @@ sys/xvimage/Makefile
ext/Makefile
ext/alsa/Makefile
ext/cdparanoia/Makefile
ext/gnomevfs/Makefile
ext/gio/Makefile
ext/libvisual/Makefile
ext/ogg/Makefile
......
......@@ -84,8 +84,6 @@ EXTRA_HFILES = \
$(top_srcdir)/ext/gio/gstgiosrc.h \
$(top_srcdir)/ext/gio/gstgiostreamsink.h \
$(top_srcdir)/ext/gio/gstgiostreamsrc.h \
$(top_srcdir)/ext/gnomevfs/gstgnomevfssink.h \
$(top_srcdir)/ext/gnomevfs/gstgnomevfssrc.h \
$(top_srcdir)/ext/ogg/gstoggdemux.h \
$(top_srcdir)/ext/ogg/gstoggmux.h \
$(top_srcdir)/ext/pango/gstclockoverlay.h \
......
......@@ -39,8 +39,6 @@
<xi:include href="xml/element-giosrc.xml" />
<xi:include href="xml/element-giostreamsink.xml" />
<xi:include href="xml/element-giostreamsrc.xml" />
<xi:include href="xml/element-gnomevfssink.xml" />
<xi:include href="xml/element-gnomevfssrc.xml" />
<xi:include href="xml/element-multifdsink.xml" />
<xi:include href="xml/element-oggdemux.xml" />
<xi:include href="xml/element-oggmux.xml" />
......@@ -85,7 +83,6 @@
<xi:include href="xml/plugin-ffmpegcolorspace.xml" />
<xi:include href="xml/plugin-gdp.xml" />
<xi:include href="xml/plugin-gio.xml" />
<xi:include href="xml/plugin-gnomevfs.xml" />
<xi:include href="xml/plugin-libvisual.xml" />
<xi:include href="xml/plugin-ogg.xml" />
<xi:include href="xml/plugin-pango.xml" />
......
......@@ -241,9 +241,9 @@ GstDecodeBin
</SECTION>
<SECTION>
<FILE>element-decodebin2</FILE>
<TITLE>decodebin2</TITLE>
GstDecodeBin2
<FILE>element-decodebin</FILE>
<TITLE>decodebin</TITLE>
GstDecodeBin
<SUBSECTION Standard>
</SECTION>
......@@ -395,34 +395,6 @@ GST_TYPE_TCP_PROTOCOL
gst_tcp_protocol_get_type
</SECTION>
<SECTION>
<FILE>element-gnomevfssink</FILE>
<TITLE>gnomevfssink</TITLE>
GstGnomeVFSSink
<SUBSECTION Standard>
GstGnomeVFSSinkClass
GST_GNOME_VFS_SINK_CLASS
GST_TYPE_GNOME_VFS_SINK
GST_IS_GNOME_VFS_SINK
gst_gnome_vfs_sink_get_type
GST_IS_GNOME_VFS_SINK_CLASS
GST_GNOME_VFS_SINK
</SECTION>
<SECTION>
<FILE>element-gnomevfssrc</FILE>
<TITLE>gnomevfssrc</TITLE>
GstGnomeVFSSrc
<SUBSECTION Standard>
GST_GNOME_VFS_SRC
GST_GNOME_VFS_SRC_CLASS
GST_IS_GNOME_VFS_SRC
GST_IS_GNOME_VFS_SRC_CLASS
GST_TYPE_GNOME_VFS_SRC
GstGnomeVFSSrcClass
gst_gnome_vfs_src_get_type
</SECTION>
<SECTION>
<FILE>element-oggdemux</FILE>
<TITLE>oggdemux</TITLE>
......@@ -460,13 +432,6 @@ GST_TYPE_OGG_MUX
GstOggMuxClass
</SECTION>
<SECTION>
<FILE>gstplaybasebin</FILE>
<TITLE>GstPlayBaseBin</TITLE>
GstPlayBaseBin
<SUBSECTION Standard>
</SECTION>
<SECTION>
<FILE>element-playbin</FILE>
<TITLE>playbin</TITLE>
......@@ -475,9 +440,9 @@ GstPlayBin
</SECTION>
<SECTION>
<FILE>element-playbin2</FILE>
<TITLE>playbin2</TITLE>
GstPlayBin2
<FILE>element-playbin</FILE>
<TITLE>playbin</TITLE>
GstPlayBin
GstPlayFlags
<SUBSECTION Standard>
gst_play_flags_get_type
......
<plugin>
<name>gnomevfs</name>
<description>elements to read from and write to Gnome-VFS uri&apos;s</description>
<filename>../../ext/gnomevfs/.libs/libgstgnomevfs.so</filename>
<basename>libgstgnomevfs.so</basename>
<version>0.10.34.1</version>
<license>LGPL</license>
<source>gst-plugins-base</source>
<package>GStreamer Base Plug-ins git</package>
<origin>Unknown package origin</origin>
<elements>
<element>
<name>gnomevfssink</name>
<longname>GnomeVFS Sink</longname>
<class>Sink/File</class>
<description>Write a stream to a GnomeVFS URI</description>
<author>Bastien Nocera &lt;hadess@hadess.net&gt;</author>
<pads>
<caps>
<name>sink</name>
<direction>sink</direction>
<presence>always</presence>
<details>ANY</details>
</caps>
</pads>
</element>
<element>
<name>gnomevfssrc</name>
<longname>GnomeVFS Source</longname>
<class>Source/File</class>
<description>Read from any GnomeVFS-supported file</description>
<author>Bastien Nocera &lt;hadess@hadess.net&gt;, GStreamer maintainers &lt;gstreamer-devel@lists.sourceforge.net&gt;</author>
<pads>
<caps>
<name>src</name>
<direction>source</direction>
<presence>always</presence>
<details>ANY</details>
</caps>
</pads>
</element>
</elements>
</plugin>
\ No newline at end of file
......@@ -16,12 +16,6 @@ else
GIO_DIR=
endif
if USE_GNOME_VFS
GNOMEVFS_DIR=gnomevfs
else
GNOMEVFS_DIR=
endif
if USE_LIBVISUAL
LIBVISUAL_DIR=libvisual
else
......@@ -64,7 +58,6 @@ SUBDIRS = \
$(ALSA_DIR) \
$(CDPARANOIA_DIR) \
$(GIO_DIR) \
$(GNOMEVFS_DIR) \
$(LIBVISUAL_DIR) \
$(OGG_DIR) \
$(PANGO_DIR) \
......@@ -75,7 +68,6 @@ DIST_SUBDIRS = \
alsa \
cdparanoia \
gio \
gnomevfs \
libvisual \
ogg \
pango \
......
plugin_LTLIBRARIES = libgstgnomevfs.la
libgstgnomevfs_la_SOURCES = \
gstgnomevfs.c \
gstgnomevfssink.c \
gstgnomevfssrc.c \
gstgnomevfsuri.c
libgstgnomevfs_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS) $(GNOME_VFS_CFLAGS)
libgstgnomevfs_la_LIBADD = \
$(top_builddir)/gst-libs/gst/tag/libgsttag-$(GST_MAJORMINOR).la \
$(GST_BASE_LIBS) $(GNOME_VFS_LIBS)
libgstgnomevfs_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstgnomevfs_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = \
gstgnomevfs.h \
gstgnomevfssink.h \
gstgnomevfssrc.h \
gstgnomevfsuri.h
/* GStreamer
* Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
*
* gnomevfs.c: register gnomevfs elements
*
* 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 "gst/gst-i18n-plugin.h"
#include "gstgnomevfs.h"
#include "gstgnomevfssrc.h"
#include "gstgnomevfssink.h"
#include <libgnomevfs/gnome-vfs.h>
#include <gst/gst.h>
#include <string.h>
gchar *
gst_gnome_vfs_location_to_uri_string (const gchar * location)
{
gchar *newloc, *ret;
if (location == NULL)
return NULL;
/* already an URI string? */
if (strstr (location, "://"))
return g_strdup (location);
newloc = gnome_vfs_escape_path_string (location);
if (newloc && *newloc == '/') {
ret = g_strdup_printf ("file://%s", newloc);
} else {
gchar *curdir;
curdir = g_get_current_dir ();
ret = g_strdup_printf ("file://%s/%s", curdir, newloc);
g_free (curdir);
}
g_free (newloc);
return ret;
}
GType
gst_gnome_vfs_uri_get_type (void)
{
static GType type; /* 0 */
if (type == 0) {
type = g_boxed_type_register_static ("GnomeVFSURI",
(GBoxedCopyFunc) gnome_vfs_uri_ref,
(GBoxedFreeFunc) gnome_vfs_uri_unref);
}
return type;
}
static gpointer
gst_gnome_vfs_handle_copy (gpointer handle)
{
return handle;
}
static void
gst_gnome_vfs_handle_free (gpointer handle)
{
return;
}
GType
gst_gnome_vfs_handle_get_type (void)
{
static GType type; /* 0 */
if (type == 0) {
/* hackish, but makes it show up nicely in gst-inspect */
type = g_boxed_type_register_static ("GnomeVFSHandle",
(GBoxedCopyFunc) gst_gnome_vfs_handle_copy,
(GBoxedFreeFunc) gst_gnome_vfs_handle_free);
}
return type;
}
static gboolean
plugin_init (GstPlugin * plugin)
{
/* gnome vfs engine init */
if (!gnome_vfs_initialized ()) {
if (!gnome_vfs_init ()) {
GST_WARNING ("Failed to initialize GnomeVFS - not registering plugin!");
return FALSE;
}
}
gst_plugin_add_dependency_simple (plugin, NULL, GNOME_VFS_MODULES_DIR, NULL,
GST_PLUGIN_DEPENDENCY_FLAG_NONE);
if (!gst_element_register (plugin, "gnomevfssrc", GST_RANK_MARGINAL,
gst_gnome_vfs_src_get_type ()))
return FALSE;
if (!gst_element_register (plugin, "gnomevfssink", GST_RANK_MARGINAL,
gst_gnome_vfs_sink_get_type ()))
return FALSE;
#ifdef ENABLE_NLS
/* FIXME: add category
GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR);
*/
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif /* ENABLE_NLS */
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gnomevfs",
"elements to read from and write to Gnome-VFS uri's",
plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN)
/* GStreamer
* Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
*
* 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.
*/
#ifndef __GST_GNOME_VFS_H__
#define __GST_GNOME_VFS_H__
#include <glib-object.h>
G_BEGIN_DECLS
#define GST_TYPE_GNOME_VFS_URI (gst_gnome_vfs_uri_get_type ())
#define GST_TYPE_GNOME_VFS_HANDLE (gst_gnome_vfs_handle_get_type ())
GType gst_gnome_vfs_uri_get_type (void);
GType gst_gnome_vfs_handle_get_type (void);
gchar * gst_gnome_vfs_location_to_uri_string (const gchar * location);
G_END_DECLS
#endif /* __GST_GNOME_VFS_H__ */
/* 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>
* 2005 Tim-Philipp Müller <tim centricular net>
*
* 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.
*/
/**
* SECTION:element-gnomevfssink
* @see_also: #GstFileSink, #GstGnomeVFSSrc
*
* This plugin writes incoming data to a local or remote location specified
* by an URI. This location can be specified using any protocol supported by
* the GnomeVFS library. Common protocols are 'file', 'ftp', or 'smb'.
*
* Applications can connect to the #GstGnomeVFSSink::allow-overwrite signal to
* receive a callback when an existing file will be overwritten. The return
* value of the signal will determine if gnomevfssink will overwrite the
* resource or abort with an error.
*
* <refsect2>
* <title>Example launch lines</title>
* |[
* gst-launch -v filesrc location=input.xyz ! gnomevfssink location=file:///home/joe/out.xyz
* ]| The above pipeline will simply copy a local file. Instead of gnomevfssink,
* we could just as well have used the filesink element here.
* |[
* gst-launch -v filesrc location=foo.mp3 ! mad ! flacenc ! gnomevfssink location=smb://othercomputer/foo.flac
* ]| The above pipeline will re-encode an mp3 file into FLAC format and store
* it on a remote host using the Samba protocol.
* </refsect2>
*
* Last reviewed on 2006-02-28 (0.10.4)
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "gstgnomevfssink.h"
#include "gst/gst-i18n-plugin.h"
#include <gst/gst.h>
#include <libgnomevfs/gnome-vfs.h>
#include <string.h>
#include <errno.h>
enum
{
SIGNAL_ERASE_ASK,
LAST_SIGNAL
};
enum
{
ARG_0,
ARG_LOCATION,
ARG_URI,
ARG_HANDLE
};
static void gst_gnome_vfs_sink_finalize (GObject * obj);
static void gst_gnome_vfs_sink_uri_handler_init (gpointer g_iface,
gpointer iface_data);
static void gst_gnome_vfs_sink_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_gnome_vfs_sink_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static gboolean gst_gnome_vfs_sink_open_file (GstGnomeVFSSink * sink);
static void gst_gnome_vfs_sink_close_file (GstGnomeVFSSink * sink);
static gboolean gst_gnome_vfs_sink_start (GstBaseSink * basesink);
static gboolean gst_gnome_vfs_sink_stop (GstBaseSink * basesink);
static GstFlowReturn gst_gnome_vfs_sink_render (GstBaseSink * basesink,
GstBuffer * buffer);
static gboolean gst_gnome_vfs_sink_handle_event (GstBaseSink * basesink,
GstEvent * event);
static gboolean gst_gnome_vfs_sink_query (GstPad * pad, GstQuery * query);
static guint gst_gnome_vfs_sink_signals[LAST_SIGNAL]; /* all 0 */
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
GST_DEBUG_CATEGORY_STATIC (gst_gnome_vfs_sink_debug);
#define GST_CAT_DEFAULT gst_gnome_vfs_sink_debug
static void
gst_gnome_vfs_sink_do_init (GType type)
{
static const GInterfaceInfo urihandler_info = {
gst_gnome_vfs_sink_uri_handler_init,
NULL,
NULL
};
g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &urihandler_info);
GST_DEBUG_CATEGORY_INIT (gst_gnome_vfs_sink_debug, "gnomevfssink", 0,
"Gnome VFS sink element");
}
#define gst_gnome_vfs_sink_parent_class parent_class
G_DEFINE_TYPE_WITH_CODE (GstGnomeVFSSink, gst_gnome_vfs_sink,
GST_TYPE_BASE_SINK, gst_gnome_vfs_sink_do_init (g_define_type_id));
static gboolean
_gst_boolean_allow_overwrite_accumulator (GSignalInvocationHint * ihint,
GValue * return_accu, const GValue * handler_return, gpointer dummy)
{
gboolean allow_overwrite;
allow_overwrite = g_value_get_boolean (handler_return);
if (!(ihint->run_type & G_SIGNAL_RUN_CLEANUP))
g_value_set_boolean (return_accu, allow_overwrite);
/* stop emission if signal doesn't allow overwriting */
return allow_overwrite;
}
static void
gst_gnome_vfs_sink_class_init (GstGnomeVFSSinkClass * klass)
{
GstBaseSinkClass *basesink_class;
GstElementClass *gstelement_class;
GObjectClass *gobject_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
basesink_class = (GstBaseSinkClass *) klass;
gobject_class->set_property = gst_gnome_vfs_sink_set_property;
gobject_class->get_property = gst_gnome_vfs_sink_get_property;
gobject_class->finalize = gst_gnome_vfs_sink_finalize;
g_object_class_install_property (gobject_class, ARG_LOCATION,
g_param_spec_string ("location", "File Location",
"Location of the file to write", NULL,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_URI,
g_param_spec_boxed ("uri", "GnomeVFSURI", "URI for GnomeVFS",
GST_TYPE_GNOME_VFS_URI, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, ARG_HANDLE,
g_param_spec_boxed ("handle", "GnomeVFSHandle", "Handle for GnomeVFS",
GST_TYPE_GNOME_VFS_HANDLE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstGnomeVFSSink::allow-overwrite
* @sink: the object which received the signal
* @uri: the URI to be overwritten
*
* This signal is fired when gnomevfssink is about to overwrite an
* existing resource. The application can connect to this signal and ask
* the user if the resource may be overwritten.
*
* Returns: A boolean indicating that the resource may be overwritten.
*/
gst_gnome_vfs_sink_signals[SIGNAL_ERASE_ASK] =
g_signal_new ("allow-overwrite", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_CLEANUP, G_STRUCT_OFFSET (GstGnomeVFSSinkClass, erase_ask),
_gst_boolean_allow_overwrite_accumulator, NULL,
gst_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1, GST_TYPE_GNOME_VFS_URI);
gst_element_class_add_pad_template (gstelement_class,
gst_static_pad_template_get (&sinktemplate));
gst_element_class_set_details_simple (gstelement_class,
"GnomeVFS Sink", "Sink/File",
"Write a stream to a GnomeVFS URI", "Bastien Nocera <hadess@hadess.net>");
basesink_class->stop = GST_DEBUG_FUNCPTR (gst_gnome_vfs_sink_stop);
basesink_class->start = GST_DEBUG_FUNCPTR (gst_gnome_vfs_sink_start);
basesink_class->event = GST_DEBUG_FUNCPTR (gst_gnome_vfs_sink_handle_event);
basesink_class->render = GST_DEBUG_FUNCPTR (gst_gnome_vfs_sink_render);
basesink_class->get_times = NULL;
}
static void
gst_gnome_vfs_sink_finalize (GObject * obj)
{
GstGnomeVFSSink *sink = GST_GNOME_VFS_SINK (obj);
if (sink->uri) {
gnome_vfs_uri_unref (sink->uri);
sink->uri = NULL;
}
if (sink->uri_name) {