Commit 75735c45 authored by Tim-Philipp Müller's avatar Tim-Philipp Müller

audioparsers: add very basic dts/dca parser

Still some issues, e.g. with seekable queries in totem, but also
processing already-chunked input (created with matroskademux ! gdppay).
parent 5d52d3f6
plugin_LTLIBRARIES = libgstaudioparsersbad.la
libgstaudioparsersbad_la_SOURCES = \
gstaacparse.c gstamrparse.c gstac3parse.c gstflacparse.c gstmpegaudioparse.c \
gstaacparse.c gstamrparse.c gstac3parse.c \
gstdcaparse.c gstflacparse.c gstmpegaudioparse.c \
gstbaseparse.c plugin.c
libgstaudioparsersbad_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
......@@ -12,5 +13,6 @@ libgstaudioparsersbad_la_LIBADD = \
libgstaudioparsersbad_la_LDFLAGS = $(PACKAGE_LIBS) $(GST_PLUGIN_LDFLAGS)
libgstaudioparsersbad_la_LIBTOOLFLAGS = --tag=disable-static
noinst_HEADERS = gstaacparse.h gstamrparse.h gstac3parse.h gstflacparse.h gstmpegaudioparse.h \
noinst_HEADERS = gstaacparse.h gstamrparse.h gstac3parse.h \
gstdcaparse.h gstflacparse.h gstmpegaudioparse.h \
gstbaseparse.h
This diff is collapsed.
/* GStreamer DCA parser
* Copyright (C) 2010 Tim-Philipp Müller <tim centricular net>
*
* 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.
*/
#ifndef __GST_DCA_PARSE_H__
#define __GST_DCA_PARSE_H__
#include <gst/gst.h>
#include "gstbaseparse.h"
G_BEGIN_DECLS
#define GST_TYPE_DCA_PARSE \
(gst_dca_parse_get_type())
#define GST_DCA_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_DCA_PARSE, GstDcaParse))
#define GST_DCA_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_DCA_PARSE, GstDcaParseClass))
#define GST_IS_DCA_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_DCA_PARSE))
#define GST_IS_DCA_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_DCA_PARSE))
#define DCA_MIN_FRAMESIZE 96
#define DCA_MAX_FRAMESIZE 18725 /* 16384*16/14 */
typedef struct _GstDcaParse GstDcaParse;
typedef struct _GstDcaParseClass GstDcaParseClass;
/**
* GstDcaParse:
*
* The opaque GstDcaParse object
*/
struct _GstDcaParse {
GstBaseParse baseparse;
/*< private >*/
gint rate;
gint channels;
guint32 last_sync;
};
/**
* GstDcaParseClass:
* @parent_class: Element parent class.
*
* The opaque GstDcaParseClass data structure.
*/
struct _GstDcaParseClass {
GstBaseParseClass baseparse_class;
};
GType gst_dca_parse_get_type (void);
G_END_DECLS
#endif /* __GST_DCA_PARSE_H__ */
......@@ -24,6 +24,7 @@
#include "gstaacparse.h"
#include "gstamrparse.h"
#include "gstac3parse.h"
#include "gstdcaparse.h"
#include "gstflacparse.h"
#include "gstmpegaudioparse.h"
......@@ -38,6 +39,8 @@ plugin_init (GstPlugin * plugin)
GST_RANK_PRIMARY + 1, GST_TYPE_AMRPARSE);
ret &= gst_element_register (plugin, "ac3parse",
GST_RANK_PRIMARY + 1, GST_TYPE_AC3_PARSE);
ret &= gst_element_register (plugin, "dcaparse",
GST_RANK_NONE, GST_TYPE_DCA_PARSE);
ret &= gst_element_register (plugin, "flacparse",
GST_RANK_PRIMARY + 1, GST_TYPE_FLAC_PARSE);
ret &= gst_element_register (plugin, "mpegaudioparse",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment