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, &constraints, NULL, NULL, this); | 132 config, |
| 133 &constraints, |
| 134 nullptr, |
| 135 std::unique_ptr<rtc::RTCCertificateGeneratorInterface>(), |
| 136 this); |
133 return peer_connection_.get() != NULL; | 137 return peer_connection_.get() != NULL; |
134 } | 138 } |
135 | 139 |
136 void Conductor::DeletePeerConnection() { | 140 void Conductor::DeletePeerConnection() { |
137 peer_connection_ = NULL; | 141 peer_connection_ = NULL; |
138 active_streams_.clear(); | 142 active_streams_.clear(); |
139 main_wnd_->StopLocalRenderer(); | 143 main_wnd_->StopLocalRenderer(); |
140 main_wnd_->StopRemoteRenderer(); | 144 main_wnd_->StopRemoteRenderer(); |
141 peer_connection_factory_ = NULL; | 145 peer_connection_factory_ = NULL; |
142 peer_id_ = -1; | 146 peer_id_ = -1; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 } | 544 } |
541 | 545 |
542 void Conductor::OnFailure(const std::string& error) { | 546 void Conductor::OnFailure(const std::string& error) { |
543 LOG(LERROR) << error; | 547 LOG(LERROR) << error; |
544 } | 548 } |
545 | 549 |
546 void Conductor::SendMessage(const std::string& json_object) { | 550 void Conductor::SendMessage(const std::string& json_object) { |
547 std::string* msg = new std::string(json_object); | 551 std::string* msg = new std::string(json_object); |
548 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); | 552 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); |
549 } | 553 } |
OLD | NEW |