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

Side by Side Diff: content/browser/renderer_host/media/video_capture_manager.h

Issue 2606983002: Media Capture Depth Stream Extensions API: focal length and depth range. (Closed)
Patch Set: 80-char line fix in test html. Created 3 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // VideoCaptureManager is used to open/close, start/stop, enumerate available 5 // VideoCaptureManager is used to open/close, start/stop, enumerate available
6 // video capture devices, and manage VideoCaptureController's. 6 // video capture devices, and manage VideoCaptureController's.
7 // All functions are expected to be called from Browser::IO thread. Some helper 7 // All functions are expected to be called from Browser::IO thread. Some helper
8 // functions (*OnDeviceThread) will dispatch operations to the device thread. 8 // functions (*OnDeviceThread) will dispatch operations to the device thread.
9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice. 9 // VideoCaptureManager will open OS dependent instances of VideoCaptureDevice.
10 // A device can only be opened once. 10 // A device can only be opened once.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Some devices had troubles when stopped and restarted quickly, so the device 178 // Some devices had troubles when stopped and restarted quickly, so the device
179 // is only stopped when Chrome is sent to background and not when, e.g., a tab 179 // is only stopped when Chrome is sent to background and not when, e.g., a tab
180 // is hidden, see http://crbug.com/582295. 180 // is hidden, see http://crbug.com/582295.
181 void OnApplicationStateChange(base::android::ApplicationState state); 181 void OnApplicationStateChange(base::android::ApplicationState state);
182 #endif 182 #endif
183 183
184 using EnumerationCallback = 184 using EnumerationCallback =
185 base::Callback<void(const media::VideoCaptureDeviceDescriptors&)>; 185 base::Callback<void(const media::VideoCaptureDeviceDescriptors&)>;
186 void EnumerateDevices(const EnumerationCallback& client_callback); 186 void EnumerateDevices(const EnumerationCallback& client_callback);
187 187
188 // Retrieves camera calibration information for a particular device. Returns
189 // nullopt_t if the |device_id| is not found or camera calibration information
190 // is not available for the device. Camera calibration is cached during
191 // device(s) enumeration.
192 base::Optional<CameraCalibration> GetCameraCalibration(
193 const std::string& device_id);
194
188 private: 195 private:
189 class CaptureDeviceStartRequest; 196 class CaptureDeviceStartRequest;
190 struct DeviceEntry; 197 struct DeviceEntry;
191 struct DeviceInfo; 198 struct DeviceInfo;
192 199
193 using SessionMap = std::map<media::VideoCaptureSessionId, MediaStreamDevice>; 200 using SessionMap = std::map<media::VideoCaptureSessionId, MediaStreamDevice>;
194 using DeviceEntries = std::vector<std::unique_ptr<DeviceEntry>>; 201 using DeviceEntries = std::vector<std::unique_ptr<DeviceEntry>>;
195 using DeviceInfos = std::vector<DeviceInfo>; 202 using DeviceInfos = std::vector<DeviceInfo>;
196 using DeviceStartQueue = std::list<CaptureDeviceStartRequest>; 203 using DeviceStartQueue = std::list<CaptureDeviceStartRequest>;
197 using VideoCaptureDeviceDescriptor = media::VideoCaptureDeviceDescriptor; 204 using VideoCaptureDeviceDescriptor = media::VideoCaptureDeviceDescriptor;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 // Map used by DesktopCapture. 355 // Map used by DesktopCapture.
349 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> 356 std::map<media::VideoCaptureSessionId, gfx::NativeViewId>
350 notification_window_ids_; 357 notification_window_ids_;
351 358
352 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); 359 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager);
353 }; 360 };
354 361
355 } // namespace content 362 } // namespace content
356 363
357 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ 364 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698