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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 encoded_images_[encoder_idx] | 1006 encoded_images_[encoder_idx] |
1007 .adapt_reason_.quality_resolution_downscales = | 1007 .adapt_reason_.quality_resolution_downscales = |
1008 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; | 1008 quality_scaler_enabled_ ? quality_scaler_.downscale_shift() : -1; |
1009 // Report once per frame (lowest stream always sent). | 1009 // Report once per frame (lowest stream always sent). |
1010 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = | 1010 encoded_images_[encoder_idx].adapt_reason_.bw_resolutions_disabled = |
1011 (stream_idx == 0) ? bw_resolutions_disabled : -1; | 1011 (stream_idx == 0) ? bw_resolutions_disabled : -1; |
1012 int qp_128 = -1; | 1012 int qp_128 = -1; |
1013 vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, | 1013 vpx_codec_control(&encoders_[encoder_idx], VP8E_GET_LAST_QUANTIZER, |
1014 &qp_128); | 1014 &qp_128); |
1015 encoded_images_[encoder_idx].qp_ = qp_128; | 1015 encoded_images_[encoder_idx].qp_ = qp_128; |
1016 encoded_complete_callback_->Encoded(encoded_images_[encoder_idx], | 1016 encoded_complete_callback_->OnEncodedImage(encoded_images_[encoder_idx], |
1017 &codec_specific, &frag_info); | 1017 &codec_specific, &frag_info); |
1018 } else if (codec_.mode == kScreensharing) { | 1018 } else if (codec_.mode == kScreensharing) { |
1019 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; | 1019 result = WEBRTC_VIDEO_CODEC_TARGET_BITRATE_OVERSHOOT; |
1020 } | 1020 } |
1021 } | 1021 } |
1022 } | 1022 } |
1023 if (encoders_.size() == 1 && send_stream_[0]) { | 1023 if (encoders_.size() == 1 && send_stream_[0]) { |
1024 if (encoded_images_[0]._length > 0) { | 1024 if (encoded_images_[0]._length > 0) { |
1025 int qp_128; | 1025 int qp_128; |
1026 vpx_codec_control(&encoders_[0], VP8E_GET_LAST_QUANTIZER, &qp_128); | 1026 vpx_codec_control(&encoders_[0], VP8E_GET_LAST_QUANTIZER, &qp_128); |
1027 quality_scaler_.ReportQP(qp_128); | 1027 quality_scaler_.ReportQP(qp_128); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 return -1; | 1315 return -1; |
1316 } | 1316 } |
1317 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1317 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
1318 VPX_CODEC_OK) { | 1318 VPX_CODEC_OK) { |
1319 return -1; | 1319 return -1; |
1320 } | 1320 } |
1321 return 0; | 1321 return 0; |
1322 } | 1322 } |
1323 | 1323 |
1324 } // namespace webrtc | 1324 } // namespace webrtc |
OLD | NEW |