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