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

Side by Side Diff: remoting/host/video_scheduler_unittest.cc

Issue 850983002: Implement video frame acknowledgements in the chromoting protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_scheduler.h" 5 #include "remoting/host/video_scheduler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 namespace remoting { 42 namespace remoting {
43 43
44 namespace { 44 namespace {
45 45
46 ACTION(FinishEncode) { 46 ACTION(FinishEncode) {
47 scoped_ptr<VideoPacket> packet(new VideoPacket()); 47 scoped_ptr<VideoPacket> packet(new VideoPacket());
48 return packet.release(); 48 return packet.release();
49 } 49 }
50 50
51 ACTION(FinishSend) { 51 ACTION(FinishSend) {
52 arg1.Run(); 52 arg1.Run(protocol::VideoStub::PacketProgress::SENT);
53 arg1.Run(protocol::VideoStub::PacketProgress::DONE);
53 } 54 }
54 55
55 } // namespace 56 } // namespace
56 57
57 static const int kWidth = 640; 58 static const int kWidth = 640;
58 static const int kHeight = 480; 59 static const int kHeight = 480;
59 static const int kCursorWidth = 64; 60 static const int kCursorWidth = 64;
60 static const int kCursorHeight = 32; 61 static const int kCursorHeight = 32;
61 static const int kHotspotX = 11; 62 static const int kHotspotX = 11;
62 static const int kHotspotY = 12; 63 static const int kHotspotY = 12;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 new ThreadCheckMouseCursorMonitor(capture_task_runner_)); 339 new ThreadCheckMouseCursorMonitor(capture_task_runner_));
339 340
340 // Start and stop the scheduler, so it will tear down the screen capturer, 341 // Start and stop the scheduler, so it will tear down the screen capturer,
341 // video encoder and mouse monitor. 342 // video encoder and mouse monitor.
342 StartVideoScheduler(capturer.Pass(), encoder.Pass(), 343 StartVideoScheduler(capturer.Pass(), encoder.Pass(),
343 mouse_cursor_monitor.Pass()); 344 mouse_cursor_monitor.Pass());
344 StopVideoScheduler(); 345 StopVideoScheduler();
345 } 346 }
346 347
347 } // namespace remoting 348 } // namespace remoting
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698