Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/memory/ref_counted.h" | |
| 11 #include "media/capture/capture_export.h" | 12 #include "media/capture/capture_export.h" |
| 12 | 13 |
| 13 namespace media { | 14 namespace media { |
| 14 | 15 |
| 15 // A Java counterpart will be generated for this enum. | 16 // A Java counterpart will be generated for this enum. |
| 16 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media | 17 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media |
| 17 enum class VideoCaptureApi { | 18 enum class VideoCaptureApi { |
| 18 LINUX_V4L2_SINGLE_PLANE, | 19 LINUX_V4L2_SINGLE_PLANE, |
| 19 WIN_MEDIA_FOUNDATION, | 20 WIN_MEDIA_FOUNDATION, |
| 20 WIN_DIRECT_SHOW, | 21 WIN_DIRECT_SHOW, |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 75 | 76 |
| 76 std::string display_name; // Name that is intended for display in the UI | 77 std::string display_name; // Name that is intended for display in the UI |
| 77 std::string device_id; | 78 std::string device_id; |
| 78 // A unique hardware identifier of the capture device. | 79 // A unique hardware identifier of the capture device. |
| 79 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty | 80 // It is of the form "[vid]:[pid]" when a USB device is detected, and empty |
| 80 // otherwise. | 81 // otherwise. |
| 81 std::string model_id; | 82 std::string model_id; |
| 82 | 83 |
| 83 VideoCaptureApi capture_api; | 84 VideoCaptureApi capture_api; |
| 84 VideoCaptureTransportType transport_type; | 85 VideoCaptureTransportType transport_type; |
| 86 | |
| 87 // Contains camera calibration parameters. | |
| 88 // These parameters apply to both RGB and depth video devices. See also | |
| 89 // https://w3c.github.io/mediacapture-depth/#mediatracksettings-dictionary | |
| 90 // TODO(aleksandar.stojiljkovic): Add principal point and camera distortion | |
| 91 // model and coefficients. See also https://crbug.com/616098 | |
| 92 struct CameraCalibration | |
| 93 : public base::RefCountedThreadSafe<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 private: | |
| 101 friend class base::RefCountedThreadSafe<CameraCalibration>; | |
|
mcasas
2017/01/05 01:09:32
I fail to see why should CameraCalibration be ref
aleksandar.stojiljkovic
2017/01/09 18:47:01
Done.
Didn't know better. As I learned about it he
| |
| 102 ~CameraCalibration() {} | |
| 103 }; | |
| 104 | |
| 105 scoped_refptr<CameraCalibration> camera_calibration = nullptr; | |
| 85 }; | 106 }; |
| 86 | 107 |
| 87 using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>; | 108 using VideoCaptureDeviceDescriptors = std::vector<VideoCaptureDeviceDescriptor>; |
| 88 | 109 |
| 89 } // namespace media | 110 } // namespace media |
| 90 | 111 |
| 91 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ | 112 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_DESCRIPTOR_H_ |
| OLD | NEW |