Remove RTC_DISALLOW_COPY_AND_ASSIGN from modules/

Bug: webrtc:13555, webrtc:13082
Change-Id: I2c2cbcbd918f0cfa970c1a964893220ba11d4b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/247960
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: (Daniel.L) Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35771}
This commit is contained in:
Byoungchan Lee
2022-01-21 09:49:39 +09:00
committed by WebRTC LUCI CQ
parent ce6170fcdf
commit 604fd2f1ab
127 changed files with 466 additions and 393 deletions

View File

@ -18,7 +18,6 @@
#include "modules/audio_processing/aec3/aec3_common.h"
#include "modules/audio_processing/aec3/fft_data.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -30,6 +29,9 @@ class Aec3Fft {
Aec3Fft();
Aec3Fft(const Aec3Fft&) = delete;
Aec3Fft& operator=(const Aec3Fft&) = delete;
// Computes the FFT. Note that both the input and output are modified.
void Fft(std::array<float, kFftLength>* x, FftData* X) const {
RTC_DCHECK(x);
@ -66,8 +68,6 @@ class Aec3Fft {
private:
const OouraFft ooura_fft_;
RTC_DISALLOW_COPY_AND_ASSIGN(Aec3Fft);
};
} // namespace webrtc

View File

@ -11,8 +11,6 @@
#ifndef MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
#define MODULES_AUDIO_PROCESSING_AEC3_BLOCK_PROCESSOR_METRICS_H_
#include "rtc_base/constructor_magic.h"
namespace webrtc {
// Handles the reporting of metrics for the block_processor.
@ -20,6 +18,9 @@ class BlockProcessorMetrics {
public:
BlockProcessorMetrics() = default;
BlockProcessorMetrics(const BlockProcessorMetrics&) = delete;
BlockProcessorMetrics& operator=(const BlockProcessorMetrics&) = delete;
// Updates the metric with new capture data.
void UpdateCapture(bool underrun);
@ -38,8 +39,6 @@ class BlockProcessorMetrics {
int render_buffer_underruns_ = 0;
int render_buffer_overruns_ = 0;
int buffer_render_calls_ = 0;
RTC_DISALLOW_COPY_AND_ASSIGN(BlockProcessorMetrics);
};
} // namespace webrtc

View File

@ -17,7 +17,6 @@
#include "api/array_view.h"
#include "modules/audio_processing/aec3/aec3_common.h"
#include "modules/audio_processing/utility/cascaded_biquad_filter.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -26,6 +25,9 @@ class Decimator {
public:
explicit Decimator(size_t down_sampling_factor);
Decimator(const Decimator&) = delete;
Decimator& operator=(const Decimator&) = delete;
// Downsamples the signal.
void Decimate(rtc::ArrayView<const float> in, rtc::ArrayView<float> out);
@ -33,8 +35,6 @@ class Decimator {
const size_t down_sampling_factor_;
CascadedBiQuadFilter anti_aliasing_filter_;
CascadedBiQuadFilter noise_reduction_filter_;
RTC_DISALLOW_COPY_AND_ASSIGN(Decimator);
};
} // namespace webrtc

View File

@ -21,7 +21,6 @@
#include "modules/audio_processing/aec3/delay_estimate.h"
#include "modules/audio_processing/aec3/matched_filter.h"
#include "modules/audio_processing/aec3/matched_filter_lag_aggregator.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -37,6 +36,9 @@ class EchoPathDelayEstimator {
size_t num_capture_channels);
~EchoPathDelayEstimator();
EchoPathDelayEstimator(const EchoPathDelayEstimator&) = delete;
EchoPathDelayEstimator& operator=(const EchoPathDelayEstimator&) = delete;
// Resets the estimation. If the delay confidence is reset, the reset behavior
// is as if the call is restarted.
void Reset(bool reset_delay_confidence);
@ -71,8 +73,6 @@ class EchoPathDelayEstimator {
// Internal reset method with more granularity.
void Reset(bool reset_lag_aggregator, bool reset_delay_confidence);
RTC_DISALLOW_COPY_AND_ASSIGN(EchoPathDelayEstimator);
};
} // namespace webrtc

