ZLMediaKit/src/RtspMuxer/RtspMuxer.cpp
2018-10-24 18:09:54 +08:00

21 lines
468 B
C++

//
// Created by xzl on 2018/10/24.
//
#include "RtspMuxer.h"
#include "Common/Factory.h"
namespace mediakit {
void RtspMuxer::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 mediakit */