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

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

Issue 2514883002: Create //webrtc/api:libjingle_peerconnection_api + refactorings. (Closed)
Patch Set: Created 4 years, 1 month 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
« webrtc/api/mediatype.cc ('K') | « webrtc/pc/mediasession.h ('k') | no next file » | 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 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 return false; 1157 return false;
1158 1158
1159 const TransportDescription* current_tdesc = 1159 const TransportDescription* current_tdesc =
1160 GetTransportDescription(content_name, current_description); 1160 GetTransportDescription(content_name, current_description);
1161 if (!current_tdesc) 1161 if (!current_tdesc)
1162 return false; 1162 return false;
1163 1163
1164 return current_tdesc->secure(); 1164 return current_tdesc->secure();
1165 } 1165 }
1166 1166
1167 std::string MediaTypeToString(MediaType type) {
1168 std::string type_str;
1169 switch (type) {
1170 case MEDIA_TYPE_AUDIO:
1171 type_str = "audio";
1172 break;
1173 case MEDIA_TYPE_VIDEO:
1174 type_str = "video";
1175 break;
1176 case MEDIA_TYPE_DATA:
1177 type_str = "data";
1178 break;
1179 default:
1180 ASSERT(false);
1181 break;
1182 }
1183 return type_str;
1184 }
1185
1186 std::string MediaContentDirectionToString(MediaContentDirection direction) { 1167 std::string MediaContentDirectionToString(MediaContentDirection direction) {
1187 std::string dir_str; 1168 std::string dir_str;
1188 switch (direction) { 1169 switch (direction) {
1189 case MD_INACTIVE: 1170 case MD_INACTIVE:
1190 dir_str = "inactive"; 1171 dir_str = "inactive";
1191 break; 1172 break;
1192 case MD_SENDONLY: 1173 case MD_SENDONLY:
1193 dir_str = "sendonly"; 1174 dir_str = "sendonly";
1194 break; 1175 break;
1195 case MD_RECVONLY: 1176 case MD_RECVONLY:
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 2139 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
2159 } 2140 }
2160 2141
2161 DataContentDescription* GetFirstDataContentDescription( 2142 DataContentDescription* GetFirstDataContentDescription(
2162 SessionDescription* sdesc) { 2143 SessionDescription* sdesc) {
2163 return static_cast<DataContentDescription*>( 2144 return static_cast<DataContentDescription*>(
2164 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2145 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2165 } 2146 }
2166 2147
2167 } // namespace cricket 2148 } // namespace cricket
OLDNEW
« webrtc/api/mediatype.cc ('K') | « webrtc/pc/mediasession.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698