Async  0.18.0
AsyncAudioEncoder.h
Go to the documentation of this file.
1 
27 #ifndef ASYNC_AUDIO_ENCODER_INCLUDED
28 #define ASYNC_AUDIO_ENCODER_INCLUDED
29 
30 
31 /****************************************************************************
32  *
33  * System Includes
34  *
35  ****************************************************************************/
36 
37 #include <sigc++/sigc++.h>
38 #include <string>
39 
40 
41 /****************************************************************************
42  *
43  * Project Includes
44  *
45  ****************************************************************************/
46 
47 #include <AsyncAudioSink.h>
48 
49 
50 /****************************************************************************
51  *
52  * Local Includes
53  *
54  ****************************************************************************/
55 
56 
57 
58 /****************************************************************************
59  *
60  * Forward declarations
61  *
62  ****************************************************************************/
63 
64 
65 
66 /****************************************************************************
67  *
68  * Namespace
69  *
70  ****************************************************************************/
71 
72 namespace Async
73 {
74 
75 
76 /****************************************************************************
77  *
78  * Forward declarations of classes inside of the declared namespace
79  *
80  ****************************************************************************/
81 
82 
83 
84 /****************************************************************************
85  *
86  * Defines & typedefs
87  *
88  ****************************************************************************/
89 
90 
91 
92 /****************************************************************************
93  *
94  * Exported Global Variables
95  *
96  ****************************************************************************/
97 
98 
99 
100 /****************************************************************************
101  *
102  * Class definitions
103  *
104  ****************************************************************************/
105 
113 class AudioEncoder : public AudioSink, public SigC::Object
114 {
115  public:
116  static AudioEncoder *create(const std::string &name);
117 
121  AudioEncoder(void) {}
122 
126  ~AudioEncoder(void) {}
127 
132  virtual const char *name(void) const = 0;
133 
139  virtual void setOption(const std::string &name, const std::string &value) {}
140 
144  virtual void printCodecParams(void) {}
145 
150 
159  virtual void flushSamples(void) { flushEncodedSamples(); }
160 
166  SigC::Signal2<void,const void *,int> writeEncodedSamples;
167 
171  SigC::Signal0<void> flushEncodedSamples;
172 
173 
174  protected:
175 
176  private:
177  AudioEncoder(const AudioEncoder&);
178  AudioEncoder& operator=(const AudioEncoder&);
179 
180 }; /* class AudioEncoder */
181 
182 
183 } /* namespace */
184 
185 #endif /* ASYNC_AUDIO_ENCODER_INCLUDED */
186 
187 
188 
189 /*
190  * This file has not been truncated
191  */
192