| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |