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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.cc

Issue 2606983002: Media Capture Depth Stream Extensions API: focal length and depth range. (Closed)
Patch Set: review #25 fix. Thanks kinuko@. 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_manager.cc
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 6af09c0411e1b71cfec71c2d414e2eb4196b9ec2..ff135d6e0c504035aa4108aa59e38426954428f9 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -1074,6 +1074,9 @@ void VideoCaptureManager::OnDevicesInfoEnumerated(
for (const auto& it : devices_info_cache_) {
devices.emplace_back(it.descriptor);
descriptors_and_formats.emplace_back(it.descriptor, it.supported_formats);
+ }
+
+ if (!descriptors_and_formats.empty()) {
MediaInternals::GetInstance()->UpdateVideoCaptureDeviceCapabilities(
descriptors_and_formats);
}
@@ -1270,6 +1273,14 @@ void VideoCaptureManager::DoTakePhoto(
base::Unretained(device), base::Passed(&callback)));
}
+base::Optional<CameraCalibration> VideoCaptureManager::GetCameraCalibration(
+ const std::string& device_id) {
+ VideoCaptureManager::DeviceInfo* info = GetDeviceInfoById(device_id);
+ if (!info)
+ return base::Optional<CameraCalibration>();
+ return info->descriptor.camera_calibration;
+}
+
#if defined(OS_ANDROID)
void VideoCaptureManager::OnApplicationStateChange(
base::android::ApplicationState state) {

Powered by Google App Engine
This is Rietveld 408576698