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

Unified Diff: modules/audio_coding/acm2/audio_coding_module.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
Index: modules/audio_coding/acm2/audio_coding_module.cc
diff --git a/modules/audio_coding/acm2/audio_coding_module.cc b/modules/audio_coding/acm2/audio_coding_module.cc
index c48fbef32994dd46c78e85be6096472c2bc21048..5997d1269e5446da3574314c632c722237b85224 100644
--- a/modules/audio_coding/acm2/audio_coding_module.cc
+++ b/modules/audio_coding/acm2/audio_coding_module.cc
@@ -269,6 +269,7 @@
rtc::CriticalSection acm_crit_sect_;
rtc::Buffer encode_buffer_ RTC_GUARDED_BY(acm_crit_sect_);
+ int id_; // TODO(henrik.lundin) Make const.
uint32_t expected_codec_ts_ RTC_GUARDED_BY(acm_crit_sect_);
uint32_t expected_in_ts_ RTC_GUARDED_BY(acm_crit_sect_);
acm2::ACMResampler resampler_ RTC_GUARDED_BY(acm_crit_sect_);
@@ -455,7 +456,8 @@
AudioCodingModuleImpl::AudioCodingModuleImpl(
const AudioCodingModule::Config& config)
- : expected_codec_ts_(0xD87F3F9F),
+ : id_(config.id),
+ expected_codec_ts_(0xD87F3F9F),
expected_in_ts_(0xD87F3F9F),
receiver_(config),
bitrate_logger_("WebRTC.Audio.TargetBitrateInKbps"),
@@ -1118,6 +1120,7 @@
LOG(LS_ERROR) << "PlayoutData failed, RecOut Failed";
return -1;
}
+ audio_frame->id_ = id_;
return 0;
}
@@ -1283,7 +1286,7 @@
} // namespace
AudioCodingModule::Config::Config()
- : neteq_config(), clock(Clock::GetRealTimeClock()) {
+ : id(0), neteq_config(), clock(Clock::GetRealTimeClock()) {
// Post-decode VAD is disabled by default in NetEq, however, Audio
// Conference Mixer relies on VAD decisions and fails without them.
neteq_config.enable_post_decode_vad = true;
@@ -1293,15 +1296,17 @@
AudioCodingModule::Config::~Config() = default;
// Create module
-AudioCodingModule* AudioCodingModule::Create() {
+AudioCodingModule* AudioCodingModule::Create(int id) {
Config config;
+ config.id = id;
config.clock = Clock::GetRealTimeClock();
config.decoder_factory = CreateBuiltinAudioDecoderFactory();
return Create(config);
}
-AudioCodingModule* AudioCodingModule::Create(Clock* clock) {
+AudioCodingModule* AudioCodingModule::Create(int id, Clock* clock) {
Config config;
+ config.id = id;
config.clock = clock;
config.decoder_factory = CreateBuiltinAudioDecoderFactory();
return Create(config);
« no previous file with comments | « modules/audio_coding/acm2/acm_send_test.cc ('k') | modules/audio_coding/acm2/audio_coding_module_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698