aiff: enable new aiff muxer

Fixes #598763 even more.
This commit is contained in:
Tim-Philipp Müller 2009-10-31 17:50:54 +00:00
parent 20f4a1afd9
commit d65d288844
5 changed files with 70 additions and 48 deletions

View file

@ -1,6 +1,6 @@
plugin_LTLIBRARIES = libgstaiff.la plugin_LTLIBRARIES = libgstaiff.la
libgstaiff_la_SOURCES = aiffparse.c libgstaiff_la_SOURCES = aiff.c aiffmux.c aiffparse.c
libgstaiff_la_CFLAGS = \ libgstaiff_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \
@ -11,4 +11,4 @@ libgstaiff_la_LIBADD = \
libgstaiff_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) libgstaiff_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstaiff_la_LIBTOOLFLAGS = --tag=disable-static libgstaiff_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = aiffparse.h noinst_HEADERS = aiffmux.h aiffparse.h

63
gst/aiff/aiff.c Normal file
View file

@ -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)

View file

@ -1,5 +1,4 @@
/* /* GStreamer AIFF muxer
* GStreamer
* Copyright (C) 2009 Robert Swain <robert.swain@gmail.com> * Copyright (C) 2009 Robert Swain <robert.swain@gmail.com>
* *
* Permission is hereby granted, free of charge, to any person obtaining a * Permission is hereby granted, free of charge, to any person obtaining a
@ -59,8 +58,8 @@
#include "aiffmux.h" #include "aiffmux.h"
GST_DEBUG_CATEGORY_STATIC (gst_aiff_mux_debug); GST_DEBUG_CATEGORY (aiffmux_debug);
#define GST_CAT_DEFAULT gst_aiff_mux_debug #define GST_CAT_DEFAULT aiffmux_debug
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink", static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_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_static_pad_template_get_caps (&src_factory));
gst_element_add_pad (GST_ELEMENT (aiffmux), aiffmux->srcpad); 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

View file

@ -59,7 +59,7 @@
#include <gst/audio/audio.h> #include <gst/audio/audio.h>
#include <gst/gst-i18n-plugin.h> #include <gst/gst-i18n-plugin.h>
GST_DEBUG_CATEGORY_STATIC (aiffparse_debug); GST_DEBUG_CATEGORY (aiffparse_debug);
#define GST_CAT_DEFAULT (aiffparse_debug) #define GST_CAT_DEFAULT (aiffparse_debug)
static void gst_aiffparse_dispose (GObject * object); static void gst_aiffparse_dispose (GObject * object);
@ -1586,25 +1586,3 @@ gst_aiffparse_change_state (GstElement * element, GstStateChange transition)
} }
return ret; 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)

View file

@ -117,7 +117,7 @@ struct _AIFFParseClass {
GstElementClass parent_class; GstElementClass parent_class;
}; };
GType aiffparse_get_type(void); GType gst_aiffparse_get_type(void);
G_END_DECLS G_END_DECLS