| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "media/capture/video/android/video_capture_device_android.h" | 5 #include "media/capture/video/android/video_capture_device_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| 11 #include "base/android/jni_array.h" | 11 #include "base/android/jni_array.h" |
| 12 #include "base/android/jni_string.h" | 12 #include "base/android/jni_string.h" |
| 13 #include "base/numerics/safe_conversions.h" | 13 #include "base/numerics/safe_conversions.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "jni/VideoCapture_jni.h" | 15 #include "jni/VideoCapture_jni.h" |
| 16 #include "media/capture/video/android/photo_capabilities.h" | 16 #include "media/capture/video/android/photo_capabilities.h" |
| 17 #include "media/capture/video/android/video_capture_device_factory_android.h" | 17 #include "media/capture/video/android/video_capture_device_factory_android.h" |
| 18 #include "third_party/libyuv/include/libyuv.h" | 18 #include "third_party/libyuv/include/libyuv.h" |
| 19 | 19 |
| 20 using base::android::AttachCurrentThread; | 20 using base::android::AttachCurrentThread; |
| 21 using base::android::CheckException; | 21 using base::android::CheckException; |
| 22 using base::android::GetClass; | 22 using base::android::GetClass; |
| 23 using base::android::JavaParamRef; |
| 23 using base::android::MethodID; | 24 using base::android::MethodID; |
| 24 using base::android::JavaRef; | 25 using base::android::JavaRef; |
| 25 using base::android::ScopedJavaLocalRef; | 26 using base::android::ScopedJavaLocalRef; |
| 26 | 27 |
| 27 namespace media { | 28 namespace media { |
| 28 | 29 |
| 29 // static | 30 // static |
| 30 bool VideoCaptureDeviceAndroid::RegisterVideoCaptureDevice(JNIEnv* env) { | 31 bool VideoCaptureDeviceAndroid::RegisterVideoCaptureDevice(JNIEnv* env) { |
| 31 return RegisterNativesImpl(env); | 32 return RegisterNativesImpl(env); |
| 32 } | 33 } |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 { | 380 { |
| 380 base::AutoLock lock(lock_); | 381 base::AutoLock lock(lock_); |
| 381 state_ = kError; | 382 state_ = kError; |
| 382 if (!client_) | 383 if (!client_) |
| 383 return; | 384 return; |
| 384 client_->OnError(from_here, reason); | 385 client_->OnError(from_here, reason); |
| 385 } | 386 } |
| 386 } | 387 } |
| 387 | 388 |
| 388 } // namespace media | 389 } // namespace media |
| OLD | NEW |