| 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/jni_string.h" | 10 #include "base/android/jni_string.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 env, base::android::GetApplicationContext(), id, | 114 env, base::android::GetApplicationContext(), id, |
| 115 reinterpret_cast<jint>(this))); | 115 reinterpret_cast<jint>(this))); |
| 116 | 116 |
| 117 return true; | 117 return true; |
| 118 } | 118 } |
| 119 | 119 |
| 120 const VideoCaptureDevice::Name& VideoCaptureDeviceAndroid::device_name() { | 120 const VideoCaptureDevice::Name& VideoCaptureDeviceAndroid::device_name() { |
| 121 return device_name_; | 121 return device_name_; |
| 122 } | 122 } |
| 123 | 123 |
| 124 void VideoCaptureDeviceAndroid::GetDeviceSupportedFormats( |
| 125 const std::string& device_name, |
| 126 VideoCaptureFormats* capture_formats) { |
| 127 NOTIMPLEMENTED(); |
| 128 } |
| 129 |
| 124 void VideoCaptureDeviceAndroid::Allocate( | 130 void VideoCaptureDeviceAndroid::Allocate( |
| 125 const VideoCaptureCapability& capture_format, | 131 const VideoCaptureCapability& capture_format, |
| 126 EventHandler* observer) { | 132 EventHandler* observer) { |
| 127 { | 133 { |
| 128 base::AutoLock lock(lock_); | 134 base::AutoLock lock(lock_); |
| 129 if (state_ != kIdle) | 135 if (state_ != kIdle) |
| 130 return; | 136 return; |
| 131 observer_ = observer; | 137 observer_ = observer; |
| 132 state_ = kAllocated; | 138 state_ = kAllocated; |
| 133 } | 139 } |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { | 265 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { |
| 260 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; | 266 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; |
| 261 { | 267 { |
| 262 base::AutoLock lock(lock_); | 268 base::AutoLock lock(lock_); |
| 263 state_ = kError; | 269 state_ = kError; |
| 264 } | 270 } |
| 265 observer_->OnError(); | 271 observer_->OnError(); |
| 266 } | 272 } |
| 267 | 273 |
| 268 } // namespace media | 274 } // namespace media |
| OLD | NEW |