| 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 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 encoded_images_[encoder_idx] | 1017 encoded_images_[encoder_idx] |
| 1018 .adapt_reason_.quality_resolution_downscales = | 1018 .adapt_reason_.quality_resolution_downscales = |
| 1019 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; | 1019 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; |
| 1020 // Report once per frame (lowest stream always sent). | 1020 // Report once per frame (lowest stream always sent). |
| 1021 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = | 1021 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = |
| 1022 (stream_idx == 0) ? bw_resolutions_disabled : -1; | 1022 (stream_idx == 0) ? bw_resolutions_disabled : -1; |
| 1023 int qp_128 = -1; | 1023 int qp_128 = -1; |
| 1024 vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, | 1024 vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, |
| 1025 &qp_128); | 1025 &qp_128); |
| 1026 encoded_images_[encoder_idx].qp_ = qp_128; | 1026 encoded_images_[encoder_idx].qp_ = qp_128; |
| 1027 encoded_complete_callback_->OnEncodedImage(encoded_images_[encoder_idx], | 1027 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], |
| 1028 &codec_specific, &frag_info); | 1028 &codec_specific, &frag_info); |
| 1029 } else if (codec_.mode == kScreensharing) { | 1029 } else if (codec_.mode == kScreensharing) { |
| 1030 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; | 1030 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; |
| 1031 } | 1031 } |
| 1032 } | 1032 } |
| 1033 } | 1033 } |
| 1034 if (encoders_.size() == 1 && send_stream_[0]) { | 1034 if (encoders_.size() == 1 && send_stream_[0]) { |
| 1035 if (encoded_images_[0]._length > 0) { | 1035 if (encoded_images_[0]._length > 0) { |
| 1036 int qp_128; | 1036 int qp_128; |
| 1037 vpx_codec_control(&encoders_[0], VP8E_GET_LAST_QUANTIZER, &qp_128); | 1037 vpx_codec_control(&encoders_[0], VP8E_GET_LAST_QUANTIZER, &qp_128); |
| 1038 quality_scaler_.ReportQP(qp_128); | 1038 quality_scaler_.ReportQP(qp_128); |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 return -1; | 1326 return -1; |
| 1327 } | 1327 } |
| 1328 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1328 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
| 1329 VPX_CODEC_OK) { | 1329 VPX_CODEC_OK) { |
| 1330 return -1; | 1330 return -1; |
| 1331 } | 1331 } |
| 1332 return 0; | 1332 return 0; |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 } // namespace webrtc | 1335 } // namespace webrtc |
| OLD | NEW |