OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const char MediaConstraintsInterface::kCpuOveruseThreshold[] = | 109 const char MediaConstraintsInterface::kCpuOveruseThreshold[] = |
110 "googCpuOveruseThreshold"; | 110 "googCpuOveruseThreshold"; |
111 const char MediaConstraintsInterface::kCpuUnderuseEncodeRsdThreshold[] = | 111 const char MediaConstraintsInterface::kCpuUnderuseEncodeRsdThreshold[] = |
112 "googCpuUnderuseEncodeRsdThreshold"; | 112 "googCpuUnderuseEncodeRsdThreshold"; |
113 const char MediaConstraintsInterface::kCpuOveruseEncodeRsdThreshold[] = | 113 const char MediaConstraintsInterface::kCpuOveruseEncodeRsdThreshold[] = |
114 "googCpuOveruseEncodeRsdThreshold"; | 114 "googCpuOveruseEncodeRsdThreshold"; |
115 const char MediaConstraintsInterface::kCpuOveruseEncodeUsage[] = | 115 const char MediaConstraintsInterface::kCpuOveruseEncodeUsage[] = |
116 "googCpuOveruseEncodeUsage"; | 116 "googCpuOveruseEncodeUsage"; |
117 const char MediaConstraintsInterface::kHighStartBitrate[] = | 117 const char MediaConstraintsInterface::kHighStartBitrate[] = |
118 "googHighStartBitrate"; | 118 "googHighStartBitrate"; |
119 const char MediaConstraintsInterface::kHighBitrate[] = | |
120 "googHighBitrate"; | |
121 const char MediaConstraintsInterface::kVeryHighBitrate[] = | |
122 "googVeryHighBitrate"; | |
123 const char MediaConstraintsInterface::kPayloadPadding[] = "googPayloadPadding"; | 119 const char MediaConstraintsInterface::kPayloadPadding[] = "googPayloadPadding"; |
124 | 120 |
125 | 121 |
126 // Set |value| to the value associated with the first appearance of |key|, or | 122 // Set |value| to the value associated with the first appearance of |key|, or |
127 // return false if |key| is not found. | 123 // return false if |key| is not found. |
128 bool MediaConstraintsInterface::Constraints::FindFirst( | 124 bool MediaConstraintsInterface::Constraints::FindFirst( |
129 const std::string& key, std::string* value) const { | 125 const std::string& key, std::string* value) const { |
130 for (Constraints::const_iterator iter = begin(); iter != end(); ++iter) { | 126 for (Constraints::const_iterator iter = begin(); iter != end(); ++iter) { |
131 if (iter->key == key) { | 127 if (iter->key == key) { |
132 *value = iter->value; | 128 *value = iter->value; |
(...skipping 25 matching lines...) Expand all Loading... |
158 ++*mandatory_constraints; | 154 ++*mandatory_constraints; |
159 return rtc::FromString(string_value, value); | 155 return rtc::FromString(string_value, value); |
160 } | 156 } |
161 if (constraints->GetOptional().FindFirst(key, &string_value)) { | 157 if (constraints->GetOptional().FindFirst(key, &string_value)) { |
162 return rtc::FromString(string_value, value); | 158 return rtc::FromString(string_value, value); |
163 } | 159 } |
164 return false; | 160 return false; |
165 } | 161 } |
166 | 162 |
167 } // namespace webrtc | 163 } // namespace webrtc |
OLD | NEW |