Index: modules/include/module_common_types.h |
diff --git a/modules/include/module_common_types.h b/modules/include/module_common_types.h |
index c3ad9935554295c3713abb087368ffc23e8a39a5..bc5c347a4a93baadca7a294b8bf4b18d60e6697b 100644 |
--- a/modules/include/module_common_types.h |
+++ b/modules/include/module_common_types.h |
@@ -330,18 +330,7 @@ |
// ResetWithoutMuting() to skip this wasteful zeroing. |
void ResetWithoutMuting(); |
- // TODO(solenberg): Remove once downstream users of AudioFrame have updated. |
- RTC_DEPRECATED |
- void UpdateFrame(int id, uint32_t timestamp, const int16_t* data, |
- size_t samples_per_channel, int sample_rate_hz, |
- SpeechType speech_type, VADActivity vad_activity, |
- size_t num_channels = 1) { |
- RTC_UNUSED(id); |
- UpdateFrame(timestamp, data, samples_per_channel, sample_rate_hz, |
- speech_type, vad_activity, num_channels); |
- } |
- |
- void UpdateFrame(uint32_t timestamp, const int16_t* data, |
+ void UpdateFrame(int id, uint32_t timestamp, const int16_t* data, |
size_t samples_per_channel, int sample_rate_hz, |
SpeechType speech_type, VADActivity vad_activity, |
size_t num_channels = 1); |
@@ -377,6 +366,7 @@ |
RTC_DEPRECATED AudioFrame& operator>>=(const int rhs); |
RTC_DEPRECATED AudioFrame& operator+=(const AudioFrame& rhs); |
+ int id_; |
// RTP timestamp of the first sample in the AudioFrame. |
uint32_t timestamp_ = 0; |
// Time since the first frame in milliseconds. |
@@ -424,6 +414,7 @@ |
} |
inline void AudioFrame::ResetWithoutMuting() { |
+ id_ = -1; |
// TODO(wu): Zero is a valid value for |timestamp_|. We should initialize |
// to an invalid value, or add a new member to indicate invalidity. |
timestamp_ = 0; |
@@ -437,13 +428,15 @@ |
profile_timestamp_ms_ = 0; |
} |
-inline void AudioFrame::UpdateFrame(uint32_t timestamp, |
+inline void AudioFrame::UpdateFrame(int id, |
+ uint32_t timestamp, |
const int16_t* data, |
size_t samples_per_channel, |
int sample_rate_hz, |
SpeechType speech_type, |
VADActivity vad_activity, |
size_t num_channels) { |
+ id_ = id; |
timestamp_ = timestamp; |
samples_per_channel_ = samples_per_channel; |
sample_rate_hz_ = sample_rate_hz; |
@@ -464,6 +457,7 @@ |
inline void AudioFrame::CopyFrom(const AudioFrame& src) { |
if (this == &src) return; |
+ id_ = src.id_; |
timestamp_ = src.timestamp_; |
elapsed_time_ms_ = src.elapsed_time_ms_; |
ntp_time_ms_ = src.ntp_time_ms_; |