| 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/video_frame_pump.h" | 5 #include "remoting/protocol/video_frame_pump.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 encode_task_runner_->PostTask( | 105 encode_task_runner_->PostTask( |
| 106 FROM_HERE, base::Bind(&VideoEncoder::SetLosslessColor, | 106 FROM_HERE, base::Bind(&VideoEncoder::SetLosslessColor, |
| 107 base::Unretained(encoder_.get()), want_lossless)); | 107 base::Unretained(encoder_.get()), want_lossless)); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void VideoFramePump::SetSizeCallback(const SizeCallback& size_callback) { | 110 void VideoFramePump::SetSizeCallback(const SizeCallback& size_callback) { |
| 111 DCHECK(thread_checker_.CalledOnValidThread()); | 111 DCHECK(thread_checker_.CalledOnValidThread()); |
| 112 size_callback_ = size_callback; | 112 size_callback_ = size_callback; |
| 113 } | 113 } |
| 114 | 114 |
| 115 webrtc::SharedMemory* VideoFramePump::CreateSharedMemory(size_t size) { | |
| 116 DCHECK(thread_checker_.CalledOnValidThread()); | |
| 117 return nullptr; | |
| 118 } | |
| 119 | |
| 120 void VideoFramePump::OnCaptureCompleted(webrtc::DesktopFrame* frame) { | 115 void VideoFramePump::OnCaptureCompleted(webrtc::DesktopFrame* frame) { |
| 121 DCHECK(thread_checker_.CalledOnValidThread()); | 116 DCHECK(thread_checker_.CalledOnValidThread()); |
| 122 | 117 |
| 123 capture_scheduler_.OnCaptureCompleted(); | 118 capture_scheduler_.OnCaptureCompleted(); |
| 124 | 119 |
| 125 captured_frame_timestamps_->capture_ended_time = base::TimeTicks::Now(); | 120 captured_frame_timestamps_->capture_ended_time = base::TimeTicks::Now(); |
| 126 | 121 |
| 127 if (frame) { | 122 if (frame) { |
| 128 webrtc::DesktopVector dpi = | 123 webrtc::DesktopVector dpi = |
| 129 frame->dpi().is_zero() ? webrtc::DesktopVector(kDefaultDpi, kDefaultDpi) | 124 frame->dpi().is_zero() ? webrtc::DesktopVector(kDefaultDpi, kDefaultDpi) |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } | 265 } |
| 271 | 266 |
| 272 void VideoFramePump::OnKeepAlivePacketSent() { | 267 void VideoFramePump::OnKeepAlivePacketSent() { |
| 273 DCHECK(thread_checker_.CalledOnValidThread()); | 268 DCHECK(thread_checker_.CalledOnValidThread()); |
| 274 | 269 |
| 275 keep_alive_timer_.Reset(); | 270 keep_alive_timer_.Reset(); |
| 276 } | 271 } |
| 277 | 272 |
| 278 } // namespace protocol | 273 } // namespace protocol |
| 279 } // namespace remoting | 274 } // namespace remoting |
| OLD | NEW |