Index: remoting/protocol/fake_connection_to_client.cc |
diff --git a/remoting/protocol/fake_connection_to_client.cc b/remoting/protocol/fake_connection_to_client.cc |
index 8d115f5a38255e8fa32987b77eb747464fe04861..6c622d884ef7095df39d2c15b50647de5ff2db2e 100644 |
--- a/remoting/protocol/fake_connection_to_client.cc |
+++ b/remoting/protocol/fake_connection_to_client.cc |
@@ -6,7 +6,9 @@ |
#include <utility> |
+#include "remoting/codec/video_encoder.h" |
#include "remoting/protocol/session.h" |
+#include "remoting/protocol/video_frame_pump.h" |
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h" |
namespace remoting { |
@@ -42,6 +44,19 @@ void FakeConnectionToClient::SetEventHandler(EventHandler* event_handler) { |
std::unique_ptr<VideoStream> FakeConnectionToClient::StartVideoStream( |
std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer) { |
+ if (video_stub_ && video_encode_task_runner_) { |
+ std::unique_ptr<VideoEncoder> video_encoder = |
+ VideoEncoder::Create(session_->config()); |
+ |
+ std::unique_ptr<protocol::VideoFramePump> pump( |
+ new protocol::VideoFramePump(video_encode_task_runner_, |
+ std::move(desktop_capturer), |
+ std::move(video_encoder), |
+ video_stub_)); |
+ video_feedback_stub_ = pump->video_feedback_stub(); |
+ return std::move(pump); |
+ } |
+ |
std::unique_ptr<FakeVideoStream> result(new FakeVideoStream()); |
last_video_stream_ = result->GetWeakPtr(); |
return std::move(result); |