diff --git a/api/BUILD.gn b/api/BUILD.gn index 0a6c670936..1e4bac22ff 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -206,7 +206,6 @@ rtc_library("libjingle_peerconnection_api") { "../modules/audio_processing:audio_processing_statistics", "../rtc_base", "../rtc_base:checks", - "../rtc_base:deprecation", "../rtc_base:ip_address", "../rtc_base:rtc_base_approved", "../rtc_base:socket_address", diff --git a/api/DEPS b/api/DEPS index ffa9e98f47..52de6c37c8 100644 --- a/api/DEPS +++ b/api/DEPS @@ -45,7 +45,6 @@ specific_include_rules = { "+rtc_base/system/rtc_export.h", "+rtc_base/system/rtc_export_template.h", "+rtc_base/units/unit_base.h", - "+rtc_base/deprecation.h", ], "array_view\.h": [ diff --git a/api/audio_codecs/BUILD.gn b/api/audio_codecs/BUILD.gn index b6292de570..5926f5ec2e 100644 --- a/api/audio_codecs/BUILD.gn +++ b/api/audio_codecs/BUILD.gn @@ -33,7 +33,6 @@ rtc_library("audio_codecs_api") { "..:bitrate_allocation", "..:scoped_refptr", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base:sanitizer", "../../rtc_base/system:rtc_export", diff --git a/api/audio_codecs/audio_encoder.h b/api/audio_codecs/audio_encoder.h index fd2d948863..92e42cf107 100644 --- a/api/audio_codecs/audio_encoder.h +++ b/api/audio_codecs/audio_encoder.h @@ -16,12 +16,12 @@ #include #include +#include "absl/base/attributes.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/call/bitrate_allocation.h" #include "api/units/time_delta.h" #include "rtc_base/buffer.h" -#include "rtc_base/deprecation.h" namespace webrtc { @@ -182,12 +182,11 @@ class AudioEncoder { // implementation does nothing. virtual void SetMaxPlaybackRate(int frequency_hz); - // This is to be deprecated. Please use |OnReceivedTargetAudioBitrate| - // instead. // Tells the encoder what average bitrate we'd like it to produce. The // encoder is free to adjust or disregard the given bitrate (the default // implementation does the latter). - RTC_DEPRECATED virtual void SetTargetBitrate(int target_bps); + ABSL_DEPRECATED("Use OnReceivedTargetAudioBitrate instead") + virtual void SetTargetBitrate(int target_bps); // Causes this encoder to let go of any other encoders it contains, and // returns a pointer to an array where they are stored (which is required to @@ -210,7 +209,8 @@ class AudioEncoder { virtual void OnReceivedUplinkPacketLossFraction( float uplink_packet_loss_fraction); - RTC_DEPRECATED virtual void OnReceivedUplinkRecoverablePacketLossFraction( + ABSL_DEPRECATED("") + virtual void OnReceivedUplinkRecoverablePacketLossFraction( float uplink_recoverable_packet_loss_fraction); // Provides target audio bitrate to this encoder to allow it to adapt. diff --git a/api/jsep.h b/api/jsep.h index dcf821369e..b56cf1d15b 100644 --- a/api/jsep.h +++ b/api/jsep.h @@ -28,7 +28,6 @@ #include "absl/types/optional.h" #include "api/rtc_error.h" -#include "rtc_base/deprecation.h" #include "rtc_base/ref_count.h" #include "rtc_base/system/rtc_export.h" diff --git a/api/jsep_session_description.h b/api/jsep_session_description.h index e13d85e71c..70ac9398a6 100644 --- a/api/jsep_session_description.h +++ b/api/jsep_session_description.h @@ -23,7 +23,6 @@ #include "api/jsep.h" #include "api/jsep_ice_candidate.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/deprecation.h" namespace cricket { class SessionDescription; diff --git a/api/rtp_receiver_interface.h b/api/rtp_receiver_interface.h index 786ea3aceb..8984d71fe8 100644 --- a/api/rtp_receiver_interface.h +++ b/api/rtp_receiver_interface.h @@ -26,7 +26,6 @@ #include "api/rtp_parameters.h" #include "api/scoped_refptr.h" #include "api/transport/rtp/rtp_source.h" -#include "rtc_base/deprecation.h" #include "rtc_base/ref_count.h" #include "rtc_base/system/rtc_export.h" diff --git a/api/rtp_transceiver_interface.h b/api/rtp_transceiver_interface.h index 9b46846597..4799c4b153 100644 --- a/api/rtp_transceiver_interface.h +++ b/api/rtp_transceiver_interface.h @@ -14,6 +14,7 @@ #include #include +#include "absl/base/attributes.h" #include "absl/types/optional.h" #include "api/array_view.h" #include "api/media_types.h" @@ -111,8 +112,8 @@ class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface { // https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-direction // TODO(hta): Deprecate SetDirection without error and rename // SetDirectionWithError to SetDirection, remove default implementations. - RTC_DEPRECATED virtual void SetDirection( - RtpTransceiverDirection new_direction); + ABSL_DEPRECATED("Use SetDirectionWithError instead") + virtual void SetDirection(RtpTransceiverDirection new_direction); virtual RTCError SetDirectionWithError(RtpTransceiverDirection new_direction); // The current_direction attribute indicates the current direction negotiated @@ -140,7 +141,7 @@ class RTC_EXPORT RtpTransceiverInterface : public rtc::RefCountInterface { // This is an internal function, and is exposed for historical reasons. // https://w3c.github.io/webrtc-pc/#dfn-stop-the-rtcrtptransceiver virtual void StopInternal(); - RTC_DEPRECATED virtual void Stop(); + ABSL_DEPRECATED("Use StopStandard instead") virtual void Stop(); // The SetCodecPreferences method overrides the default codec preferences used // by WebRTC for this transceiver. diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn index 7d23adc37a..30955273b0 100644 --- a/api/transport/BUILD.gn +++ b/api/transport/BUILD.gn @@ -33,7 +33,6 @@ rtc_library("network_control") { deps = [ ":webrtc_key_value_config", - "../../rtc_base:deprecation", "../rtc_event_log", "../units:data_rate", "../units:data_size", @@ -89,8 +88,8 @@ rtc_library("goog_cc") { ":webrtc_key_value_config", "..:network_state_predictor_api", "../../modules/congestion_controller/goog_cc", - "../../rtc_base:deprecation", ] + absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ] } rtc_source_set("sctp_transport_factory_interface") { diff --git a/api/transport/goog_cc_factory.h b/api/transport/goog_cc_factory.h index b14d6dcd78..e12755d745 100644 --- a/api/transport/goog_cc_factory.h +++ b/api/transport/goog_cc_factory.h @@ -12,9 +12,9 @@ #define API_TRANSPORT_GOOG_CC_FACTORY_H_ #include +#include "absl/base/attributes.h" #include "api/network_state_predictor.h" #include "api/transport/network_control.h" -#include "rtc_base/deprecation.h" namespace webrtc { class RtcEventLog; @@ -31,8 +31,8 @@ class GoogCcNetworkControllerFactory : public NetworkControllerFactoryInterface { public: GoogCcNetworkControllerFactory() = default; - explicit RTC_DEPRECATED GoogCcNetworkControllerFactory( - RtcEventLog* event_log); + ABSL_DEPRECATED("") + explicit GoogCcNetworkControllerFactory(RtcEventLog* event_log); explicit GoogCcNetworkControllerFactory( NetworkStatePredictorFactoryInterface* network_state_predictor_factory); @@ -49,7 +49,8 @@ class GoogCcNetworkControllerFactory // Deprecated, use GoogCcFactoryConfig to enable feedback only mode instead. // Factory to create packet feedback only GoogCC, this can be used for // connections providing packet receive time feedback but no other reports. -class RTC_DEPRECATED GoogCcFeedbackNetworkControllerFactory +class ABSL_DEPRECATED("use GoogCcFactoryConfig instead") + GoogCcFeedbackNetworkControllerFactory : public GoogCcNetworkControllerFactory { public: explicit GoogCcFeedbackNetworkControllerFactory(RtcEventLog* event_log); diff --git a/api/transport/network_types.h b/api/transport/network_types.h index 10fc0beedf..38a8917f1e 100644 --- a/api/transport/network_types.h +++ b/api/transport/network_types.h @@ -19,7 +19,6 @@ #include "api/units/data_size.h" #include "api/units/time_delta.h" #include "api/units/timestamp.h" -#include "rtc_base/deprecation.h" namespace webrtc { diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index d50a334635..b697b86283 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -142,7 +142,6 @@ rtc_library("encoded_image") { "..:rtp_packet_info", "..:scoped_refptr", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:rtc_export", ] diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h index 650766ab64..60e6625991 100644 --- a/api/video/encoded_image.h +++ b/api/video/encoded_image.h @@ -16,6 +16,7 @@ #include #include +#include "absl/base/attributes.h" #include "absl/types/optional.h" #include "api/rtp_packet_infos.h" #include "api/scoped_refptr.h" @@ -26,7 +27,6 @@ #include "api/video/video_rotation.h" #include "api/video/video_timing.h" #include "rtc_base/checks.h" -#include "rtc_base/deprecation.h" #include "rtc_base/ref_count.h" #include "rtc_base/system/rtc_export.h" @@ -73,7 +73,8 @@ class RTC_EXPORT EncodedImage { EncodedImage(); EncodedImage(EncodedImage&&); EncodedImage(const EncodedImage&); - RTC_DEPRECATED EncodedImage(uint8_t* buffer, size_t length, size_t capacity); + ABSL_DEPRECATED("") + EncodedImage(uint8_t* buffer, size_t length, size_t capacity); ~EncodedImage(); diff --git a/api/video_codecs/video_encoder.h b/api/video_codecs/video_encoder.h index a030362ab7..caf069718b 100644 --- a/api/video_codecs/video_encoder.h +++ b/api/video_codecs/video_encoder.h @@ -364,7 +364,7 @@ class RTC_EXPORT VideoEncoder { // TODO(bugs.webrtc.org/10720): After updating downstream projects and posting // an announcement to discuss-webrtc, remove the three-parameters variant // and make the two-parameters variant pure-virtual. - /* RTC_DEPRECATED */ virtual int32_t InitEncode( + /* ABSL_DEPRECATED("bugs.webrtc.org/10720") */ virtual int32_t InitEncode( const VideoCodec* codec_settings, int32_t number_of_cores, size_t max_payload_size); diff --git a/audio/utility/BUILD.gn b/audio/utility/BUILD.gn index 54ca04698d..933553d81b 100644 --- a/audio/utility/BUILD.gn +++ b/audio/utility/BUILD.gn @@ -26,10 +26,10 @@ rtc_library("audio_frame_operations") { "../../api/audio:audio_frame_api", "../../common_audio", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../system_wrappers:field_trial", ] + absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ] } if (rtc_include_tests) { diff --git a/audio/utility/audio_frame_operations.h b/audio/utility/audio_frame_operations.h index 65c310c489..2f1540bcf5 100644 --- a/audio/utility/audio_frame_operations.h +++ b/audio/utility/audio_frame_operations.h @@ -14,8 +14,8 @@ #include #include +#include "absl/base/attributes.h" #include "api/audio/audio_frame.h" -#include "rtc_base/deprecation.h" namespace webrtc { @@ -36,12 +36,14 @@ class AudioFrameOperations { // |frame.num_channels_| will be updated. This version checks for sufficient // buffer size and that |num_channels_| is mono. Use UpmixChannels // instead. TODO(bugs.webrtc.org/8649): remove. - RTC_DEPRECATED static int MonoToStereo(AudioFrame* frame); + ABSL_DEPRECATED("bugs.webrtc.org/8649") + static int MonoToStereo(AudioFrame* frame); // |frame.num_channels_| will be updated. This version checks that // |num_channels_| is stereo. Use DownmixChannels // instead. TODO(bugs.webrtc.org/8649): remove. - RTC_DEPRECATED static int StereoToMono(AudioFrame* frame); + ABSL_DEPRECATED("bugs.webrtc.org/8649") + static int StereoToMono(AudioFrame* frame); // Downmixes 4 channels |src_audio| to stereo |dst_audio|. This is an in-place // operation, meaning |src_audio| and |dst_audio| may point to the same diff --git a/logging/BUILD.gn b/logging/BUILD.gn index 25f275ae0e..ff98a2e7a0 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -342,7 +342,6 @@ if (rtc_enable_protobuf) { "../modules/rtp_rtcp", "../modules/rtp_rtcp:rtp_rtcp_format", "../rtc_base:checks", - "../rtc_base:deprecation", "../rtc_base:ignore_wundef", "../rtc_base:protobuf_utils", "../rtc_base:rtc_base_approved", diff --git a/logging/rtc_event_log/rtc_event_log_parser.h b/logging/rtc_event_log/rtc_event_log_parser.h index 841bbf7d05..05ff94a9a8 100644 --- a/logging/rtc_event_log/rtc_event_log_parser.h +++ b/logging/rtc_event_log/rtc_event_log_parser.h @@ -19,6 +19,7 @@ #include // pair #include +#include "absl/base/attributes.h" #include "api/rtc_event_log/rtc_event_log.h" #include "call/video_receive_stream.h" #include "call/video_send_stream.h" @@ -296,7 +297,7 @@ class ParsedRtcEventLog { return error_ + " failed at " + file_ + " line " + std::to_string(line_); } - RTC_DEPRECATED operator bool() const { return ok(); } + ABSL_DEPRECATED("Use ok() instead") operator bool() const { return ok(); } private: ParseStatus() : error_(), file_(), line_(0) {} diff --git a/media/BUILD.gn b/media/BUILD.gn index 0ae8a6125a..76f06e0156 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -242,7 +242,6 @@ rtc_library("rtc_internal_video_codecs") { "../modules/video_coding/codecs/av1:libaom_av1_decoder", "../modules/video_coding/codecs/av1:libaom_av1_encoder", "../rtc_base:checks", - "../rtc_base:deprecation", "../rtc_base:rtc_base_approved", "../rtc_base/system:rtc_export", "../test:fake_video_codecs", diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index c98db4ea1a..c817905de5 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -17,7 +17,6 @@ visibility = [ ":*" ] rtc_source_set("audio_coding_module_typedefs") { visibility += [ "*" ] sources = [ "include/audio_coding_module_typedefs.h" ] - deps = [ "../../rtc_base:deprecation" ] } rtc_library("audio_coding") { @@ -52,7 +51,6 @@ rtc_library("audio_coding") { "../../common_audio:common_audio_c", "../../rtc_base:audio_format_to_string", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base/synchronization:mutex", "../../system_wrappers", diff --git a/modules/audio_coding/include/audio_coding_module_typedefs.h b/modules/audio_coding/include/audio_coding_module_typedefs.h index 07aa8c956f..a7210dadcb 100644 --- a/modules/audio_coding/include/audio_coding_module_typedefs.h +++ b/modules/audio_coding/include/audio_coding_module_typedefs.h @@ -13,8 +13,6 @@ #include -#include "rtc_base/deprecation.h" - namespace webrtc { /////////////////////////////////////////////////////////////////////////// diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn index 05f883948d..5d6a1d82fc 100644 --- a/modules/audio_device/BUILD.gn +++ b/modules/audio_device/BUILD.gn @@ -51,7 +51,6 @@ rtc_source_set("audio_device_api") { "../../api:scoped_refptr", "../../api/task_queue", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base:stringutils", ] @@ -171,7 +170,6 @@ rtc_library("audio_device_impl") { "../../common_audio:common_audio_c", "../../rtc_base", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base:rtc_task_queue", "../../rtc_base/synchronization:mutex", @@ -183,6 +181,7 @@ rtc_library("audio_device_impl") { "../../system_wrappers:metrics", "../utility", ] + absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ] if (rtc_include_internal_audio_device && is_ios) { deps += [ "../../sdk:audio_device" ] } diff --git a/modules/audio_device/include/audio_device_data_observer.h b/modules/audio_device/include/audio_device_data_observer.h index e1c2035d67..b59cafcb5d 100644 --- a/modules/audio_device/include/audio_device_data_observer.h +++ b/modules/audio_device/include/audio_device_data_observer.h @@ -14,6 +14,7 @@ #include #include +#include "absl/base/attributes.h" #include "api/scoped_refptr.h" #include "api/task_queue/task_queue_factory.h" #include "modules/audio_device/include/audio_device.h" @@ -48,7 +49,7 @@ rtc::scoped_refptr CreateAudioDeviceWithDataObserver( // Creates an ADMWrapper around an ADM instance that registers // the provided AudioDeviceDataObserver. -RTC_DEPRECATED +ABSL_DEPRECATED("") rtc::scoped_refptr CreateAudioDeviceWithDataObserver( rtc::scoped_refptr impl, AudioDeviceDataObserver* observer); @@ -60,7 +61,7 @@ rtc::scoped_refptr CreateAudioDeviceWithDataObserver( std::unique_ptr observer); // Creates an ADM instance with AudioDeviceDataObserver registered. -RTC_DEPRECATED +ABSL_DEPRECATED("") rtc::scoped_refptr CreateAudioDeviceWithDataObserver( const AudioDeviceModule::AudioLayer audio_layer, TaskQueueFactory* task_queue_factory, diff --git a/modules/audio_device/include/audio_device_defines.h b/modules/audio_device/include/audio_device_defines.h index d5d4d7372e..01129a47a9 100644 --- a/modules/audio_device/include/audio_device_defines.h +++ b/modules/audio_device/include/audio_device_defines.h @@ -16,7 +16,6 @@ #include #include "rtc_base/checks.h" -#include "rtc_base/deprecation.h" #include "rtc_base/strings/string_builder.h" namespace webrtc { diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index 6dc1add778..147748fc4e 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -43,7 +43,6 @@ rtc_library("api") { "../../api/audio:aec3_config", "../../api/audio:audio_frame_api", "../../api/audio:echo_control", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:arch", "../../rtc_base/system:file_wrapper", @@ -119,8 +118,8 @@ rtc_source_set("aec_dump_interface") { deps = [ ":api", ":audio_frame_view", - "../../rtc_base:deprecation", ] + absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ] } rtc_library("audio_processing") { @@ -177,7 +176,6 @@ rtc_library("audio_processing") { "../../common_audio:common_audio_c", "../../common_audio/third_party/ooura:fft_size_256", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:gtest_prod", "../../rtc_base:ignore_wundef", "../../rtc_base:refcount", diff --git a/modules/audio_processing/include/aec_dump.h b/modules/audio_processing/include/aec_dump.h index ed5acb0943..a7769d9973 100644 --- a/modules/audio_processing/include/aec_dump.h +++ b/modules/audio_processing/include/aec_dump.h @@ -15,9 +15,9 @@ #include +#include "absl/base/attributes.h" #include "modules/audio_processing/include/audio_frame_view.h" #include "modules/audio_processing/include/audio_processing.h" -#include "rtc_base/deprecation.h" namespace webrtc { @@ -76,7 +76,8 @@ class AecDump { // Logs Event::Type INIT message. virtual void WriteInitMessage(const ProcessingConfig& api_format, int64_t time_now_ms) = 0; - RTC_DEPRECATED void WriteInitMessage(const ProcessingConfig& api_format) { + ABSL_DEPRECATED("") + void WriteInitMessage(const ProcessingConfig& api_format) { WriteInitMessage(api_format, 0); } diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h index 67b9fc1a41..2312ffd536 100644 --- a/modules/audio_processing/include/audio_processing.h +++ b/modules/audio_processing/include/audio_processing.h @@ -32,7 +32,6 @@ #include "modules/audio_processing/include/config.h" #include "rtc_base/arraysize.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/deprecation.h" #include "rtc_base/ref_count.h" #include "rtc_base/system/file_wrapper.h" #include "rtc_base/system/rtc_export.h" diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 4233ef4081..9e5ec4a72d 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -116,7 +116,6 @@ rtc_library("rtp_rtcp_format") { "../../api/video:video_rtp_headers", "../../common_video", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:divide_round", "../../rtc_base:rtc_base_approved", "../../system_wrappers", @@ -284,7 +283,6 @@ rtc_library("rtp_rtcp") { "../../logging:rtc_event_rtp_rtcp", "../../modules/audio_coding:audio_coding_module_typedefs", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:divide_round", "../../rtc_base:gtest_prod", "../../rtc_base:rate_limiter", @@ -335,7 +333,6 @@ rtc_source_set("rtp_rtcp_legacy") { "../../api/video:video_bitrate_allocation", "../../logging:rtc_event_rtp_rtcp", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:gtest_prod", "../../rtc_base:rtc_base_approved", "../../rtc_base/synchronization:mutex", diff --git a/modules/rtp_rtcp/include/receive_statistics.h b/modules/rtp_rtcp/include/receive_statistics.h index 062c90bdbe..2cc3feab3a 100644 --- a/modules/rtp_rtcp/include/receive_statistics.h +++ b/modules/rtp_rtcp/include/receive_statistics.h @@ -20,7 +20,6 @@ #include "modules/rtp_rtcp/include/rtcp_statistics.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/rtcp_packet/report_block.h" -#include "rtc_base/deprecation.h" namespace webrtc { diff --git a/modules/rtp_rtcp/include/rtp_header_extension_map.h b/modules/rtp_rtcp/include/rtp_header_extension_map.h index ff2d34d60d..72e5541d37 100644 --- a/modules/rtp_rtcp/include/rtp_header_extension_map.h +++ b/modules/rtp_rtcp/include/rtp_header_extension_map.h @@ -19,7 +19,6 @@ #include "api/rtp_parameters.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "rtc_base/checks.h" -#include "rtc_base/deprecation.h" namespace webrtc { diff --git a/modules/rtp_rtcp/include/rtp_rtcp.h b/modules/rtp_rtcp/include/rtp_rtcp.h index df37bddb7d..727fc6e649 100644 --- a/modules/rtp_rtcp/include/rtp_rtcp.h +++ b/modules/rtp_rtcp/include/rtp_rtcp.h @@ -13,9 +13,9 @@ #include +#include "absl/base/attributes.h" #include "modules/include/module.h" #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h" -#include "rtc_base/deprecation.h" namespace webrtc { @@ -23,8 +23,8 @@ namespace webrtc { class RtpRtcp : public Module, public RtpRtcpInterface { public: // Instantiates a deprecated version of the RtpRtcp module. - static std::unique_ptr RTC_DEPRECATED - Create(const Configuration& configuration) { + static std::unique_ptr ABSL_DEPRECATED("") + Create(const Configuration& configuration) { return DEPRECATED_Create(configuration); } diff --git a/modules/rtp_rtcp/source/rtp_packet_received.h b/modules/rtp_rtcp/source/rtp_packet_received.h index c895313755..e1e1309594 100644 --- a/modules/rtp_rtcp/source/rtp_packet_received.h +++ b/modules/rtp_rtcp/source/rtp_packet_received.h @@ -19,7 +19,6 @@ #include "api/rtp_headers.h" #include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/rtp_packet.h" -#include "rtc_base/deprecation.h" namespace webrtc { // Class to hold rtp packet with metadata for receiver side. diff --git a/modules/rtp_rtcp/source/rtp_sender.h b/modules/rtp_rtcp/source/rtp_sender.h index 642c647955..8c579429cc 100644 --- a/modules/rtp_rtcp/source/rtp_sender.h +++ b/modules/rtp_rtcp/source/rtp_sender.h @@ -29,7 +29,6 @@ #include "modules/rtp_rtcp/source/rtp_packet_history.h" #include "modules/rtp_rtcp/source/rtp_rtcp_config.h" #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h" -#include "rtc_base/deprecation.h" #include "rtc_base/random.h" #include "rtc_base/rate_statistics.h" #include "rtc_base/synchronization/mutex.h" diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index a70adad8b8..ebf281faeb 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -186,7 +186,6 @@ rtc_library("video_coding") { "../../common_video", "../../rtc_base", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base:rtc_numerics", "../../rtc_base:rtc_task_queue", @@ -236,7 +235,6 @@ rtc_library("video_codec_interface") { "../../api/video_codecs:video_codecs_api", "../../common_video", "../../common_video/generic_frame_descriptor", - "../../rtc_base:deprecation", "../../rtc_base/system:rtc_export", ] absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ] @@ -487,7 +485,6 @@ rtc_library("webrtc_vp8") { "../../api/video_codecs:vp8_temporal_layers_factory", "../../common_video", "../../rtc_base:checks", - "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", "../../rtc_base:rtc_numerics", "../../rtc_base/experiments:cpu_speed_experiment", diff --git a/modules/video_coding/codecs/vp8/include/vp8.h b/modules/video_coding/codecs/vp8/include/vp8.h index 44efbeeb3b..d05c3a68d1 100644 --- a/modules/video_coding/codecs/vp8/include/vp8.h +++ b/modules/video_coding/codecs/vp8/include/vp8.h @@ -14,10 +14,10 @@ #include #include +#include "absl/base/attributes.h" #include "api/video_codecs/video_encoder.h" #include "api/video_codecs/vp8_frame_buffer_controller.h" #include "modules/video_coding/include/video_codec_interface.h" -#include "rtc_base/deprecation.h" namespace webrtc { @@ -40,7 +40,8 @@ class VP8Encoder { static std::unique_ptr Create(); static std::unique_ptr Create(Settings settings); - RTC_DEPRECATED static std::unique_ptr Create( + ABSL_DEPRECATED("") + static std::unique_ptr Create( std::unique_ptr frame_buffer_controller_factory); }; diff --git a/modules/video_coding/deprecated/BUILD.gn b/modules/video_coding/deprecated/BUILD.gn index fd3a5fa5fc..487c0267d5 100644 --- a/modules/video_coding/deprecated/BUILD.gn +++ b/modules/video_coding/deprecated/BUILD.gn @@ -21,7 +21,6 @@ rtc_library("nack_module") { "../../../api/units:timestamp", "../../../rtc_base:checks", "../../../rtc_base:criticalsection", - "../../../rtc_base:deprecation", "../../../rtc_base:logging", "../../../rtc_base:macromagic", "../../../rtc_base:rtc_numerics", @@ -31,4 +30,5 @@ rtc_library("nack_module") { "../../../system_wrappers:field_trial", "../../utility", ] + absl_deps = [ "//third_party/abseil-cpp/absl/base:core_headers" ] } diff --git a/modules/video_coding/deprecated/nack_module.h b/modules/video_coding/deprecated/nack_module.h index f9580ae80c..0ad009b597 100644 --- a/modules/video_coding/deprecated/nack_module.h +++ b/modules/video_coding/deprecated/nack_module.h @@ -17,11 +17,11 @@ #include #include +#include "absl/base/attributes.h" #include "api/units/time_delta.h" #include "modules/include/module.h" #include "modules/include/module_common_types.h" #include "modules/video_coding/histogram.h" -#include "rtc_base/deprecation.h" #include "rtc_base/numerics/sequence_number_util.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/thread_annotations.h" @@ -125,7 +125,7 @@ class DEPRECATED_NackModule : public Module { const absl::optional backoff_settings_; }; -using NackModule = RTC_DEPRECATED DEPRECATED_NackModule; +using NackModule = ABSL_DEPRECATED("") DEPRECATED_NackModule; } // namespace webrtc diff --git a/modules/video_coding/include/video_codec_interface.h b/modules/video_coding/include/video_codec_interface.h index b786be1693..4737dde90f 100644 --- a/modules/video_coding/include/video_codec_interface.h +++ b/modules/video_coding/include/video_codec_interface.h @@ -13,6 +13,7 @@ #include +#include "absl/base/attributes.h" #include "absl/types/optional.h" #include "api/video/video_frame.h" #include "api/video_codecs/video_decoder.h" @@ -21,7 +22,6 @@ #include "modules/video_coding/codecs/h264/include/h264_globals.h" #include "modules/video_coding/codecs/vp9/include/vp9_globals.h" #include "modules/video_coding/include/video_error_codes.h" -#include "rtc_base/deprecation.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { @@ -79,7 +79,7 @@ struct CodecSpecificInfoVP9 { uint8_t num_ref_pics; uint8_t p_diff[kMaxVp9RefPics]; - RTC_DEPRECATED bool end_of_picture; + ABSL_DEPRECATED("") bool end_of_picture; }; static_assert(std::is_pod::value, ""); diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 8a6fa3c816..2899dafb05 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -117,7 +117,6 @@ rtc_library("rtc_pc_base") { "../rtc_base", "../rtc_base:callback_list", "../rtc_base:checks", - "../rtc_base:deprecation", "../rtc_base:rtc_task_queue", "../rtc_base:socket", "../rtc_base:socket_address", @@ -289,7 +288,6 @@ rtc_library("peerconnection") { "../rtc_base", "../rtc_base:callback_list", "../rtc_base:checks", - "../rtc_base:deprecation", "../rtc_base:ip_address", "../rtc_base:network_constants", "../rtc_base:rtc_base_approved", diff --git a/pc/peer_connection.h b/pc/peer_connection.h index fc0832468a..d81f3c9918 100644 --- a/pc/peer_connection.h +++ b/pc/peer_connection.h @@ -88,7 +88,6 @@ #include "pc/usage_pattern.h" #include "rtc_base/checks.h" #include "rtc_base/copy_on_write_buffer.h" -#include "rtc_base/deprecation.h" #include "rtc_base/network/sent_packet.h" #include "rtc_base/rtc_certificate.h" #include "rtc_base/ssl_certificate.h" diff --git a/pc/session_description.h b/pc/session_description.h index 07270ee7e6..dacf1a2174 100644 --- a/pc/session_description.h +++ b/pc/session_description.h @@ -37,7 +37,6 @@ #include "pc/media_protocol_names.h" #include "pc/simulcast_description.h" #include "rtc_base/checks.h" -#include "rtc_base/deprecation.h" #include "rtc_base/socket_address.h" #include "rtc_base/system/rtc_export.h" diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index 49c73a1b47..28ff7fd53c 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -307,10 +307,6 @@ rtc_library("logging") { frameworks = [ "Foundation.framework" ] } - # logging.h needs the deprecation header while downstream projects are - # removing code that depends on logging implementation details. - deps += [ ":deprecation" ] - if (is_android) { libs += [ "log" ] } @@ -457,10 +453,6 @@ rtc_source_set("type_traits") { sources = [ "type_traits.h" ] } -rtc_source_set("deprecation") { - sources = [ "deprecation.h" ] -} - rtc_library("rtc_task_queue") { visibility = [ "*" ] sources = [ @@ -909,7 +901,6 @@ rtc_library("rtc_base") { ":async_resolver_interface", ":async_socket", ":checks", - ":deprecation", ":ip_address", ":network_constants", ":null_socket_server", diff --git a/rtc_base/deprecation.h b/rtc_base/deprecation.h deleted file mode 100644 index f285ab04bb..0000000000 --- a/rtc_base/deprecation.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. - * - * Use of this source code is governed by a BSD-style license - * that can be found in the LICENSE file in the root of the source - * tree. An additional intellectual property rights grant can be found - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - -#ifndef RTC_BASE_DEPRECATION_H_ -#define RTC_BASE_DEPRECATION_H_ - -// Annotate the declarations of deprecated functions with this to cause a -// compiler warning when they're used. Like so: -// -// RTC_DEPRECATED std::pony PonyPlz(const std::pony_spec& ps); -// -// NOTE 1: The annotation goes on the declaration in the .h file, not the -// definition in the .cc file! -// -// NOTE 2: In order to keep unit testing the deprecated function without -// getting warnings, do something like this: -// -// std::pony DEPRECATED_PonyPlz(const std::pony_spec& ps); -// RTC_DEPRECATED inline std::pony PonyPlz(const std::pony_spec& ps) { -// return DEPRECATED_PonyPlz(ps); -// } -// -// In other words, rename the existing function, and provide an inline wrapper -// using the original name that calls it. That way, callers who are willing to -// call it using the DEPRECATED_-prefixed name don't get the warning. -// -// TODO(kwiberg): Remove this when we can use [[deprecated]] from C++14. -#if defined(_MSC_VER) -// Note: Deprecation warnings seem to fail to trigger on Windows -// (https://bugs.chromium.org/p/webrtc/issues/detail?id=5368). -#define RTC_DEPRECATED __declspec(deprecated) -#elif defined(__GNUC__) -#define RTC_DEPRECATED __attribute__((__deprecated__)) -#else -#define RTC_DEPRECATED -#endif - -#endif // RTC_BASE_DEPRECATION_H_ diff --git a/rtc_base/logging.h b/rtc_base/logging.h index d2607c28b7..e21c30e21a 100644 --- a/rtc_base/logging.h +++ b/rtc_base/logging.h @@ -51,10 +51,10 @@ #include #include +#include "absl/base/attributes.h" #include "absl/meta/type_traits.h" #include "absl/strings/string_view.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/deprecation.h" #include "rtc_base/strings/string_builder.h" #include "rtc_base/system/inline.h" @@ -434,7 +434,7 @@ class LogMessage { // DEPRECATED - DO NOT USE - PLEASE USE THE MACROS INSTEAD OF THE CLASS. // Android code should use the 'const char*' version since tags are static // and we want to avoid allocating a std::string copy per log line. - RTC_DEPRECATED + ABSL_DEPRECATED("Use RTC_LOG macros instead of accessing this class directly") LogMessage(const char* file, int line, LoggingSeverity sev, @@ -508,7 +508,7 @@ class LogMessage { // DEPRECATED - DO NOT USE - PLEASE USE THE MACROS INSTEAD OF THE CLASS. // Android code should use the 'const char*' version since tags are static // and we want to avoid allocating a std::string copy per log line. - RTC_DEPRECATED + ABSL_DEPRECATED("Use RTC_LOG macros instead of accessing this class directly") LogMessage(const char* file, int line, LoggingSeverity sev, diff --git a/rtc_base/ssl_identity.h b/rtc_base/ssl_identity.h index d078b045a7..a9167ef5eb 100644 --- a/rtc_base/ssl_identity.h +++ b/rtc_base/ssl_identity.h @@ -18,7 +18,6 @@ #include #include -#include "rtc_base/deprecation.h" #include "rtc_base/system/rtc_export.h" namespace rtc { diff --git a/rtc_base/ssl_stream_adapter.h b/rtc_base/ssl_stream_adapter.h index 7bff726510..977768a657 100644 --- a/rtc_base/ssl_stream_adapter.h +++ b/rtc_base/ssl_stream_adapter.h @@ -18,7 +18,6 @@ #include #include "absl/memory/memory.h" -#include "rtc_base/deprecation.h" #include "rtc_base/ssl_certificate.h" #include "rtc_base/ssl_identity.h" #include "rtc_base/stream.h" diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 41902bb204..f6352d8742 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -365,7 +365,6 @@ if (!build_with_chromium) { ":chart_proto", "../api:function_view", "../api:network_state_predictor_api", - "../rtc_base:deprecation", "../rtc_base:ignore_wundef", # TODO(kwiberg): Remove this dependency. @@ -396,6 +395,7 @@ if (!build_with_chromium) { ] absl_deps = [ "//third_party/abseil-cpp/absl/algorithm:container", + "//third_party/abseil-cpp/absl/base:core_headers", "//third_party/abseil-cpp/absl/strings", "//third_party/abseil-cpp/absl/types:optional", ] diff --git a/rtc_tools/rtc_event_log_visualizer/plot_base.h b/rtc_tools/rtc_event_log_visualizer/plot_base.h index 06a206f031..a26146b5e5 100644 --- a/rtc_tools/rtc_event_log_visualizer/plot_base.h +++ b/rtc_tools/rtc_event_log_visualizer/plot_base.h @@ -15,7 +15,7 @@ #include #include -#include "rtc_base/deprecation.h" +#include "absl/base/attributes.h" #include "rtc_base/ignore_wundef.h" RTC_PUSH_IGNORING_WUNDEF() @@ -101,8 +101,8 @@ class Plot { public: virtual ~Plot() {} - // Deprecated. Use PrintPythonCode() or ExportProtobuf() instead. - RTC_DEPRECATED virtual void Draw() {} + ABSL_DEPRECATED("Use PrintPythonCode() or ExportProtobuf() instead.") + virtual void Draw() {} // Sets the lower x-axis limit to min_value (if left_margin == 0). // Sets the upper x-axis limit to max_value (if right_margin == 0). @@ -189,8 +189,8 @@ class PlotCollection { public: virtual ~PlotCollection() {} - // Deprecated. Use PrintPythonCode() or ExportProtobuf() instead. - RTC_DEPRECATED virtual void Draw() {} + ABSL_DEPRECATED("Use PrintPythonCode() or ExportProtobuf() instead.") + virtual void Draw() {} virtual Plot* AppendNewPlot(); diff --git a/rtc_tools/rtc_event_log_visualizer/plot_protobuf.h b/rtc_tools/rtc_event_log_visualizer/plot_protobuf.h index 0773b58d20..fbe68853a3 100644 --- a/rtc_tools/rtc_event_log_visualizer/plot_protobuf.h +++ b/rtc_tools/rtc_event_log_visualizer/plot_protobuf.h @@ -10,6 +10,7 @@ #ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_PLOT_PROTOBUF_H_ #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_PLOT_PROTOBUF_H_ +#include "absl/base/attributes.h" #include "rtc_base/ignore_wundef.h" RTC_PUSH_IGNORING_WUNDEF() #include "rtc_tools/rtc_event_log_visualizer/proto/chart.pb.h" @@ -25,10 +26,10 @@ class ProtobufPlot final : public Plot { void Draw() override; }; -class ProtobufPlotCollection final : public PlotCollection { +class ABSL_DEPRECATED("Use PlotCollection and ExportProtobuf() instead") + ProtobufPlotCollection final : public PlotCollection { public: - // This class is deprecated. Use PlotCollection and ExportProtobuf() instead. - RTC_DEPRECATED ProtobufPlotCollection(); + ProtobufPlotCollection(); ~ProtobufPlotCollection() override; void Draw() override; Plot* AppendNewPlot() override; diff --git a/rtc_tools/rtc_event_log_visualizer/plot_python.h b/rtc_tools/rtc_event_log_visualizer/plot_python.h index 998ed7b221..6acc436d71 100644 --- a/rtc_tools/rtc_event_log_visualizer/plot_python.h +++ b/rtc_tools/rtc_event_log_visualizer/plot_python.h @@ -10,6 +10,7 @@ #ifndef RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_PLOT_PYTHON_H_ #define RTC_TOOLS_RTC_EVENT_LOG_VISUALIZER_PLOT_PYTHON_H_ +#include "absl/base/attributes.h" #include "rtc_tools/rtc_event_log_visualizer/plot_base.h" namespace webrtc { @@ -21,10 +22,10 @@ class PythonPlot final : public Plot { void Draw() override; }; -class PythonPlotCollection final : public PlotCollection { +class ABSL_DEPRECATED("Use PlotCollection and PrintPythonCode() instead.") + PythonPlotCollection final : public PlotCollection { public: - // This class is deprecated. Use PlotCollection and PrintPythonCode() instead. - RTC_DEPRECATED explicit PythonPlotCollection(bool shared_xaxis = false); + explicit PythonPlotCollection(bool shared_xaxis = false); ~PythonPlotCollection() override; void Draw() override; Plot* AppendNewPlot() override;