| Index: remoting/client/chromoting_client.cc
|
| diff --git a/remoting/client/chromoting_client.cc b/remoting/client/chromoting_client.cc
|
| index f0dd8c79c477c216e6c5c9b1e14c1d0d599c70bc..230384cdb1f199039305f27976c851e4069a737c 100644
|
| --- a/remoting/client/chromoting_client.cc
|
| +++ b/remoting/client/chromoting_client.cc
|
| @@ -5,7 +5,7 @@
|
| #include "remoting/client/chromoting_client.h"
|
|
|
| #include "base/bind.h"
|
| -#include "remoting/client/audio_player.h"
|
| +#include "remoting/client/audio_decode_scheduler.h"
|
| #include "remoting/client/client_context.h"
|
| #include "remoting/client/client_user_interface.h"
|
| #include "remoting/client/rectangle_update_decoder.h"
|
| @@ -35,13 +35,13 @@ ChromotingClient::ChromotingClient(
|
| protocol::ConnectionToHost* connection,
|
| ClientUserInterface* user_interface,
|
| RectangleUpdateDecoder* rectangle_decoder,
|
| - AudioPlayer* audio_player)
|
| + AudioDecodeScheduler* audio_decode_scheduler)
|
| : config_(config),
|
| task_runner_(task_runner),
|
| connection_(connection),
|
| user_interface_(user_interface),
|
| rectangle_decoder_(rectangle_decoder),
|
| - audio_player_(audio_player),
|
| + audio_decode_scheduler_(audio_decode_scheduler),
|
| packet_being_processed_(false),
|
| last_sequence_number_(0),
|
| weak_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
|
| @@ -65,7 +65,8 @@ void ChromotingClient::Start(
|
|
|
| connection_->Connect(xmpp_proxy, config_.local_jid, config_.host_jid,
|
| config_.host_public_key, transport_factory.Pass(),
|
| - authenticator.Pass(), this, this, this, this, this);
|
| + authenticator.Pass(), this, this, this, this,
|
| + audio_decode_scheduler_);
|
| }
|
|
|
| void ChromotingClient::Stop(const base::Closure& shutdown_task) {
|
| @@ -141,12 +142,6 @@ int ChromotingClient::GetPendingVideoPackets() {
|
| return received_packets_.size();
|
| }
|
|
|
| -void ChromotingClient::ProcessAudioPacket(scoped_ptr<AudioPacket> packet,
|
| - const base::Closure& done) {
|
| - audio_player_->ProcessAudioPacket(packet.Pass());
|
| - done.Run();
|
| -}
|
| -
|
| void ChromotingClient::DispatchPacket() {
|
| DCHECK(task_runner_->BelongsToCurrentThread());
|
| CHECK(!packet_being_processed_);
|
| @@ -217,6 +212,9 @@ void ChromotingClient::Initialize() {
|
|
|
| // Initialize the decoder.
|
| rectangle_decoder_->Initialize(connection_->config());
|
| + if (connection_->config().is_audio_enabled()) {
|
| + audio_decode_scheduler_->Initialize(connection_->config());
|
| + }
|
| }
|
|
|
| } // namespace remoting
|
|
|