Index: webrtc/modules/include/module_common_types.h |
diff --git a/webrtc/modules/include/module_common_types.h b/webrtc/modules/include/module_common_types.h |
index a5ea5c8e2d7da8327573eb74b1795087dd8f0085..b0b4c6796c19920e1c2700188dd68dd26d28ad08 100644 |
--- a/webrtc/modules/include/module_common_types.h |
+++ b/webrtc/modules/include/module_common_types.h |
@@ -18,6 +18,7 @@ |
#include <limits> |
#include "webrtc/base/constructormagic.h" |
+#include "webrtc/base/deprecation.h" |
#include "webrtc/common_types.h" |
#include "webrtc/common_video/rotation.h" |
#include "webrtc/typedefs.h" |
@@ -520,8 +521,6 @@ class CallStatsObserver { |
* |
* - Stereo data is interleaved starting with the left channel. |
* |
- * - The +operator assume that you would never add exactly opposite frames when |
- * deciding the resulting state. To do this use the -operator. |
*/ |
class AudioFrame { |
public: |
@@ -556,10 +555,13 @@ class AudioFrame { |
void CopyFrom(const AudioFrame& src); |
- void Mute(); |
- |
- AudioFrame& operator>>=(const int rhs); |
- AudioFrame& operator+=(const AudioFrame& rhs); |
+ // These methods are deprecated. Use the functions in |
+ // webrtc/audio/utility instead. These methods will exists for a |
+ // short period of time until webrtc clients have updated. See |
+ // webrtc:6548 for details. |
+ RTC_DEPRECATED void Mute(); |
+ 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. |
@@ -585,7 +587,6 @@ class AudioFrame { |
// See https://bugs.chromium.org/p/webrtc/issues/detail?id=5647. |
inline AudioFrame::AudioFrame() |
: data_() { |
- Reset(); |
} |
inline void AudioFrame::Reset() { |
@@ -660,7 +661,7 @@ inline AudioFrame& AudioFrame::operator>>=(const int rhs) { |
} |
namespace { |
-inline int16_t ClampToInt16(int32_t input) { |
+inline int16_t DEPRECATED_ClampToInt16(int32_t input) { |
if (input < -0x00008000) { |
return -0x8000; |
} else if (input > 0x00007FFF) { |
@@ -704,7 +705,7 @@ inline AudioFrame& AudioFrame::operator+=(const AudioFrame& rhs) { |
for (size_t i = 0; i < samples_per_channel_ * num_channels_; i++) { |
int32_t wrap_guard = |
static_cast<int32_t>(data_[i]) + static_cast<int32_t>(rhs.data_[i]); |
- data_[i] = ClampToInt16(wrap_guard); |
+ data_[i] = DEPRECATED_ClampToInt16(wrap_guard); |
} |
} |
return *this; |