OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 webrtc::FakeConstraints constraints; | 122 webrtc::FakeConstraints constraints; |
123 if (dtls) { | 123 if (dtls) { |
124 constraints.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 124 constraints.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
125 "true"); | 125 "true"); |
126 } else { | 126 } else { |
127 constraints.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 127 constraints.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
128 "false"); | 128 "false"); |
129 } | 129 } |
130 | 130 |
131 peer_connection_ = peer_connection_factory_->CreatePeerConnection( | 131 peer_connection_ = peer_connection_factory_->CreatePeerConnection( |
132 config, | 132 config, &constraints, NULL, NULL, this); |
133 &constraints, | |
134 nullptr, | |
135 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>(), | |
136 this); | |
137 return peer_connection_.get() != NULL; | 133 return peer_connection_.get() != NULL; |
138 } | 134 } |
139 | 135 |
140 void Conductor::DeletePeerConnection() { | 136 void Conductor::DeletePeerConnection() { |
141 peer_connection_ = NULL; | 137 peer_connection_ = NULL; |
142 active_streams_.clear(); | 138 active_streams_.clear(); |
143 main_wnd_->StopLocalRenderer(); | 139 main_wnd_->StopLocalRenderer(); |
144 main_wnd_->StopRemoteRenderer(); | 140 main_wnd_->StopRemoteRenderer(); |
145 peer_connection_factory_ = NULL; | 141 peer_connection_factory_ = NULL; |
146 peer_id_ = -1; | 142 peer_id_ = -1; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 } | 540 } |
545 | 541 |
546 void Conductor::OnFailure(const std::string& error) { | 542 void Conductor::OnFailure(const std::string& error) { |
547 LOG(LERROR) << error; | 543 LOG(LERROR) << error; |
548 } | 544 } |
549 | 545 |
550 void Conductor::SendMessage(const std::string& json_object) { | 546 void Conductor::SendMessage(const std::string& json_object) { |
551 std::string* msg = new std::string(json_object); | 547 std::string* msg = new std::string(json_object); |
552 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); | 548 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); |
553 } | 549 } |
OLD | NEW |