Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: webrtc/pc/mediasession.cc

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Added three headers for backwards-compatibility, specifically for building chromium. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 return false; 1189 return false;
1190 1190
1191 const TransportDescription* current_tdesc = 1191 const TransportDescription* current_tdesc =
1192 GetTransportDescription(content_name, current_description); 1192 GetTransportDescription(content_name, current_description);
1193 if (!current_tdesc) 1193 if (!current_tdesc)
1194 return false; 1194 return false;
1195 1195
1196 return current_tdesc->secure(); 1196 return current_tdesc->secure();
1197 } 1197 }
1198 1198
1199 std::string MediaTypeToString(MediaType type) {
1200 std::string type_str;
1201 switch (type) {
1202 case MEDIA_TYPE_AUDIO:
1203 type_str = "audio";
1204 break;
1205 case MEDIA_TYPE_VIDEO:
1206 type_str = "video";
1207 break;
1208 case MEDIA_TYPE_DATA:
1209 type_str = "data";
1210 break;
1211 default:
1212 ASSERT(false);
1213 break;
1214 }
1215 return type_str;
1216 }
1217
1218 std::string MediaContentDirectionToString(MediaContentDirection direction) { 1199 std::string MediaContentDirectionToString(MediaContentDirection direction) {
1219 std::string dir_str; 1200 std::string dir_str;
1220 switch (direction) { 1201 switch (direction) {
1221 case MD_INACTIVE: 1202 case MD_INACTIVE:
1222 dir_str = "inactive"; 1203 dir_str = "inactive";
1223 break; 1204 break;
1224 case MD_SENDONLY: 1205 case MD_SENDONLY:
1225 dir_str = "sendonly"; 1206 dir_str = "sendonly";
1226 break; 1207 break;
1227 case MD_RECVONLY: 1208 case MD_RECVONLY:
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2190 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 2171 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
2191 } 2172 }
2192 2173
2193 DataContentDescription* GetFirstDataContentDescription( 2174 DataContentDescription* GetFirstDataContentDescription(
2194 SessionDescription* sdesc) { 2175 SessionDescription* sdesc) {
2195 return static_cast<DataContentDescription*>( 2176 return static_cast<DataContentDescription*>(
2196 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2177 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2197 } 2178 }
2198 2179
2199 } // namespace cricket 2180 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698