Gnash  0.8.11dev
AudioDecoderGst.h
Go to the documentation of this file.
1 // AudioDecoderGst.h: Audio decoding using Gstreamer.
2 //
3 // Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012
4 // Free Software Foundation, Inc.
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // This program 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
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 
20 #ifndef GNASH_AUDIODECODERGST_H
21 #define GNASH_AUDIODECODERGST_H
22 
23 #include "log.h"
24 #include "AudioDecoder.h"
25 
26 #include <gst/gst.h>
27 #include "GnashImage.h"
28 
29 #include "swfdec_codec_gst.h"
30 
31 // Forward declarations
32 namespace gnash {
33  namespace media {
34  class AudioInfo;
35  class SoundInfo;
36  }
37 }
38 
39 namespace gnash {
40 namespace media {
41 namespace gst {
42 
45 
46 public:
47  AudioDecoderGst(const AudioInfo& info);
49 
50  ~AudioDecoderGst();
51 
52  std::uint8_t* decode(const std::uint8_t* input, std::uint32_t inputSize,
53  std::uint32_t& outputSize, std::uint32_t& decodedData);
54  std::uint8_t* decode(const EncodedAudioFrame& ef, std::uint32_t& outputSize);
55 
56 private:
57 
58  std::uint8_t* pullBuffers(std::uint32_t& outputSize);
59 
60  void setup(GstCaps* caps);
61 
62  SwfdecGstDecoder _decoder;
63 
64 };
65 
66 } // gnash.media.gst namespace
67 } // media namespace
68 } // gnash namespace
69 
70 #endif // __AUDIODECODERGST_H__
71 
Class containing information about an embedded sound definition.
Definition: SoundInfo.h:34
An encoded audio frame.
Definition: MediaParser.h:453
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
GST based AudioDecoder.
Definition: AudioDecoderGst.h:44
#define DSOEXPORT
Definition: dsodefs.h:55
Information about an audio stream.
Definition: MediaParser.h:236
Definition: swfdec_codec_gst.h:29
Audio decoding base class.
Definition: AudioDecoder.h:36