mirror of
https://gitee.com/xia-chu/ZLMediaKit.git
synced 2026-05-06 10:57:50 +08:00
Some checks failed
Android / build (push) Has been cancelled
CodeQL / Analyze (cpp) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Docker / build (push) Has been cancelled
Linux / build (push) Has been cancelled
Linux_Python / build (push) Has been cancelled
macOS / build (push) Has been cancelled
macOS_Python / build (push) Has been cancelled
Windows / build (push) Has been cancelled
Windows_Python / build (push) Has been cancelled
# Conflicts: # conf/config.ini # src/Codec/Transcode.cpp # src/Common/MediaSource.h # src/Common/MultiMediaSourceMuxer.cpp # src/Common/MultiMediaSourceMuxer.h # src/Common/macros.h # webrtc/WebRtcPusher.cpp # webrtc/WebRtcTransport.cpp # webrtc/WebRtcTransport.h
34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
/*
|
|
* Copyright (c) 2016-present The ZLMediaKit project authors. All Rights Reserved.
|
|
*
|
|
* This file is part of ZLMediaKit(https://github.com/ZLMediaKit/ZLMediaKit).
|
|
*
|
|
* Use of this source code is governed by MIT-like license that can be found in the
|
|
* 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_G711_H
|
|
#define ZLMEDIAKIT_G711_H
|
|
|
|
#include "Extension/Frame.h"
|
|
#include "Extension/Track.h"
|
|
|
|
namespace mediakit{
|
|
|
|
/**
|
|
* G711音频通道
|
|
*/
|
|
class G711Track : public AudioTrackImp{
|
|
public:
|
|
using Ptr = std::shared_ptr<G711Track>;
|
|
G711Track(CodecId codecId, int sample_rate = 8000, int channels = 1, int sample_bit = 16) : AudioTrackImp(codecId, sample_rate, channels, sample_bit) {}
|
|
|
|
toolkit::Buffer::Ptr getExtraData() const override;
|
|
void setExtraData(const uint8_t *data, size_t size) override;
|
|
private:
|
|
Track::Ptr clone() const override { return std::make_shared<G711Track>(*this); }
|
|
};
|
|
|
|
}//namespace mediakit
|
|
#endif //ZLMEDIAKIT_G711_H
|