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

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

Issue 10382184: [Chromoting] Initial plumbing for cursor shape. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment for CaptureCursor Created 8 years, 7 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 | 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_SCREEN_RECORDER_H_ 5 #ifndef REMOTING_HOST_SCREEN_RECORDER_H_
6 #define REMOTING_HOST_SCREEN_RECORDER_H_ 6 #define REMOTING_HOST_SCREEN_RECORDER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 class MessageLoopProxy; 23 class MessageLoopProxy;
24 } // namespace base 24 } // namespace base
25 25
26 namespace remoting { 26 namespace remoting {
27 27
28 namespace protocol { 28 namespace protocol {
29 class ConnectionToClient; 29 class ConnectionToClient;
30 } // namespace protocol 30 } // namespace protocol
31 31
32 class CaptureData; 32 class CaptureData;
33 class CursorShapeData;
33 34
34 // A class for controlling and coordinate Capturer, Encoder 35 // A class for controlling and coordinate Capturer, Encoder
35 // and NetworkChannel in a record session. 36 // and NetworkChannel in a record session.
36 // 37 //
37 // THREADING 38 // THREADING
38 // 39 //
39 // This class works on three threads, namely capture, encode and network 40 // This class works on three threads, namely capture, encode and network
40 // thread. The main function of this class is to coordinate and schedule 41 // thread. The main function of this class is to coordinate and schedule
41 // capture, encode and transmission of data on different threads. 42 // capture, encode and transmission of data on different threads.
42 // 43 //
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // Capturer thread ---------------------------------------------------------- 117 // Capturer thread ----------------------------------------------------------
117 118
118 void DoStart(); 119 void DoStart();
119 void DoSetMaxRate(double max_rate); 120 void DoSetMaxRate(double max_rate);
120 121
121 // Hepler method to schedule next capture using the current rate. 122 // Hepler method to schedule next capture using the current rate.
122 void StartCaptureTimer(); 123 void StartCaptureTimer();
123 124
124 void DoCapture(); 125 void DoCapture();
125 void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data); 126 void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data);
127 void CursorShapeChangedCallback(scoped_refptr<CursorShapeData> cursor_data);
126 void DoFinishOneRecording(); 128 void DoFinishOneRecording();
127 void DoInvalidateFullScreen(); 129 void DoInvalidateFullScreen();
128 130
129 // Network thread ----------------------------------------------------------- 131 // Network thread -----------------------------------------------------------
130 132
131 void DoSendVideoPacket(scoped_ptr<VideoPacket> packet); 133 void DoSendVideoPacket(scoped_ptr<VideoPacket> packet);
132 134
133 void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection, 135 void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection,
134 int width, int height); 136 int width, int height);
135 137
136 // Signal network thread to cease activities. 138 // Signal network thread to cease activities.
137 void DoStopOnNetworkThread(const base::Closure& done_task); 139 void DoStopOnNetworkThread(const base::Closure& done_task);
138 140
139 // Callback for VideoStub::ProcessVideoPacket() that is used for 141 // Callback for VideoStub::ProcessVideoPacket() that is used for
140 // each last packet in a frame. 142 // each last packet in a frame.
141 void VideoFrameSentCallback(); 143 void VideoFrameSentCallback();
142 144
143 // Encoder thread ----------------------------------------------------------- 145 // Encoder thread -----------------------------------------------------------
144 146
145 void DoEncode(scoped_refptr<CaptureData> capture_data); 147 void DoEncode(scoped_refptr<CaptureData> capture_data);
148 void DoEncodeCursor(scoped_refptr<CursorShapeData> cursor);
146 149
147 // Perform stop operations on encode thread. 150 // Perform stop operations on encode thread.
148 void DoStopOnEncodeThread(const base::Closure& done_task); 151 void DoStopOnEncodeThread(const base::Closure& done_task);
149 152
150 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet); 153 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet);
151 void SendVideoPacket(VideoPacket* packet); 154 void SendVideoPacket(VideoPacket* packet);
152 155
153 // Message loops used by this class. 156 // Message loops used by this class.
154 MessageLoop* capture_loop_; 157 MessageLoop* capture_loop_;
155 MessageLoop* encode_loop_; 158 MessageLoop* encode_loop_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 200
198 // An object to schedule capturing. 201 // An object to schedule capturing.
199 CaptureScheduler scheduler_; 202 CaptureScheduler scheduler_;
200 203
201 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); 204 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder);
202 }; 205 };
203 206
204 } // namespace remoting 207 } // namespace remoting
205 208
206 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ 209 #endif // REMOTING_HOST_SCREEN_RECORDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698