View File

@ -15,7 +15,6 @@
#include "modules/audio_processing/aec3/aec3_common.h"
#include "modules/audio_processing/aec3/aec_state.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -34,6 +33,9 @@ class EchoRemoverMetrics {
EchoRemoverMetrics();
EchoRemoverMetrics(const EchoRemoverMetrics&) = delete;
EchoRemoverMetrics& operator=(const EchoRemoverMetrics&) = delete;
// Updates the metric with new data.
void Update(
const AecState& aec_state,
@ -52,8 +54,6 @@ class EchoRemoverMetrics {
DbMetric erle_time_domain_;
bool saturated_capture_ = false;
bool metrics_reported_ = false;
RTC_DISALLOW_COPY_AND_ASSIGN(EchoRemoverMetrics);
};
namespace aec3 {

View File

@ -18,7 +18,6 @@
#include "api/array_view.h"
#include "modules/audio_processing/aec3/aec3_common.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -28,6 +27,9 @@ class ErlEstimator {
explicit ErlEstimator(size_t startup_phase_length_blocks_);
~ErlEstimator();
ErlEstimator(const ErlEstimator&) = delete;
ErlEstimator& operator=(const ErlEstimator&) = delete;
// Resets the ERL estimation.
void Reset();
@ -49,7 +51,6 @@ class ErlEstimator {
float erl_time_domain_;
int hold_counter_time_domain_;
size_t blocks_since_reset_ = 0;
RTC_DISALLOW_COPY_AND_ASSIGN(ErlEstimator);
};
} // namespace webrtc

View File

@ -15,7 +15,6 @@
#include "absl/types/optional.h"
#include "modules/audio_processing/aec3/clockdrift_detector.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -24,6 +23,10 @@ class RenderDelayControllerMetrics {
public:
RenderDelayControllerMetrics();
RenderDelayControllerMetrics(const RenderDelayControllerMetrics&) = delete;
RenderDelayControllerMetrics& operator=(const RenderDelayControllerMetrics&) =
delete;
// Updates the metric with new data.
void Update(absl::optional<size_t> delay_samples,
size_t buffer_delay_blocks,
@ -46,8 +49,6 @@ class RenderDelayControllerMetrics {
bool metrics_reported_ = false;
bool initial_update = true;
int skew_shift_count_ = 0;
RTC_DISALLOW_COPY_AND_ASSIGN(RenderDelayControllerMetrics);
};
} // namespace webrtc

View File

@ -20,7 +20,6 @@
#include "modules/audio_processing/aec3/aec3_common.h"
#include "modules/audio_processing/aec3/render_buffer.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -30,6 +29,9 @@ class RenderSignalAnalyzer {
explicit RenderSignalAnalyzer(const EchoCanceller3Config& config);
~RenderSignalAnalyzer();
RenderSignalAnalyzer(const RenderSignalAnalyzer&) = delete;
RenderSignalAnalyzer& operator=(const RenderSignalAnalyzer&) = delete;
// Updates the render signal analysis with the most recent render signal.
void Update(const RenderBuffer& render_buffer,
const absl::optional<size_t>& delay_partitions);
@ -53,8 +55,6 @@ class RenderSignalAnalyzer {
std::array<size_t, kFftLengthBy2 - 1> narrow_band_counters_;
absl::optional<int> narrow_peak_band_;
size_t narrow_peak_counter_;
RTC_DISALLOW_COPY_AND_ASSIGN(RenderSignalAnalyzer);
};
} // namespace webrtc

View File

