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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

Issue 2660253002: Do not regenerate ssrc on SetSendingStatus (Closed)
Patch Set: Rebase Created 3 years, 10 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 | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('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 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 BitrateSent(&state.send_bitrate, &tmp, &tmp, &tmp); 348 BitrateSent(&state.send_bitrate, &tmp, &tmp, &tmp);
349 return state; 349 return state;
350 } 350 }
351 351
352 int32_t ModuleRtpRtcpImpl::SetSendingStatus(const bool sending) { 352 int32_t ModuleRtpRtcpImpl::SetSendingStatus(const bool sending) {
353 if (rtcp_sender_.Sending() != sending) { 353 if (rtcp_sender_.Sending() != sending) {
354 // Sends RTCP BYE when going from true to false 354 // Sends RTCP BYE when going from true to false
355 if (rtcp_sender_.SetSendingStatus(GetFeedbackState(), sending) != 0) { 355 if (rtcp_sender_.SetSendingStatus(GetFeedbackState(), sending) != 0) {
356 LOG(LS_WARNING) << "Failed to send RTCP BYE"; 356 LOG(LS_WARNING) << "Failed to send RTCP BYE";
357 } 357 }
358
359 collision_detected_ = false;
360
361 // Generate a new SSRC for the next "call" if false
362 rtp_sender_.SetSendingStatus(sending);
363
364 // Make sure that RTCP objects are aware of our SSRC (it could have changed
365 // Due to collision)
366 uint32_t SSRC = rtp_sender_.SSRC();
367 rtcp_sender_.SetSSRC(SSRC);
368 SetRtcpReceiverSsrcs(SSRC);
369
370 return 0;
371 } 358 }
372 return 0; 359 return 0;
373 } 360 }
374 361
375 bool ModuleRtpRtcpImpl::Sending() const { 362 bool ModuleRtpRtcpImpl::Sending() const {
376 return rtcp_sender_.Sending(); 363 return rtcp_sender_.Sending();
377 } 364 }
378 365
379 void ModuleRtpRtcpImpl::SetSendingMediaStatus(const bool sending) { 366 void ModuleRtpRtcpImpl::SetSendingMediaStatus(const bool sending) {
380 rtp_sender_.SetSendingMediaStatus(sending); 367 rtp_sender_.SetSendingMediaStatus(sending);
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
911 StreamDataCountersCallback* 898 StreamDataCountersCallback*
912 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 899 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
913 return rtp_sender_.GetRtpStatisticsCallback(); 900 return rtp_sender_.GetRtpStatisticsCallback();
914 } 901 }
915 902
916 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation( 903 void ModuleRtpRtcpImpl::SetVideoBitrateAllocation(
917 const BitrateAllocation& bitrate) { 904 const BitrateAllocation& bitrate) {
918 rtcp_sender_.SetVideoBitrateAllocation(bitrate); 905 rtcp_sender_.SetVideoBitrateAllocation(bitrate);
919 } 906 }
920 } // namespace webrtc 907 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698