| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/client_session.h" | 5 #include "remoting/host/client_session.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "remoting/codec/audio_encoder.h" | 10 #include "remoting/codec/audio_encoder.h" |
| 11 #include "remoting/codec/audio_encoder_opus.h" |
| 11 #include "remoting/codec/audio_encoder_speex.h" | 12 #include "remoting/codec/audio_encoder_speex.h" |
| 12 #include "remoting/codec/audio_encoder_verbatim.h" | 13 #include "remoting/codec/audio_encoder_verbatim.h" |
| 13 #include "remoting/codec/video_encoder.h" | 14 #include "remoting/codec/video_encoder.h" |
| 14 #include "remoting/codec/video_encoder_row_based.h" | 15 #include "remoting/codec/video_encoder_row_based.h" |
| 15 #include "remoting/codec/video_encoder_vp8.h" | 16 #include "remoting/codec/video_encoder_vp8.h" |
| 16 #include "remoting/host/audio_scheduler.h" | 17 #include "remoting/host/audio_scheduler.h" |
| 17 #include "remoting/host/desktop_environment.h" | 18 #include "remoting/host/desktop_environment.h" |
| 18 #include "remoting/host/event_executor.h" | 19 #include "remoting/host/event_executor.h" |
| 19 #include "remoting/host/screen_recorder.h" | 20 #include "remoting/host/screen_recorder.h" |
| 20 #include "remoting/host/video_frame_capturer.h" | 21 #include "remoting/host/video_frame_capturer.h" |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 | 287 |
| 287 // static | 288 // static |
| 288 scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder( | 289 scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder( |
| 289 const protocol::SessionConfig& config) { | 290 const protocol::SessionConfig& config) { |
| 290 const protocol::ChannelConfig& audio_config = config.audio_config(); | 291 const protocol::ChannelConfig& audio_config = config.audio_config(); |
| 291 | 292 |
| 292 if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { | 293 if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { |
| 293 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); | 294 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); |
| 294 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_SPEEX) { | 295 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_SPEEX) { |
| 295 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex()); | 296 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex()); |
| 297 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { |
| 298 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); |
| 296 } | 299 } |
| 297 | 300 |
| 298 NOTIMPLEMENTED(); | 301 NOTIMPLEMENTED(); |
| 299 return scoped_ptr<AudioEncoder>(NULL); | 302 return scoped_ptr<AudioEncoder>(NULL); |
| 300 } | 303 } |
| 301 | 304 |
| 302 // static | 305 // static |
| 303 void ClientSessionTraits::Destruct(const ClientSession* client) { | 306 void ClientSessionTraits::Destruct(const ClientSession* client) { |
| 304 client->network_task_runner_->DeleteSoon(FROM_HERE, client); | 307 client->network_task_runner_->DeleteSoon(FROM_HERE, client); |
| 305 } | 308 } |
| 306 | 309 |
| 307 } // namespace remoting | 310 } // namespace remoting |
| OLD | NEW |