overte/plugins/opusCodec/src/OpusCodecManager.h

42 lines
1.2 KiB
C++

//
// OpusCodecManager.h
// plugins/opusCodec/src
//
// Created by Michael Bailey on 12/20/2019
// Copyright 2019 Michael Bailey
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#ifndef hifi__OpusCodecManager_h
#define hifi__OpusCodecManager_h
#include <plugins/CodecPlugin.h>
class AthenaOpusCodec : public CodecPlugin {
Q_OBJECT
public:
// Plugin functions
bool isSupported() const override;
const QString getName() const override { return NAME; }
void init() override;
void deinit() override;
/// Called when a plugin is being activated for use. May be called multiple times.
bool activate() override;
/// Called when a plugin is no longer being used. May be called multiple times.
void deactivate() override;
virtual Encoder* createEncoder(int sampleRate, int numChannels) override;
virtual Decoder* createDecoder(int sampleRate, int numChannels) override;
virtual void releaseEncoder(Encoder* encoder) override;
virtual void releaseDecoder(Decoder* decoder) override;
private:
static const char* NAME;
};
#endif // hifi__opusCodecManager_h