mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-30 06:42:22 +08:00
添加RtspMaker类
This commit is contained in:
23
src/Rtsp/RtspMaker.cpp
Normal file
23
src/Rtsp/RtspMaker.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// Created by xzl on 2018/10/24.
|
||||
//
|
||||
|
||||
#include "RtspMaker.h"
|
||||
#include "Common/Factory.h"
|
||||
|
||||
namespace ZL {
|
||||
namespace Rtsp {
|
||||
|
||||
void RtspMaker::addTrack(const Track::Ptr &track, uint32_t ssrc, int mtu) {
|
||||
if (track->getCodecId() == CodecInvalid) {
|
||||
addTrack(std::make_shared<TitleSdp>(), ssrc, mtu);
|
||||
} else {
|
||||
Sdp::Ptr sdp = Factory::getSdpByTrack(track);
|
||||
if (sdp) {
|
||||
addTrack(sdp, ssrc, mtu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} /* namespace Rtsp */
|
||||
} /* namespace ZL */
|
||||
Reference in New Issue
Block a user