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

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

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Rebase Created 3 years, 11 months 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
« no previous file with comments | « webrtc/pc/mediasession.h ('k') | webrtc/pc/mediastream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 return false; 1186 return false;
1187 1187
1188 const TransportDescription* current_tdesc = 1188 const TransportDescription* current_tdesc =
1189 GetTransportDescription(content_name, current_description); 1189 GetTransportDescription(content_name, current_description);
1190 if (!current_tdesc) 1190 if (!current_tdesc)
1191 return false; 1191 return false;
1192 1192
1193 return current_tdesc->secure(); 1193 return current_tdesc->secure();
1194 } 1194 }
1195 1195
1196 std::string MediaTypeToString(MediaType type) {
1197 std::string type_str;
1198 switch (type) {
1199 case MEDIA_TYPE_AUDIO:
1200 type_str = "audio";
1201 break;
1202 case MEDIA_TYPE_VIDEO:
1203 type_str = "video";
1204 break;
1205 case MEDIA_TYPE_DATA:
1206 type_str = "data";
1207 break;
1208 default:
1209 RTC_NOTREACHED();
1210 break;
1211 }
1212 return type_str;
1213 }
1214
1215 std::string MediaContentDirectionToString(MediaContentDirection direction) { 1196 std::string MediaContentDirectionToString(MediaContentDirection direction) {
1216 std::string dir_str; 1197 std::string dir_str;
1217 switch (direction) { 1198 switch (direction) {
1218 case MD_INACTIVE: 1199 case MD_INACTIVE:
1219 dir_str = "inactive"; 1200 dir_str = "inactive";
1220 break; 1201 break;
1221 case MD_SENDONLY: 1202 case MD_SENDONLY:
1222 dir_str = "sendonly"; 1203 dir_str = "sendonly";
1223 break; 1204 break;
1224 case MD_RECVONLY: 1205 case MD_RECVONLY:
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2187 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 2168 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
2188 } 2169 }
2189 2170
2190 DataContentDescription* GetFirstDataContentDescription( 2171 DataContentDescription* GetFirstDataContentDescription(
2191 SessionDescription* sdesc) { 2172 SessionDescription* sdesc) {
2192 return static_cast<DataContentDescription*>( 2173 return static_cast<DataContentDescription*>(
2193 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2174 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2194 } 2175 }
2195 2176
2196 } // namespace cricket 2177 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/pc/mediasession.h ('k') | webrtc/pc/mediastream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698