@ -17,7 +17,6 @@
#include "modules/audio_processing/aec3/aec3_common.h"
#include "modules/audio_processing/aec3/aec3_fft.h"
#include "modules/audio_processing/aec3/fft_data.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -27,6 +26,10 @@ class SuppressionFilter {
int sample_rate_hz,
size_t num_capture_channels_);
~SuppressionFilter();
SuppressionFilter(const SuppressionFilter&) = delete;
SuppressionFilter& operator=(const SuppressionFilter&) = delete;
void ApplyGain(rtc::ArrayView<const FftData> comfort_noise,
rtc::ArrayView<const FftData> comfort_noise_high_bands,
const std::array<float, kFftLengthBy2Plus1>& suppression_gain,
@ -40,7 +43,6 @@ class SuppressionFilter {
const size_t num_capture_channels_;
const Aec3Fft fft_;
std::vector<std::vector<std::array<float, kFftLengthBy2>>> e_output_old_;
RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionFilter);
};
} // namespace webrtc

View File

@ -25,7 +25,6 @@
#include "modules/audio_processing/aec3/nearend_detector.h"
#include "modules/audio_processing/aec3/render_signal_analyzer.h"
#include "modules/audio_processing/logging/apm_data_dumper.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -36,6 +35,10 @@ class SuppressionGain {
int sample_rate_hz,
size_t num_capture_channels);
~SuppressionGain();
SuppressionGain(const SuppressionGain&) = delete;
SuppressionGain& operator=(const SuppressionGain&) = delete;
void GetGain(
rtc::ArrayView<const std::array<float, kFftLengthBy2Plus1>>
nearend_spectrum,
@ -134,8 +137,6 @@ class SuppressionGain {
// echo spectrum.
const bool use_unbounded_echo_spectrum_;
std::unique_ptr<NearendDetector> dominant_nearend_detector_;
RTC_DISALLOW_COPY_AND_ASSIGN(SuppressionGain);
};
} // namespace webrtc

View File

@ -16,7 +16,6 @@
#include "modules/audio_processing/agc2/agc2_common.h"
#include "modules/audio_processing/include/audio_frame_view.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -34,6 +33,10 @@ class FixedDigitalLevelEstimator {
FixedDigitalLevelEstimator(int sample_rate_hz,
ApmDataDumper* apm_data_dumper);
FixedDigitalLevelEstimator(const FixedDigitalLevelEstimator&) = delete;
FixedDigitalLevelEstimator& operator=(const FixedDigitalLevelEstimator&) =
delete;
// The input is assumed to be in FloatS16 format. Scaled input will
// produce similarly scaled output. A frame of with kFrameDurationMs
// ms of audio produces a level estimates in the same scale. The
@ -57,8 +60,6 @@ class FixedDigitalLevelEstimator {
float filter_state_level_;
int samples_in_frame_;
int samples_in_sub_frame_;
RTC_DISALLOW_COPY_AND_ASSIGN(FixedDigitalLevelEstimator);
};
} // namespace webrtc

View File

@ -15,7 +15,6 @@
#include <string>
#include "modules/audio_processing/agc2/agc2_common.h"
#include "rtc_base/constructor_magic.h"
#include "rtc_base/gtest_prod_util.h"
#include "system_wrappers/include/metrics.h"
@ -64,6 +63,9 @@ class InterpolatedGainCurve {
const std::string& histogram_name_prefix);
~InterpolatedGainCurve();
InterpolatedGainCurve(const InterpolatedGainCurve&) = delete;
InterpolatedGainCurve& operator=(const InterpolatedGainCurve&) = delete;
Stats get_stats() const { return stats_; }
// Given a non-negative input level (linear scale), a scalar factor to apply
@ -143,8 +145,6 @@ class InterpolatedGainCurve {
// Stats.
mutable Stats stats_;
RTC_DISALLOW_COPY_AND_ASSIGN(InterpolatedGainCurve);
};
} // namespace webrtc

View File

