Gnash  0.8.11dev
AudioDecoder.h
Go to the documentation of this file.
1 // AudioDecoder.h: Audio decoding base class.
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_AUDIODECODER_H
21 #define GNASH_AUDIODECODER_H
22 
23 #include <cstdint> // for C99 int types
24 
25 // Forward declarations
26 namespace gnash {
27  namespace media {
28  class EncodedAudioFrame;
29  }
30 }
31 
32 namespace gnash {
33 namespace media {
34 
36 class AudioDecoder {
37 
38 public:
39 
41 
42  // virtual classes need a virtual destructor !
43  virtual ~AudioDecoder() {}
44 
46  //
65  virtual std::uint8_t* decode(const std::uint8_t* input,
66  std::uint32_t inputSize, std::uint32_t& outputSize,
67  std::uint32_t& decodedData);
68 
70  //
82  virtual std::uint8_t* decode(const EncodedAudioFrame& input,
83  std::uint32_t& outputSize);
84 
85 };
86 
87 inline std::uint8_t*
88 AudioDecoder::decode(const std::uint8_t*, std::uint32_t, std::uint32_t&,
89  std::uint32_t&)
90 {
91  return nullptr;
92 }
93 
94 inline std::uint8_t*
95 AudioDecoder::decode(const EncodedAudioFrame&, std::uint32_t&)
96 {
97  return nullptr;
98 }
99 
100 } // gnash.media namespace
101 } // gnash namespace
102 
103 #endif
AudioDecoder()
Definition: AudioDecoder.h:40
An encoded audio frame.
Definition: MediaParser.h:453
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:40
virtual std::uint8_t * decode(const std::uint8_t *input, std::uint32_t inputSize, std::uint32_t &outputSize, std::uint32_t &decodedData)
Decodes a frame and returns a pointer to the data.
Definition: AudioDecoder.h:88
virtual ~AudioDecoder()
Definition: AudioDecoder.h:43
Audio decoding base class.
Definition: AudioDecoder.h:36