Overte C++ Documentation
OpusCodecManager.h
1 //
2 // OpusCodecManager.h
3 // plugins/opusCodec/src
4 //
5 // Created by Michael Bailey on 12/20/2019
6 // Copyright 2019 Michael Bailey
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi__OpusCodecManager_h
13 #define hifi__OpusCodecManager_h
14 
15 #include <plugins/CodecPlugin.h>
16 
17 class AthenaOpusCodec : public CodecPlugin {
18  Q_OBJECT
19 
20 public:
21  // Plugin functions
22  bool isSupported() const override;
23  const QString getName() const override { return NAME; }
24 
25  void init() override;
26  void deinit() override;
27 
29  bool activate() override;
31  void deactivate() override;
32 
33  virtual Encoder* createEncoder(int sampleRate, int numChannels) override;
34  virtual Decoder* createDecoder(int sampleRate, int numChannels) override;
35  virtual void releaseEncoder(Encoder* encoder) override;
36  virtual void releaseDecoder(Decoder* decoder) override;
37 
38 private:
39  static const char* NAME;
40 };
41 
42 #endif // hifi__opusCodecManager_h