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

Unified Diff: media/capture/video/video_capture_device_descriptor.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 side-by-side diff with in-line comments
Download patch
Index: media/capture/video/video_capture_device_descriptor.h
diff --git a/media/capture/video/video_capture_device_descriptor.h b/media/capture/video/video_capture_device_descriptor.h
index b7e7819cfdd7d55c0c4ad8b8e7a60b6c653a6081..28ec8a283a0a845594717599685d06c0516a07cb 100644
--- a/media/capture/video/video_capture_device_descriptor.h
+++ b/media/capture/video/video_capture_device_descriptor.h
@@ -8,6 +8,7 @@
#include <string>
#include <vector>
+#include "base/optional.h"
#include "media/base/video_facing.h"
#include "media/capture/capture_export.h"
@@ -83,6 +84,21 @@ struct CAPTURE_EXPORT VideoCaptureDeviceDescriptor {
VideoCaptureApi capture_api;
VideoCaptureTransportType transport_type;
+
+ // Contains camera calibration parameters.
+ // These parameters apply to both RGB and depth video devices. See also
+ // https://w3c.github.io/mediacapture-depth/#mediatracksettings-dictionary
+ // TODO(aleksandar.stojiljkovic): Add principal point and camera distortion
+ // model and coefficients. See also https://crbug.com/616098
+ struct CameraCalibration {
+ double focal_length_x = 0.0;
+ double focal_length_y = 0.0;
+ // depth near and far are used only for depth cameras.
+ double depth_near = 0.0;
+ double depth_far = 0.0;
+ };
+
+ base::Optional<CameraCalibration> camera_calibration;
};
using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>;

Powered by Google App Engine
This is Rietveld 408576698