| 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/video/capture/android/video_capture_device_android.h" | 5 #include "media/video/capture/android/video_capture_device_android.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // static | 29 // static |
| 30 void VideoCaptureDevice::GetDeviceSupportedFormats( | 30 void VideoCaptureDevice::GetDeviceSupportedFormats( |
| 31 const Name& device, | 31 const Name& device, |
| 32 VideoCaptureFormats* capture_formats) { | 32 VideoCaptureFormats* capture_formats) { |
| 33 VideoCaptureDeviceFactoryAndroid::GetDeviceSupportedFormats(device, | 33 VideoCaptureDeviceFactoryAndroid::GetDeviceSupportedFormats(device, |
| 34 capture_formats); | 34 capture_formats); |
| 35 } | 35 } |
| 36 | 36 |
| 37 // static | 37 // static |
| 38 VideoCaptureDevice* VideoCaptureDevice::Create(const Name& device_name) { | 38 VideoCaptureDevice* VideoCaptureDevice::Create( |
| 39 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 40 const Name& device_name) { |
| 39 return VideoCaptureDeviceAndroid::Create(device_name); | 41 return VideoCaptureDeviceAndroid::Create(device_name); |
| 40 } | 42 } |
| 41 | 43 |
| 42 // static | 44 // static |
| 43 VideoCaptureDevice* VideoCaptureDeviceAndroid::Create(const Name& device_name) { | 45 VideoCaptureDevice* VideoCaptureDeviceAndroid::Create(const Name& device_name) { |
| 44 scoped_ptr<VideoCaptureDeviceAndroid> ret( | 46 scoped_ptr<VideoCaptureDeviceAndroid> ret( |
| 45 new VideoCaptureDeviceAndroid(device_name)); | 47 new VideoCaptureDeviceAndroid(device_name)); |
| 46 if (ret->Init()) | 48 if (ret->Init()) |
| 47 return ret.release(); | 49 return ret.release(); |
| 48 return NULL; | 50 return NULL; |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { | 221 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { |
| 220 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; | 222 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; |
| 221 { | 223 { |
| 222 base::AutoLock lock(lock_); | 224 base::AutoLock lock(lock_); |
| 223 state_ = kError; | 225 state_ = kError; |
| 224 } | 226 } |
| 225 client_->OnError(reason); | 227 client_->OnError(reason); |
| 226 } | 228 } |
| 227 | 229 |
| 228 } // namespace media | 230 } // namespace media |
| OLD | NEW |