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

Side by Side Diff: remoting/protocol/video_frame_pump.cc

Issue 1462063004: Move VideoFramePump to remoting/protocol (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/video_frame_pump.h ('k') | remoting/protocol/video_frame_pump_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/host/video_frame_pump.h" 5 #include "remoting/protocol/video_frame_pump.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "base/task_runner_util.h" 14 #include "base/task_runner_util.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "remoting/proto/control.pb.h" 16 #include "remoting/proto/control.pb.h"
17 #include "remoting/proto/video.pb.h" 17 #include "remoting/proto/video.pb.h"
18 #include "remoting/protocol/video_stub.h" 18 #include "remoting/protocol/video_stub.h"
19 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h" 19 #include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
20 20
21 namespace remoting { 21 namespace remoting {
22 namespace protocol {
22 23
23 // Interval between empty keep-alive frames. These frames are sent only when the 24 // Interval between empty keep-alive frames. These frames are sent only when the
24 // stream is paused or inactive for some other reason (e.g. when blocked on 25 // stream is paused or inactive for some other reason (e.g. when blocked on
25 // capturer). To prevent PseudoTCP from resetting congestion window this value 26 // capturer). To prevent PseudoTCP from resetting congestion window this value
26 // must be smaller than the minimum RTO used in PseudoTCP, which is 250ms. 27 // must be smaller than the minimum RTO used in PseudoTCP, which is 250ms.
27 static const int kKeepAlivePacketIntervalMs = 200; 28 static const int kKeepAlivePacketIntervalMs = 200;
28 29
29 static bool g_enable_timestamps = false; 30 static bool g_enable_timestamps = false;
30 31
31 VideoFramePump::FrameTimestamps::FrameTimestamps() {} 32 VideoFramePump::FrameTimestamps::FrameTimestamps() {}
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 base::Bind(&VideoFramePump::OnKeepAlivePacketSent, 247 base::Bind(&VideoFramePump::OnKeepAlivePacketSent,
247 weak_factory_.GetWeakPtr())); 248 weak_factory_.GetWeakPtr()));
248 } 249 }
249 250
250 void VideoFramePump::OnKeepAlivePacketSent() { 251 void VideoFramePump::OnKeepAlivePacketSent() {
251 DCHECK(thread_checker_.CalledOnValidThread()); 252 DCHECK(thread_checker_.CalledOnValidThread());
252 253
253 keep_alive_timer_.Reset(); 254 keep_alive_timer_.Reset();
254 } 255 }
255 256
257 } // namespace protocol
256 } // namespace remoting 258 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/video_frame_pump.h ('k') | remoting/protocol/video_frame_pump_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698