mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-21 01:13:37 +08:00
完善rtsp生成器
This commit is contained in:
parent
1cb5c9a7ff
commit
68fc3bdcf8
@ -289,7 +289,7 @@ public:
|
||||
virtual ~RtspMaker(){}
|
||||
|
||||
/**
|
||||
* 添加音视频track
|
||||
* 添加音视频或title 媒体
|
||||
* @param sdp 媒体描述对象
|
||||
* @param ssrc 媒体rtp ssrc
|
||||
* @param mtu 媒体rtp mtu
|
||||
@ -305,6 +305,23 @@ public:
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加音视频或title 媒体
|
||||
* @param track 媒体描述
|
||||
* @param ssrc 媒体rtp ssrc
|
||||
* @param mtu 媒体rtp mtu
|
||||
*/
|
||||
void addTrack(const Track::Ptr & track,uint32_t ssrc = 0,int mtu = 1400) {
|
||||
if(track->getCodecId() == CodecInvalid){
|
||||
addTrack(std::make_shared<TitleSdp>(),ssrc,mtu);
|
||||
} else {
|
||||
Sdp::Ptr sdp = Sdp::getSdpByTrack(track);
|
||||
if(sdp){
|
||||
addTrack(sdp,ssrc,mtu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取完整的SDP字符串
|
||||
* @return SDP字符串
|
||||
|
Loading…
Reference in New Issue
Block a user