Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(884)

Unified Diff: voice_engine/channel.cc

Issue 3014683002: Revert of Remove various IDs (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « modules/module_common_types_unittest.cc ('k') | voice_engine/voice_engine_defines.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: voice_engine/channel.cc
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc
index 875454a17d1321fc30e5bd90edbc0fff2ab3caf4..4dff3de585c38ef9aeeb2001fb0906cc6e621b7b 100644
--- a/voice_engine/channel.cc
+++ b/voice_engine/channel.cc
@@ -646,6 +646,8 @@
AudioFrameOperations::Mute(audio_frame);
}
+ // Convert module ID to internal VoE channel ID
+ audio_frame->id_ = VoEChannelId(audio_frame->id_);
// Store speech type for dead-or-alive detection
_outputSpeechType = audio_frame->speech_type_;
@@ -794,6 +796,7 @@
WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_instanceId, _channelId),
"Channel::Channel() - ctor");
AudioCodingModule::Config acm_config(config.acm_config);
+ acm_config.id = VoEModuleId(instanceId, channelId);
acm_config.neteq_config.enable_muted_state = true;
audio_coding_.reset(AudioCodingModule::Create(acm_config));
@@ -1639,6 +1642,7 @@
// TODO(henrika): try to avoid copying by moving ownership of audio frame
// either into pool of frames or into the task itself.
audio_frame->CopyFrom(audio_input);
+ audio_frame->id_ = ChannelId();
encoder_queue_->PostTask(std::unique_ptr<rtc::QueuedTask>(
new ProcessAndEncodeAudioTask(std::move(audio_frame), this)));
}
@@ -1655,6 +1659,7 @@
CodecInst codec;
const int result = GetSendCodec(codec);
std::unique_ptr<AudioFrame> audio_frame(new AudioFrame());
+ audio_frame->id_ = ChannelId();
// TODO(ossu): Investigate how this could happen. b/62909493
if (result == 0) {
audio_frame->sample_rate_hz_ = std::min(codec.plfreq, sample_rate);
@@ -1675,6 +1680,7 @@
RTC_DCHECK_RUN_ON(encoder_queue_);
RTC_DCHECK_GT(audio_input->samples_per_channel_, 0);
RTC_DCHECK_LE(audio_input->num_channels_, 2);
+ RTC_DCHECK_EQ(audio_input->id_, ChannelId());
bool is_muted = InputMute();
AudioFrameOperations::Mute(audio_input, previous_frame_muted_, is_muted);
« no previous file with comments | « modules/module_common_types_unittest.cc ('k') | voice_engine/voice_engine_defines.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698