audio_decoder.cc 701 B

123456789101112131415161718192021222324
  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
  3. // found in the LICENSE file.
  4. #include "remoting/codec/audio_decoder.h"
  5. #include "base/memory/ptr_util.h"
  6. #include "base/notreached.h"
  7. #include "remoting/codec/audio_decoder_opus.h"
  8. #include "remoting/protocol/session_config.h"
  9. namespace remoting {
  10. std::unique_ptr<AudioDecoder> AudioDecoder::CreateAudioDecoder(
  11. const protocol::SessionConfig& config) {
  12. if (config.audio_config().codec == protocol::ChannelConfig::CODEC_OPUS) {
  13. return base::WrapUnique(new AudioDecoderOpus());
  14. }
  15. NOTIMPLEMENTED();
  16. return nullptr;
  17. }
  18. } // namespace remoting