mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
SquashSRS4: Update srs-bench.
This commit is contained in:
parent
25145b945d
commit
b7b474deba
10 changed files with 590 additions and 516 deletions
|
@ -429,19 +429,18 @@ srs_error_t SrsRtcPlayStream::initialize(SrsRequest* req, std::map<uint32_t, Srs
|
|||
return srs_error_wrap(err, "rtc fetch source failed");
|
||||
}
|
||||
|
||||
if (true) {
|
||||
std::map<uint32_t, SrsRtcTrackDescription*>::iterator it = sub_relations.begin();
|
||||
while (it != sub_relations.end()) {
|
||||
if (it->second->type_ == "audio") {
|
||||
SrsRtcAudioSendTrack* track = new SrsRtcAudioSendTrack(session_, it->second);
|
||||
audio_tracks_.insert(make_pair(it->first, track));
|
||||
}
|
||||
for (map<uint32_t, SrsRtcTrackDescription*>::iterator it = sub_relations.begin(); it != sub_relations.end(); ++it) {
|
||||
uint32_t ssrc = it->first;
|
||||
SrsRtcTrackDescription* desc = it->second;
|
||||
|
||||
if (it->second->type_ == "video") {
|
||||
SrsRtcVideoSendTrack* track = new SrsRtcVideoSendTrack(session_, it->second);
|
||||
video_tracks_.insert(make_pair(it->first, track));
|
||||
}
|
||||
++it;
|
||||
if (desc->type_ == "audio") {
|
||||
SrsRtcAudioSendTrack* track = new SrsRtcAudioSendTrack(session_, desc);
|
||||
audio_tracks_.insert(make_pair(ssrc, track));
|
||||
}
|
||||
|
||||
if (desc->type_ == "video") {
|
||||
SrsRtcVideoSendTrack* track = new SrsRtcVideoSendTrack(session_, desc);
|
||||
video_tracks_.insert(make_pair(ssrc, track));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -605,7 +604,7 @@ srs_error_t SrsRtcPlayStream::send_packet(SrsRtpPacket2*& pkt)
|
|||
|
||||
// TODO: FIXME: Maybe refine for performance issue.
|
||||
if (!audio_tracks_.count(pkt->header.get_ssrc()) && !video_tracks_.count(pkt->header.get_ssrc())) {
|
||||
srs_warn("ssrc %u not found", pkt->header.get_ssrc());
|
||||
srs_warn("RTC: Drop for ssrc %u not found", pkt->header.get_ssrc());
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue