OLD | NEW |
---|---|
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 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 6 #define CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
157 // audio (i.e. IsAudioInputMediaType returns true). | 157 // audio (i.e. IsAudioInputMediaType returns true). |
158 | 158 |
159 // Contains the device properties of the capture device. | 159 // Contains the device properties of the capture device. |
160 AudioDeviceParameters input; | 160 AudioDeviceParameters input; |
161 | 161 |
162 // If the capture device has an associated output device (e.g. headphones), | 162 // If the capture device has an associated output device (e.g. headphones), |
163 // this will contain the properties for the output device. If no such device | 163 // this will contain the properties for the output device. If no such device |
164 // exists (e.g. webcam w/mic), then the value of this member will be all | 164 // exists (e.g. webcam w/mic), then the value of this member will be all |
165 // zeros. | 165 // zeros. |
166 AudioDeviceParameters matched_output; | 166 AudioDeviceParameters matched_output; |
167 | |
168 // Contains camera calibration parameters. | |
169 // These parameters apply to both RGB and depth video devices. See also | |
170 // https://w3c.github.io/mediacapture-depth/#mediatracksettings-dictionary | |
171 // TODO(aleksandar.stojiljkovic): Add principal point and camera distortion | |
172 // model and coefficients. See also https://crbug.com/616098 | |
173 struct CONTENT_EXPORT CameraCalibration { | |
174 double focal_length_x = 0.0; | |
175 double focal_length_y = 0.0; | |
176 // depth_near and far are used only for depth cameras. | |
177 double depth_near = 0.0; | |
178 double depth_far = 0.0; | |
179 // Specifies if the values here are valid. | |
180 bool valid = false; | |
181 }; | |
mcasas
2017/01/05 01:09:32
content/public/ can pull data types out of media/,
aleksandar.stojiljkovic
2017/01/09 18:47:01
Done.
I saw related TODO(ajm) at L.126 but assumed
| |
182 | |
183 // This field values are optional and available only for some camera models. | |
184 CameraCalibration camera_calibration; | |
mcasas
2017/01/05 01:09:32
If this field is not always present we probably wa
aleksandar.stojiljkovic
2017/01/09 18:47:01
Done. Thanks.
| |
167 }; | 185 }; |
168 | 186 |
169 class CONTENT_EXPORT MediaStreamDevices | 187 class CONTENT_EXPORT MediaStreamDevices |
170 : public std::vector<MediaStreamDevice> { | 188 : public std::vector<MediaStreamDevice> { |
171 public: | 189 public: |
172 MediaStreamDevices(); | 190 MediaStreamDevices(); |
173 MediaStreamDevices(size_t count, const MediaStreamDevice& value); | 191 MediaStreamDevices(size_t count, const MediaStreamDevice& value); |
174 | 192 |
175 // Looks for a MediaStreamDevice based on its ID. | 193 // Looks for a MediaStreamDevice based on its ID. |
176 // Returns NULL if not found. | 194 // Returns NULL if not found. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
262 | 280 |
263 // Callback used return results of media access requests. | 281 // Callback used return results of media access requests. |
264 typedef base::Callback<void(const MediaStreamDevices& devices, | 282 typedef base::Callback<void(const MediaStreamDevices& devices, |
265 content::MediaStreamRequestResult result, | 283 content::MediaStreamRequestResult result, |
266 std::unique_ptr<MediaStreamUI> ui)> | 284 std::unique_ptr<MediaStreamUI> ui)> |
267 MediaResponseCallback; | 285 MediaResponseCallback; |
268 | 286 |
269 } // namespace content | 287 } // namespace content |
270 | 288 |
271 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ | 289 #endif // CONTENT_PUBLIC_COMMON_MEDIA_STREAM_REQUEST_H_ |
OLD | NEW |