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}
diff --git a/modules/video_coding/codecs/test/videoprocessor.h b/modules/video_coding/codecs/test/videoprocessor.h
index eafe492..595a4f1 100644
--- a/modules/video_coding/codecs/test/videoprocessor.h
+++ b/modules/video_coding/codecs/test/videoprocessor.h
@@ -37,7 +37,6 @@
 #include "modules/video_coding/utility/ivf_file_writer.h"
 #include "rtc_base/buffer.h"
 #include "rtc_base/checks.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/no_unique_address.h"
 #include "rtc_base/thread_annotations.h"
 #include "test/testsupport/frame_reader.h"
@@ -70,6 +69,9 @@
                  FrameWriterList* decoded_frame_writers);
   ~VideoProcessor();
 
+  VideoProcessor(const VideoProcessor&) = delete;
+  VideoProcessor& operator=(const VideoProcessor&) = delete;
+
   // Reads a frame and sends it to the encoder. When the encode callback
   // is received, the encoded frame is buffered. After encoding is finished
   // buffered frame is sent to decoder. Quality evaluation is done in
@@ -270,8 +272,6 @@
 
   // This class must be operated on a TaskQueue.
   RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(VideoProcessor);
 };
 
 }  // namespace test
diff --git a/modules/video_coding/fec_controller_default.h b/modules/video_coding/fec_controller_default.h
index 6b9e8eb..cca1658 100644
--- a/modules/video_coding/fec_controller_default.h
+++ b/modules/video_coding/fec_controller_default.h
@@ -19,7 +19,6 @@
 
 #include "api/fec_controller.h"
 #include "modules/video_coding/media_opt_util.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
 #include "system_wrappers/include/clock.h"
@@ -32,6 +31,10 @@
                        VCMProtectionCallback* protection_callback);
   explicit FecControllerDefault(Clock* clock);
   ~FecControllerDefault() override;
+
+  FecControllerDefault(const FecControllerDefault&) = delete;
+  FecControllerDefault& operator=(const FecControllerDefault&) = delete;
+
   void SetProtectionCallback(
       VCMProtectionCallback* protection_callback) override;
   void SetProtectionMethod(bool enable_fec, bool enable_nack) override;
@@ -58,7 +61,7 @@
   std::unique_ptr<media_optimization::VCMLossProtectionLogic> loss_prot_logic_
       RTC_GUARDED_BY(mutex_);
   size_t max_payload_size_ RTC_GUARDED_BY(mutex_);
-  RTC_DISALLOW_COPY_AND_ASSIGN(FecControllerDefault);
+
   const float overhead_threshold_;
 };
 
diff --git a/modules/video_coding/h264_sprop_parameter_sets.h b/modules/video_coding/h264_sprop_parameter_sets.h
index dbf27ef..8a32f31 100644
--- a/modules/video_coding/h264_sprop_parameter_sets.h
+++ b/modules/video_coding/h264_sprop_parameter_sets.h
@@ -15,13 +15,15 @@
 #include <string>
 #include <vector>
 
-#include "rtc_base/constructor_magic.h"
-
 namespace webrtc {
 
 class H264SpropParameterSets {
  public:
   H264SpropParameterSets() {}
+
+  H264SpropParameterSets(const H264SpropParameterSets&) = delete;
+  H264SpropParameterSets& operator=(const H264SpropParameterSets&) = delete;
+
   bool DecodeSprop(const std::string& sprop);
   const std::vector<uint8_t>& sps_nalu() { return sps_; }
   const std::vector<uint8_t>& pps_nalu() { return pps_; }
@@ -29,7 +31,6 @@
  private:
   std::vector<uint8_t> sps_;
   std::vector<uint8_t> pps_;
-  RTC_DISALLOW_COPY_AND_ASSIGN(H264SpropParameterSets);
 };
 
 }  // namespace webrtc
diff --git a/modules/video_coding/jitter_buffer.h b/modules/video_coding/jitter_buffer.h
index 23f19bf..df7581a 100644
--- a/modules/video_coding/jitter_buffer.h
+++ b/modules/video_coding/jitter_buffer.h
@@ -26,7 +26,6 @@
 #include "modules/video_coding/inter_frame_delay.h"
 #include "modules/video_coding/jitter_buffer_common.h"
 #include "modules/video_coding/jitter_estimator.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/synchronization/mutex.h"
 #include "rtc_base/thread_annotations.h"
 
@@ -74,6 +73,9 @@
 
   ~VCMJitterBuffer();
 
+  VCMJitterBuffer(const VCMJitterBuffer&) = delete;
+  VCMJitterBuffer& operator=(const VCMJitterBuffer&) = delete;
+
   // Initializes and starts jitter buffer.
   void Start();
 
@@ -264,8 +266,6 @@
   // average_packets_per_frame converges fast if we have fewer than this many
   // frames.
   int frame_counter_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer);
 };
 }  // namespace webrtc
 
