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

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
« no previous file with comments | « remoting/host/audio_capturer_linux.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remoting_me2me_host.cc
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 6dcad1bd8b18cb7069577d009b931c3596b9da23..91a5ba90b87561bcaa7e9ae7255932a47ff6b153 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -68,9 +68,9 @@
#include "remoting/host/curtain_mode_mac.h"
#endif // defined(OS_MACOSX)
-#if defined(OS_POSIX)
-#include <signal.h>
-#endif // defined(OS_POSIX)
+#if defined(OS_LINUX)
+#include "remoting/host/audio_capturer_linux.h"
+#endif // defined(OS_LINUX)
// N.B. OS_WIN is defined by including src/base headers.
#if defined(OS_WIN)
@@ -93,6 +93,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_";
@@ -702,8 +706,8 @@ class HostProcess
int exit_code_;
#if defined(OS_MACOSX)
- remoting::CurtainMode curtain_;
-#endif
+ remoting::CurtainMode curtain_;
+#endif // defined(OS_MACOSX)
};
} // namespace remoting
@@ -751,10 +755,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);
@@ -762,6 +762,15 @@ int main(int argc, char** argv) {
new remoting::ChromotingHostContext(
new remoting::AutoThreadTaskRunner(message_loop.message_loop_proxy(),
quit_message_loop)));
+
+#if defined(OS_LINUX)
+ // TODO(sergeyu): Pass configuration parameters to the Linux-specific version
+ // of DesktopEnvironmentFactory when we have it.
+ remoting::VideoFrameCapturer::EnableXDamage(true);
+ remoting::AudioCapturerLinux::SetPipeName(CommandLine::ForCurrentProcess()->
+ GetSwitchValuePath(kAudioPipeSwitchName));
+#endif // defined(OS_LINUX)
+
if (!context->Start())
return remoting::kHostInitializationFailed;
« no previous file with comments | « remoting/host/audio_capturer_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698