| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 int adapted_width; | 257 int adapted_width; |
| 258 int adapted_height; | 258 int adapted_height; |
| 259 int crop_width; | 259 int crop_width; |
| 260 int crop_height; | 260 int crop_height; |
| 261 int crop_x; | 261 int crop_x; |
| 262 int crop_y; | 262 int crop_y; |
| 263 | 263 |
| 264 if (!capturer_->AdaptFrame(width, height, timestamp_ns, | 264 if (!capturer_->AdaptFrame(width, height, timestamp_ns, |
| 265 &adapted_width, &adapted_height, | 265 &adapted_width, &adapted_height, |
| 266 &crop_width, &crop_height, &crop_x, &crop_y)) { | 266 &crop_width, &crop_height, &crop_x, &crop_y)) { |
| 267 surface_texture_helper_->ReturnTextureFrame(); |
| 267 return; | 268 return; |
| 268 } | 269 } |
| 269 | 270 |
| 270 Matrix matrix = handle.sampling_matrix; | 271 Matrix matrix = handle.sampling_matrix; |
| 271 | 272 |
| 272 matrix.Crop(crop_width / static_cast<float>(width), | 273 matrix.Crop(crop_width / static_cast<float>(width), |
| 273 crop_height / static_cast<float>(height), | 274 crop_height / static_cast<float>(height), |
| 274 crop_x / static_cast<float>(width), | 275 crop_x / static_cast<float>(width), |
| 275 crop_y / static_cast<float>(height)); | 276 crop_y / static_cast<float>(height)); |
| 276 | 277 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 335 |
| 335 JOW(void, VideoCapturer_00024NativeObserver_nativeOnOutputFormatRequest) | 336 JOW(void, VideoCapturer_00024NativeObserver_nativeOnOutputFormatRequest) |
| 336 (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height, | 337 (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height, |
| 337 jint j_fps) { | 338 jint j_fps) { |
| 338 LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest"; | 339 LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest"; |
| 339 reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest( | 340 reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest( |
| 340 j_width, j_height, j_fps); | 341 j_width, j_height, j_fps); |
| 341 } | 342 } |
| 342 | 343 |
| 343 } // namespace webrtc_jni | 344 } // namespace webrtc_jni |
| OLD | NEW |