Signal to NetEq Controller if arrived packets are DTX packets.
This CL also puts the arguments in a struct to allow for easier future additions.
Bug: webrtc:11005
Change-Id: I47bf664e7106b724eb1fc42299c42bbf022393ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188385
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Jakob Ivarsson <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32409}
diff --git a/modules/audio_coding/neteq/decision_logic.cc b/modules/audio_coding/neteq/decision_logic.cc
index a4de9b8..fb26b99 100644
--- a/modules/audio_coding/neteq/decision_logic.cc
+++ b/modules/audio_coding/neteq/decision_logic.cc
@@ -198,26 +198,24 @@
}
}
-absl::optional<int> DecisionLogic::PacketArrived(bool is_cng_or_dtmf,
- size_t packet_length_samples,
- bool should_update_stats,
- uint16_t main_sequence_number,
- uint32_t main_timestamp,
- int fs_hz) {
- if (is_cng_or_dtmf) {
+absl::optional<int> DecisionLogic::PacketArrived(
+ int fs_hz,
+ bool should_update_stats,
+ const PacketArrivedInfo& info) {
+ if (info.is_cng_or_dtmf) {
last_pack_cng_or_dtmf_ = true;
return absl::nullopt;
}
if (!should_update_stats) {
return absl::nullopt;
}
- if (packet_length_samples > 0 && fs_hz > 0 &&
- packet_length_samples != packet_length_samples_) {
- packet_length_samples_ = packet_length_samples;
+ if (info.packet_length_samples > 0 && fs_hz > 0 &&
+ info.packet_length_samples != packet_length_samples_) {
+ packet_length_samples_ = info.packet_length_samples;
delay_manager_->SetPacketAudioLength(packet_length_samples_ * 1000 / fs_hz);
}
auto relative_delay = delay_manager_->Update(
- main_timestamp, fs_hz, /*reset=*/last_pack_cng_or_dtmf_);
+ info.main_timestamp, fs_hz, /*reset=*/last_pack_cng_or_dtmf_);
last_pack_cng_or_dtmf_ = false;
return relative_delay;
}