Debian Codegraph @

gst/audioparsers/gstmpegaudioparse.h

raw
1 /* GStreamer MPEG audio parser
2 * Copyright (C) 2006-2007 Jan Schmidt <[email protected]>
3 * Copyright (C) 2010 Mark Nauwelaerts <mnauw users sf net>
4 * Copyright (C) 2010 Nokia Corporation. All rights reserved.
5 * Contact: Stefan Kost <[email protected]>
6 *
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.
11 *
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.
16 *
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., 51 Franklin St, Fifth Floor,
20 * Boston, MA 02110-1301, USA.
21 */
22
23 #ifndef __GST_MPEG_AUDIO_PARSE_H__
24 #define __GST_MPEG_AUDIO_PARSE_H__
25
26 #include <gst/gst.h>
27 #include <gst/base/gstbaseparse.h>
28
29 G_BEGIN_DECLS
30
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))
41
42 typedef struct _GstMpegAudioParse GstMpegAudioParse;
43 typedef struct _GstMpegAudioParseClass GstMpegAudioParseClass;
44
45 /**
46 * GstMpegAudioParse:
47 *
48 * The opaque GstMpegAudioParse object
49 */
50 struct _GstMpegAudioParse {
51 GstBaseParse baseparse;
52
53 /*< private >*/
54 GstFormat upstream_format;
55
56 gint rate;
57 gint channels;
58 gint layer;
59 gint version;
60
61 GstClockTime max_bitreservoir;
62
63 /* Samples per frame */
64 gint spf;
65
66 GstClockTime frame_duration;
67
68 gint freerate;
69
70 gboolean sent_codec_tag;
71 guint last_posted_bitrate;
72 gint last_posted_crc, last_crc;
73 guint last_posted_channel_mode, last_mode;
74
75 gboolean outgoing_frame_is_xing_header;
76
77 /* Bitrate from non-vbr headers */
78 guint32 hdr_bitrate;
79 gboolean bitrate_is_constant;
80
81 /* Xing info */
82 guint32 xing_flags;
83 guint32 xing_frames;
84 GstClockTime xing_total_time;
85 GstClockTime xing_actual_total_time;
86 guint32 xing_bytes;
87 /* percent -> filepos mapping */
88 guchar xing_seek_table[100];
89 /* filepos -> percent mapping */
90 guint16 xing_seek_table_inverse[256];
91 guint32 xing_vbr_scale;
92 guint xing_bitrate;
93
94 /* VBRI info */
95 guint32 vbri_frames;
96 GstClockTime vbri_total_time;
97 guint32 vbri_bytes;
98 guint vbri_bitrate;
99 guint vbri_seek_points;
100 guint32 *vbri_seek_table;
101 gboolean vbri_valid;
102
103 /* LAME info */
104 guint32 encoder_delay;
105 guint32 encoder_padding;
106
107 /* Gapless playback states */
108 guint32 decoder_delay;
109 guint64 start_of_actual_samples;
110 guint64 end_of_actual_samples;
111 GstClockTime start_padding_time;
112 GstClockTime end_padding_time;
113 GstClockTime total_padding_time;
114 };
115
116 /**
117 * GstMpegAudioParseClass:
118 * @parent_class: Element parent class.
119 *
120 * The opaque GstMpegAudioParseClass data structure.
121 */
122 struct _GstMpegAudioParseClass {
123 GstBaseParseClass baseparse_class;
124 };
125
126 GType gst_mpeg_audio_parse_get_type (void);
127
128 G_END_DECLS
129
130 #endif /* __GST_MPEG_AUDIO_PARSE_H__ */