1
/* GStreamer FAAD (Free AAC Decoder) plugin
2
* Copyright (C) 2003 Ronald Bultje <rbultje@ronald.bitfreak.net>
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Library General Public
6
* License as published by the Free Software Foundation; either
7
* version 2 of the License, or (at your option) any later version.
9
* This library is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Library General Public License for more details.
14
* You should have received a copy of the GNU Library General Public
15
* License along with this library; if not, write to the
16
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17
* Boston, MA 02111-1307, USA.
20
#ifndef __GST_FAAD_H__
21
#define __GST_FAAD_H__
32
#define GST_TYPE_FAAD \
33
(gst_faad_get_type ())
34
#define GST_FAAD(obj) \
35
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_FAAD, GstFaad))
36
#define GST_FAAD_CLASS(klass) \
37
(G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_FAAD, GstFaadClass))
38
#define GST_IS_FAAD(obj) \
39
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_FAAD))
40
#define GST_IS_FAAD_CLASS(klass) \
41
(G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_FAAD))
43
typedef struct _GstFaad {
49
guint samplerate; /* sample rate of the last MPEG frame */
50
guint channels; /* number of channels of the last frame */
51
guint bps; /* bytes per sample */
53
guint8 fake_codec_data[2];
55
GstBuffer *tempbuf; /* used to keep input leftovers */
61
/* FAAD channel setup */
62
guchar *channel_positions;
63
gboolean need_channel_setup;
64
gboolean packetised; /* We must differentiate between raw and packetised streams */
66
gint64 prev_ts; /* timestamp of previous buffer */
67
gint64 next_ts; /* timestamp of next buffer */
68
guint64 bytes_in; /* bytes received */
69
guint64 sum_dur_out; /* sum of durations of decoded buffers we sent out */
73
/* segment handling */
76
/* list of raw output buffers for reverse playback */
78
/* gather/decode queues for reverse playback */
83
typedef struct _GstFaadClass {
84
GstElementClass parent_class;
87
GType gst_faad_get_type (void);
91
#endif /* __GST_FAAD_H__ */