mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-18 06:02:21 +08:00
修复webrtc纯音频推流时不能注册流的bug:#963
This commit is contained in:
@@ -1034,15 +1034,17 @@ string RtcSession::toRtspSdp() const{
|
||||
switch (m.type) {
|
||||
case TrackAudio:
|
||||
case TrackVideo: {
|
||||
copy.media.emplace_back(m);
|
||||
copy.media.back().plan.resize(1);
|
||||
if (m.direction != RtpDirection::inactive) {
|
||||
copy.media.emplace_back(m);
|
||||
copy.media.back().plan.resize(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
continue;
|
||||
default: continue;
|
||||
}
|
||||
}
|
||||
|
||||
CHECK(!copy.media.empty());
|
||||
auto sdp = copy.toRtcSessionSdp();
|
||||
toRtsp(sdp->items);
|
||||
int i = 0;
|
||||
@@ -1368,6 +1370,18 @@ bool RtcSession::supportRtcpFb(const string &name, TrackType type) const {
|
||||
return ref.find(name) != ref.end();
|
||||
}
|
||||
|
||||
bool RtcSession::supportSimulcast() const {
|
||||
for (auto &m : media) {
|
||||
if (!m.rtp_rids.empty()) {
|
||||
return true;
|
||||
}
|
||||
if (!m.rtp_ssrc_sim.empty()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
string const SdpConst::kTWCCRtcpFb = "transport-cc";
|
||||
string const SdpConst::kRembRtcpFb = "goog-remb";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user