summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2009-10-31 17:50:54 (GMT)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-10-31 17:51:19 (GMT)
commitd65d2888449ca0810842151b96093159c20166de (patch)
tree16501260c07475f6bb1b5e1a419a4659728d833a
parent20f4a1afd9f6e90364d3bf259fc5421ae42d5ab7 (diff)
aiff: enable new aiff muxer
Fixes #598763 even more.
-rw-r--r--gst/aiff/Makefile.am4
-rw-r--r--gst/aiff/aiff.c63
-rw-r--r--gst/aiff/aiffmux.c25
-rw-r--r--gst/aiff/aiffparse.c24
-rw-r--r--gst/aiff/aiffparse.h2
5 files changed, 70 insertions, 48 deletions
diff --git a/gst/aiff/Makefile.am b/gst/aiff/Makefile.am
index 923c273..5a693d4 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 0000000..f74639b
--- /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 <songbird@songbirdnest.com>
+ *
+ * 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 "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 4597488..95e1cd6 100644
--- a/gst/aiff/aiffmux.c
+++ b/gst/aiff/aiffmux.c
@@ -1,5 +1,4 @@
-/*
- * GStreamer
+/* GStreamer AIFF muxer
* Copyright (C) 2009 Robert Swain <robert.swain@gmail.com>
*
* 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 81ce145..3e0db89 100644
--- a/gst/aiff/aiffparse.c
+++ b/gst/aiff/aiffparse.c
@@ -59,7 +59,7 @@
#include <gst/audio/audio.h>
#include <gst/gst-i18n-plugin.h>
-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 9cb7453..2d4c9ae 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