| Index: remoting/host/audio_capturer_linux.cc
|
| diff --git a/remoting/host/audio_capturer_linux.cc b/remoting/host/audio_capturer_linux.cc
|
| index 5af0d4cf76b9685270258ac193596b6073e21ee2..73188dc15142dfdef20a650fcb612c3e57b22257 100644
|
| --- a/remoting/host/audio_capturer_linux.cc
|
| +++ b/remoting/host/audio_capturer_linux.cc
|
| @@ -9,19 +9,17 @@
|
| #include <sys/types.h>
|
| #include <unistd.h>
|
|
|
| -#include "base/command_line.h"
|
| #include "base/eintr_wrapper.h"
|
| #include "base/file_path.h"
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| #include "remoting/proto/audio.pb.h"
|
| +#include "remoting/host/chromoting_host_context.h"
|
|
|
| namespace remoting {
|
|
|
| namespace {
|
|
|
| -const char kAudioPipeOptionName[] = "audio-pipe-name";
|
| -
|
| // PulseAudio's module-pipe-sink must be configured to use the following
|
| // parameters for the sink we read from.
|
| const AudioPacket_SamplingRate kSamplingRate = AudioPacket::SAMPLING_RATE_44100;
|
| @@ -175,14 +173,14 @@ void AudioCapturerLinux::WaitForPipeReadable() {
|
| &file_descriptor_watcher_, this);
|
| }
|
|
|
| -bool AudioCapturer::IsSupported() {
|
| - CommandLine* cl = CommandLine::ForCurrentProcess();
|
| - return !cl->GetSwitchValuePath(kAudioPipeOptionName).empty();
|
| +bool AudioCapturer::IsSupported(
|
| + ChromotingHostContext* context) {
|
| + return !context->audio_capturer_pipe().empty();
|
| }
|
|
|
| -scoped_ptr<AudioCapturer> AudioCapturer::Create() {
|
| - CommandLine* cl = CommandLine::ForCurrentProcess();
|
| - FilePath path = cl->GetSwitchValuePath(kAudioPipeOptionName);
|
| +scoped_ptr<AudioCapturer> AudioCapturer::Create(
|
| + ChromotingHostContext* context) {
|
| + FilePath path = context->audio_capturer_pipe();
|
| if (path.empty())
|
| return scoped_ptr<AudioCapturer>();
|
| return scoped_ptr<AudioCapturer>(new AudioCapturerLinux(path));
|
|
|