| Index: webrtc/examples/peerconnection/client/conductor.cc
|
| diff --git a/webrtc/examples/peerconnection/client/conductor.cc b/webrtc/examples/peerconnection/client/conductor.cc
|
| index 8c288ebf266dc374a29965a26e9855240b8775e1..c74f7c28d991e7a486f735198e20647a171caf48 100644
|
| --- a/webrtc/examples/peerconnection/client/conductor.cc
|
| +++ b/webrtc/examples/peerconnection/client/conductor.cc
|
| @@ -63,11 +63,11 @@ Conductor::Conductor(PeerConnectionClient* client, MainWindow* main_wnd)
|
| }
|
|
|
| Conductor::~Conductor() {
|
| - RTC_DCHECK(peer_connection_.get() == NULL);
|
| + RTC_DCHECK(peer_connection_.get() == nullptr);
|
| }
|
|
|
| bool Conductor::connection_active() const {
|
| - return peer_connection_.get() != NULL;
|
| + return peer_connection_.get() != nullptr;
|
| }
|
|
|
| void Conductor::Close() {
|
| @@ -76,8 +76,8 @@ void Conductor::Close() {
|
| }
|
|
|
| bool Conductor::InitializePeerConnection() {
|
| - RTC_DCHECK(peer_connection_factory_.get() == NULL);
|
| - RTC_DCHECK(peer_connection_.get() == NULL);
|
| + RTC_DCHECK(peer_connection_factory_.get() == nullptr);
|
| + RTC_DCHECK(peer_connection_.get() == nullptr);
|
|
|
| peer_connection_factory_ = webrtc::CreatePeerConnectionFactory();
|
|
|
| @@ -94,25 +94,25 @@ bool Conductor::InitializePeerConnection() {
|
| DeletePeerConnection();
|
| }
|
| AddStreams();
|
| - return peer_connection_.get() != NULL;
|
| + return peer_connection_.get() != nullptr;
|
| }
|
|
|
| bool Conductor::ReinitializePeerConnectionForLoopback() {
|
| loopback_ = true;
|
| rtc::scoped_refptr<webrtc::StreamCollectionInterface> streams(
|
| peer_connection_->local_streams());
|
| - peer_connection_ = NULL;
|
| + peer_connection_ = nullptr;
|
| if (CreatePeerConnection(DTLS_OFF)) {
|
| for (size_t i = 0; i < streams->count(); ++i)
|
| peer_connection_->AddStream(streams->at(i));
|
| - peer_connection_->CreateOffer(this, NULL);
|
| + peer_connection_->CreateOffer(this, nullptr);
|
| }
|
| - return peer_connection_.get() != NULL;
|
| + return peer_connection_.get() != nullptr;
|
| }
|
|
|
| bool Conductor::CreatePeerConnection(bool dtls) {
|
| - RTC_DCHECK(peer_connection_factory_.get() != NULL);
|
| - RTC_DCHECK(peer_connection_.get() == NULL);
|
| + RTC_DCHECK(peer_connection_factory_.get() != nullptr);
|
| + RTC_DCHECK(peer_connection_.get() == nullptr);
|
|
|
| webrtc::PeerConnectionInterface::RTCConfiguration config;
|
| webrtc::PeerConnectionInterface::IceServer server;
|
| @@ -129,22 +129,22 @@ bool Conductor::CreatePeerConnection(bool dtls) {
|
| }
|
|
|
| peer_connection_ = peer_connection_factory_->CreatePeerConnection(
|
| - config, &constraints, NULL, NULL, this);
|
| - return peer_connection_.get() != NULL;
|
| + config, &constraints, nullptr, nullptr, this);
|
| + return peer_connection_.get() != nullptr;
|
| }
|
|
|
| void Conductor::DeletePeerConnection() {
|
| - peer_connection_ = NULL;
|
| + peer_connection_ = nullptr;
|
| active_streams_.clear();
|
| main_wnd_->StopLocalRenderer();
|
| main_wnd_->StopRemoteRenderer();
|
| - peer_connection_factory_ = NULL;
|
| + peer_connection_factory_ = nullptr;
|
| peer_id_ = -1;
|
| loopback_ = false;
|
| }
|
|
|
| void Conductor::EnsureStreamingUI() {
|
| - RTC_DCHECK(peer_connection_.get() != NULL);
|
| + RTC_DCHECK(peer_connection_.get() != nullptr);
|
| if (main_wnd_->IsWindow()) {
|
| if (main_wnd_->current_ui() != MainWindow::STREAMING)
|
| main_wnd_->SwitchToStreamingUI();
|
| @@ -221,7 +221,7 @@ void Conductor::OnPeerDisconnected(int id) {
|
| LOG(INFO) << __FUNCTION__;
|
| if (id == peer_id_) {
|
| LOG(INFO) << "Our peer disconnected";
|
| - main_wnd_->QueueUIThreadCallback(PEER_CONNECTION_CLOSED, NULL);
|
| + main_wnd_->QueueUIThreadCallback(PEER_CONNECTION_CLOSED, nullptr);
|
| } else {
|
| // Refresh the list if we're showing it.
|
| if (main_wnd_->current_ui() == MainWindow::LIST_PEERS)
|
| @@ -290,7 +290,7 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
|
| DummySetSessionDescriptionObserver::Create(), session_description);
|
| if (session_description->type() ==
|
| webrtc::SessionDescriptionInterface::kOffer) {
|
| - peer_connection_->CreateAnswer(this, NULL);
|
| + peer_connection_->CreateAnswer(this, nullptr);
|
| }
|
| return;
|
| } else {
|
| @@ -324,7 +324,7 @@ void Conductor::OnMessageFromPeer(int peer_id, const std::string& message) {
|
|
|
| void Conductor::OnMessageSent(int err) {
|
| // Process the next pending message if any.
|
| - main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, NULL);
|
| + main_wnd_->QueueUIThreadCallback(SEND_MESSAGE_TO_PEER, nullptr);
|
| }
|
|
|
| void Conductor::OnServerConnectionFailure() {
|
| @@ -360,7 +360,7 @@ void Conductor::ConnectToPeer(int peer_id) {
|
|
|
| if (InitializePeerConnection()) {
|
| peer_id_ = peer_id;
|
| - peer_connection_->CreateOffer(this, NULL);
|
| + peer_connection_->CreateOffer(this, nullptr);
|
| } else {
|
| main_wnd_->MessageBox("Error", "Failed to initialize PeerConnection", true);
|
| }
|
| @@ -402,13 +402,12 @@ void Conductor::AddStreams() {
|
|
|
| rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
|
| peer_connection_factory_->CreateAudioTrack(
|
| - kAudioLabel, peer_connection_factory_->CreateAudioSource(NULL)));
|
| + kAudioLabel, peer_connection_factory_->CreateAudioSource(nullptr)));
|
|
|
| rtc::scoped_refptr<webrtc::VideoTrackInterface> video_track(
|
| peer_connection_factory_->CreateVideoTrack(
|
| - kVideoLabel,
|
| - peer_connection_factory_->CreateVideoSource(OpenVideoCaptureDevice(),
|
| - NULL)));
|
| + kVideoLabel, peer_connection_factory_->CreateVideoSource(
|
| + OpenVideoCaptureDevice(), nullptr)));
|
| main_wnd_->StartLocalRenderer(video_track);
|
|
|
| rtc::scoped_refptr<webrtc::MediaStreamInterface> stream =
|
|
|