From d41ed9693d51937d629f486b209a36bb5a8ddf89 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Thu, 26 Nov 2009 17:04:43 +0100 Subject: [PATCH] aacparse: separate plugin registration and rename plugin --- gst/aacparse/Makefile.am | 2 +- gst/aacparse/gstaacparse.c | 21 ------------------- gst/aacparse/plugin.c | 42 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 gst/aacparse/plugin.c diff --git a/gst/aacparse/Makefile.am b/gst/aacparse/Makefile.am index 1341e8dd67..f1f8f7c5aa 100644 --- a/gst/aacparse/Makefile.am +++ b/gst/aacparse/Makefile.am @@ -1,7 +1,7 @@ plugin_LTLIBRARIES = libgstaacparse.la libgstaacparse_la_SOURCES = \ - gstaacparse.c gstbaseparse.c + gstaacparse.c gstbaseparse.c plugin.c libgstaacparse_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) libgstaacparse_la_LIBADD = $(GST_BASE_LIBS) diff --git a/gst/aacparse/gstaacparse.c b/gst/aacparse/gstaacparse.c index a85b1e7073..56fe647431 100644 --- a/gst/aacparse/gstaacparse.c +++ b/gst/aacparse/gstaacparse.c @@ -690,24 +690,3 @@ gst_aacparse_is_seekable (GstBaseParse * parse) /* Not seekable if ADIF header is found */ return (aacparse->header_type != DSPAAC_HEADER_ADIF); } - - -/** - * plugin_init: - * @plugin: GstPlugin - * - * Returns: TRUE on success. - */ -static gboolean -plugin_init (GstPlugin * plugin) -{ - return gst_element_register (plugin, "aacparse", - GST_RANK_NONE, GST_TYPE_AACPARSE); -} - - -GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, - "aacparse", - "Advanced Audio Coding Parser", - plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN); diff --git a/gst/aacparse/plugin.c b/gst/aacparse/plugin.c new file mode 100644 index 0000000000..caab51c5fc --- /dev/null +++ b/gst/aacparse/plugin.c @@ -0,0 +1,42 @@ +/* GStreamer audio parsers + * Copyright (C) 2009 Tim-Philipp Müller + * + * 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 "gstaacparse.h" + +static gboolean +plugin_init (GstPlugin * plugin) +{ + gboolean ret; + + ret = gst_element_register (plugin, "aacparse", + GST_RANK_NONE, GST_TYPE_AACPARSE); + + return ret; +} + + +GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, + "audioparsersbad", + "audioparsers", + plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);