1 /* GStreamer AAC parser
2 * Copyright (C) 2008 Nokia Corporation. All rights reserved.
4 * Contact: Stefan Kost <stefan.kost@nokia.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 #ifndef __GST_AACPARSE_H__
23 #define __GST_AACPARSE_H__
26 #include <gst/baseparse/gstbaseparse.h>
30 #define GST_TYPE_AACPARSE \
31 (gst_aacparse_get_type())
32 #define GST_AACPARSE(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_AACPARSE, GstAacParse))
34 #define GST_AACPARSE_CLASS(klass) \
35 (G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_AACPARSE, GstAacParseClass))
36 #define GST_IS_AACPARSE(obj) \
37 (G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_AACPARSE))
38 #define GST_IS_AACPARSE_CLASS(klass) \
39 (G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_AACPARSE))
44 * @DSPAAC_HEADER_NOT_PARSED: Header not parsed yet.
45 * @DSPAAC_HEADER_UNKNOWN: Unknown (not recognized) header.
46 * @DSPAAC_HEADER_ADIF: ADIF header found.
47 * @DSPAAC_HEADER_ADTS: ADTS header found.
48 * @DSPAAC_HEADER_NONE: Raw stream, no header.
50 * Type header enumeration set in #header_type.
53 DSPAAC_HEADER_NOT_PARSED,
54 DSPAAC_HEADER_UNKNOWN,
61 typedef struct _GstAacParse GstAacParse;
62 typedef struct _GstAacParseClass GstAacParseClass;
66 * @element: the parent element.
67 * @object_type: AAC object type of the stream.
68 * @bitrate: Current media bitrate.
69 * @sample_rate: Current media samplerate.
70 * @channels: Current media channel count.
71 * @frames_per_sec: FPS value of the current stream.
72 * @header_type: #GstAacHeaderType indicating the current stream type.
73 * @framecount: The amount of frames that has been processed this far.
74 * @bytecount: The amount of bytes that has been processed this far.
75 * @sync: Tells whether the parser is in sync (a.k.a. not searching for header)
76 * @eos: End-of-Stream indicator. Set when EOS event arrives.
77 * @duration: Duration of the current stream.
78 * @ts: Current stream timestamp.
80 * The opaque GstAacParse data structure.
85 /* Stream type -related info */
92 GstAacHeaderType header_type;
97 * @parent_class: Element parent class.
99 * The opaque GstAacParseClass data structure.
101 struct _GstAacParseClass {
102 GstBaseParseClass parent_class;
105 GType gst_aacparse_get_type (void);
109 #endif /* __GST_AACPARSE_H__ */