update copyright date
[gnash.git] / libmedia / gst / AudioDecoderGst.h
blobc2ae1704c4e57568702be9554965fea14a447db4
1 // AudioDecoderGst.h: Audio decoding using Gstreamer.
2 //
3 // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #ifndef GNASH_AUDIODECODERGST_H
20 #define GNASH_AUDIODECODERGST_H
22 #include "log.h"
23 #include "AudioDecoder.h"
25 #include <gst/gst.h>
26 #include "GnashImage.h"
28 #include "swfdec_codec_gst.h"
30 // Forward declarations
31 namespace gnash {
32 namespace media {
33 class AudioInfo;
34 class SoundInfo;
38 namespace gnash {
39 namespace media {
40 namespace gst {
42 /// GST based AudioDecoder
43 class DSOEXPORT AudioDecoderGst : public AudioDecoder {
45 public:
46 AudioDecoderGst(const AudioInfo& info);
47 AudioDecoderGst(SoundInfo& info);
49 ~AudioDecoderGst();
51 boost::uint8_t* decode(const boost::uint8_t* input, boost::uint32_t inputSize,
52 boost::uint32_t& outputSize, boost::uint32_t& decodedData,
53 bool /*parse*/);
54 boost::uint8_t* decode(const EncodedAudioFrame& ef, boost::uint32_t& outputSize);
56 private:
58 boost::uint8_t* pullBuffers(boost::uint32_t& outputSize);
60 void setup(GstCaps* caps);
62 SwfdecGstDecoder _decoder;
66 } // gnash.media.gst namespace
67 } // media namespace
68 } // gnash namespace
70 #endif // __AUDIODECODERGST_H__