@ -18,7 +18,6 @@
#include "modules/audio_processing/audio_buffer.h"
#include "modules/audio_processing/include/audio_processing.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -85,6 +84,9 @@ class EchoControlMobileImpl::Canceller {
WebRtcAecm_Free(state_);
}
Canceller(const Canceller&) = delete;
Canceller& operator=(const Canceller&) = delete;
void* state() {
RTC_DCHECK(state_);
return state_;
@ -98,7 +100,6 @@ class EchoControlMobileImpl::Canceller {
private:
void* state_;
RTC_DISALLOW_COPY_AND_ASSIGN(Canceller);
};
EchoControlMobileImpl::EchoControlMobileImpl()

View File

@ -24,7 +24,6 @@
#include "modules/audio_processing/test/conversational_speech/timing.h"
#include "modules/audio_processing/test/conversational_speech/wavreader_abstract_factory.h"
#include "modules/audio_processing/test/conversational_speech/wavreader_interface.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
namespace test {
@ -57,6 +56,9 @@ class MultiEndCall {
std::unique_ptr<WavReaderAbstractFactory> wavreader_abstract_factory);
~MultiEndCall();
MultiEndCall(const MultiEndCall&) = delete;
MultiEndCall& operator=(const MultiEndCall&) = delete;
const std::set<std::string>& speaker_names() const { return speaker_names_; }
const std::map<std::string, std::unique_ptr<WavReaderInterface>>&
audiotrack_readers() const {
@ -92,8 +94,6 @@ class MultiEndCall {
int sample_rate_hz_;
size_t total_duration_samples_;
std::vector<SpeakingTurn> speaking_turns_;
RTC_DISALLOW_COPY_AND_ASSIGN(MultiEndCall);
};
} // namespace conversational_speech

View File

@ -23,7 +23,6 @@
#include "common_audio/channel_buffer.h"
#include "common_audio/wav_file.h"
#include "modules/audio_processing/include/audio_processing.h"
#include "rtc_base/constructor_magic.h"
namespace webrtc {
@ -35,13 +34,14 @@ class RawFile final {
explicit RawFile(const std::string& filename);
~RawFile();
RawFile(const RawFile&) = delete;
RawFile& operator=(const RawFile&) = delete;
void WriteSamples(const int16_t* samples, size_t num_samples);
void WriteSamples(const float* samples, size_t num_samples);
private:
FILE* file_handle_;
RTC_DISALLOW_COPY_AND_ASSIGN(RawFile);
};
// Encapsulates samples and metadata for an integer frame.
@ -78,6 +78,9 @@ class ChannelBufferWavReader final {
explicit ChannelBufferWavReader(std::unique_ptr<WavReader> file);
~ChannelBufferWavReader();
ChannelBufferWavReader(const ChannelBufferWavReader&) = delete;
ChannelBufferWavReader& operator=(const ChannelBufferWavReader&) = delete;
// Reads data from the file according to the `buffer` format. Returns false if
// a full buffer can't be read from the file.
bool Read(ChannelBuffer<float>* buffer);
@ -85,8 +88,6 @@ class ChannelBufferWavReader final {
private:
std::unique_ptr<WavReader> file_;
std::vector<float> interleaved_;
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavReader);
};
// Writes ChannelBuffers to a provided WavWriter.
@ -95,13 +96,14 @@ class ChannelBufferWavWriter final {
explicit ChannelBufferWavWriter(std::unique_ptr<WavWriter> file);
~ChannelBufferWavWriter();
ChannelBufferWavWriter(const ChannelBufferWavWriter&) = delete;
ChannelBufferWavWriter& operator=(const ChannelBufferWavWriter&) = delete;
void Write(const ChannelBuffer<float>& buffer);
private:
std::unique_ptr<WavWriter> file_;
std::vector<float> interleaved_;
RTC_DISALLOW_COPY_AND_ASSIGN(ChannelBufferWavWriter);
};
// Takes a pointer to a vector. Allows appending the samples of channel buffers