first bunch of conversions to new plugin_init. Includes libs/gst, gst/id3, sys/oss, ext/gnomevfs, gst/typefind and ex...

Original commit message from CVS:
first bunch of conversions to new plugin_init. Includes libs/gst, gst/id3, sys/oss, ext/gnomevfs, gst/typefind and ext/mad.
You guessed it, everything Rhythmbox needs ;)
fixed BMP typefind and made gnomevfs one plugin instead of two while doing this
This commit is contained in:
Benjamin Otte 2003-10-31 20:03:29 +00:00
parent 656ebe81bb
commit abfdbffca2
10 changed files with 134 additions and 75 deletions

View file

@ -1149,6 +1149,36 @@ if test "x$HAVE_FFMPEG" = xyes; then
AC_CONFIG_SUBDIRS(gst-libs/ext/ffmpeg/ffmpeg)
fi
dnl ############################
dnl # Set up some more defines #
dnl ############################
dnl set license and copyright notice
AC_DEFINE(GST_LICENSE, "LGPL", [GStreamer license])
AC_DEFINE(GST_COPYRIGHT, "(c) 1999-2003 The GStreamer Team", [copyright message in plugins])
dnl package name in plugins
AC_ARG_WITH(package-name,
AC_HELP_STRING([--with-package-name],[specify package name to use in plugins]),
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
no) AC_MSG_ERROR(bad value ${withval} for --with-package-name) ;;
*) GST_PACKAGE="${withval}" ;;
esac],
[GST_PACKAGE="Gstreamer"]) dnl Default value
AC_MSG_NOTICE(Using $GST_PACKAGE as package name)
AC_DEFINE_UNQUOTED(GST_PACKAGE, "$GST_PACKAGE", [package name in plugins])
dnl package origin URL
AC_ARG_WITH(package-origin,
AC_HELP_STRING([--with-package-origin],[specify package origin URL to use in plugins]),
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
no) AC_MSG_ERROR(bad value ${withval} for --with-package-origin) ;;
*) GST_ORIGIN="${withval}" ;;
esac],
[GST_ORIGIN="http://gstreamer.net"]) dnl Default value
AC_MSG_NOTICE(Using $GST_ORIGIN as package origin)
AC_DEFINE_UNQUOTED(GST_ORIGIN, "$GST_ORIGIN", [package origin])
dnl #########################
dnl # Make the output files #
dnl #########################

View file

@ -89,15 +89,12 @@ struct _GstMadClass {
};
/* elementfactory information */
static GstElementDetails gst_mad_details = {
static GstElementDetails gst_mad_details = GST_ELEMENT_DETAILS (
"mad mp3 decoder",
"Codec/Audio/Decoder",
"GPL",
"Uses mad code to decode mp3 streams",
VERSION,
"Wim Taymans <wim.taymans@chello.be>",
"(C) 2001",
};
"Wim Taymans <wim.taymans@chello.be>"
);
/* Mad signals and args */
@ -144,7 +141,7 @@ GST_PAD_TEMPLATE_FACTORY (mad_sink_template_factory,
)
)
static void gst_mad_base_init (gpointer g_class);
static void gst_mad_class_init (GstMadClass *klass);
static void gst_mad_init (GstMad *mad);
static void gst_mad_dispose (GObject *object);
@ -191,7 +188,7 @@ gst_mad_get_type (void)
if (!mad_type) {
static const GTypeInfo mad_info = {
sizeof (GstMadClass),
NULL,
gst_mad_base_init,
NULL,
(GClassInitFunc) gst_mad_class_init,
NULL,
@ -257,6 +254,17 @@ gst_mad_emphasis_get_type(void) {
return mad_emphasis_type;
}
static void
gst_mad_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (mad_sink_template_factory));
gst_element_class_add_pad_template (element_class,
GST_PAD_TEMPLATE_GET (mad_src_template_factory));
gst_element_class_set_details (element_class, &gst_mad_details);
}
static void
gst_mad_class_init (GstMadClass *klass)
{
@ -1408,28 +1416,24 @@ gst_mad_change_state (GstElement *element)
}
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
GstElementFactory *factory;
/* create an elementfactory for the mad element */
factory = gst_element_factory_new ("mad", GST_TYPE_MAD, &gst_mad_details);
g_return_val_if_fail (factory != NULL, FALSE);
gst_element_factory_add_pad_template (factory,
GST_PAD_TEMPLATE_GET (mad_sink_template_factory));
gst_element_factory_add_pad_template (factory,
GST_PAD_TEMPLATE_GET (mad_src_template_factory));
gst_element_factory_set_rank (factory, GST_ELEMENT_RANK_PRIMARY);
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (factory));
if (!gst_element_register (plugin, "mad", GST_RANK_PRIMARY, GST_TYPE_MAD))
return FALSE;
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"mad",
plugin_init
};
"mp3 decoding based on the mad library",
plugin_init,
VERSION,
"GPL",
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
)

