1 /* GStreamer MPEG audio parser
2 * Copyright (C) 2006-2007 Jan Schmidt <thaytan@mad.scientist.com>
3 * Copyright (C) 2010 Mark Nauwelaerts <mnauw users sf net>
4 * Copyright (C) 2010 Nokia Corporation. All rights reserved.
5 * Contact: Stefan Kost <stefan.kost@nokia.com>
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 #ifndef __GST_MPEG_AUDIO_PARSE_H__
24 #define __GST_MPEG_AUDIO_PARSE_H__
27 #include <gst/base/gstbaseparse.h>
31 #define GST_TYPE_MPEG_AUDIO_PARSE \
32 (gst_mpeg_audio_parse_get_type())
33 #define GST_MPEG_AUDIO_PARSE(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_MPEG_AUDIO_PARSE, GstMpegAudioParse))
35 #define GST_MPEG_AUDIO_PARSE_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_MPEG_AUDIO_PARSE, GstMpegAudioParseClass))
37 #define GST_IS_MPEG_AUDIO_PARSE(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_MPEG_AUDIO_PARSE))
39 #define GST_IS_MPEG_AUDIO_PARSE_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_MPEG_AUDIO_PARSE))
42 typedef struct _GstMpegAudioParse GstMpegAudioParse;
43 typedef struct _GstMpegAudioParseClass GstMpegAudioParseClass;
48 * The opaque GstMpegAudioParse object
50 struct _GstMpegAudioParse {
51 GstBaseParse baseparse;
59 GstClockTime max_bitreservoir;
60 /* samples per frame */
63 gboolean sent_codec_tag;
64 guint last_posted_bitrate;
65 gint last_posted_crc, last_crc;
66 guint last_posted_channel_mode, last_mode;
68 /* Bitrate from non-vbr headers */
74 GstClockTime xing_total_time;
76 /* percent -> filepos mapping */
77 guchar xing_seek_table[100];
78 /* filepos -> percent mapping */
79 guint16 xing_seek_table_inverse[256];
80 guint32 xing_vbr_scale;
85 GstClockTime vbri_total_time;
88 guint vbri_seek_points;
89 guint32 *vbri_seek_table;
93 guint32 encoder_delay;
94 guint32 encoder_padding;
98 * GstMpegAudioParseClass:
99 * @parent_class: Element parent class.
101 * The opaque GstMpegAudioParseClass data structure.
103 struct _GstMpegAudioParseClass {
104 GstBaseParseClass baseparse_class;
107 GType gst_mpeg_audio_parse_get_type (void);
111 #endif /* __GST_MPEG_AUDIO_PARSE_H__ */