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

Unified Diff: remoting/host/chromoting_host.h

Issue 10916161: Revert 155219 - [Chromoting] Refactoring DesktopEnvironment and moving screen/audio recorders to Cl… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromoting_host.h
===================================================================
--- remoting/host/chromoting_host.h (revision 155274)
+++ remoting/host/chromoting_host.h (working copy)
@@ -12,7 +12,9 @@
#include "base/observer_list.h"
#include "base/threading/thread.h"
#include "net/base/backoff_entry.h"
+#include "remoting/codec/video_encoder.h"
#include "remoting/host/client_session.h"
+#include "remoting/host/desktop_environment.h"
#include "remoting/host/host_key_pair.h"
#include "remoting/host/host_status_observer.h"
#include "remoting/host/mouse_move_observer.h"
@@ -29,8 +31,13 @@
class CandidateSessionConfig;
} // namespace protocol
+class AudioEncoder;
+class AudioScheduler;
class ChromotingHostContext;
-class DesktopEnvironmentFactory;
+class DesktopEnvironment;
+class Encoder;
+class ScreenRecorder;
+class VideoFrameCapturer;
// A class to implement the functionality of a host process.
//
@@ -62,11 +69,10 @@
public:
// The caller must ensure that |context|, |signal_strategy| and
// |environment| out-live the host.
- ChromotingHost(
- ChromotingHostContext* context,
- SignalStrategy* signal_strategy,
- DesktopEnvironmentFactory* desktop_environment_factory,
- scoped_ptr<protocol::SessionManager> session_manager);
+ ChromotingHost(ChromotingHostContext* context,
+ SignalStrategy* signal_strategy,
+ DesktopEnvironment* environment,
+ scoped_ptr<protocol::SessionManager> session_manager);
// Asynchronously start the host process.
//
@@ -157,9 +163,21 @@
kStopped,
};
+ // Creates encoder for the specified configuration.
+ static VideoEncoder* CreateVideoEncoder(
+ const protocol::SessionConfig& config);
+
+ // Creates an audio encoder for the specified configuration.
+ static scoped_ptr<AudioEncoder> CreateAudioEncoder(
+ const protocol::SessionConfig& config);
+
virtual ~ChromotingHost();
- // Called from Shutdown() to finish shutdown.
+ void StopScreenRecorder();
+ void StopAudioScheduler();
+ void OnRecorderStopped();
+
+ // Called from Shutdown() or OnScreenRecorderStopped() to finish shutdown.
void ShutdownFinish();
// Unless specified otherwise all members of this class must be
@@ -167,7 +185,7 @@
// Parameters specified when the host was created.
ChromotingHostContext* context_;
- DesktopEnvironmentFactory* desktop_environment_factory_;
+ DesktopEnvironment* desktop_environment_;
scoped_ptr<protocol::SessionManager> session_manager_;
// Connection objects.
@@ -179,6 +197,16 @@
// The connections to remote clients.
ClientList clients_;
+ // Schedulers for audio and video capture.
+ // TODO(sergeyu): Do we need to have one set of schedulers per client?
+ scoped_refptr<ScreenRecorder> recorder_;
+ scoped_refptr<AudioScheduler> audio_scheduler_;
+
+ // Number of screen recorders and audio schedulers that are currently being
+ // stopped. Used to delay shutdown if one or more recorders/schedulers are
+ // asynchronously shutting down.
+ int stopping_recorders_;
+
// Tracks the internal state of the host.
State state_;
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698