Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(863)

Side by Side Diff: media/video/capture/android/video_capture_device_android.cc

Issue 24079003: Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + implementation for Linux and Fake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed parameter device_name from GetDeviceSupportedFormats. Added explanation to VCD interface. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 VideoCaptureFormats* capture_formats) {
126 NOTIMPLEMENTED();
127 }
128
124 void VideoCaptureDeviceAndroid::Allocate( 129 void VideoCaptureDeviceAndroid::Allocate(
125 const VideoCaptureCapability& capture_format, 130 const VideoCaptureCapability& capture_format,
126 EventHandler* observer) { 131 EventHandler* observer) {
127 { 132 {
128 base::AutoLock lock(lock_); 133 base::AutoLock lock(lock_);
129 if (state_ != kIdle) 134 if (state_ != kIdle)
130 return; 135 return;
131 observer_ = observer; 136 observer_ = observer;
132 state_ = kAllocated; 137 state_ = kAllocated;
133 } 138 }
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) { 264 void VideoCaptureDeviceAndroid::SetErrorState(const std::string& reason) {
260 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason; 265 LOG(ERROR) << "VideoCaptureDeviceAndroid::SetErrorState: " << reason;
261 { 266 {
262 base::AutoLock lock(lock_); 267 base::AutoLock lock(lock_);
263 state_ = kError; 268 state_ = kError;
264 } 269 }
265 observer_->OnError(); 270 observer_->OnError();
266 } 271 }
267 272
268 } // namespace media 273 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698