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_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 5 #ifndef CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 6 #define CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 #include "content/public/common/media_stream_request.h" | 12 #include "content/public/common/media_stream_request.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 // Names for media stream source capture types. | 16 // Names for media stream source capture types. |
17 // These are values of the "TrackControls.stream_source" field, and are | 17 // These are values of the "TrackControls.stream_source" field, and are |
18 // set via the "chromeMediaSource" constraint. | 18 // set via the "chromeMediaSource" constraint. |
19 CONTENT_EXPORT extern const char kMediaStreamSourceTab[]; | 19 CONTENT_EXPORT extern const char kMediaStreamSourceTab[]; |
20 CONTENT_EXPORT extern const char kMediaStreamSourceScreen[]; | 20 CONTENT_EXPORT extern const char kMediaStreamSourceScreen[]; |
21 CONTENT_EXPORT extern const char kMediaStreamSourceDesktop[]; | 21 CONTENT_EXPORT extern const char kMediaStreamSourceDesktop[]; |
22 CONTENT_EXPORT extern const char kMediaStreamSourceSystem[]; | 22 CONTENT_EXPORT extern const char kMediaStreamSourceSystem[]; |
23 | 23 |
24 // The type of video stream. See https://w3c.github.io/mediacapture-depth. | |
25 enum VideoKind { | |
26 VIDEO_KIND_NO_CONSTRAINT, | |
Guido Urdaneta
2017/02/07 10:26:04
would VIDEO_KIND_NONE be better name?
At this poin
aleksandar.stojiljkovic
2017/02/07 11:33:49
Done. I didn't like it's semantics when using it a
| |
27 VIDEO_KIND_COLOR, | |
28 VIDEO_KIND_DEPTH, | |
29 NUM_VIDEO_KINDS, | |
30 }; | |
31 | |
24 struct CONTENT_EXPORT TrackControls { | 32 struct CONTENT_EXPORT TrackControls { |
25 public: | 33 public: |
26 TrackControls(); | 34 TrackControls(); |
27 explicit TrackControls(bool request); | 35 explicit TrackControls(bool request); |
28 explicit TrackControls(const TrackControls& other); | 36 explicit TrackControls(const TrackControls& other); |
29 ~TrackControls(); | 37 ~TrackControls(); |
30 bool requested; | 38 bool requested; |
31 | 39 |
32 // Source. This is "tab", "screen", "desktop", "system", or blank. | 40 // Source. This is "tab", "screen", "desktop", "system", or blank. |
33 // Consider replacing with MediaStreamType enum variables. | 41 // Consider replacing with MediaStreamType enum variables. |
(...skipping 13 matching lines...) Expand all Loading... | |
47 public: | 55 public: |
48 StreamControls(); | 56 StreamControls(); |
49 StreamControls(bool request_audio, bool request_video); | 57 StreamControls(bool request_audio, bool request_video); |
50 ~StreamControls(); | 58 ~StreamControls(); |
51 TrackControls audio; | 59 TrackControls audio; |
52 TrackControls video; | 60 TrackControls video; |
53 // Hotword functionality (chromeos only) | 61 // Hotword functionality (chromeos only) |
54 // See crbug.com/564574 for discussion on possibly #ifdef'ing this out. | 62 // See crbug.com/564574 for discussion on possibly #ifdef'ing this out. |
55 bool hotword_enabled; // kMediaStreamAudioHotword = "googHotword"; | 63 bool hotword_enabled; // kMediaStreamAudioHotword = "googHotword"; |
56 bool disable_local_echo; | 64 bool disable_local_echo; |
65 // https://w3c.github.io/mediacapture-depth | |
66 VideoKind video_kind; | |
57 }; | 67 }; |
58 | 68 |
59 // StreamDeviceInfo describes information about a device. | 69 // StreamDeviceInfo describes information about a device. |
60 struct CONTENT_EXPORT StreamDeviceInfo { | 70 struct CONTENT_EXPORT StreamDeviceInfo { |
61 static const int kNoId; | 71 static const int kNoId; |
62 | 72 |
63 StreamDeviceInfo(); | 73 StreamDeviceInfo(); |
64 StreamDeviceInfo(MediaStreamType service_param, | 74 StreamDeviceInfo(MediaStreamType service_param, |
65 const std::string& name_param, | 75 const std::string& name_param, |
66 const std::string& device_param); | 76 const std::string& device_param); |
(...skipping 10 matching lines...) Expand all Loading... | |
77 | 87 |
78 // Id for this capture session. Unique for all sessions of the same type. | 88 // Id for this capture session. Unique for all sessions of the same type. |
79 int session_id; | 89 int session_id; |
80 }; | 90 }; |
81 | 91 |
82 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; | 92 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; |
83 | 93 |
84 } // namespace content | 94 } // namespace content |
85 | 95 |
86 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 96 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
OLD | NEW |