| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |