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/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" |
10 #include "remoting/base/capabilities.h" | 10 #include "remoting/base/capabilities.h" |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 const protocol::SessionConfig& config) { | 410 const protocol::SessionConfig& config) { |
411 const protocol::ChannelConfig& video_config = config.video_config(); | 411 const protocol::ChannelConfig& video_config = config.video_config(); |
412 | 412 |
413 if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { | 413 if (video_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { |
414 return scoped_ptr<VideoEncoder>(new remoting::VideoEncoderVerbatim()); | 414 return scoped_ptr<VideoEncoder>(new remoting::VideoEncoderVerbatim()); |
415 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { | 415 } else if (video_config.codec == protocol::ChannelConfig::CODEC_VP8) { |
416 return scoped_ptr<VideoEncoder>(new remoting::VideoEncoderVp8()); | 416 return scoped_ptr<VideoEncoder>(new remoting::VideoEncoderVp8()); |
417 } | 417 } |
418 | 418 |
419 NOTIMPLEMENTED(); | 419 NOTIMPLEMENTED(); |
420 return scoped_ptr<VideoEncoder>(NULL); | 420 return scoped_ptr<VideoEncoder>(); |
421 } | 421 } |
422 | 422 |
423 // static | 423 // static |
424 scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder( | 424 scoped_ptr<AudioEncoder> ClientSession::CreateAudioEncoder( |
425 const protocol::SessionConfig& config) { | 425 const protocol::SessionConfig& config) { |
426 const protocol::ChannelConfig& audio_config = config.audio_config(); | 426 const protocol::ChannelConfig& audio_config = config.audio_config(); |
427 | 427 |
428 if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { | 428 if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) { |
429 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); | 429 return scoped_ptr<AudioEncoder>(new AudioEncoderVerbatim()); |
430 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_SPEEX) { | 430 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_SPEEX) { |
431 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex()); | 431 return scoped_ptr<AudioEncoder>(new AudioEncoderSpeex()); |
432 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { | 432 } else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) { |
433 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); | 433 return scoped_ptr<AudioEncoder>(new AudioEncoderOpus()); |
434 } | 434 } |
435 | 435 |
436 NOTIMPLEMENTED(); | 436 NOTIMPLEMENTED(); |
437 return scoped_ptr<AudioEncoder>(NULL); | 437 return scoped_ptr<AudioEncoder>(); |
438 } | 438 } |
439 | 439 |
440 } // namespace remoting | 440 } // namespace remoting |
OLD | NEW |