Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Side by Side Diff: talk/media/webrtc/webrtcvideoengine2.cc

Issue 1404363003: Update receive report SSRCs on RemoveSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 send_streams_.find(ssrc); 1139 send_streams_.find(ssrc);
1140 if (it == send_streams_.end()) { 1140 if (it == send_streams_.end()) {
1141 return false; 1141 return false;
1142 } 1142 }
1143 1143
1144 for (uint32_t old_ssrc : it->second->GetSsrcs()) 1144 for (uint32_t old_ssrc : it->second->GetSsrcs())
1145 send_ssrcs_.erase(old_ssrc); 1145 send_ssrcs_.erase(old_ssrc);
1146 1146
1147 removed_stream = it->second; 1147 removed_stream = it->second;
1148 send_streams_.erase(it); 1148 send_streams_.erase(it);
1149
1150 // Switch receiver report SSRCs, the one in use is no longer valid.
1151 if (rtcp_receiver_report_ssrc_ == ssrc) {
1152 rtcp_receiver_report_ssrc_ = send_streams_.empty()
1153 ? kDefaultRtcpReceiverReportSsrc
1154 : send_streams_.begin()->first;
1155 LOG(LS_INFO) << "SetLocalSsrc on all the receive streams because the "
1156 "previous local SSRC was removed.";
1157
1158 for (auto& kv : receive_streams_) {
1159 kv.second->SetLocalSsrc(rtcp_receiver_report_ssrc_);
1160 }
1161 }
1149 } 1162 }
1150 1163
1151 delete removed_stream; 1164 delete removed_stream;
1152 1165
1153 if (ssrc == default_send_ssrc_) { 1166 if (ssrc == default_send_ssrc_) {
1154 default_send_ssrc_ = 0; 1167 default_send_ssrc_ = 0;
1155 } 1168 }
1156 1169
1157 return true; 1170 return true;
1158 } 1171 }
(...skipping 1572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2744 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2732 } 2745 }
2733 } 2746 }
2734 2747
2735 return video_codecs; 2748 return video_codecs;
2736 } 2749 }
2737 2750
2738 } // namespace cricket 2751 } // namespace cricket
2739 2752
2740 #endif // HAVE_WEBRTC_VIDEO 2753 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « no previous file | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698