OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ | |
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "content/common/content_export.h" | |
11 #include "media/capture/video_capture_types.h" | |
12 #include "third_party/webrtc/base/optional.h" | |
13 | |
14 namespace blink { | |
15 class WebMediaConstraints; | |
16 } | |
17 | |
18 namespace content { | |
19 | |
20 struct CONTENT_EXPORT VideoContentCaptureSourceSelectionResult { | |
21 // Creates a result without value and with an empty |failed_constraint_name|. | |
22 VideoContentCaptureSourceSelectionResult(); | |
23 | |
24 VideoContentCaptureSourceSelectionResult( | |
25 const VideoContentCaptureSourceSelectionResult& other); | |
26 VideoContentCaptureSourceSelectionResult& operator=( | |
27 const VideoContentCaptureSourceSelectionResult& other); | |
28 VideoContentCaptureSourceSelectionResult( | |
29 VideoContentCaptureSourceSelectionResult&& other); | |
30 VideoContentCaptureSourceSelectionResult& operator=( | |
31 VideoContentCaptureSourceSelectionResult&& other); | |
32 ~VideoContentCaptureSourceSelectionResult(); | |
33 | |
34 bool HasValue() const; | |
35 | |
36 // Convenience accessors for fields embedded in the capture_params field. | |
37 int Height() const; | |
38 int Width() const; | |
39 float FrameRate() const; | |
40 media::ResolutionChangePolicy ResolutionChangePolicy() const; | |
41 | |
hta - Chromium
2017/03/08 13:34:09
Wonder if you could get away with a "private" here
Guido Urdaneta
2017/03/09 14:38:38
Done. Changed to a class.
| |
42 std::string device_id; | |
43 rtc::Optional<bool> noise_reduction; | |
44 media::VideoCaptureParams capture_params; | |
45 const char* failed_constraint_name; | |
46 }; | |
47 | |
48 VideoContentCaptureSourceSelectionResult CONTENT_EXPORT | |
49 SelectVideoContentCaptureSourceSettings( | |
50 const blink::WebMediaConstraints& constraints); | |
51 | |
52 } // namespace content | |
53 | |
54 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_CONSTRAINTS_UTIL_VIDEO_CONTENT_H_ | |
OLD | NEW |