OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ | 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "media/capture/video_capture_types.h" | 12 #include "media/capture/video_capture_types.h" |
13 #include "third_party/webrtc/base/optional.h" | 13 #include "third_party/webrtc/base/optional.h" |
14 | 14 |
15 namespace blink { | 15 namespace blink { |
16 class WebMediaConstraints; | 16 class WebMediaConstraints; |
17 } | 17 } |
18 | 18 |
19 namespace content { | 19 namespace content { |
20 | 20 |
21 class CONTENT_EXPORT VideoContentCaptureSourceSelectionResult { | 21 class CONTENT_EXPORT VideoContentCaptureSourceSelectionResult { |
22 public: | 22 public: |
| 23 // Creates a result without value and with an empty failed constraint name. |
| 24 VideoContentCaptureSourceSelectionResult(); |
| 25 |
23 // Creates a result without value and with the given |failed_constraint_name|. | 26 // Creates a result without value and with the given |failed_constraint_name|. |
24 // Does not take ownership of |failed_constraint_name|, so it must be null or | 27 // Does not take ownership of |failed_constraint_name|, so it must be null or |
25 // point to a string that remains accessible. | 28 // point to a string that remains accessible. |
26 explicit VideoContentCaptureSourceSelectionResult( | 29 explicit VideoContentCaptureSourceSelectionResult( |
27 const char* failed_constraint_name); | 30 const char* failed_constraint_name); |
28 | 31 |
29 // Creates a result with the given values. |device_id| is moved to an internal | 32 // Creates a result with the given values. |
30 // field. | |
31 VideoContentCaptureSourceSelectionResult( | 33 VideoContentCaptureSourceSelectionResult( |
32 std::string device_id, | 34 std::string device_id, |
33 const rtc::Optional<bool>& noise_reduction, | 35 const rtc::Optional<bool>& noise_reduction, |
34 media::VideoCaptureParams capture_params); | 36 media::VideoCaptureParams capture_params); |
35 | 37 |
36 VideoContentCaptureSourceSelectionResult( | 38 VideoContentCaptureSourceSelectionResult( |
37 const VideoContentCaptureSourceSelectionResult& other); | 39 const VideoContentCaptureSourceSelectionResult& other); |
38 VideoContentCaptureSourceSelectionResult& operator=( | 40 VideoContentCaptureSourceSelectionResult& operator=( |
39 const VideoContentCaptureSourceSelectionResult& other); | 41 const VideoContentCaptureSourceSelectionResult& other); |
40 VideoContentCaptureSourceSelectionResult( | 42 VideoContentCaptureSourceSelectionResult( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 77 |
76 // This function performs source and source-settings selection for content | 78 // This function performs source and source-settings selection for content |
77 // video capture based on the given |constraints|. | 79 // video capture based on the given |constraints|. |
78 VideoContentCaptureSourceSelectionResult CONTENT_EXPORT | 80 VideoContentCaptureSourceSelectionResult CONTENT_EXPORT |
79 SelectVideoContentCaptureSourceSettings( | 81 SelectVideoContentCaptureSourceSettings( |
80 const blink::WebMediaConstraints& constraints); | 82 const blink::WebMediaConstraints& constraints); |
81 | 83 |
82 } // namespace content | 84 } // namespace content |
83 | 85 |
84 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ | 86 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ |
OLD | NEW |