| 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_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" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Send |packet| to the client, unless we are in the process of stopping. | 143 // Send |packet| to the client, unless we are in the process of stopping. |
| 144 void SendVideoPacket(scoped_ptr<VideoPacket> packet); | 144 void SendVideoPacket(scoped_ptr<VideoPacket> packet); |
| 145 | 145 |
| 146 // Callback passed to |video_stub_| for the last packet in each frame, to | 146 // Callback passed to |video_stub_| for the last packet in each frame, to |
| 147 // rate-limit frame captures to network throughput. | 147 // rate-limit frame captures to network throughput. |
| 148 void VideoFrameSentCallback(); | 148 void VideoFrameSentCallback(); |
| 149 | 149 |
| 150 // Send updated cursor shape to client. | 150 // Send updated cursor shape to client. |
| 151 void SendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape); | 151 void SendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape); |
| 152 | 152 |
| 153 // Posted to the network thread to delete |capturer| on the thread that | |
| 154 // created it. | |
| 155 void StopOnNetworkThread(scoped_ptr<media::ScreenCapturer> capturer); | |
| 156 | |
| 157 // Encoder thread ----------------------------------------------------------- | 153 // Encoder thread ----------------------------------------------------------- |
| 158 | 154 |
| 159 // Encode a frame, passing generated VideoPackets to SendVideoPacket(). | 155 // Encode a frame, passing generated VideoPackets to SendVideoPacket(). |
| 160 void EncodeFrame(scoped_refptr<media::ScreenCaptureData> capture_data); | 156 void EncodeFrame(scoped_refptr<media::ScreenCaptureData> capture_data); |
| 161 | 157 |
| 162 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet); | 158 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet); |
| 163 | 159 |
| 164 // Used to synchronize capture and encode thread teardown, notifying the | 160 // Used to synchronize capture and encode thread teardown, notifying the |
| 165 // network thread when done. | 161 // network thread when done. |
| 166 void StopOnEncodeThread(scoped_ptr<media::ScreenCapturer> capturer); | 162 void StopOnEncodeThread(scoped_ptr<media::ScreenCapturer> capturer); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 194 |
| 199 // An object to schedule capturing. | 195 // An object to schedule capturing. |
| 200 CaptureScheduler scheduler_; | 196 CaptureScheduler scheduler_; |
| 201 | 197 |
| 202 DISALLOW_COPY_AND_ASSIGN(VideoScheduler); | 198 DISALLOW_COPY_AND_ASSIGN(VideoScheduler); |
| 203 }; | 199 }; |
| 204 | 200 |
| 205 } // namespace remoting | 201 } // namespace remoting |
| 206 | 202 |
| 207 #endif // REMOTING_HOST_VIDEO_SCHEDULER_H_ | 203 #endif // REMOTING_HOST_VIDEO_SCHEDULER_H_ |
| OLD | NEW |