Readability review.
These CLs implement a simple frame recording and fetch "extension" for the Chromoting protocol, to allow sample sessions to be captured for performance testing.
The three main classes introduced are:
- HostExtensionSessionManager
This pulls logic for handling Chromoting extensions out of
ClientSession instances into a dedicated manager class.
It also introduces hooks through which extensions can
wrap or replace the Chromoting video encoder or capturer.
- VideoFrameRecorder
This allows a VideoEncoder to be wrapped to return a new
encoder that will optionally copy & deliver frames to the
VideoFrameRecorder before supplying them to the real
encoder.
- VideoFrameRecorderHostExtension
This extension uses a VideoFrameRecorder to allow a
connected client to start/stop recording, and to retrieve
the resulting frame data.
Original CLs:
crrev.com/402233003
crrev.com/339073002
crrev.com/372943002
crrev.com/462503002
BUG=260879
Review URL: https://codereview.chromium.org/468613002
Cr-Commit-Position: refs/heads/master@{#292541}
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc
index d741e1c..2af7f68 100644
--- a/remoting/host/client_session.cc
+++ b/remoting/host/client_session.cc
@@ -456,11 +456,11 @@
// Create VideoEncoder and DesktopCapturer to match the session's video
// channel configuration.
scoped_ptr<webrtc::DesktopCapturer> video_capturer =
- extension_manager_->OnCreateVideoCapturer(
- desktop_environment_->CreateVideoCapturer());
+ desktop_environment_->CreateVideoCapturer();
+ extension_manager_->OnCreateVideoCapturer(&video_capturer);
scoped_ptr<VideoEncoder> video_encoder =
- extension_manager_->OnCreateVideoEncoder(
- CreateVideoEncoder(connection_->session()->config()));
+ CreateVideoEncoder(connection_->session()->config());
+ extension_manager_->OnCreateVideoEncoder(&video_encoder);
// Don't start the VideoScheduler if either capturer or encoder are missing.
if (!video_capturer || !video_encoder)