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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 void AndroidVideoCapturerJni::OnTextureFrame(int width, | 254 void AndroidVideoCapturerJni::OnTextureFrame(int width, |
255 int height, | 255 int height, |
256 int rotation, | 256 int rotation, |
257 int64_t timestamp_ns, | 257 int64_t timestamp_ns, |
258 const NativeHandleImpl& handle) { | 258 const NativeHandleImpl& handle) { |
259 RTC_DCHECK(rotation == 0 || rotation == 90 || rotation == 180 || | 259 RTC_DCHECK(rotation == 0 || rotation == 90 || rotation == 180 || |
260 rotation == 270); | 260 rotation == 270); |
261 rtc::CritScope cs(&capturer_lock_); | 261 rtc::CritScope cs(&capturer_lock_); |
262 if (!capturer_) { | 262 if (!capturer_) { |
263 LOG(LS_WARNING) << "OnTextureFrame() called for closed capturer."; | 263 LOG(LS_WARNING) << "OnTextureFrame() called for closed capturer."; |
| 264 surface_texture_helper_->ReturnTextureFrame(); |
264 return; | 265 return; |
265 } | 266 } |
266 int adapted_width; | 267 int adapted_width; |
267 int adapted_height; | 268 int adapted_height; |
268 int crop_width; | 269 int crop_width; |
269 int crop_height; | 270 int crop_height; |
270 int crop_x; | 271 int crop_x; |
271 int crop_y; | 272 int crop_y; |
272 | 273 |
273 if (!capturer_->AdaptFrame(width, height, timestamp_ns, | 274 if (!capturer_->AdaptFrame(width, height, timestamp_ns, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 345 |
345 JOW(void, VideoCapturer_00024NativeObserver_nativeOnOutputFormatRequest) | 346 JOW(void, VideoCapturer_00024NativeObserver_nativeOnOutputFormatRequest) |
346 (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height, | 347 (JNIEnv* jni, jclass, jlong j_capturer, jint j_width, jint j_height, |
347 jint j_fps) { | 348 jint j_fps) { |
348 LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest"; | 349 LOG(LS_INFO) << "NativeObserver_nativeOnOutputFormatRequest"; |
349 reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest( | 350 reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)->OnOutputFormatRequest( |
350 j_width, j_height, j_fps); | 351 j_width, j_height, j_fps); |
351 } | 352 } |
352 | 353 |
353 } // namespace webrtc_jni | 354 } // namespace webrtc_jni |
OLD | NEW |