| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2013 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 |
| 11 #include "webrtc/api/webrtcsessiondescriptionfactory.h" | 11 #include "webrtc/api/webrtcsessiondescriptionfactory.h" |
| 12 | 12 |
| 13 #include <utility> | 13 #include <utility> |
| 14 | 14 |
| 15 #include "webrtc/api/jsep.h" | 15 #include "webrtc/api/jsep.h" |
| 16 #include "webrtc/api/jsepsessiondescription.h" | 16 #include "webrtc/api/jsepsessiondescription.h" |
| 17 #include "webrtc/api/mediaconstraintsinterface.h" | 17 #include "webrtc/api/mediaconstraintsinterface.h" |
| 18 #include "webrtc/api/webrtcsession.h" | 18 #include "webrtc/api/webrtcsession.h" |
| 19 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/base/sslidentity.h" | 20 #include "webrtc/base/sslidentity.h" |
| 20 | 21 |
| 21 using cricket::MediaSessionOptions; | 22 using cricket::MediaSessionOptions; |
| 22 | 23 |
| 23 namespace webrtc { | 24 namespace webrtc { |
| 24 namespace { | 25 namespace { |
| 25 static const char kFailedDueToIdentityFailed[] = | 26 static const char kFailedDueToIdentityFailed[] = |
| 26 " failed because DTLS identity request failed"; | 27 " failed because DTLS identity request failed"; |
| 27 static const char kFailedDueToSessionShutdown[] = | 28 static const char kFailedDueToSessionShutdown[] = |
| 28 " failed because the session was shut down"; | 29 " failed because the session was shut down"; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 case MSG_USE_CONSTRUCTOR_CERTIFICATE: { | 325 case MSG_USE_CONSTRUCTOR_CERTIFICATE: { |
| 325 rtc::ScopedRefMessageData<rtc::RTCCertificate>* param = | 326 rtc::ScopedRefMessageData<rtc::RTCCertificate>* param = |
| 326 static_cast<rtc::ScopedRefMessageData<rtc::RTCCertificate>*>( | 327 static_cast<rtc::ScopedRefMessageData<rtc::RTCCertificate>*>( |
| 327 msg->pdata); | 328 msg->pdata); |
| 328 LOG(LS_INFO) << "Using certificate supplied to the constructor."; | 329 LOG(LS_INFO) << "Using certificate supplied to the constructor."; |
| 329 SetCertificate(param->data()); | 330 SetCertificate(param->data()); |
| 330 delete param; | 331 delete param; |
| 331 break; | 332 break; |
| 332 } | 333 } |
| 333 default: | 334 default: |
| 334 ASSERT(false); | 335 RTC_NOTREACHED(); |
| 335 break; | 336 break; |
| 336 } | 337 } |
| 337 } | 338 } |
| 338 | 339 |
| 339 void WebRtcSessionDescriptionFactory::InternalCreateOffer( | 340 void WebRtcSessionDescriptionFactory::InternalCreateOffer( |
| 340 CreateSessionDescriptionRequest request) { | 341 CreateSessionDescriptionRequest request) { |
| 341 if (session_->local_description()) { | 342 if (session_->local_description()) { |
| 342 for (const cricket::TransportInfo& transport : | 343 for (const cricket::TransportInfo& transport : |
| 343 session_->local_description()->description()->transport_infos()) { | 344 session_->local_description()->description()->transport_infos()) { |
| 344 // If the needs-ice-restart flag is set as described by JSEP, we should | 345 // If the needs-ice-restart flag is set as described by JSEP, we should |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 if (create_session_description_requests_.front().type == | 501 if (create_session_description_requests_.front().type == |
| 501 CreateSessionDescriptionRequest::kOffer) { | 502 CreateSessionDescriptionRequest::kOffer) { |
| 502 InternalCreateOffer(create_session_description_requests_.front()); | 503 InternalCreateOffer(create_session_description_requests_.front()); |
| 503 } else { | 504 } else { |
| 504 InternalCreateAnswer(create_session_description_requests_.front()); | 505 InternalCreateAnswer(create_session_description_requests_.front()); |
| 505 } | 506 } |
| 506 create_session_description_requests_.pop(); | 507 create_session_description_requests_.pop(); |
| 507 } | 508 } |
| 508 } | 509 } |
| 509 } // namespace webrtc | 510 } // namespace webrtc |
| OLD | NEW |