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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ 5 #ifndef MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_
6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ 6 #define MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/optional.h"
11 #include "media/base/video_facing.h" 12 #include "media/base/video_facing.h"
12 #include "media/capture/capture_export.h" 13 #include "media/capture/capture_export.h"
13 14
14 namespace media { 15 namespace media {
15 16
16 // A Java counterpart will be generated for this enum. 17 // A Java counterpart will be generated for this enum.
17 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media 18 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media
18 enum class VideoCaptureApi { 19 enum class VideoCaptureApi {
19 LINUX_V4L2_SINGLE_PLANE, 20 LINUX_V4L2_SINGLE_PLANE,
20 WIN_MEDIA_FOUNDATION, 21 WIN_MEDIA_FOUNDATION,
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 std::string device_id; 77 std::string device_id;
77 // A unique hardware identifier of the capture device. 78 // A unique hardware identifier of the capture device.
78 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty 79 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty
79 // otherwise. 80 // otherwise.
80 std::string model_id; 81 std::string model_id;
81 82
82 VideoFacingMode facing; 83 VideoFacingMode facing;
83 84
84 VideoCaptureApi capture_api; 85 VideoCaptureApi capture_api;
85 VideoCaptureTransportType transport_type; 86 VideoCaptureTransportType transport_type;
87
88 // Contains camera calibration parameters.
89 // These parameters apply to both RGB and depth video devices. See also
90 // https://w3c.github.io/mediacapture-depth/#mediatracksettings-dictionary
91 // TODO(aleksandar.stojiljkovic): Add principal point and camera distortion
92 // model and coefficients. See also https://crbug.com/616098
93 struct CameraCalibration {
94 double focal_length_x = 0.0;
95 double focal_length_y = 0.0;
96 // depth near and far are used only for depth cameras.
97 double depth_near = 0.0;
98 double depth_far = 0.0;
99 };
100
101 base::Optional<CameraCalibration> camera_calibration;
86 }; 102 };
87 103
88 using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>; 104 using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>;
89 105
90 } // namespace media 106 } // namespace media
91 107
92 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ 108 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698