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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 base::Unretained(this))), | 59 base::Unretained(this))), |
60 weak_factory_(this) { | 60 weak_factory_(this) { |
61 DCHECK(encoder_); | 61 DCHECK(encoder_); |
62 DCHECK(video_stub_); | 62 DCHECK(video_stub_); |
63 | 63 |
64 capturer_->Start(this); | 64 capturer_->Start(this); |
65 capture_scheduler_.Start(); | 65 capture_scheduler_.Start(); |
66 } | 66 } |
67 | 67 |
68 VideoFramePump::~VideoFramePump() { | 68 VideoFramePump::~VideoFramePump() { |
| 69 DCHECK(thread_checker_.CalledOnValidThread()); |
69 encode_task_runner_->DeleteSoon(FROM_HERE, encoder_.release()); | 70 encode_task_runner_->DeleteSoon(FROM_HERE, encoder_.release()); |
70 } | 71 } |
71 | 72 |
72 void VideoFramePump::SetEventTimestampsSource( | 73 void VideoFramePump::SetEventTimestampsSource( |
73 scoped_refptr<InputEventTimestampsSource> event_timestamps_source) { | 74 scoped_refptr<InputEventTimestampsSource> event_timestamps_source) { |
74 DCHECK(thread_checker_.CalledOnValidThread()); | 75 DCHECK(thread_checker_.CalledOnValidThread()); |
75 | 76 |
76 event_timestamps_source_ = event_timestamps_source; | 77 event_timestamps_source_ = event_timestamps_source; |
77 } | 78 } |
78 | 79 |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 } | 256 } |
256 | 257 |
257 void VideoFramePump::OnKeepAlivePacketSent() { | 258 void VideoFramePump::OnKeepAlivePacketSent() { |
258 DCHECK(thread_checker_.CalledOnValidThread()); | 259 DCHECK(thread_checker_.CalledOnValidThread()); |
259 | 260 |
260 keep_alive_timer_.Reset(); | 261 keep_alive_timer_.Reset(); |
261 } | 262 } |
262 | 263 |
263 } // namespace protocol | 264 } // namespace protocol |
264 } // namespace remoting | 265 } // namespace remoting |
OLD | NEW |