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

Unified Diff: modules/include/module_common_types.h

Issue 3019543002: Remove various IDs (Closed)
Patch Set: rebase+build error 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/audio_mixer/frame_combiner_unittest.cc ('k') | modules/module_common_types_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: modules/include/module_common_types.h
diff --git a/modules/include/module_common_types.h b/modules/include/module_common_types.h
index bc5c347a4a93baadca7a294b8bf4b18d60e6697b..c3ad9935554295c3713abb087368ffc23e8a39a5 100644
--- a/modules/include/module_common_types.h
+++ b/modules/include/module_common_types.h
@@ -330,7 +330,18 @@ class AudioFrame {
// ResetWithoutMuting() to skip this wasteful zeroing.
void ResetWithoutMuting();
- void UpdateFrame(int id, uint32_t timestamp, const int16_t* data,
+ // 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,
size_t samples_per_channel, int sample_rate_hz,
SpeechType speech_type, VADActivity vad_activity,
size_t num_channels = 1);
@@ -366,7 +377,6 @@ class AudioFrame {
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.
@@ -414,7 +424,6 @@ inline void AudioFrame::Reset() {
}
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;
@@ -428,15 +437,13 @@ inline void AudioFrame::ResetWithoutMuting() {
profile_timestamp_ms_ = 0;
}
-inline void AudioFrame::UpdateFrame(int id,
- uint32_t timestamp,
+inline void AudioFrame::UpdateFrame(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;
@@ -457,7 +464,6 @@ inline void AudioFrame::UpdateFrame(int id,
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_;
« no previous file with comments | « modules/audio_mixer/frame_combiner_unittest.cc ('k') | modules/module_common_types_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698