Chromium Code Reviews| Index: remoting/client/plugin/chromoting_instance.cc |
| diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc |
| index b58bea2267c0775e52b4e2879a305cfd0a446926..aaac6fb74cb3a3b2283505c909c1b0bbfc0655ae 100644 |
| --- a/remoting/client/plugin/chromoting_instance.cc |
| +++ b/remoting/client/plugin/chromoting_instance.cc |
| @@ -28,6 +28,7 @@ |
| #include "ppapi/cpp/rect.h" |
| #include "remoting/base/constants.h" |
| #include "remoting/base/util.h" |
| +#include "remoting/client/audio_decode_scheduler.h" |
| #include "remoting/client/client_config.h" |
| #include "remoting/client/chromoting_client.h" |
| #include "remoting/client/frame_consumer_proxy.h" |
| @@ -470,11 +471,15 @@ void ChromotingInstance::Connect(const ClientConfig& config) { |
| jingle_glue::JingleThreadWrapper::EnsureForCurrentThread(); |
| host_connection_.reset(new protocol::ConnectionToHost(true)); |
| - audio_player_.reset(new PepperAudioPlayer(this)); |
| + scoped_ptr<AudioPlayer> audio_player(new PepperAudioPlayer(this)); |
| + audio_decode_scheduler_.reset(new AudioDecodeScheduler( |
|
Sergey Ulanov
2012/08/02 20:32:48
Do we really need to create this object here? Can
kxing
2012/08/03 14:51:47
Done.
|
| + context_.main_task_runner(), |
| + context_.audio_decode_task_runner(), |
| + audio_player.Pass())); |
| client_.reset(new ChromotingClient(config, context_.main_task_runner(), |
| host_connection_.get(), this, |
| rectangle_decoder_.get(), |
| - audio_player_.get())); |
| + audio_decode_scheduler_.get())); |
|
Sergey Ulanov
2012/08/02 20:32:48
Please modify ChromotingClient to take ownership o
kxing
2012/08/03 14:51:47
Done.
|
| // Construct the input pipeline |
| mouse_input_filter_.reset( |
| @@ -536,7 +541,7 @@ void ChromotingInstance::Disconnect() { |
| input_handler_.reset(); |
| input_tracker_.reset(); |
| mouse_input_filter_.reset(); |
| - audio_player_.reset(); |
| + audio_decode_scheduler_.reset(); |
| host_connection_.reset(); |
| } |