| 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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1035 webrtc::EncodedImageCallback::Result callback_result( | 1035 webrtc::EncodedImageCallback::Result callback_result( |
| 1036 webrtc::EncodedImageCallback::Result::OK); | 1036 webrtc::EncodedImageCallback::Result::OK); |
| 1037 if (callback_) { | 1037 if (callback_) { |
| 1038 std::unique_ptr<webrtc::EncodedImage> image( | 1038 std::unique_ptr<webrtc::EncodedImage> image( |
| 1039 new webrtc::EncodedImage(payload, payload_size, payload_size)); | 1039 new webrtc::EncodedImage(payload, payload_size, payload_size)); |
| 1040 image->_encodedWidth = width_; | 1040 image->_encodedWidth = width_; |
| 1041 image->_encodedHeight = height_; | 1041 image->_encodedHeight = height_; |
| 1042 image->_timeStamp = output_timestamp_; | 1042 image->_timeStamp = output_timestamp_; |
| 1043 image->capture_time_ms_ = output_render_time_ms_; | 1043 image->capture_time_ms_ = output_render_time_ms_; |
| 1044 image->rotation_ = output_rotation_; | 1044 image->rotation_ = output_rotation_; |
| 1045 if (codec_mode_ == webrtc::VideoCodecMode::kScreensharing) |
| 1046 image->content_type_ = webrtc::VideoContentType::kScreenshare; |
| 1047 else |
| 1048 image->content_type_ = webrtc::VideoContentType::kUnspecified; |
| 1045 image->_frameType = | 1049 image->_frameType = |
| 1046 (key_frame ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta); | 1050 (key_frame ? webrtc::kVideoFrameKey : webrtc::kVideoFrameDelta); |
| 1047 image->_completeFrame = true; | 1051 image->_completeFrame = true; |
| 1048 webrtc::CodecSpecificInfo info; | 1052 webrtc::CodecSpecificInfo info; |
| 1049 memset(&info, 0, sizeof(info)); | 1053 memset(&info, 0, sizeof(info)); |
| 1050 info.codecType = codec_type; | 1054 info.codecType = codec_type; |
| 1051 if (codec_type == kVideoCodecVP8) { | 1055 if (codec_type == kVideoCodecVP8) { |
| 1052 info.codecSpecific.VP8.pictureId = picture_id_; | 1056 info.codecSpecific.VP8.pictureId = picture_id_; |
| 1053 info.codecSpecific.VP8.nonReference = false; | 1057 info.codecSpecific.VP8.nonReference = false; |
| 1054 info.codecSpecific.VP8.simulcastIdx = 0; | 1058 info.codecSpecific.VP8.simulcastIdx = 0; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1344 } | 1348 } |
| 1345 } | 1349 } |
| 1346 | 1350 |
| 1347 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1351 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( |
| 1348 webrtc::VideoEncoder* encoder) { | 1352 webrtc::VideoEncoder* encoder) { |
| 1349 ALOGD << "Destroy video encoder."; | 1353 ALOGD << "Destroy video encoder."; |
| 1350 delete encoder; | 1354 delete encoder; |
| 1351 } | 1355 } |
| 1352 | 1356 |
| 1353 } // namespace webrtc_jni | 1357 } // namespace webrtc_jni |
| OLD | NEW |