Chromium Code Reviews| 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 417 RTC_DCHECK(sender_); | 417 RTC_DCHECK(sender_); |
| 418 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) | 418 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) |
| 419 rtp_rtcp->SetRTCPStatus(rtcp_mode); | 419 rtp_rtcp->SetRTCPStatus(rtcp_mode); |
| 420 } | 420 } |
| 421 | 421 |
| 422 void ViEChannel::SetProtectionMode(bool enable_nack, | 422 void ViEChannel::SetProtectionMode(bool enable_nack, |
| 423 bool enable_fec, | 423 bool enable_fec, |
| 424 int payload_type_red, | 424 int payload_type_red, |
| 425 int payload_type_fec) { | 425 int payload_type_fec) { |
| 426 // Validate payload types. | 426 // Validate payload types. |
| 427 if (enable_fec) { | 427 if (enable_fec || payload_type_red != -1 || payload_type_fec != -1) { |
|
stefan-webrtc
2016/02/12 10:46:27
Shouldn't this be:
enable_fec && payload_type_red
pbos-webrtc
2016/02/12 12:00:27
Comment updated.
| |
| 428 RTC_DCHECK_GE(payload_type_red, 0); | 428 RTC_DCHECK_GE(payload_type_red, 0); |
| 429 RTC_DCHECK_GE(payload_type_fec, 0); | 429 RTC_DCHECK_GE(payload_type_fec, 0); |
| 430 RTC_DCHECK_LE(payload_type_red, 127); | 430 RTC_DCHECK_LE(payload_type_red, 127); |
| 431 RTC_DCHECK_LE(payload_type_fec, 127); | 431 RTC_DCHECK_LE(payload_type_fec, 127); |
| 432 } else { | 432 } else { |
| 433 // Payload types unset. | |
| 433 RTC_DCHECK_EQ(payload_type_red, -1); | 434 RTC_DCHECK_EQ(payload_type_red, -1); |
| 434 RTC_DCHECK_EQ(payload_type_fec, -1); | 435 RTC_DCHECK_EQ(payload_type_fec, -1); |
| 435 // Set to valid uint8_ts to be castable later without signed overflows. | 436 // Set to valid uint8_ts to be castable later without signed overflows. |
| 436 payload_type_red = 0; | 437 payload_type_red = 0; |
| 437 payload_type_fec = 0; | 438 payload_type_fec = 0; |
| 438 } | 439 } |
| 439 | 440 |
| 440 VCMVideoProtection protection_method; | 441 VCMVideoProtection protection_method; |
| 441 if (enable_nack) { | 442 if (enable_nack) { |
| 442 protection_method = enable_fec ? kProtectionNackFEC : kProtectionNack; | 443 protection_method = enable_fec ? kProtectionNackFEC : kProtectionNack; |
| (...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1110 rtc::CritScope lock(&crit_); | 1111 rtc::CritScope lock(&crit_); |
| 1111 receive_stats_callback_ = receive_statistics_proxy; | 1112 receive_stats_callback_ = receive_statistics_proxy; |
| 1112 } | 1113 } |
| 1113 | 1114 |
| 1114 void ViEChannel::SetIncomingVideoStream( | 1115 void ViEChannel::SetIncomingVideoStream( |
| 1115 IncomingVideoStream* incoming_video_stream) { | 1116 IncomingVideoStream* incoming_video_stream) { |
| 1116 rtc::CritScope lock(&crit_); | 1117 rtc::CritScope lock(&crit_); |
| 1117 incoming_video_stream_ = incoming_video_stream; | 1118 incoming_video_stream_ = incoming_video_stream; |
| 1118 } | 1119 } |
| 1119 } // namespace webrtc | 1120 } // namespace webrtc |
| OLD | NEW |