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

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

Issue 11474043: Wait for encode thread during VideoScheduler teardown. (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
« no previous file with comments | « no previous file | remoting/host/video_scheduler.cc » ('j') | remoting/host/video_scheduler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // Send updated cursor shape to client. 139 // Send updated cursor shape to client.
140 void SendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape); 140 void SendCursorShape(scoped_ptr<protocol::CursorShapeInfo> cursor_shape);
141 141
142 // Encoder thread ----------------------------------------------------------- 142 // Encoder thread -----------------------------------------------------------
143 143
144 // Encode a frame, passing generated VideoPackets to SendVideoPacket(). 144 // Encode a frame, passing generated VideoPackets to SendVideoPacket().
145 void EncodeFrame(scoped_refptr<CaptureData> capture_data); 145 void EncodeFrame(scoped_refptr<CaptureData> capture_data);
146 146
147 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet); 147 void EncodedDataAvailableCallback(scoped_ptr<VideoPacket> packet);
148 148
149 // Used to synchronize capture and encode thread teardown, notifying the
150 // network thread when done.
151 void StopOnEncodeThread(const base::Closure& done_task);
152
149 // Task runners used by this class. 153 // Task runners used by this class.
150 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; 154 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_;
151 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_; 155 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_;
152 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 156 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
153 157
154 // Used to capture frames. Always accessed on the capture thread. 158 // Used to capture frames. Always accessed on the capture thread.
155 VideoFrameCapturer* capturer_; 159 VideoFrameCapturer* capturer_;
156 160
157 // Used to encode captured frames. Always accessed on the encode thread. 161 // Used to encode captured frames. Always accessed on the encode thread.
158 scoped_ptr<VideoEncoder> encoder_; 162 scoped_ptr<VideoEncoder> encoder_;
(...skipping 20 matching lines...) Expand all
179 183
180 // An object to schedule capturing. 184 // An object to schedule capturing.
181 CaptureScheduler scheduler_; 185 CaptureScheduler scheduler_;
182 186
183 DISALLOW_COPY_AND_ASSIGN(VideoScheduler); 187 DISALLOW_COPY_AND_ASSIGN(VideoScheduler);
184 }; 188 };
185 189
186 } // namespace remoting 190 } // namespace remoting
187 191
188 #endif // REMOTING_HOST_VIDEO_SCHEDULER_H_ 192 #endif // REMOTING_HOST_VIDEO_SCHEDULER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/video_scheduler.cc » ('j') | remoting/host/video_scheduler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698