OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 header.VerifyAndAllocateFragmentationHeader(1); | 1028 header.VerifyAndAllocateFragmentationHeader(1); |
1029 header.fragmentationOffset[0] = 0; | 1029 header.fragmentationOffset[0] = 0; |
1030 header.fragmentationLength[0] = image->_length; | 1030 header.fragmentationLength[0] = image->_length; |
1031 header.fragmentationPlType[0] = 0; | 1031 header.fragmentationPlType[0] = 0; |
1032 header.fragmentationTimeDiff[0] = 0; | 1032 header.fragmentationTimeDiff[0] = 0; |
1033 if (codecType_ == kVideoCodecVP8 && scale_) { | 1033 if (codecType_ == kVideoCodecVP8 && scale_) { |
1034 int qp; | 1034 int qp; |
1035 if (webrtc::vp8::GetQp(payload, payload_size, &qp)) { | 1035 if (webrtc::vp8::GetQp(payload, payload_size, &qp)) { |
1036 current_acc_qp_ += qp; | 1036 current_acc_qp_ += qp; |
1037 quality_scaler_.ReportQP(qp); | 1037 quality_scaler_.ReportQP(qp); |
| 1038 image->qp_ = qp; |
1038 } | 1039 } |
1039 } | 1040 } |
1040 } else if (codecType_ == kVideoCodecH264) { | 1041 } else if (codecType_ == kVideoCodecH264) { |
1041 if (scale_) { | 1042 if (scale_) { |
1042 h264_bitstream_parser_.ParseBitstream(payload, payload_size); | 1043 h264_bitstream_parser_.ParseBitstream(payload, payload_size); |
1043 int qp; | 1044 int qp; |
1044 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) { | 1045 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) { |
1045 current_acc_qp_ += qp; | 1046 current_acc_qp_ += qp; |
1046 quality_scaler_.ReportQP(qp); | 1047 quality_scaler_.ReportQP(qp); |
1047 } | 1048 } |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1260 } | 1261 } |
1261 | 1262 |
1262 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1263 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( |
1263 webrtc::VideoEncoder* encoder) { | 1264 webrtc::VideoEncoder* encoder) { |
1264 ALOGD << "Destroy video encoder."; | 1265 ALOGD << "Destroy video encoder."; |
1265 delete encoder; | 1266 delete encoder; |
1266 } | 1267 } |
1267 | 1268 |
1268 } // namespace webrtc_jni | 1269 } // namespace webrtc_jni |
1269 | 1270 |
OLD | NEW |