ZLMediaKit/ext-codec/Opus.h

43 lines
1.1 KiB
C++
Raw Permalink Normal View History

/*
2023-12-09 16:23:51 +08:00
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
2020-05-12 11:48:15 +08:00
*
2023-12-09 16:23:51 +08:00
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
2020-05-12 11:48:15 +08:00
*
2023-12-09 16:23:51 +08:00
* Use of this source code is governed by MIT-like license that can be found in the
2020-05-12 11:48:15 +08:00
* LICENSE file in the root of the source tree. All contributing project authors
* may be found in the AUTHORS file in the root of the source tree.
*/
#ifndef ZLMEDIAKIT_OPUS_H
#define ZLMEDIAKIT_OPUS_H
2023-12-10 10:21:40 +08:00
#include "Extension/Frame.h"
#include "Extension/Track.h"
2020-05-12 11:48:15 +08:00
2023-12-10 10:21:40 +08:00
namespace mediakit {
2020-05-12 11:48:15 +08:00
/**
* Opus帧音频通道
* Opus frame audio channel
* [AUTO-TRANSLATED:522e95da]
2020-05-12 11:48:15 +08:00
*/
class OpusTrack : public AudioTrackImp{
public:
2022-12-02 14:43:06 +08:00
using Ptr = std::shared_ptr<OpusTrack>;
2020-08-01 10:22:12 +08:00
OpusTrack() : AudioTrackImp(CodecOpus,48000,2,16){}
2020-05-12 11:48:15 +08:00
private:
// 克隆该Track [AUTO-TRANSLATED:9a15682a]
// Clone this Track
2023-12-09 16:23:51 +08:00
Track::Ptr clone() const override {
return std::make_shared<OpusTrack>(*this);
2020-05-12 11:48:15 +08:00
}
// 生成sdp [AUTO-TRANSLATED:663a9367]
// Generate sdp
2023-12-09 16:23:51 +08:00
Sdp::Ptr getSdp(uint8_t payload_type) const override ;
2020-05-12 11:48:15 +08:00
};
}//namespace mediakit
#endif //ZLMEDIAKIT_OPUS_H