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

Side by Side Diff: remoting/host/video_scheduler.h

Issue 11470028: Move screen capturers to remoting/capturer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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 #ifndef REMOTING_HOST_VIDEO_SCHEDULER_H_ 5 #ifndef REMOTING_HOST_VIDEO_SCHEDULER_H_
6 #define REMOTING_HOST_VIDEO_SCHEDULER_H_ 6 #define REMOTING_HOST_VIDEO_SCHEDULER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "base/timer.h" 15 #include "base/timer.h"
16 #include "remoting/capturer/video_frame_capturer.h"
16 #include "remoting/codec/video_encoder.h" 17 #include "remoting/codec/video_encoder.h"
17 #include "remoting/host/capture_scheduler.h" 18 #include "remoting/host/capture_scheduler.h"
18 #include "remoting/host/video_frame_capturer.h"
19 #include "remoting/proto/video.pb.h" 19 #include "remoting/proto/video.pb.h"
20 20
21 namespace base { 21 namespace base {
22 class SingleThreadTaskRunner; 22 class SingleThreadTaskRunner;
23 } // namespace base 23 } // namespace base
24 24
25 namespace remoting { 25 namespace remoting {
26 26
27 class CaptureData; 27 class CaptureData;
28 class CursorShapeInfo;
28 class VideoFrameCapturer; 29 class VideoFrameCapturer;
29 30
30 namespace protocol { 31 namespace protocol {
31 class ClientStub; 32 class ClientStub;
32 class CursorShapeInfo; 33 class CursorShapeInfo;
33 class VideoStub; 34 class VideoStub;
34 } // namespace protocol 35 } // namespace protocol
35 36
36 // Class responsible for scheduling frame captures from a VideoFrameCapturer, 37 // Class responsible for scheduling frame captures from a VideoFrameCapturer,
37 // delivering them to a VideoEncoder to encode, and finally passing the encoded 38 // delivering them to a VideoEncoder to encode, and finally passing the encoded
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, 84 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
84 VideoFrameCapturer* capturer, 85 VideoFrameCapturer* capturer,
85 scoped_ptr<VideoEncoder> encoder, 86 scoped_ptr<VideoEncoder> encoder,
86 protocol::ClientStub* client_stub, 87 protocol::ClientStub* client_stub,
87 protocol::VideoStub* video_stub); 88 protocol::VideoStub* video_stub);
88 89
89 // VideoFrameCapturer::Delegate implementation. 90 // VideoFrameCapturer::Delegate implementation.
90 virtual void OnCaptureCompleted( 91 virtual void OnCaptureCompleted(
91 scoped_refptr<CaptureData> capture_data) OVERRIDE; 92 scoped_refptr<CaptureData> capture_data) OVERRIDE;
92 virtual void OnCursorShapeChanged( 93 virtual void OnCursorShapeChanged(
93 scoped_ptr<protocol::CursorShapeInfo> cursor_shape) OVERRIDE; 94 const MouseCursorShape& cursor_shape) OVERRIDE;
94 95
95 // Stop scheduling frame captures. |done_task| is executed on the network 96 // Stop scheduling frame captures. |done_task| is executed on the network
96 // thread when capturing has stopped. This object cannot be re-used once 97 // thread when capturing has stopped. This object cannot be re-used once
97 // it has been stopped. 98 // it has been stopped.
98 void Stop(const base::Closure& done_task); 99 void Stop(const base::Closure& done_task);
99 100
100 // Pauses or resumes scheduling of frame captures. Pausing/resuming captures 101 // Pauses or resumes scheduling of frame captures. Pausing/resuming captures
101 // only affects capture scheduling and does not stop/start the capturer. 102 // only affects capture scheduling and does not stop/start the capturer.
102 void Pause(bool pause); 103 void Pause(bool pause);
103 104
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 // An object to schedule capturing. 181 // An object to schedule capturing.
181 CaptureScheduler scheduler_; 182 CaptureScheduler scheduler_;
182 183
183 DISALLOW_COPY_AND_ASSIGN(VideoScheduler); 184 DISALLOW_COPY_AND_ASSIGN(VideoScheduler);
184 }; 185 };
185 186
186 } // namespace remoting 187 } // namespace remoting
187 188
188 #endif // REMOTING_HOST_VIDEO_SCHEDULER_H_ 189 #endif // REMOTING_HOST_VIDEO_SCHEDULER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698