OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 return VCM_UNINITIALIZED; | 190 return VCM_UNINITIALIZED; |
191 | 191 |
192 *framerate = _encoder->GetEncoderParameters().input_frame_rate; | 192 *framerate = _encoder->GetEncoderParameters().input_frame_rate; |
193 return 0; | 193 return 0; |
194 } | 194 } |
195 | 195 |
196 EncoderParameters VideoSender::UpdateEncoderParameters( | 196 EncoderParameters VideoSender::UpdateEncoderParameters( |
197 const EncoderParameters& params, | 197 const EncoderParameters& params, |
198 VideoBitrateAllocator* bitrate_allocator, | 198 VideoBitrateAllocator* bitrate_allocator, |
199 uint32_t target_bitrate_bps) { | 199 uint32_t target_bitrate_bps) { |
200 uint32_t video_target_rate_bps = _mediaOpt.SetTargetRates( | 200 uint32_t video_target_rate_bps = _mediaOpt.SetTargetRates(target_bitrate_bps); |
201 target_bitrate_bps, params.loss_rate, params.rtt); | |
202 uint32_t input_frame_rate = _mediaOpt.InputFrameRate(); | 201 uint32_t input_frame_rate = _mediaOpt.InputFrameRate(); |
203 if (input_frame_rate == 0) | 202 if (input_frame_rate == 0) |
204 input_frame_rate = current_codec_.maxFramerate; | 203 input_frame_rate = current_codec_.maxFramerate; |
205 | 204 |
206 BitrateAllocation bitrate_allocation; | 205 BitrateAllocation bitrate_allocation; |
207 if (bitrate_allocator) { | 206 if (bitrate_allocator) { |
208 bitrate_allocation = bitrate_allocator->GetAllocation(video_target_rate_bps, | 207 bitrate_allocation = bitrate_allocator->GetAllocation(video_target_rate_bps, |
209 input_frame_rate); | 208 input_frame_rate); |
210 } else { | 209 } else { |
211 DefaultVideoBitrateAllocator default_allocator(current_codec_); | 210 DefaultVideoBitrateAllocator default_allocator(current_codec_); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 } | 399 } |
401 | 400 |
402 int32_t VideoSender::EnableFrameDropper(bool enable) { | 401 int32_t VideoSender::EnableFrameDropper(bool enable) { |
403 rtc::CritScope lock(&encoder_crit_); | 402 rtc::CritScope lock(&encoder_crit_); |
404 frame_dropper_enabled_ = enable; | 403 frame_dropper_enabled_ = enable; |
405 _mediaOpt.EnableFrameDropper(enable); | 404 _mediaOpt.EnableFrameDropper(enable); |
406 return VCM_OK; | 405 return VCM_OK; |
407 } | 406 } |
408 } // namespace vcm | 407 } // namespace vcm |
409 } // namespace webrtc | 408 } // namespace webrtc |
OLD | NEW |