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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 VCMVideoProtection protection_mode; | 414 VCMVideoProtection protection_mode; |
415 if (fec) { | 415 if (fec) { |
416 protection_mode = | 416 protection_mode = |
417 nack ? webrtc::kProtectionNackFEC : kProtectionFEC; | 417 nack ? webrtc::kProtectionNackFEC : kProtectionFEC; |
418 } else { | 418 } else { |
419 protection_mode = nack ? kProtectionNack : kProtectionNone; | 419 protection_mode = nack ? kProtectionNack : kProtectionNone; |
420 } | 420 } |
421 vcm_->SetVideoProtection(protection_mode, true); | 421 vcm_->SetVideoProtection(protection_mode, true); |
422 } | 422 } |
423 | 423 |
424 void ViEEncoder::SetSenderBufferingMode(int target_delay_ms) { | |
425 { | |
426 rtc::CritScope lock(&data_cs_); | |
427 target_delay_ms_ = target_delay_ms; | |
428 } | |
429 if (target_delay_ms > 0) { | |
430 // Disable external frame-droppers. | |
431 vcm_->EnableFrameDropper(false); | |
432 vp_->EnableTemporalDecimation(false); | |
433 } else { | |
434 // Real-time mode - enable frame droppers. | |
435 vp_->EnableTemporalDecimation(true); | |
436 vcm_->EnableFrameDropper(true); | |
437 } | |
438 } | |
439 | |
440 void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) { | 424 void ViEEncoder::OnSetRates(uint32_t bitrate_bps, int framerate) { |
441 if (stats_proxy_) | 425 if (stats_proxy_) |
442 stats_proxy_->OnSetRates(bitrate_bps, framerate); | 426 stats_proxy_->OnSetRates(bitrate_bps, framerate); |
443 } | 427 } |
444 | 428 |
445 int32_t ViEEncoder::SendData(const uint8_t payload_type, | 429 int32_t ViEEncoder::SendData(const uint8_t payload_type, |
446 const EncodedImage& encoded_image, | 430 const EncodedImage& encoded_image, |
447 const RTPFragmentationHeader* fragmentation_header, | 431 const RTPFragmentationHeader* fragmentation_header, |
448 const RTPVideoHeader* rtp_video_hdr) { | 432 const RTPVideoHeader* rtp_video_hdr) { |
449 RTC_DCHECK(send_payload_router_ != NULL); | 433 RTC_DCHECK(send_payload_router_ != NULL); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 const uint32_t width, | 601 const uint32_t width, |
618 const uint32_t height) { | 602 const uint32_t height) { |
619 return vp_->SetTargetResolution(width, height, frame_rate); | 603 return vp_->SetTargetResolution(width, height, frame_rate); |
620 } | 604 } |
621 | 605 |
622 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { | 606 void QMVideoSettingsCallback::SetTargetFramerate(int frame_rate) { |
623 vp_->SetTargetFramerate(frame_rate); | 607 vp_->SetTargetFramerate(frame_rate); |
624 } | 608 } |
625 | 609 |
626 } // namespace webrtc | 610 } // namespace webrtc |
OLD | NEW |