OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 } | 142 } |
143 else | 143 else |
144 { | 144 { |
145 constraints.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 145 constraints.AddOptional(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
146 "false"); | 146 "false"); |
147 } | 147 } |
148 | 148 |
149 peer_connection_ = | 149 peer_connection_ = |
150 peer_connection_factory_->CreatePeerConnection(servers, | 150 peer_connection_factory_->CreatePeerConnection(servers, |
151 &constraints, | 151 &constraints, |
152 NULL, | 152 nullptr, |
153 NULL, | 153 this, |
154 this); | 154 nullptr); |
155 return peer_connection_.get() != NULL; | 155 return peer_connection_.get() != NULL; |
156 } | 156 } |
157 | 157 |
158 void Conductor::DeletePeerConnection() { | 158 void Conductor::DeletePeerConnection() { |
159 peer_connection_ = NULL; | 159 peer_connection_ = NULL; |
160 active_streams_.clear(); | 160 active_streams_.clear(); |
161 main_wnd_->StopLocalRenderer(); | 161 main_wnd_->StopLocalRenderer(); |
162 main_wnd_->StopRemoteRenderer(); | 162 main_wnd_->StopRemoteRenderer(); |
163 peer_connection_factory_ = NULL; | 163 peer_connection_factory_ = NULL; |
164 peer_id_ = -1; | 164 peer_id_ = -1; |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 } | 550 } |
551 | 551 |
552 void Conductor::OnFailure(const std::string& error) { | 552 void Conductor::OnFailure(const std::string& error) { |
553 LOG(LERROR) << error; | 553 LOG(LERROR) << error; |
554 } | 554 } |
555 | 555 |
556 void Conductor::SendMessage(const std::string& json_object) { | 556 void Conductor::SendMessage(const std::string& json_object) { |
557 std::string* msg = new std::string(json_object); | 557 std::string* msg = new std::string(json_object); |
558 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); | 558 main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, msg); |
559 } | 559 } |
OLD | NEW |