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

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: Created 3 years, 11 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // Some devices had troubles when stopped and restarted quickly, so the device 165 // Some devices had troubles when stopped and restarted quickly, so the device
166 // is only stopped when Chrome is sent to background and not when, e.g., a tab 166 // is only stopped when Chrome is sent to background and not when, e.g., a tab
167 // is hidden, see http://crbug.com/582295. 167 // is hidden, see http://crbug.com/582295.
168 void OnApplicationStateChange(base::android::ApplicationState state); 168 void OnApplicationStateChange(base::android::ApplicationState state);
169 #endif 169 #endif
170 170
171 using EnumerationCallback = 171 using EnumerationCallback =
172 base::Callback<void(const media::VideoCaptureDeviceDescriptors&)>; 172 base::Callback<void(const media::VideoCaptureDeviceDescriptors&)>;
173 void EnumerateDevices(const EnumerationCallback& client_callback); 173 void EnumerateDevices(const EnumerationCallback& client_callback);
174 174
175 // Retrieves camera calibration information for a particular device. Returns
176 // false if the |device_id| is not found or camera calibration information is
177 // not available for the device. Camera calibration is cached during
178 // device(s) enumeration.
179 bool GetCameraCalibration(const std::string& device_id,
180 MediaStreamDevice::CameraCalibration* calibration);
181
175 private: 182 private:
176 class CaptureDeviceStartRequest; 183 class CaptureDeviceStartRequest;
177 class DeviceEntry; 184 class DeviceEntry;
178 struct DeviceInfo; 185 struct DeviceInfo;
179 186
180 using SessionMap = std::map<media::VideoCaptureSessionId, MediaStreamDevice>; 187 using SessionMap = std::map<media::VideoCaptureSessionId, MediaStreamDevice>;
181 using DeviceEntries = std::vector<std::unique_ptr<DeviceEntry>>; 188 using DeviceEntries = std::vector<std::unique_ptr<DeviceEntry>>;
182 using DeviceInfos = std::vector<DeviceInfo>; 189 using DeviceInfos = std::vector<DeviceInfo>;
183 using DeviceStartQueue = std::list<CaptureDeviceStartRequest>; 190 using DeviceStartQueue = std::list<CaptureDeviceStartRequest>;
184 using VideoCaptureDeviceDescriptor = media::VideoCaptureDeviceDescriptor; 191 using VideoCaptureDeviceDescriptor = media::VideoCaptureDeviceDescriptor;
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // Map used by DesktopCapture. 340 // Map used by DesktopCapture.
334 std::map<media::VideoCaptureSessionId, gfx::NativeViewId> 341 std::map<media::VideoCaptureSessionId, gfx::NativeViewId>
335 notification_window_ids_; 342 notification_window_ids_;
336 343
337 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager); 344 DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager);
338 }; 345 };
339 346
340 } // namespace content 347 } // namespace content
341 348
342 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_ 349 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698