Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(132)

Unified Diff: remoting/protocol/video_frame_pump.cc

Issue 2050353002: Update webrtc::DesktopCapturer clients to implement OnCaptureResult(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
Jamie 2016/06/14 21:22:44 Should this and similar TODOs have tracking bugs?
Sergey Ulanov 2016/06/15 20:30:10 I removed the TODO in this file - it will be remov
+
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()));
}

Powered by Google App Engine
This is Rietveld 408576698