OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1185 return false; | 1185 return false; |
1186 | 1186 |
1187 const TransportDescription* current_tdesc = | 1187 const TransportDescription* current_tdesc = |
1188 GetTransportDescription(content_name, current_description); | 1188 GetTransportDescription(content_name, current_description); |
1189 if (!current_tdesc) | 1189 if (!current_tdesc) |
1190 return false; | 1190 return false; |
1191 | 1191 |
1192 return current_tdesc->secure(); | 1192 return current_tdesc->secure(); |
1193 } | 1193 } |
1194 | 1194 |
1195 std::string MediaTypeToString(MediaType type) { | |
1196 std::string type_str; | |
1197 switch (type) { | |
1198 case MEDIA_TYPE_AUDIO: | |
1199 type_str = "audio"; | |
1200 break; | |
1201 case MEDIA_TYPE_VIDEO: | |
1202 type_str = "video"; | |
1203 break; | |
1204 case MEDIA_TYPE_DATA: | |
1205 type_str = "data"; | |
1206 break; | |
1207 default: | |
1208 ASSERT(false); | |
1209 break; | |
1210 } | |
1211 return type_str; | |
1212 } | |
1213 | |
1214 std::string MediaContentDirectionToString(MediaContentDirection direction) { | 1195 std::string MediaContentDirectionToString(MediaContentDirection direction) { |
1215 std::string dir_str; | 1196 std::string dir_str; |
1216 switch (direction) { | 1197 switch (direction) { |
1217 case MD_INACTIVE: | 1198 case MD_INACTIVE: |
1218 dir_str = "inactive"; | 1199 dir_str = "inactive"; |
1219 break; | 1200 break; |
1220 case MD_SENDONLY: | 1201 case MD_SENDONLY: |
1221 dir_str = "sendonly"; | 1202 dir_str = "sendonly"; |
1222 break; | 1203 break; |
1223 case MD_RECVONLY: | 1204 case MD_RECVONLY: |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2186 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2167 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
2187 } | 2168 } |
2188 | 2169 |
2189 DataContentDescription* GetFirstDataContentDescription( | 2170 DataContentDescription* GetFirstDataContentDescription( |
2190 SessionDescription* sdesc) { | 2171 SessionDescription* sdesc) { |
2191 return static_cast<DataContentDescription*>( | 2172 return static_cast<DataContentDescription*>( |
2192 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2173 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
2193 } | 2174 } |
2194 | 2175 |
2195 } // namespace cricket | 2176 } // namespace cricket |
OLD | NEW |