mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-16 21:15:57 +08:00
新增若干音视频编码类型的默认实现
部分支持VP8/VP9/AV1/JPEG/MP3/H266/ADPCM/SVAC/G722/G723/G729
This commit is contained in:
@@ -31,26 +31,10 @@ void JPEGTrack::getVideoResolution(const uint8_t *buf, int len) {
|
||||
}
|
||||
}
|
||||
|
||||
class JPEGSdp : public Sdp {
|
||||
public:
|
||||
JPEGSdp(int bitrate) : Sdp(90000, Rtsp::PT_JPEG) {
|
||||
_printer << "m=video 0 RTP/AVP " << (int)getPayloadType() << "\r\n";
|
||||
if (bitrate) {
|
||||
_printer << "b=AS:" << bitrate << "\r\n";
|
||||
}
|
||||
}
|
||||
|
||||
std::string getSdp() const { return _printer; }
|
||||
|
||||
private:
|
||||
_StrPrinter _printer;
|
||||
};
|
||||
|
||||
Sdp::Ptr JPEGTrack::getSdp(uint8_t) const {
|
||||
return std::make_shared<JPEGSdp>(getBitRate() >> 10);
|
||||
Sdp::Ptr JPEGTrack::getSdp(uint8_t pt) const {
|
||||
return std::make_shared<DefaultSdp>(pt, *this);
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
CodecId getCodec() {
|
||||
|
||||
Reference in New Issue
Block a user