| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 if (is_screenshare_ && | 71 if (is_screenshare_ && |
| 72 result == WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT) { | 72 result == WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT) { |
| 73 // Target bitrate exceeded, encoder state has been reset - try again. | 73 // Target bitrate exceeded, encoder state has been reset - try again. |
| 74 return encoder_->Encode(frame, codec_specific, &frame_types); | 74 return encoder_->Encode(frame, codec_specific, &frame_types); |
| 75 } | 75 } |
| 76 | 76 |
| 77 return result; | 77 return result; |
| 78 } | 78 } |
| 79 | 79 |
| 80 const char* VCMGenericEncoder::ImplementationName() const { | |
| 81 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | |
| 82 return encoder_->ImplementationName(); | |
| 83 } | |
| 84 | |
| 85 void VCMGenericEncoder::SetEncoderParameters(const EncoderParameters& params) { | 80 void VCMGenericEncoder::SetEncoderParameters(const EncoderParameters& params) { |
| 86 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); | 81 RTC_DCHECK_RUNS_SERIALIZED(&race_checker_); |
| 87 bool channel_parameters_have_changed; | 82 bool channel_parameters_have_changed; |
| 88 bool rates_have_changed; | 83 bool rates_have_changed; |
| 89 { | 84 { |
| 90 rtc::CritScope lock(¶ms_lock_); | 85 rtc::CritScope lock(¶ms_lock_); |
| 91 channel_parameters_have_changed = | 86 channel_parameters_have_changed = |
| 92 params.loss_rate != encoder_params_.loss_rate || | 87 params.loss_rate != encoder_params_.loss_rate || |
| 93 params.rtt != encoder_params_.rtt; | 88 params.rtt != encoder_params_.rtt; |
| 94 rates_have_changed = | 89 rates_have_changed = |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 media_opt_->UpdateWithEncodedData(encoded_image); | 154 media_opt_->UpdateWithEncodedData(encoded_image); |
| 160 if (internal_source_) { | 155 if (internal_source_) { |
| 161 // Signal to encoder to drop next frame. | 156 // Signal to encoder to drop next frame. |
| 162 result.drop_next_frame = media_opt_->DropFrame(); | 157 result.drop_next_frame = media_opt_->DropFrame(); |
| 163 } | 158 } |
| 164 } | 159 } |
| 165 return result; | 160 return result; |
| 166 } | 161 } |
| 167 | 162 |
| 168 } // namespace webrtc | 163 } // namespace webrtc |
| OLD | NEW |