Index: remoting/protocol/video_frame_pump.cc |
diff --git a/remoting/protocol/video_frame_pump.cc b/remoting/protocol/video_frame_pump.cc |
index ab98abcc84048ea4d6d056e6fb4160bc965ab7c3..cd115cf3ac8a54eb6b9fff31e88ff79eafea440e 100644 |
--- a/remoting/protocol/video_frame_pump.cc |
+++ b/remoting/protocol/video_frame_pump.cc |
@@ -112,13 +112,17 @@ void VideoFramePump::SetSizeCallback(const SizeCallback& size_callback) { |
size_callback_ = size_callback; |
} |
-void VideoFramePump::OnCaptureCompleted(webrtc::DesktopFrame* frame) { |
+void VideoFramePump::OnCaptureResult( |
+ webrtc::DesktopCapturer::Result result, |
+ std::unique_ptr<webrtc::DesktopFrame> frame) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
capture_scheduler_.OnCaptureCompleted(); |
captured_frame_timestamps_->capture_ended_time = base::TimeTicks::Now(); |
+ // TODO(sergeyu): Handle ERROR_PERMANENT result. |
+ |
if (frame) { |
webrtc::DesktopVector dpi = |
frame->dpi().is_zero() ? webrtc::DesktopVector(kDefaultDpi, kDefaultDpi) |
@@ -137,7 +141,7 @@ void VideoFramePump::OnCaptureCompleted(webrtc::DesktopFrame* frame) { |
base::PostTaskAndReplyWithResult( |
encode_task_runner_.get(), FROM_HERE, |
base::Bind(&VideoFramePump::EncodeFrame, encoder_.get(), |
- base::Passed(base::WrapUnique(frame)), |
+ base::Passed(&frame), |
base::Passed(&captured_frame_timestamps_)), |
base::Bind(&VideoFramePump::OnFrameEncoded, weak_factory_.GetWeakPtr())); |
} |