diff options
author | Karl Wiberg <kwiberg@webrtc.org> | 2018-03-20 19:18:55 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2018-03-21 13:55:18 +0000 |
commit | 08126349f5cc5d682a3398014a45088b4bb310f5 (patch) | |
tree | 88ed1b772cd33ff32f32193169cd99be3db1ed58 /audio | |
parent | 92be1caf4f6ab78d9e6a6f7e226e2f5a79bec2f4 (diff) | |
download | webrtc-08126349f5cc5d682a3398014a45088b4bb310f5.tar.gz |
Pass a real audio codec pair ID to decoders that we create
Bug: webrtc:8941
Change-Id: Ic2aed2ca759eb378164f3f65465e23fd7c13a9f8
Reviewed-on: https://webrtc-review.googlesource.com/63261
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22538}
Diffstat (limited to 'audio')
-rw-r--r-- | audio/audio_receive_stream.cc | 13 | ||||
-rw-r--r-- | audio/channel.cc | 7 | ||||
-rw-r--r-- | audio/channel.h | 3 |
3 files changed, 13 insertions, 10 deletions
diff --git a/audio/audio_receive_stream.cc b/audio/audio_receive_stream.cc index 8a1fbed7dc..00b745bdd5 100644 --- a/audio/audio_receive_stream.cc +++ b/audio/audio_receive_stream.cc @@ -70,13 +70,12 @@ std::unique_ptr<voe::ChannelProxy> CreateChannelAndProxy( RTC_DCHECK(audio_state); internal::AudioState* internal_audio_state = static_cast<internal::AudioState*>(audio_state); - return std::unique_ptr<voe::ChannelProxy>(new voe::ChannelProxy( - std::unique_ptr<voe::Channel>(new voe::Channel( - module_process_thread, - internal_audio_state->audio_device_module(), - config.jitter_buffer_max_packets, - config.jitter_buffer_fast_accelerate, - config.decoder_factory)))); + return std::unique_ptr<voe::ChannelProxy>( + new voe::ChannelProxy(std::unique_ptr<voe::Channel>(new voe::Channel( + module_process_thread, internal_audio_state->audio_device_module(), + config.jitter_buffer_max_packets, + config.jitter_buffer_fast_accelerate, config.decoder_factory, + config.codec_pair_id)))); } } // namespace diff --git a/audio/channel.cc b/audio/channel.cc index d50c161cf1..986476c91b 100644 --- a/audio/channel.cc +++ b/audio/channel.cc @@ -557,7 +557,8 @@ Channel::Channel(rtc::TaskQueue* encoder_queue, audio_device_module, 0, false, - rtc::scoped_refptr<AudioDecoderFactory>()) { + rtc::scoped_refptr<AudioDecoderFactory>(), + rtc::nullopt) { RTC_DCHECK(encoder_queue); encoder_queue_ = encoder_queue; } @@ -566,7 +567,8 @@ Channel::Channel(ProcessThread* module_process_thread, AudioDeviceModule* audio_device_module, size_t jitter_buffer_max_packets, bool jitter_buffer_fast_playout, - rtc::scoped_refptr<AudioDecoderFactory> decoder_factory) + rtc::scoped_refptr<AudioDecoderFactory> decoder_factory, + rtc::Optional<AudioCodecPairId> codec_pair_id) : event_log_proxy_(new RtcEventLogProxy()), rtcp_rtt_stats_proxy_(new RtcpRttStatsProxy()), rtp_payload_registry_(new RTPPayloadRegistry()), @@ -610,6 +612,7 @@ Channel::Channel(ProcessThread* module_process_thread, RTC_DCHECK(audio_device_module); AudioCodingModule::Config acm_config; acm_config.decoder_factory = decoder_factory; + acm_config.neteq_config.codec_pair_id = codec_pair_id; acm_config.neteq_config.max_packets_in_buffer = jitter_buffer_max_packets; acm_config.neteq_config.enable_fast_accelerate = jitter_buffer_fast_playout; acm_config.neteq_config.enable_muted_state = true; diff --git a/audio/channel.h b/audio/channel.h index e59cae11ad..9d5bfa4bac 100644 --- a/audio/channel.h +++ b/audio/channel.h @@ -157,7 +157,8 @@ class Channel AudioDeviceModule* audio_device_module, size_t jitter_buffer_max_packets, bool jitter_buffer_fast_playout, - rtc::scoped_refptr<AudioDecoderFactory> decoder_factory); + rtc::scoped_refptr<AudioDecoderFactory> decoder_factory, + rtc::Optional<AudioCodecPairId> codec_pair_id); virtual ~Channel(); void SetSink(AudioSinkInterface* sink); |