This source file includes following definitions.
- CreateAudioDecoder
#include "remoting/codec/audio_decoder.h"
#include "base/logging.h"
#include "remoting/codec/audio_decoder_opus.h"
#include "remoting/codec/audio_decoder_verbatim.h"
#include "remoting/protocol/session_config.h"
namespace remoting {
scoped_ptr<AudioDecoder> AudioDecoder::CreateAudioDecoder(
const protocol::SessionConfig& config) {
const protocol::ChannelConfig& audio_config = config.audio_config();
if (audio_config.codec == protocol::ChannelConfig::CODEC_VERBATIM) {
return scoped_ptr<AudioDecoder>(new AudioDecoderVerbatim());
} else if (audio_config.codec == protocol::ChannelConfig::CODEC_OPUS) {
return scoped_ptr<AudioDecoder>(new AudioDecoderOpus());
}
NOTIMPLEMENTED();
return scoped_ptr<AudioDecoder>();
}
}