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/api/neteq/neteq_controller.h b/api/neteq/neteq_controller.h
index 499b999..8344cd1 100644
--- a/api/neteq/neteq_controller.h
+++ b/api/neteq/neteq_controller.h
@@ -97,6 +97,14 @@
     size_t sync_buffer_samples;
   };
 
+  struct PacketArrivedInfo {
+    size_t packet_length_samples;
+    uint32_t main_timestamp;
+    uint16_t main_sequence_number;
+    bool is_cng_or_dtmf;
+    bool is_dtx;
+  };
+
   virtual ~NetEqController() = default;
 
   // Resets object to a clean state.
@@ -154,15 +162,33 @@
   // Returns the target buffer level in ms.
   virtual int TargetLevelMs() const = 0;
 
-  // Notify the NetEqController that a packet has arrived. Returns the relative
-  // arrival delay, if it can be computed.
+  // Deprecated.
+  // TODO(ivoc): Remove when downstream is updated.
   virtual absl::optional<int> PacketArrived(bool last_cng_or_dtmf,
                                             size_t packet_length_samples,
                                             bool should_update_stats,
                                             uint16_t main_sequence_number,
                                             uint32_t main_timestamp,
-                                            int fs_hz) = 0;
+                                            int fs_hz) {
+    PacketArrivedInfo info;
+    info.is_dtx = false;
+    info.is_cng_or_dtmf = last_cng_or_dtmf;
+    info.packet_length_samples = packet_length_samples;
+    info.main_sequence_number = main_sequence_number;
+    info.main_timestamp = main_timestamp;
+    return PacketArrived(fs_hz, should_update_stats, info);
+  }
 
+  // Notify the NetEqController that a packet has arrived. Returns the relative
+  // arrival delay, if it can be computed.
+  // TODO(ivoc): Make pure virtual when downstream is updated.
+  virtual absl::optional<int> PacketArrived(int fs_hz,
+                                            bool should_update_stats,
+                                            const PacketArrivedInfo& info) {
+    return PacketArrived(info.is_cng_or_dtmf, info.packet_length_samples,
+                         should_update_stats, info.main_sequence_number,
+                         info.main_timestamp, fs_hz);
+  }
   // Notify the NetEqController that we are currently in muted state.
   // TODO(ivoc): Make pure virtual when downstream is updated.
   virtual void NotifyMutedState() {}