Move files from gst-plugins-ugly into the "subprojects/gst-plugins-ugly/" subdir
[platform/upstream/gstreamer.git] / subprojects / gst-plugins-ugly / ext / a52dec / gsta52dec.h
1 /* GStreamer
2  * Copyright (C) <2001> David I. Lehn <dlehn@users.sourceforge.net>
3  *
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.
8  *
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.
13  *
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., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20
21 #ifndef __GST_A52DEC_H__
22 #define __GST_A52DEC_H__
23
24 #include <gst/gst.h>
25 #include <gst/audio/audio.h>
26 #include <gst/audio/gstaudiodecoder.h>
27
28 G_BEGIN_DECLS
29
30 #define GST_TYPE_A52DEC \
31   (gst_a52dec_get_type())
32 #define GST_A52DEC(obj) \
33   (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_A52DEC,GstA52Dec))
34 #define GST_A52DEC_CLASS(klass) \
35   (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_A52DEC,GstA52DecClass))
36 #define GST_IS_A52DEC(obj) \
37   (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_A52DEC))
38 #define GST_IS_A52DEC_CLASS(klass) \
39   (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_A52DEC))
40
41 typedef struct _GstA52Dec GstA52Dec;
42 typedef struct _GstA52DecClass GstA52DecClass;
43
44 struct _GstA52Dec {
45   GstAudioDecoder element;
46
47   GstPadChainFunction base_chain;
48
49   gboolean       dvdmode;
50   gboolean       flag_update;
51   int            prev_flags;
52
53   /* stream properties */
54   int            bit_rate;
55   int            sample_rate;
56   int            stream_channels;
57   int            request_channels;
58   int            using_channels;
59
60   gint           channel_reorder_map[6];
61
62   sample_t       level;
63   sample_t       bias;
64   gboolean       dynamic_range_compression;
65   sample_t      *samples;
66   a52_state_t   *state;
67 };
68
69 struct _GstA52DecClass {
70   GstAudioDecoderClass parent_class;
71
72   guint32 a52_cpuflags;
73 };
74
75 GType gst_a52dec_get_type (void);
76 GST_ELEMENT_REGISTER_DECLARE (a52dec);
77
78 #ifndef A52_MONO
79 #define A52_MONO 1
80 #endif
81 #ifndef A52_STEREO
82 #define A52_STEREO 2
83 #endif
84 #ifndef A52_3F
85 #define A52_3F 3
86 #endif
87 #ifndef A52_2F1R
88 #define A52_2F1R 4
89 #endif
90 #ifndef A52_3F1R
91 #define A52_3F1R 5
92 #endif
93 #ifndef A52_2F2R
94 #define A52_2F2R 6
95 #endif
96 #ifndef A52_3F2R
97 #define A52_3F2R 7
98 #endif
99 #ifndef A52_DOLBY
100 #define A52_DOLBY 10
101 #endif
102
103 G_END_DECLS
104
105 #endif /* __GST_A52DEC_H__ */