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.h" | 8 #include "base/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "media/video/capture/screen/screen_capture_data.h" | 10 #include "media/video/capture/screen/screen_capture_data.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 void StartVideoScheduler(scoped_ptr<media::ScreenCapturer> capturer); | 77 void StartVideoScheduler(scoped_ptr<media::ScreenCapturer> capturer); |
78 void StopVideoScheduler(); | 78 void StopVideoScheduler(); |
79 | 79 |
80 // media::ScreenCapturer mocks. | 80 // media::ScreenCapturer mocks. |
81 void OnCapturerStart(media::ScreenCapturer::Delegate* delegate); | 81 void OnCapturerStart(media::ScreenCapturer::Delegate* delegate); |
82 void OnCapturerStop(); | 82 void OnCapturerStop(); |
83 void OnCaptureFrame(); | 83 void OnCaptureFrame(); |
84 | 84 |
85 protected: | 85 protected: |
86 MessageLoop message_loop_; | 86 base::MessageLoop message_loop_; |
87 base::RunLoop run_loop_; | 87 base::RunLoop run_loop_; |
88 scoped_refptr<AutoThreadTaskRunner> task_runner_; | 88 scoped_refptr<AutoThreadTaskRunner> task_runner_; |
89 scoped_refptr<VideoScheduler> scheduler_; | 89 scoped_refptr<VideoScheduler> scheduler_; |
90 | 90 |
91 MockClientStub client_stub_; | 91 MockClientStub client_stub_; |
92 MockVideoStub video_stub_; | 92 MockVideoStub video_stub_; |
93 | 93 |
94 // The following mock objects are owned by VideoScheduler. | 94 // The following mock objects are owned by VideoScheduler. |
95 MockVideoEncoder* encoder_; | 95 MockVideoEncoder* encoder_; |
96 | 96 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 .RetiresOnSaturation(); | 188 .RetiresOnSaturation(); |
189 | 189 |
190 // Start video frame capture. | 190 // Start video frame capture. |
191 StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>()); | 191 StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>()); |
192 | 192 |
193 task_runner_ = NULL; | 193 task_runner_ = NULL; |
194 run_loop_.Run(); | 194 run_loop_.Run(); |
195 } | 195 } |
196 | 196 |
197 } // namespace remoting | 197 } // namespace remoting |
OLD | NEW |