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

Unified Diff: remoting/host/remoting_me2me_host.cc

Issue 10911271: Remove CommandLine dependency from the Linux's AudioCapturer. (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
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index bc18501420e2889552e4b038c6fdf02c4cf6a49f..d323b1057cac9fb28b24798023e9314e976640fc 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -92,6 +92,10 @@ const char kDaemonIpcSwitchName[] = "daemon-pipe";
// The command line switch used to get version of the daemon.
const char kVersionSwitchName[] = "version";
+// The command line switch used to pass name of the pipe to capture audio on
+// linux.
+const char kAudioPipeSwitchName[] = "audio-pipe-name";
+
const char kUnofficialOAuth2ClientId[] =
"440925447803-2pi3v45bff6tp1rde2f7q6lgbor3o5uj.apps.googleusercontent.com";
const char kUnofficialOAuth2ClientSecret[] = "W2ieEsG-R1gIA4MMurGrgMc_";
@@ -701,8 +705,8 @@ class HostProcess
int exit_code_;
#if defined(OS_MACOSX)
- remoting::CurtainMode curtain_;
-#endif
+ remoting::CurtainMode curtain_;
+#endif // defined(OS_MACOSX)
};
} // namespace remoting
@@ -750,10 +754,6 @@ int main(int argc, char** argv) {
// single-threaded.
net::EnableSSLServerSockets();
-#if defined(OS_LINUX)
- remoting::VideoFrameCapturer::EnableXDamage(true);
-#endif
-
// Create the main message loop and start helper threads.
MessageLoop message_loop(MessageLoop::TYPE_UI);
base::Closure quit_message_loop = base::Bind(&QuitMessageLoop, &message_loop);
@@ -761,6 +761,13 @@ int main(int argc, char** argv) {
new remoting::ChromotingHostContext(
new remoting::AutoThreadTaskRunner(message_loop.message_loop_proxy(),
quit_message_loop)));
+
+#if defined(OS_LINUX)
+ remoting::VideoFrameCapturer::EnableXDamage(true);
+ context->set_audio_capturer_pipe(CommandLine::ForCurrentProcess()->
+ GetSwitchValuePath(kAudioPipeSwitchName));
+#endif // defined(OS_LINUX)
+
if (!context->Start())
return remoting::kHostInitializationFailed;
« remoting/host/chromoting_host_context.h ('K') | « remoting/host/desktop_environment.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698