| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/protocol/ice_connection_to_host.h" | 5 #include "remoting/protocol/ice_connection_to_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 // Configure video pipeline. | 113 // Configure video pipeline. |
| 114 video_renderer_->OnSessionConfig(session_->config()); | 114 video_renderer_->OnSessionConfig(session_->config()); |
| 115 monitored_video_stub_.reset(new MonitoredVideoStub( | 115 monitored_video_stub_.reset(new MonitoredVideoStub( |
| 116 video_renderer_->GetVideoStub(), | 116 video_renderer_->GetVideoStub(), |
| 117 base::TimeDelta::FromSeconds( | 117 base::TimeDelta::FromSeconds( |
| 118 MonitoredVideoStub::kConnectivityCheckDelaySeconds), | 118 MonitoredVideoStub::kConnectivityCheckDelaySeconds), |
| 119 base::Bind(&IceConnectionToHost::OnVideoChannelStatus, | 119 base::Bind(&IceConnectionToHost::OnVideoChannelStatus, |
| 120 base::Unretained(this)))); | 120 base::Unretained(this)))); |
| 121 video_dispatcher_.reset( | 121 video_dispatcher_.reset( |
| 122 new ClientVideoDispatcher(monitored_video_stub_.get())); | 122 new ClientVideoDispatcher(monitored_video_stub_.get(), client_stub_)); |
| 123 video_dispatcher_->Init(transport_->GetChannelFactory(), this); | 123 video_dispatcher_->Init(transport_->GetChannelFactory(), this); |
| 124 | 124 |
| 125 // Configure audio pipeline if necessary. | 125 // Configure audio pipeline if necessary. |
| 126 if (session_->config().is_audio_enabled()) { | 126 if (session_->config().is_audio_enabled()) { |
| 127 audio_reader_.reset(new AudioReader(audio_stub_)); | 127 audio_reader_.reset(new AudioReader(audio_stub_)); |
| 128 audio_reader_->Init(transport_->GetMultiplexedChannelFactory(), this); | 128 audio_reader_->Init(transport_->GetMultiplexedChannelFactory(), this); |
| 129 } | 129 } |
| 130 break; | 130 break; |
| 131 | 131 |
| 132 case Session::CLOSED: | 132 case Session::CLOSED: |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 if (state != state_) { | 213 if (state != state_) { |
| 214 state_ = state; | 214 state_ = state; |
| 215 error_ = error; | 215 error_ = error; |
| 216 event_callback_->OnConnectionState(state_, error_); | 216 event_callback_->OnConnectionState(state_, error_); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 } // namespace protocol | 220 } // namespace protocol |
| 221 } // namespace remoting | 221 } // namespace remoting |
| OLD | NEW |