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