diff --git a/modules/video_coding/test/stream_generator.h b/modules/video_coding/test/stream_generator.h
index f542bab..ddb23eb 100644
--- a/modules/video_coding/test/stream_generator.h
+++ b/modules/video_coding/test/stream_generator.h
@@ -15,7 +15,6 @@
 #include <list>
 
 #include "modules/video_coding/packet.h"
-#include "rtc_base/constructor_magic.h"
 
 namespace webrtc {
 
@@ -29,6 +28,10 @@
 class StreamGenerator {
  public:
   StreamGenerator(uint16_t start_seq_num, int64_t current_time);
+
+  StreamGenerator(const StreamGenerator&) = delete;
+  StreamGenerator& operator=(const StreamGenerator&) = delete;
+
   void Init(uint16_t start_seq_num, int64_t current_time);
 
   // `time_ms` denotes the timestamp you want to put on the frame, and the unit
@@ -64,8 +67,6 @@
   uint16_t sequence_number_;
   int64_t start_time_;
   uint8_t packet_buffer_[kMaxPacketSize];
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(StreamGenerator);
 };
 
 }  // namespace webrtc
diff --git a/modules/video_coding/utility/ivf_file_reader.h b/modules/video_coding/utility/ivf_file_reader.h
index cc64d4c..75f2e3a 100644
--- a/modules/video_coding/utility/ivf_file_reader.h
+++ b/modules/video_coding/utility/ivf_file_reader.h
@@ -17,7 +17,6 @@
 #include "absl/types/optional.h"
 #include "api/video/encoded_image.h"
 #include "api/video_codecs/video_codec.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/file_wrapper.h"
 
 namespace webrtc {
@@ -27,6 +26,10 @@
   // Creates IvfFileReader. Returns nullptr if error acquired.
   static std::unique_ptr<IvfFileReader> Create(FileWrapper file);
   ~IvfFileReader();
+
+  IvfFileReader(const IvfFileReader&) = delete;
+  IvfFileReader& operator=(const IvfFileReader&) = delete;
+
   // Reinitializes reader. Returns false if any error acquired.
   bool Reset();
 
@@ -72,8 +75,6 @@
 
   absl::optional<FrameHeader> next_frame_header_;
   bool has_error_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileReader);
 };
 
 }  // namespace webrtc
diff --git a/modules/video_coding/utility/ivf_file_writer.h b/modules/video_coding/utility/ivf_file_writer.h
index 874f60a..b53459b 100644
--- a/modules/video_coding/utility/ivf_file_writer.h
+++ b/modules/video_coding/utility/ivf_file_writer.h
@@ -18,7 +18,6 @@
 
 #include "api/video/encoded_image.h"
 #include "api/video/video_codec_type.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/system/file_wrapper.h"
 #include "rtc_base/time_utils.h"
 
@@ -34,6 +33,9 @@
                                              size_t byte_limit);
   ~IvfFileWriter();
 
+  IvfFileWriter(const IvfFileWriter&) = delete;
+  IvfFileWriter& operator=(const IvfFileWriter&) = delete;
+
   bool WriteFrame(const EncodedImage& encoded_image, VideoCodecType codec_type);
   bool Close();
 
@@ -57,8 +59,6 @@
   bool using_capture_timestamps_;
   rtc::TimestampWrapAroundHandler wrap_handler_;
   FileWrapper file_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(IvfFileWriter);
 };
 
 }  // namespace webrtc
diff --git a/modules/video_coding/utility/simulcast_rate_allocator.h b/modules/video_coding/utility/simulcast_rate_allocator.h
index 9b2f969..6f93dbd 100644
--- a/modules/video_coding/utility/simulcast_rate_allocator.h
+++ b/modules/video_coding/utility/simulcast_rate_allocator.h
@@ -19,7 +19,6 @@
 #include "api/video/video_bitrate_allocation.h"
 #include "api/video/video_bitrate_allocator.h"
 #include "api/video_codecs/video_codec.h"
-#include "rtc_base/constructor_magic.h"
 #include "rtc_base/experiments/rate_control_settings.h"
 #include "rtc_base/experiments/stable_target_rate_experiment.h"
 
@@ -30,6 +29,9 @@
   explicit SimulcastRateAllocator(const VideoCodec& codec);
   ~SimulcastRateAllocator() override;
 
+  SimulcastRateAllocator(const SimulcastRateAllocator&) = delete;
+  SimulcastRateAllocator& operator=(const SimulcastRateAllocator&) = delete;
+
   VideoBitrateAllocation Allocate(
       VideoBitrateAllocationParameters parameters) override;
   const VideoCodec& GetCodec() const;
@@ -61,8 +63,6 @@
   const RateControlSettings rate_control_settings_;
   std::vector<bool> stream_enabled_;
   bool legacy_conference_mode_;
-
-  RTC_DISALLOW_COPY_AND_ASSIGN(SimulcastRateAllocator);
 };
 
 }  // namespace webrtc