| Index: remoting/host/chromoting_host.cc
|
| diff --git a/remoting/host/chromoting_host.cc b/remoting/host/chromoting_host.cc
|
| index 7a5516975427840fb005a8b61f49c9f18c128466..bdac6d9cfa4cd1bc705d413273073c9847b8f713 100644
|
| --- a/remoting/host/chromoting_host.cc
|
| +++ b/remoting/host/chromoting_host.cc
|
| @@ -9,6 +9,8 @@
|
| #include "base/logging.h"
|
| #include "base/message_loop_proxy.h"
|
| #include "build/build_config.h"
|
| +#include "remoting/base/audio_encoder.h"
|
| +#include "remoting/base/audio_encoder_verbatim.h"
|
| #include "remoting/base/constants.h"
|
| #include "remoting/base/encoder.h"
|
| #include "remoting/base/encoder_row_based.h"
|
| @@ -214,6 +216,9 @@ void ChromotingHost::OnSessionChannelsConnected(ClientSession* client) {
|
| // it should run on.
|
| Encoder* encoder = CreateEncoder(client->connection()->session()->config());
|
|
|
| + scoped_ptr<AudioEncoder> audio_encoder =
|
| + CreateAudioEncoder(client->connection()->session()->config());
|
| +
|
| recorder_ = new ScreenRecorder(context_->capture_task_runner(),
|
| context_->encode_task_runner(),
|
| context_->network_task_runner(),
|
| @@ -224,6 +229,7 @@ void ChromotingHost::OnSessionChannelsConnected(ClientSession* client) {
|
| context_->capture_task_runner(),
|
| context_->network_task_runner(),
|
| desktop_environment_->audio_capturer(),
|
| + audio_encoder.Pass(),
|
| client->connection()->audio_stub());
|
| }
|
|
|
| @@ -417,6 +423,19 @@ Encoder* ChromotingHost::CreateEncoder(const protocol::SessionConfig& config) {
|
| return NULL;
|
| }
|
|
|
| +// static
|
| +scoped_ptr<AudioEncoder> ChromotingHost::CreateAudioEncoder(
|
| + const protocol::SessionConfig& config) {
|
| + const protocol::ChannelConfig& audio_config = config.audio_config();
|
| +
|
| + if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
|
| + return AudioEncoderVerbatim::CreateVerbatimAudioEncoder();
|
| + }
|
| +
|
| + NOTIMPLEMENTED();
|
| + return scoped_ptr<AudioEncoder>(NULL);
|
| +}
|
| +
|
| void ChromotingHost::StopScreenRecorder() {
|
| DCHECK(context_->network_task_runner()->BelongsToCurrentThread());
|
| DCHECK(recorder_.get());
|
|
|