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 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 Constraints mandatory_audio; | 55 Constraints mandatory_audio; |
56 Constraints optional_audio; | 56 Constraints optional_audio; |
57 | 57 |
58 bool video_requested; | 58 bool video_requested; |
59 Constraints mandatory_video; | 59 Constraints mandatory_video; |
60 Constraints optional_video; | 60 Constraints optional_video; |
61 | 61 |
62 // Fetches |value| from the first audio constraint with a name that matches | 62 // Fetches |value| from the first audio constraint with a name that matches |
63 // |name| from |mandatory_audio| and |optional_audio|. First mandatory | 63 // |name| from |mandatory_audio| and |optional_audio|. First mandatory |
64 // constraints are searched, then optional. | 64 // constraints are searched, then optional. |
65 // |is_mandatory| may be NULL but if it is provided, it is set | 65 // |is_mandatory| may be nullptr but if it is provided, it is set |
66 // to true if the found constraint is mandatory. | 66 // to true if the found constraint is mandatory. |
67 // Returns false if no constraint is found. | 67 // Returns false if no constraint is found. |
68 bool GetFirstAudioConstraintByName(const std::string& name, | 68 bool GetFirstAudioConstraintByName(const std::string& name, |
69 std::string* value, | 69 std::string* value, |
70 bool* is_mandatory) const; | 70 bool* is_mandatory) const; |
71 | 71 |
72 // Fetches |value| from the first video constraint with a name that matches | 72 // Fetches |value| from the first video constraint with a name that matches |
73 // |name| from |mandatory_video| and |optional_video|. First mandatory | 73 // |name| from |mandatory_video| and |optional_video|. First mandatory |
74 // constraints are searched, then optional. | 74 // constraints are searched, then optional. |
75 // |is_mandatory| may be NULL but if it is provided, it is set | 75 // |is_mandatory| may be nullptr but if it is provided, it is set |
76 // to true if the found constraint is mandatory. | 76 // to true if the found constraint is mandatory. |
77 // Returns false if no constraint is found. | 77 // Returns false if no constraint is found. |
78 bool GetFirstVideoConstraintByName(const std::string& name, | 78 bool GetFirstVideoConstraintByName(const std::string& name, |
79 std::string* value, | 79 std::string* value, |
80 bool* is_mandatory) const; | 80 bool* is_mandatory) const; |
81 | 81 |
82 // Fetches |values| from all constraint with a name that matches |name| | 82 // Fetches |values| from all constraint with a name that matches |name| |
83 // from |constraints|. | 83 // from |constraints|. |
84 static void GetConstraintsByName( | 84 static void GetConstraintsByName( |
85 const StreamOptions::Constraints& constraints, | 85 const StreamOptions::Constraints& constraints, |
(...skipping 22 matching lines...) Expand all Loading... |
108 | 108 |
109 // Id for this capture session. Unique for all sessions of the same type. | 109 // Id for this capture session. Unique for all sessions of the same type. |
110 int session_id; | 110 int session_id; |
111 }; | 111 }; |
112 | 112 |
113 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; | 113 typedef std::vector<StreamDeviceInfo> StreamDeviceInfoArray; |
114 | 114 |
115 } // namespace content | 115 } // namespace content |
116 | 116 |
117 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ | 117 #endif // CONTENT_COMMON_MEDIA_MEDIA_STREAM_OPTIONS_H_ |
OLD | NEW |