diff --git a/gst/aiff/Makefile.am b/gst/aiff/Makefile.am index 923c2733c7..5a693d4b5d 100644 --- a/gst/aiff/Makefile.am +++ b/gst/aiff/Makefile.am @@ -1,6 +1,6 @@ plugin_LTLIBRARIES = libgstaiff.la -libgstaiff_la_SOURCES = aiffparse.c +libgstaiff_la_SOURCES = aiff.c aiffmux.c aiffparse.c libgstaiff_la_CFLAGS = \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ @@ -11,4 +11,4 @@ libgstaiff_la_LIBADD = \ libgstaiff_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstaiff_la_LIBTOOLFLAGS = --tag=disable-static -noinst_HEADERS = aiffparse.h +noinst_HEADERS = aiffmux.h aiffparse.h diff --git a/gst/aiff/aiff.c b/gst/aiff/aiff.c new file mode 100644 index 0000000000..f74639bcd6 --- /dev/null +++ b/gst/aiff/aiff.c @@ -0,0 +1,63 @@ +/* -*- Mode: C; tab-width: 2; indent-tabs-mode: t; c-basic-offset: 2 -*- */ +/* GStreamer AIFF plugin initialisation + * Copyright (C) <2008> Pioneers of the Inevitable + * + * 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 + +#include "aiffparse.h" +#include "aiffmux.h" + +GST_DEBUG_CATEGORY_STATIC (aiff_debug); +#define GST_CAT_DEFAULT (aiff_debug) + +GST_DEBUG_CATEGORY_EXTERN (aiffparse_debug); +GST_DEBUG_CATEGORY_EXTERN (aiffmux_debug); + +static gboolean +plugin_init (GstPlugin * plugin) +{ + gboolean ret; + + GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser"); + GST_DEBUG_CATEGORY_INIT (aiffmux_debug, "aiffmux", 0, "AIFF muxer"); + +#ifdef ENABLE_NLS + 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 + + ret = gst_element_register (plugin, "aiffparse", GST_RANK_PRIMARY, + TYPE_AIFFPARSE); + ret &= gst_element_register (plugin, "aiffmux", GST_RANK_NONE, + GST_TYPE_AIFF_MUX); + + return ret; +} + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "aiff", + "Create and parse Audio Interchange File Format (AIFF) files", + plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/gst/aiff/aiffmux.c b/gst/aiff/aiffmux.c index 4597488ca1..95e1cd6f61 100644 --- a/gst/aiff/aiffmux.c +++ b/gst/aiff/aiffmux.c @@ -1,5 +1,4 @@ -/* - * GStreamer +/* GStreamer AIFF muxer * Copyright (C) 2009 Robert Swain * * Permission is hereby granted, free of charge, to any person obtaining a @@ -59,8 +58,8 @@ #include "aiffmux.h" -GST_DEBUG_CATEGORY_STATIC (gst_aiff_mux_debug); -#define GST_CAT_DEFAULT gst_aiff_mux_debug +GST_DEBUG_CATEGORY (aiffmux_debug); +#define GST_CAT_DEFAULT aiffmux_debug static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, @@ -411,21 +410,3 @@ gst_aiff_mux_init (GstAiffMux * aiffmux, GstAiffMuxClass * gclass) gst_static_pad_template_get_caps (&src_factory)); gst_element_add_pad (GST_ELEMENT (aiffmux), aiffmux->srcpad); } - -#if 0 -static gboolean -aiff_mux_init (GstPlugin * aiffmux) -{ - GST_DEBUG_CATEGORY_INIT (gst_aiff_mux_debug, "aiffmux", 0, - "AIFF muxer element"); - - return gst_element_register (aiffmux, "aiffmux", GST_RANK_NONE, - GST_TYPE_AIFF_MUX); -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "aiffmux", - "Multiplex raw audio into AIFF", - aiff_mux_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) -#endif diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c index 81ce145ce9..3e0db8996b 100644 --- a/gst/aiff/aiffparse.c +++ b/gst/aiff/aiffparse.c @@ -59,7 +59,7 @@ #include #include -GST_DEBUG_CATEGORY_STATIC (aiffparse_debug); +GST_DEBUG_CATEGORY (aiffparse_debug); #define GST_CAT_DEFAULT (aiffparse_debug) static void gst_aiffparse_dispose (GObject * object); @@ -1586,25 +1586,3 @@ gst_aiffparse_change_state (GstElement * element, GstStateChange transition) } return ret; } - -static gboolean -plugin_init (GstPlugin * plugin) -{ - GST_DEBUG_CATEGORY_INIT (aiffparse_debug, "aiffparse", 0, "AIFF parser"); - -#ifdef ENABLE_NLS - 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 - - return gst_element_register (plugin, "aiffparse", GST_RANK_PRIMARY, - TYPE_AIFFPARSE); -} - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "aiff", - "Parse an .aiff file into raw audio", - plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN) diff --git a/gst/aiff/aiffparse.h b/gst/aiff/aiffparse.h index 9cb7453205..2d4c9ae8e7 100644 --- a/gst/aiff/aiffparse.h +++ b/gst/aiff/aiffparse.h @@ -117,7 +117,7 @@ struct _AIFFParseClass { GstElementClass parent_class; }; -GType aiffparse_get_type(void); +GType gst_aiffparse_get_type(void); G_END_DECLS