View file

@ -17,6 +17,10 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "audio.h"
int
@ -175,15 +179,20 @@ gst_audio_is_buffer_framed (GstPad* pad, GstBuffer* buf)
}
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_plugin_set_longname (plugin, "Support services for audio plugins");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstaudio",
plugin_init
};
"Support services for audio plugins",
plugin_init,
VERSION,
GST_LICENSE,
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
);

View file

@ -315,17 +315,3 @@ gst_gconf_get_default_visualization_element (void)
return ret;
}
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{
gst_plugin_set_longname (plugin,
"Convenience routines for GConf interaction");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstgconf",
plugin_init
};

View file

@ -17,8 +17,9 @@
* Boston, MA 02111-1307, USA.
*/
#include <config.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gst/gst.h>
#include <gst/idct/idct.h>
@ -127,15 +128,20 @@ void gst_idct_destroy(GstIDCT *idct)
}
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_plugin_set_longname (plugin, "Accelerated IDCT routines");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstidct",
plugin_init
};
"Accelerated IDCT routines",
plugin_init,
VERSION,
GST_LICENSE,
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
)

View file

@ -182,9 +182,8 @@ gmi_seek_to_track (GstMediaInfo *info, long track)
res = gst_pad_send_event (info->priv->decoder_pad, event);
if (!res)
{
g_warning ("seek to logical track on pad %s:%s failed of element %s",
GST_DEBUG_PAD_NAME(info->priv->decoder_pad),
gst_element_get_factory((gst_pad_get_parent(info->priv->decoder_pad)))->details->longname);
g_warning ("seek to logical track on pad %s:%s failed",
GST_DEBUG_PAD_NAME(info->priv->decoder_pad));
return FALSE;
}
/* clear structs because of the seek */

View file

@ -870,16 +870,21 @@ void resample_sinc_ft_float(resample_t * r)
}
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_plugin_set_longname (plugin, "Resampling routines for use in audio plugins");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstresample",
plugin_init
};
"Resampling routines for use in audio plugins",
plugin_init,
VERSION,
GST_LICENSE,
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
);

View file

@ -17,19 +17,27 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <riff.h>
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_plugin_set_longname (plugin, "RIFF convenience routines");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstriff",
plugin_init
};
"RIFF convenience routines",
plugin_init,
VERSION,
GST_LICENSE,
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
)

View file

@ -18,6 +18,10 @@
* Boston, MA 02111-1307, USA.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "video.h"
/* This is simply a convenience function, nothing more or less */
@ -97,15 +101,20 @@ gst_video_get_size (GstPad *pad,
}
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_plugin_set_longname (plugin, "Convenience routines for video plugins");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"gstvideo",
plugin_init
};
"Convenience routines for video plugins",
plugin_init,
VERSION,
GST_LICENSE,
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
)

View file

@ -637,17 +637,20 @@ gst_xwin_stop (GstXWindowListener *xwin)
*/
static gboolean
plugin_init (GModule *module,
GstPlugin *plugin)
plugin_init (GstPlugin *plugin)
{
gst_plugin_set_longname (plugin,
"X11-based XWindow event/motion listener");
return TRUE;
}
GstPluginDesc plugin_desc = {
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"xwindowlistener",
plugin_init
};
"X11-based XWindow event/motion listener",
plugin_init,
VERSION,
GST_LICENSE,
GST_COPYRIGHT,
GST_PACKAGE,
GST_ORIGIN
)