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 #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" |
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/message_loop.h" | 14 #include "base/message_loop.h" |
15 #include "base/time.h" | 15 #include "base/time.h" |
16 #include "base/timer.h" | 16 #include "base/timer.h" |
17 #include "remoting/base/encoder.h" | 17 #include "remoting/base/encoder.h" |
18 #include "remoting/host/capturer.h" | 18 #include "remoting/host/capturer.h" |
19 #include "remoting/host/capture_scheduler.h" | 19 #include "remoting/host/capture_scheduler.h" |
20 #include "remoting/proto/audio.pb.h" | |
20 #include "remoting/proto/video.pb.h" | 21 #include "remoting/proto/video.pb.h" |
21 | 22 |
22 namespace base { | 23 namespace base { |
23 class MessageLoopProxy; | 24 class MessageLoopProxy; |
24 } // namespace base | 25 } // namespace base |
25 | 26 |
26 namespace remoting { | 27 namespace remoting { |
27 | 28 |
28 namespace protocol { | 29 namespace protocol { |
29 class ConnectionToClient; | 30 class ConnectionToClient; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
126 void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data); | 127 void CaptureDoneCallback(scoped_refptr<CaptureData> capture_data); |
127 void CursorShapeChangedCallback( | 128 void CursorShapeChangedCallback( |
128 scoped_ptr<protocol::CursorShapeInfo> cursor_data); | 129 scoped_ptr<protocol::CursorShapeInfo> cursor_data); |
129 void DoFinishOneRecording(); | 130 void DoFinishOneRecording(); |
130 void DoInvalidateFullScreen(); | 131 void DoInvalidateFullScreen(); |
131 | 132 |
132 // Network thread ----------------------------------------------------------- | 133 // Network thread ----------------------------------------------------------- |
133 | 134 |
134 void DoSendVideoPacket(scoped_ptr<VideoPacket> packet); | 135 void DoSendVideoPacket(scoped_ptr<VideoPacket> packet); |
135 | 136 |
137 void DoSendAudioPacket(scoped_ptr<AudioPacket> packet); | |
Sergey Ulanov
2012/06/21 17:24:56
I'm not convinced we should put audio-related code
kxing
2012/06/21 18:09:22
Done.
| |
138 | |
136 void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection, | 139 void DoSendInit(scoped_refptr<protocol::ConnectionToClient> connection, |
137 int width, int height); | 140 int width, int height); |
138 | 141 |
139 // Signal network thread to cease activities. | 142 // Signal network thread to cease activities. |
140 void DoStopOnNetworkThread(const base::Closure& done_task); | 143 void DoStopOnNetworkThread(const base::Closure& done_task); |
141 | 144 |
142 // Callback for VideoStub::ProcessVideoPacket() that is used for | 145 // Callback for VideoStub::ProcessVideoPacket() that is used for |
143 // each last packet in a frame. | 146 // each last packet in a frame. |
144 void VideoFrameSentCallback(); | 147 void VideoFrameSentCallback(); |
145 | 148 |
149 void AudioSamplesSentCallback(); | |
150 | |
146 // Send updated cursor shape to client. | 151 // Send updated cursor shape to client. |
147 void DoSendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape); | 152 void DoSendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape); |
148 | 153 |
149 // Encoder thread ----------------------------------------------------------- | 154 // Encoder thread ----------------------------------------------------------- |
150 | 155 |
151 void DoEncode(scoped_refptr<CaptureData> capture_data); | 156 void DoEncode(scoped_refptr<CaptureData> capture_data); |
152 | 157 |
153 // Perform stop operations on encode thread. | 158 // Perform stop operations on encode thread. |
154 void DoStopOnEncodeThread(const base::Closure& done_task); | 159 void DoStopOnEncodeThread(const base::Closure& done_task); |
155 | 160 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
203 | 208 |
204 // An object to schedule capturing. | 209 // An object to schedule capturing. |
205 CaptureScheduler scheduler_; | 210 CaptureScheduler scheduler_; |
206 | 211 |
207 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); | 212 DISALLOW_COPY_AND_ASSIGN(ScreenRecorder); |
208 }; | 213 }; |
209 | 214 |
210 } // namespace remoting | 215 } // namespace remoting |
211 | 216 |
212 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ | 217 #endif // REMOTING_HOST_SCREEN_RECORDER_H_ |
OLD | NEW |