ZLMediaKit/src/RtspMuxer/RtspMuxer.cpp

21 lines
468 B
C++
Raw Normal View History

2018-10-24 15:49:51 +08:00
//
2018-10-24 09:45:57 +08:00
// Created by xzl on 2018/10/24.
//
2018-10-24 18:09:54 +08:00
#include "RtspMuxer.h"
2018-10-24 09:45:57 +08:00
#include "Common/Factory.h"
2018-10-24 17:17:55 +08:00
namespace mediakit {
2018-10-24 09:45:57 +08:00
2018-10-24 18:09:54 +08:00
void RtspMuxer::addTrack(const Track::Ptr &track, uint32_t ssrc, int mtu) {
2018-10-24 09:45:57 +08:00
if (track->getCodecId() == CodecInvalid) {
addTrack(std::make_shared<TitleSdp>(), ssrc, mtu);
} else {
Sdp::Ptr sdp = Factory::getSdpByTrack(track);
if (sdp) {
addTrack(sdp, ssrc, mtu);
}
}
}
2018-10-24 17:17:55 +08:00
} /* namespace mediakit */