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

Side by Side Diff: talk/app/webrtc/webrtcsdp.cc

Issue 1336553003: Revert change which removes GICE (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 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
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 using cricket::kCodecParamStereo; 70 using cricket::kCodecParamStereo;
71 using cricket::kCodecParamUseInbandFec; 71 using cricket::kCodecParamUseInbandFec;
72 using cricket::kCodecParamUseDtx; 72 using cricket::kCodecParamUseDtx;
73 using cricket::kCodecParamSctpProtocol; 73 using cricket::kCodecParamSctpProtocol;
74 using cricket::kCodecParamSctpStreams; 74 using cricket::kCodecParamSctpStreams;
75 using cricket::kCodecParamMaxAverageBitrate; 75 using cricket::kCodecParamMaxAverageBitrate;
76 using cricket::kCodecParamMaxPlaybackRate; 76 using cricket::kCodecParamMaxPlaybackRate;
77 using cricket::kCodecParamAssociatedPayloadType; 77 using cricket::kCodecParamAssociatedPayloadType;
78 using cricket::MediaContentDescription; 78 using cricket::MediaContentDescription;
79 using cricket::MediaType; 79 using cricket::MediaType;
80 using cricket::NS_JINGLE_ICE_UDP;
80 using cricket::RtpHeaderExtension; 81 using cricket::RtpHeaderExtension;
81 using cricket::SsrcGroup; 82 using cricket::SsrcGroup;
82 using cricket::StreamParams; 83 using cricket::StreamParams;
83 using cricket::StreamParamsVec; 84 using cricket::StreamParamsVec;
84 using cricket::TransportDescription; 85 using cricket::TransportDescription;
85 using cricket::TransportInfo; 86 using cricket::TransportInfo;
86 using cricket::VideoContentDescription; 87 using cricket::VideoContentDescription;
87 using rtc::SocketAddress; 88 using rtc::SocketAddress;
88 89
89 typedef std::vector<RtpHeaderExtension> RtpHeaderExtensions; 90 typedef std::vector<RtpHeaderExtension> RtpHeaderExtensions;
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 ASSERT(message.find(kLineBreak) == message.size() - 2); 885 ASSERT(message.find(kLineBreak) == message.size() - 2);
885 message.resize(message.size() - 2); 886 message.resize(message.size() - 2);
886 return message; 887 return message;
887 } 888 }
888 889
889 bool SdpDeserialize(const std::string& message, 890 bool SdpDeserialize(const std::string& message,
890 JsepSessionDescription* jdesc, 891 JsepSessionDescription* jdesc,
891 SdpParseError* error) { 892 SdpParseError* error) {
892 std::string session_id; 893 std::string session_id;
893 std::string session_version; 894 std::string session_version;
894 TransportDescription session_td("", ""); 895 TransportDescription session_td(NS_JINGLE_ICE_UDP,
896 std::string(), std::string());
895 RtpHeaderExtensions session_extmaps; 897 RtpHeaderExtensions session_extmaps;
896 cricket::SessionDescription* desc = new cricket::SessionDescription(); 898 cricket::SessionDescription* desc = new cricket::SessionDescription();
897 std::vector<JsepIceCandidate*> candidates; 899 std::vector<JsepIceCandidate*> candidates;
898 size_t current_pos = 0; 900 size_t current_pos = 0;
899 bool supports_msid = false; 901 bool supports_msid = false;
900 902
901 // Session Description 903 // Session Description
902 if (!ParseSessionDescription(message, &current_pos, &session_id, 904 if (!ParseSessionDescription(message, &current_pos, &session_id,
903 &session_version, &supports_msid, &session_td, 905 &session_version, &supports_msid, &session_td,
904 &session_extmaps, desc, error)) { 906 &session_extmaps, desc, error)) {
(...skipping 1281 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 int pl = 0; 2188 int pl = 0;
2187 if (!GetPayloadTypeFromString(line, fields[j], &pl, error)) { 2189 if (!GetPayloadTypeFromString(line, fields[j], &pl, error)) {
2188 return false; 2190 return false;
2189 } 2191 }
2190 codec_preference.push_back(pl); 2192 codec_preference.push_back(pl);
2191 } 2193 }
2192 } 2194 }
2193 2195
2194 // Make a temporary TransportDescription based on |session_td|. 2196 // Make a temporary TransportDescription based on |session_td|.
2195 // Some of this gets overwritten by ParseContent. 2197 // Some of this gets overwritten by ParseContent.
2196 TransportDescription transport(session_td.transport_options, 2198 TransportDescription transport(NS_JINGLE_ICE_UDP,
2199 session_td.transport_options,
2197 session_td.ice_ufrag, 2200 session_td.ice_ufrag,
2198 session_td.ice_pwd, 2201 session_td.ice_pwd,
2199 session_td.ice_mode, 2202 session_td.ice_mode,
2200 session_td.connection_role, 2203 session_td.connection_role,
2201 session_td.identity_fingerprint.get(), 2204 session_td.identity_fingerprint.get(),
2202 Candidates()); 2205 Candidates());
2203 2206
2204 rtc::scoped_ptr<MediaContentDescription> content; 2207 rtc::scoped_ptr<MediaContentDescription> content;
2205 std::string content_name; 2208 std::string content_name;
2206 if (HasAttribute(line, kMediaTypeVideo)) { 2209 if (HasAttribute(line, kMediaTypeVideo)) {
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
3068 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( 3071 UpdateCodec<AudioContentDescription, cricket::AudioCodec>(
3069 media_desc, payload_type, feedback_param); 3072 media_desc, payload_type, feedback_param);
3070 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { 3073 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) {
3071 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( 3074 UpdateCodec<VideoContentDescription, cricket::VideoCodec>(
3072 media_desc, payload_type, feedback_param); 3075 media_desc, payload_type, feedback_param);
3073 } 3076 }
3074 return true; 3077 return true;
3075 } 3078 }
3076 3079
3077 } // namespace webrtc 3080 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/peerconnectionendtoend_unittest.cc ('k') | talk/app/webrtc/webrtcsdp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698