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

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

Issue 11366226: Rename capture and encode threads to make it clear that they are for video. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | « remoting/host/chromoting_host_context_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »
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_CLIENT_SESSION_H_ 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_
6 #define REMOTING_HOST_CLIENT_SESSION_H_ 6 #define REMOTING_HOST_CLIENT_SESSION_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // change. 81 // change.
82 virtual void OnClientDimensionsChanged(ClientSession* client, 82 virtual void OnClientDimensionsChanged(ClientSession* client,
83 const SkISize& size) = 0; 83 const SkISize& size) = 0;
84 84
85 protected: 85 protected:
86 virtual ~EventHandler() {} 86 virtual ~EventHandler() {}
87 }; 87 };
88 88
89 // |event_handler| must outlive |this|. |desktop_environment_factory| is only 89 // |event_handler| must outlive |this|. |desktop_environment_factory| is only
90 // used by the constructor to create an instance of DesktopEnvironment. 90 // used by the constructor to create an instance of DesktopEnvironment.
91 ClientSession(EventHandler* event_handler, 91 ClientSession(
92 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 92 EventHandler* event_handler,
93 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, 93 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
94 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner, 94 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
95 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, 95 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
96 scoped_ptr<protocol::ConnectionToClient> connection, 96 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
97 DesktopEnvironmentFactory* desktop_environment_factory, 97 scoped_ptr<protocol::ConnectionToClient> connection,
98 const base::TimeDelta& max_duration); 98 DesktopEnvironmentFactory* desktop_environment_factory,
99 const base::TimeDelta& max_duration);
99 100
100 // protocol::HostStub interface. 101 // protocol::HostStub interface.
101 virtual void NotifyClientDimensions( 102 virtual void NotifyClientDimensions(
102 const protocol::ClientDimensions& dimensions) OVERRIDE; 103 const protocol::ClientDimensions& dimensions) OVERRIDE;
103 virtual void ControlVideo( 104 virtual void ControlVideo(
104 const protocol::VideoControl& video_control) OVERRIDE; 105 const protocol::VideoControl& video_control) OVERRIDE;
105 virtual void ControlAudio( 106 virtual void ControlAudio(
106 const protocol::AudioControl& audio_control) OVERRIDE; 107 const protocol::AudioControl& audio_control) OVERRIDE;
107 108
108 // protocol::ConnectionToClient::EventHandler interface. 109 // protocol::ConnectionToClient::EventHandler interface.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 base::WeakPtrFactory<protocol::ClipboardStub> client_clipboard_factory_; 211 base::WeakPtrFactory<protocol::ClipboardStub> client_clipboard_factory_;
211 212
212 // The maximum duration of this session. 213 // The maximum duration of this session.
213 // There is no maximum if this value is <= 0. 214 // There is no maximum if this value is <= 0.
214 base::TimeDelta max_duration_; 215 base::TimeDelta max_duration_;
215 216
216 // A timer that triggers a disconnect when the maximum session duration 217 // A timer that triggers a disconnect when the maximum session duration
217 // is reached. 218 // is reached.
218 base::OneShotTimer<ClientSession> max_duration_timer_; 219 base::OneShotTimer<ClientSession> max_duration_timer_;
219 220
221
220 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_; 222 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner_;
221 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner_; 223 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner_;
222 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner_; 224 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner_;
223 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_; 225 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner_;
224 226
225 // Schedulers for audio and video capture. 227 // Schedulers for audio and video capture.
226 scoped_refptr<AudioScheduler> audio_scheduler_; 228 scoped_refptr<AudioScheduler> audio_scheduler_;
227 scoped_refptr<VideoScheduler> video_scheduler_; 229 scoped_refptr<VideoScheduler> video_scheduler_;
228 230
229 // Number of screen recorders and audio schedulers that are currently being 231 // Number of screen recorders and audio schedulers that are currently being
230 // used or shutdown. Used to delay shutdown if one or more 232 // used or shutdown. Used to delay shutdown if one or more
231 // recorders/schedulers are asynchronously shutting down. 233 // recorders/schedulers are asynchronously shutting down.
232 int active_recorders_; 234 int active_recorders_;
233 235
234 // The task to be executed when the session is completely stopped. 236 // The task to be executed when the session is completely stopped.
235 base::Closure done_task_; 237 base::Closure done_task_;
236 238
237 DISALLOW_COPY_AND_ASSIGN(ClientSession); 239 DISALLOW_COPY_AND_ASSIGN(ClientSession);
238 }; 240 };
239 241
240 // Destroys |ClienSession| instances on the network thread. 242 // Destroys |ClienSession| instances on the network thread.
241 struct ClientSessionTraits { 243 struct ClientSessionTraits {
242 static void Destruct(const ClientSession* client); 244 static void Destruct(const ClientSession* client);
243 }; 245 };
244 246
245 } // namespace remoting 247 } // namespace remoting
246 248
247 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 249 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host_context_unittest.cc ('k') | remoting/host/client_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698