From d970807e0c6cb1bf958f1a33513f86ff91dcfcb4 Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Fri, 25 Jan 2019 20:26:48 +0100 Subject: [PATCH] Remove rtc_base/scoped_ref_ptr.h. The type rtc::scoped_refptr is now part of api/. Please include it from api/scoped_refptr.h. More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o. Bug: webrtc:9887, webrtc:8205 No-Try: True Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf Reviewed-on: https://webrtc-review.googlesource.com/c/119041 Commit-Queue: Mirko Bonadei Reviewed-by: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#26414} --- api/BUILD.gn | 6 +++-- api/DEPS | 20 -------------- api/audio_codecs/BUILD.gn | 3 +++ .../audio_decoder_factory_template.h | 2 +- .../audio_encoder_factory_template.h | 2 +- .../builtin_audio_decoder_factory.h | 2 +- .../builtin_audio_encoder_factory.h | 2 +- api/create_peerconnection_factory.cc | 2 +- api/create_peerconnection_factory.h | 2 +- api/media_stream_interface.h | 2 +- api/proxy.h | 2 +- api/rtp_receiver_interface.h | 2 +- api/rtp_sender_interface.h | 2 +- api/rtp_transceiver_interface.h | 2 +- api/stats/rtc_stats_collector_callback.h | 2 +- api/stats/rtc_stats_report.h | 2 +- api/stats_types.h | 2 +- api/video/BUILD.gn | 7 +++-- api/video/DEPS | 4 --- api/video/i010_buffer.h | 2 +- api/video/i420_buffer.h | 2 +- api/video/video_frame.h | 2 +- api/video/video_frame_buffer.h | 2 +- api/video_codecs/BUILD.gn | 5 ++-- api/video_codecs/test/BUILD.gn | 2 +- ...oder_software_fallback_wrapper_unittest.cc | 2 +- api/video_codecs/video_encoder_config.h | 2 +- audio/BUILD.gn | 1 + audio/audio_transport_impl.h | 2 +- call/BUILD.gn | 1 + call/audio_receive_stream.h | 2 +- call/audio_send_stream.h | 2 +- call/audio_state.h | 2 +- common_video/BUILD.gn | 2 ++ common_video/i420_buffer_pool_unittest.cc | 2 +- common_video/include/i420_buffer_pool.h | 2 +- common_video/include/video_frame_buffer.h | 2 +- common_video/libyuv/include/webrtc_libyuv.h | 2 +- examples/BUILD.gn | 2 ++ examples/androidnativeapi/BUILD.gn | 1 + .../jni/android_call_client.h | 2 +- .../objcnativeapi/objc/objc_call_client.h | 2 +- examples/peerconnection/client/linux/main.cc | 2 +- .../peerconnection/client/linux/main_wnd.h | 2 +- logging/BUILD.gn | 12 ++++----- media/BUILD.gn | 5 ++++ media/base/adapted_video_track_source.cc | 2 +- media/base/fake_frame_source.cc | 2 +- media/base/fake_video_capturer.cc | 2 +- media/base/fake_video_renderer.h | 2 +- media/base/video_broadcaster.h | 2 +- media/base/video_capturer.cc | 2 +- media/engine/apm_helpers_unittest.cc | 2 +- media/engine/simulcast_encoder_adapter.cc | 2 +- media/engine/webrtc_voice_engine.h | 2 +- media/engine/webrtc_voice_engine_unittest.cc | 2 +- modules/audio_coding/BUILD.gn | 3 +++ modules/audio_coding/acm2/acm_receive_test.h | 2 +- .../codecs/isac/audio_decoder_isac_t.h | 2 +- .../codecs/isac/audio_encoder_isac_t.h | 2 +- modules/audio_coding/neteq/decoder_database.h | 2 +- modules/audio_coding/neteq/include/neteq.h | 2 +- modules/audio_device/BUILD.gn | 5 ++++ .../android/audio_device_unittest.cc | 2 +- modules/audio_device/audio_device_impl.cc | 2 +- modules/audio_device/audio_device_unittest.cc | 2 +- modules/audio_device/include/audio_device.h | 2 +- .../include/audio_device_data_observer.h | 2 +- .../audio_device/include/test_audio_device.h | 2 +- .../ios/audio_device_unittest_ios.mm | 2 +- .../audio_device/win/audio_device_core_win.h | 2 +- .../win/audio_device_module_win.h | 2 +- modules/audio_mixer/BUILD.gn | 1 + modules/audio_mixer/audio_mixer_impl.h | 2 +- modules/audio_processing/BUILD.gn | 3 ++- .../audio_processing/agc2/rnn_vad/BUILD.gn | 2 +- .../audio_processing_impl_unittest.cc | 2 +- .../include/audio_processing.h | 2 +- modules/congestion_controller/BUILD.gn | 2 +- modules/desktop_capture/BUILD.gn | 5 ++++ .../desktop_capture/desktop_capture_options.h | 2 +- .../linux/mouse_cursor_monitor_x11.h | 2 +- .../desktop_capture/linux/shared_x_display.h | 2 +- .../linux/window_capturer_x11.cc | 2 +- .../linux/window_capturer_x11.h | 2 +- .../mouse_cursor_monitor_mac.mm | 2 +- .../desktop_capture/screen_drawer_linux.cc | 2 +- .../desktop_capture/shared_desktop_frame.h | 2 +- .../win/dxgi_duplicator_controller.h | 2 +- .../win/screen_capturer_win_directx.h | 2 +- .../desktop_capture/window_capturer_mac.mm | 2 +- modules/desktop_capture/window_finder.h | 2 +- modules/desktop_capture/window_finder_mac.h | 2 +- .../desktop_capture/window_finder_unittest.cc | 2 +- modules/rtp_rtcp/BUILD.gn | 2 ++ .../source/flexfec_header_reader_writer.cc | 2 +- .../flexfec_header_reader_writer_unittest.cc | 2 +- modules/rtp_rtcp/source/flexfec_receiver.cc | 2 +- .../source/forward_error_correction.h | 2 +- .../source/ulpfec_header_reader_writer.cc | 2 +- .../ulpfec_header_reader_writer_unittest.cc | 2 +- .../rtp_rtcp/source/ulpfec_receiver_impl.cc | 2 +- modules/video_capture/BUILD.gn | 5 ++++ .../external/video_capture_external.cc | 2 +- .../linux/video_capture_linux.cc | 2 +- modules/video_capture/objc/video_capture.h | 2 +- modules/video_capture/objc/video_capture.mm | 2 +- .../test/video_capture_unittest.cc | 2 +- modules/video_capture/video_capture_factory.h | 2 +- modules/video_capture/video_capture_impl.h | 2 +- .../windows/video_capture_factory_windows.cc | 2 +- modules/video_coding/BUILD.gn | 7 +++++ .../include/augmented_video_frame_buffer.h | 2 +- .../test/multiplex_adapter_unittest.cc | 2 +- .../codecs/test/videoprocessor.cc | 2 +- .../codecs/test/videoprocessor_unittest.cc | 2 +- .../codecs/vp8/libvpx_vp8_decoder.cc | 2 +- .../codecs/vp8/libvpx_vp8_encoder.cc | 2 +- .../codecs/vp9/vp9_frame_buffer_pool.h | 2 +- modules/video_coding/packet_buffer.h | 2 +- .../video_coding/video_codec_initializer.cc | 2 +- .../video_codec_initializer_unittest.cc | 2 +- modules/video_coding/video_sender.cc | 2 +- modules/video_processing/BUILD.gn | 3 ++- .../video_processing/test/denoiser_test.cc | 2 +- modules/video_processing/video_denoiser.h | 2 +- p2p/BUILD.gn | 2 ++ p2p/base/dtls_transport_internal.h | 2 +- p2p/base/regathering_controller_unittest.cc | 2 +- pc/BUILD.gn | 6 +++++ pc/audio_track.h | 2 +- pc/data_channel.h | 2 +- pc/local_audio_source.h | 2 +- pc/media_stream.h | 2 +- pc/media_stream_observer.h | 2 +- pc/peer_connection_data_channel_unittest.cc | 2 +- pc/peer_connection_factory.h | 2 +- pc/peer_connection_histogram_unittest.cc | 2 +- pc/peer_connection_interface_unittest.cc | 2 +- pc/peer_connection_rampup_tests.cc | 2 +- pc/peer_connection_rtp_unittest.cc | 2 +- pc/peer_connection_wrapper.h | 2 +- pc/remote_audio_source.cc | 2 +- pc/rtc_stats_collector.h | 2 +- pc/rtc_stats_integrationtest.cc | 2 +- pc/rtc_stats_traversal.h | 2 +- pc/rtp_receiver.h | 2 +- pc/rtp_sender_receiver_unittest.cc | 2 +- pc/srtp_session.h | 2 +- pc/stats_collector_unittest.cc | 2 +- pc/test/fake_audio_capture_module.h | 2 +- pc/test/fake_audio_capture_module_unittest.cc | 2 +- pc/test/peer_connection_test_wrapper.h | 2 +- pc/video_track.h | 2 +- pc/webrtc_session_description_factory.h | 2 +- rtc_base/BUILD.gn | 26 +++++++------------ rtc_base/async_invoker.h | 2 +- rtc_base/async_invoker_inl.h | 2 +- rtc_base/bind.h | 2 +- rtc_base/callback.h | 2 +- rtc_base/callback.h.pump | 2 +- rtc_base/copy_on_write_buffer.h | 2 +- rtc_base/keep_ref_until_done.h | 2 +- rtc_base/message_queue.h | 2 +- rtc_base/ref_counted_object_unittest.cc | 2 +- rtc_base/rtc_certificate.h | 2 +- rtc_base/rtc_certificate_generator.h | 2 +- rtc_base/scoped_ref_ptr.h | 19 -------------- rtc_base/task_queue.h | 2 +- rtc_base/task_queue_libevent.cc | 2 +- rtc_base/weak_ptr.h | 2 +- rtc_tools/BUILD.gn | 10 ++++--- rtc_tools/frame_analyzer/frame_analyzer.cc | 2 +- .../reference_less_video_analysis_lib.h | 2 +- .../reference_less_video_analysis_unittest.cc | 2 +- .../frame_analyzer/video_color_aligner.h | 2 +- .../frame_analyzer/video_quality_analysis.h | 2 +- .../frame_analyzer/video_temporal_aligner.h | 2 +- .../psnr_ssim_analyzer/psnr_ssim_analyzer.cc | 2 +- rtc_tools/video_file_reader.h | 2 +- rtc_tools/video_file_writer.h | 2 +- sdk/BUILD.gn | 3 +++ sdk/android/BUILD.gn | 4 +++ .../audio_device/audio_device_unittest.cc | 2 +- sdk/android/src/jni/android_media_decoder.cc | 2 +- sdk/android/src/jni/pc/audio.h | 6 ++--- sdk/android/src/jni/pc/media.h | 2 +- sdk/android/src/jni/pc/video.h | 2 +- sdk/android/src/jni/video_frame.cc | 2 +- .../peerconnection/RTCDataChannel+Private.h | 2 +- .../RTCPeerConnectionFactory+Native.h | 2 +- .../RTCPeerConnectionFactory+Private.h | 2 +- .../RTCPeerConnectionFactoryBuilder.h | 2 +- .../peerconnection/RTCRtpReceiver+Native.h | 2 +- .../api/peerconnection/RTCRtpSender+Native.h | 2 +- sdk/objc/native/api/video_capturer.h | 2 +- sdk/objc/native/api/video_frame_buffer.h | 2 +- .../unittests/ObjCVideoTrackSource_xctest.mm | 2 +- .../unittests/RTCAudioDeviceModule_xctest.mm | 2 +- test/BUILD.gn | 6 +++++ test/encoder_settings.cc | 2 +- test/fake_decoder.cc | 2 +- test/fake_vp8_decoder.cc | 2 +- test/frame_generator.cc | 2 +- test/frame_generator_unittest.cc | 2 +- test/frame_utils.h | 2 +- test/fuzzers/BUILD.gn | 7 +++-- test/fuzzers/flexfec_header_reader_fuzzer.cc | 2 +- .../forward_error_correction_fuzzer.cc | 2 +- test/fuzzers/ulpfec_header_reader_fuzzer.cc | 2 +- test/mock_audio_decoder_factory.h | 2 +- test/mock_audio_encoder_factory.h | 2 +- test/test_video_capturer.cc | 2 +- test/testsupport/frame_reader.h | 2 +- test/testsupport/y4m_frame_reader.cc | 2 +- test/testsupport/y4m_frame_reader_unittest.cc | 2 +- test/testsupport/yuv_frame_reader.cc | 2 +- test/testsupport/yuv_frame_reader_unittest.cc | 2 +- test/vcm_capturer.h | 2 +- test/win/d3d_renderer.h | 2 +- video/BUILD.gn | 2 ++ video/receive_statistics_proxy_unittest.cc | 2 +- video/video_send_stream_impl.cc | 2 +- video/video_stream_decoder.h | 2 +- 224 files changed, 303 insertions(+), 273 deletions(-) delete mode 100644 rtc_base/scoped_ref_ptr.h diff --git a/api/BUILD.gn b/api/BUILD.gn index 396f63de64..4e2077a352 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -46,6 +46,7 @@ rtc_static_library("create_peerconnection_factory") { ":callfactory_api", ":fec_controller_api", ":libjingle_peerconnection_api", + ":scoped_refptr", "../logging:rtc_event_log_api", "../logging:rtc_event_log_impl_base", "../media:rtc_audio_video", @@ -54,7 +55,6 @@ rtc_static_library("create_peerconnection_factory") { "../modules/audio_processing:api", "../pc:peerconnection", "../rtc_base:deprecation", - "../rtc_base:ptr_util", "../rtc_base:rtc_base", "../rtc_base:rtc_base_approved", "audio:audio_mixer_api", @@ -157,6 +157,7 @@ rtc_static_library("libjingle_peerconnection_api") { ":fec_controller_api", ":libjingle_logging_api", ":rtc_stats_api", + ":scoped_refptr", "audio:audio_mixer_api", "audio_codecs:audio_codecs_api", "transport:bitrate_settings", @@ -244,8 +245,8 @@ if (rtc_include_tests) { ] deps = [ ":fec_controller_api", + ":scoped_refptr", ":video_quality_test_fixture_api", - "../rtc_base:ptr_util", "../video:video_quality_test", "//third_party/abseil-cpp/absl/memory", ] @@ -295,6 +296,7 @@ rtc_source_set("rtc_stats_api") { ] deps = [ + ":scoped_refptr", "../rtc_base:checks", "../rtc_base:rtc_base_approved", "../rtc_base/system:rtc_export", diff --git a/api/DEPS b/api/DEPS index 37d0e9b3ae..ca0726f9db 100644 --- a/api/DEPS +++ b/api/DEPS @@ -68,7 +68,6 @@ specific_include_rules = { "create_peerconnection_factory\.h": [ "+rtc_base/deprecation.h", - "+rtc_base/scoped_ref_ptr.h", ], "data_channel_interface\.h": [ @@ -103,7 +102,6 @@ specific_include_rules = { "media_stream_interface\.h": [ "+modules/audio_processing/include/audio_processing_statistics.h", "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], "media_transport_interface\.h": [ @@ -137,7 +135,6 @@ specific_include_rules = { "+rtc_base/message_handler.h", # Inherits from it. "+rtc_base/message_queue.h", # Inherits from MessageData. "+rtc_base/ref_counted_object.h", - "+rtc_base/scoped_ref_ptr.h", "+rtc_base/thread.h", ], @@ -153,17 +150,14 @@ specific_include_rules = { "rtp_receiver_interface\.h": [ "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], "rtp_sender_interface\.h": [ "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], "rtp_transceiver_interface\.h": [ "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], "set_remote_description_observer_interface\.h": [ @@ -173,7 +167,6 @@ specific_include_rules = { "stats_types\.h": [ "+rtc_base/constructor_magic.h", "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", "+rtc_base/string_encode.h", "+rtc_base/thread_checker.h", ], @@ -201,7 +194,6 @@ specific_include_rules = { "audio_decoder_factory_template\.h": [ "+rtc_base/ref_counted_object.h", - "+rtc_base/scoped_ref_ptr.h", ], "audio_encoder\.h": [ @@ -215,15 +207,6 @@ specific_include_rules = { "audio_encoder_factory_template\.h": [ "+rtc_base/ref_counted_object.h", - "+rtc_base/scoped_ref_ptr.h", - ], - - "builtin_audio_decoder_factory\.h": [ - "+rtc_base/scoped_ref_ptr.h", - ], - - "builtin_audio_encoder_factory\.h": [ - "+rtc_base/scoped_ref_ptr.h", ], "frame_decryptor_interface\.h": [ @@ -236,13 +219,11 @@ specific_include_rules = { "rtc_stats_collector_callback\.h": [ "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], "rtc_stats_report\.h": [ "+rtc_base/ref_count.h", "+rtc_base/ref_counted_object.h", - "+rtc_base/scoped_ref_ptr.h", ], "audioproc_float\.h": [ @@ -281,7 +262,6 @@ specific_include_rules = { "video_encoder_config\.h": [ "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], # .cc files in api/ should not be restricted in what they can #include, diff --git a/api/audio_codecs/BUILD.gn b/api/audio_codecs/BUILD.gn index 31fe2bec58..26c66d1b5d 100644 --- a/api/audio_codecs/BUILD.gn +++ b/api/audio_codecs/BUILD.gn @@ -31,6 +31,7 @@ rtc_source_set("audio_codecs_api") { deps = [ "..:array_view", "..:bitrate_allocation", + "..:scoped_refptr", "../..:webrtc_common", "../../rtc_base:checks", "../../rtc_base:deprecation", @@ -51,6 +52,7 @@ rtc_static_library("builtin_audio_decoder_factory") { ] deps = [ ":audio_codecs_api", + "..:scoped_refptr", "../../rtc_base:rtc_base_approved", "L16:audio_decoder_L16", "g711:audio_decoder_g711", @@ -81,6 +83,7 @@ rtc_static_library("builtin_audio_encoder_factory") { ] deps = [ ":audio_codecs_api", + "..:scoped_refptr", "../../rtc_base:rtc_base_approved", "L16:audio_encoder_L16", "g711:audio_encoder_g711", diff --git a/api/audio_codecs/audio_decoder_factory_template.h b/api/audio_codecs/audio_decoder_factory_template.h index e7f1443b95..f3bc13645a 100644 --- a/api/audio_codecs/audio_decoder_factory_template.h +++ b/api/audio_codecs/audio_decoder_factory_template.h @@ -15,8 +15,8 @@ #include #include "api/audio_codecs/audio_decoder_factory.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/audio_codecs/audio_encoder_factory_template.h b/api/audio_codecs/audio_encoder_factory_template.h index 01a6a74aa6..74cb053425 100644 --- a/api/audio_codecs/audio_encoder_factory_template.h +++ b/api/audio_codecs/audio_encoder_factory_template.h @@ -15,8 +15,8 @@ #include #include "api/audio_codecs/audio_encoder_factory.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/audio_codecs/builtin_audio_decoder_factory.h b/api/audio_codecs/builtin_audio_decoder_factory.h index 3accd4a302..8776196d26 100644 --- a/api/audio_codecs/builtin_audio_decoder_factory.h +++ b/api/audio_codecs/builtin_audio_decoder_factory.h @@ -12,7 +12,7 @@ #define API_AUDIO_CODECS_BUILTIN_AUDIO_DECODER_FACTORY_H_ #include "api/audio_codecs/audio_decoder_factory.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { diff --git a/api/audio_codecs/builtin_audio_encoder_factory.h b/api/audio_codecs/builtin_audio_encoder_factory.h index 3c67dd30e6..48ebc43112 100644 --- a/api/audio_codecs/builtin_audio_encoder_factory.h +++ b/api/audio_codecs/builtin_audio_encoder_factory.h @@ -12,7 +12,7 @@ #define API_AUDIO_CODECS_BUILTIN_AUDIO_ENCODER_FACTORY_H_ #include "api/audio_codecs/audio_encoder_factory.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { diff --git a/api/create_peerconnection_factory.cc b/api/create_peerconnection_factory.cc index cc7541bb83..0d15e8cadf 100644 --- a/api/create_peerconnection_factory.cc +++ b/api/create_peerconnection_factory.cc @@ -19,6 +19,7 @@ #include "api/call/call_factory_interface.h" #include "api/fec_controller.h" #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "api/transport/network_control.h" #include "api/video_codecs/video_decoder_factory.h" #include "api/video_codecs/video_encoder_factory.h" @@ -28,7 +29,6 @@ #include "media/engine/webrtc_media_engine.h" #include "modules/audio_device/include/audio_device.h" #include "modules/audio_processing/include/audio_processing.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" namespace webrtc { diff --git a/api/create_peerconnection_factory.h b/api/create_peerconnection_factory.h index 88ecef8746..40f1276242 100644 --- a/api/create_peerconnection_factory.h +++ b/api/create_peerconnection_factory.h @@ -18,9 +18,9 @@ #include "api/audio_codecs/audio_encoder_factory.h" #include "api/fec_controller.h" #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "api/transport/network_control.h" #include "rtc_base/deprecation.h" -#include "rtc_base/scoped_ref_ptr.h" namespace rtc { // TODO(bugs.webrtc.org/9987): Move rtc::Thread to api/ or expose a better diff --git a/api/media_stream_interface.h b/api/media_stream_interface.h index af89e9df2f..b0774809e4 100644 --- a/api/media_stream_interface.h +++ b/api/media_stream_interface.h @@ -24,12 +24,12 @@ #include "absl/types/optional.h" #include "api/audio_options.h" +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_sink_interface.h" #include "api/video/video_source_interface.h" #include "modules/audio_processing/include/audio_processing_statistics.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/proxy.h b/api/proxy.h index b1d9d50b27..6627aac7d4 100644 --- a/api/proxy.h +++ b/api/proxy.h @@ -56,11 +56,11 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/event.h" #include "rtc_base/message_handler.h" #include "rtc_base/message_queue.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" namespace rtc { diff --git a/api/rtp_receiver_interface.h b/api/rtp_receiver_interface.h index e7fa0bf745..bc3256665e 100644 --- a/api/rtp_receiver_interface.h +++ b/api/rtp_receiver_interface.h @@ -23,8 +23,8 @@ #include "api/media_types.h" #include "api/proxy.h" #include "api/rtp_parameters.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/rtp_sender_interface.h b/api/rtp_sender_interface.h index 6397938956..c04ce69158 100644 --- a/api/rtp_sender_interface.h +++ b/api/rtp_sender_interface.h @@ -25,8 +25,8 @@ #include "api/proxy.h" #include "api/rtc_error.h" #include "api/rtp_parameters.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/rtp_transceiver_interface.h b/api/rtp_transceiver_interface.h index c62df49c3e..aec0d155b0 100644 --- a/api/rtp_transceiver_interface.h +++ b/api/rtp_transceiver_interface.h @@ -20,8 +20,8 @@ #include "api/rtp_parameters.h" #include "api/rtp_receiver_interface.h" #include "api/rtp_sender_interface.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/stats/rtc_stats_collector_callback.h b/api/stats/rtc_stats_collector_callback.h index 0bc821727e..c3e08245ea 100644 --- a/api/stats/rtc_stats_collector_callback.h +++ b/api/stats/rtc_stats_collector_callback.h @@ -11,9 +11,9 @@ #ifndef API_STATS_RTC_STATS_COLLECTOR_CALLBACK_H_ #define API_STATS_RTC_STATS_COLLECTOR_CALLBACK_H_ +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats_report.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/stats/rtc_stats_report.h b/api/stats/rtc_stats_report.h index ab4f8f0342..2f5b8765c3 100644 --- a/api/stats/rtc_stats_report.h +++ b/api/stats/rtc_stats_report.h @@ -18,10 +18,10 @@ #include #include +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { diff --git a/api/stats_types.h b/api/stats_types.h index 7f1160f2de..0e97eaf596 100644 --- a/api/stats_types.h +++ b/api/stats_types.h @@ -20,9 +20,9 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/string_encode.h" #include "rtc_base/thread_checker.h" diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn index 27e2096aca..d5905f5757 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -33,6 +33,7 @@ rtc_source_set("video_frame") { deps = [ "..:array_view", + "..:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:rtc_export", @@ -48,6 +49,7 @@ rtc_source_set("video_frame_i420") { ] deps = [ ":video_frame", + "..:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base", "../../rtc_base/memory:aligned_malloc", @@ -65,6 +67,7 @@ rtc_source_set("video_frame_i010") { deps = [ ":video_frame", ":video_frame_i420", + "..:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base", "../../rtc_base/memory:aligned_malloc", @@ -211,7 +214,7 @@ rtc_source_set("video_stream_encoder_create") { deps = [ ":video_frame", ":video_stream_encoder", - "../../rtc_base:ptr_util", + "../../api:scoped_refptr", "../../video:video_stream_encoder_impl", "../video_codecs:video_codecs_api", "//third_party/abseil-cpp/absl/memory", @@ -230,10 +233,10 @@ rtc_static_library("builtin_video_bitrate_allocator_factory") { ":video_bitrate_allocator", ":video_bitrate_allocator_factory", "../../:webrtc_common", + "../../api:scoped_refptr", "../../media:rtc_media_base", "../../modules/video_coding:video_coding_utility", "../../modules/video_coding:webrtc_vp9_helpers", - "../../rtc_base:ptr_util", "../../rtc_base/system:fallthrough", "../video_codecs:video_codecs_api", "//third_party/abseil-cpp/absl/memory", diff --git a/api/video/DEPS b/api/video/DEPS index 3dfec07a60..4bc9a3901b 100644 --- a/api/video/DEPS +++ b/api/video/DEPS @@ -8,21 +8,17 @@ specific_include_rules = { "i010_buffer\.h": [ "+rtc_base/memory/aligned_malloc.h", - "+rtc_base/scoped_ref_ptr.h", ], "i420_buffer\.h": [ "+rtc_base/memory/aligned_malloc.h", - "+rtc_base/scoped_ref_ptr.h", ], "video_frame\.h": [ - "+rtc_base/scoped_ref_ptr.h", ], "video_frame_buffer\.h": [ "+rtc_base/ref_count.h", - "+rtc_base/scoped_ref_ptr.h", ], "video_stream_decoder_create.cc": [ diff --git a/api/video/i010_buffer.h b/api/video/i010_buffer.h index 8f354b66e5..4b35ca31e5 100644 --- a/api/video/i010_buffer.h +++ b/api/video/i010_buffer.h @@ -14,10 +14,10 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "rtc_base/memory/aligned_malloc.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/video/i420_buffer.h b/api/video/i420_buffer.h index ca290ee70c..b76a5075e8 100644 --- a/api/video/i420_buffer.h +++ b/api/video/i420_buffer.h @@ -14,10 +14,10 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "rtc_base/memory/aligned_malloc.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { diff --git a/api/video/video_frame.h b/api/video/video_frame.h index 728d818eae..de3f0efdc5 100644 --- a/api/video/video_frame.h +++ b/api/video/video_frame.h @@ -14,11 +14,11 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/video/color_space.h" #include "api/video/hdr_metadata.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { diff --git a/api/video/video_frame_buffer.h b/api/video/video_frame_buffer.h index cdc87acfad..7fb603e1eb 100644 --- a/api/video/video_frame_buffer.h +++ b/api/video/video_frame_buffer.h @@ -13,8 +13,8 @@ #include +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/api/video_codecs/BUILD.gn b/api/video_codecs/BUILD.gn index ad93d401e7..71cd615591 100644 --- a/api/video_codecs/BUILD.gn +++ b/api/video_codecs/BUILD.gn @@ -32,6 +32,7 @@ rtc_source_set("video_codecs_api") { ] deps = [ + "..:scoped_refptr", "../..:webrtc_common", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", @@ -59,8 +60,8 @@ rtc_static_library("builtin_video_decoder_factory") { deps = [ ":video_codecs_api", + "../../api:scoped_refptr", "../../media:rtc_internal_video_codecs", - "../../rtc_base:ptr_util", "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/memory", ] @@ -79,11 +80,11 @@ rtc_static_library("builtin_video_encoder_factory") { deps = [ ":video_codecs_api", + "../../api:scoped_refptr", "../../media:rtc_encoder_simulcast_proxy", "../../media:rtc_internal_video_codecs", "../../media:rtc_media_base", "../../rtc_base:checks", - "../../rtc_base:ptr_util", "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/memory", "//third_party/abseil-cpp/absl/strings", diff --git a/api/video_codecs/test/BUILD.gn b/api/video_codecs/test/BUILD.gn index acb77cc537..b16023c1c5 100644 --- a/api/video_codecs/test/BUILD.gn +++ b/api/video_codecs/test/BUILD.gn @@ -23,12 +23,12 @@ if (rtc_include_tests) { "..:video_codecs_api", "../..:mock_video_encoder", "../../../:webrtc_common", + "../../../api:scoped_refptr", "../../../modules:module_api", "../../../modules/video_coding:video_codec_interface", "../../../modules/video_coding:video_coding_utility", "../../../modules/video_coding:webrtc_vp8", "../../../rtc_base:checks", - "../../../rtc_base:ptr_util", "../../../rtc_base:rtc_base_tests_utils", "../../../test:field_trial", "../../../test:test_support", diff --git a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc index bf08d1c650..cdddbeb580 100644 --- a/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc +++ b/api/video_codecs/test/video_encoder_software_fallback_wrapper_unittest.cc @@ -16,6 +16,7 @@ #include "absl/memory/memory.h" #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/test/mock_video_encoder.h" #include "api/video/encoded_image.h" #include "api/video/i420_buffer.h" @@ -33,7 +34,6 @@ #include "modules/video_coding/include/video_error_codes.h" #include "modules/video_coding/utility/simulcast_rate_allocator.h" #include "rtc_base/fake_clock.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/field_trial.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/api/video_codecs/video_encoder_config.h b/api/video_codecs/video_encoder_config.h index 3a353809b0..78f2db4cd5 100644 --- a/api/video_codecs/video_encoder_config.h +++ b/api/video_codecs/video_encoder_config.h @@ -16,10 +16,10 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/video_codecs/sdp_video_format.h" #include "api/video_codecs/video_codec.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/audio/BUILD.gn b/audio/BUILD.gn index 116385e6b7..e4ab39a209 100644 --- a/audio/BUILD.gn +++ b/audio/BUILD.gn @@ -46,6 +46,7 @@ rtc_static_library("audio") { "../api:array_view", "../api:call_api", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api:transport_api", "../api/audio:aec3_factory", "../api/audio:audio_frame_api", diff --git a/audio/audio_transport_impl.h b/audio/audio_transport_impl.h index e0aaa5ed51..4c244a1c13 100644 --- a/audio/audio_transport_impl.h +++ b/audio/audio_transport_impl.h @@ -14,6 +14,7 @@ #include #include "api/audio/audio_mixer.h" +#include "api/scoped_refptr.h" #include "audio/audio_level.h" #include "common_audio/resampler/include/push_resampler.h" #include "modules/audio_device/include/audio_device.h" @@ -21,7 +22,6 @@ #include "modules/audio_processing/typing_detection.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_annotations.h" namespace webrtc { diff --git a/call/BUILD.gn b/call/BUILD.gn index 4362fd18f0..af7f446dbe 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -33,6 +33,7 @@ rtc_source_set("call_interfaces") { "..:webrtc_common", "../api:fec_controller_api", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api:transport_api", "../api/audio:audio_mixer_api", "../api/audio_codecs:audio_codecs_api", diff --git a/call/audio_receive_stream.h b/call/audio_receive_stream.h index f1aeb88242..88a16edb6d 100644 --- a/call/audio_receive_stream.h +++ b/call/audio_receive_stream.h @@ -23,8 +23,8 @@ #include "api/media_transport_interface.h" #include "api/rtp_parameters.h" #include "api/rtp_receiver_interface.h" +#include "api/scoped_refptr.h" #include "call/rtp_config.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { class AudioSinkInterface; diff --git a/call/audio_send_stream.h b/call/audio_send_stream.h index 044ec99b0a..08a50c850c 100644 --- a/call/audio_send_stream.h +++ b/call/audio_send_stream.h @@ -25,9 +25,9 @@ #include "api/crypto/frame_encryptor_interface.h" #include "api/media_transport_interface.h" #include "api/rtp_parameters.h" +#include "api/scoped_refptr.h" #include "call/rtp_config.h" #include "modules/audio_processing/include/audio_processing_statistics.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/call/audio_state.h b/call/audio_state.h index 967314b067..18cbd48ca9 100644 --- a/call/audio_state.h +++ b/call/audio_state.h @@ -11,10 +11,10 @@ #define CALL_AUDIO_STATE_H_ #include "api/audio/audio_mixer.h" +#include "api/scoped_refptr.h" #include "modules/audio_device/include/audio_device.h" #include "modules/audio_processing/include/audio_processing.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/common_video/BUILD.gn b/common_video/BUILD.gn index fc36ff8221..fbbfd628d5 100644 --- a/common_video/BUILD.gn +++ b/common_video/BUILD.gn @@ -40,6 +40,7 @@ rtc_static_library("common_video") { deps = [ "..:webrtc_common", + "../api:scoped_refptr", "../api/video:encoded_image", "../api/video:video_bitrate_allocation", "../api/video:video_bitrate_allocator", @@ -87,6 +88,7 @@ if (rtc_include_tests) { deps = [ ":common_video", "../:webrtc_common", + "../api:scoped_refptr", "../api/units:time_delta", "../api/video:video_frame", "../api/video:video_frame_i010", diff --git a/common_video/i420_buffer_pool_unittest.cc b/common_video/i420_buffer_pool_unittest.cc index 5ebf1bcf68..debe637f5b 100644 --- a/common_video/i420_buffer_pool_unittest.cc +++ b/common_video/i420_buffer_pool_unittest.cc @@ -11,10 +11,10 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "common_video/include/i420_buffer_pool.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" namespace webrtc { diff --git a/common_video/include/i420_buffer_pool.h b/common_video/include/i420_buffer_pool.h index 8b0f08c80a..0beb3a58b4 100644 --- a/common_video/include/i420_buffer_pool.h +++ b/common_video/include/i420_buffer_pool.h @@ -14,10 +14,10 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "rtc_base/race_checker.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/common_video/include/video_frame_buffer.h b/common_video/include/video_frame_buffer.h index f35f10714d..bc70f34ec8 100644 --- a/common_video/include/video_frame_buffer.h +++ b/common_video/include/video_frame_buffer.h @@ -13,10 +13,10 @@ #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" #include "rtc_base/callback.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/common_video/libyuv/include/webrtc_libyuv.h b/common_video/libyuv/include/webrtc_libyuv.h index d3248340d8..340fd3d4a7 100644 --- a/common_video/libyuv/include/webrtc_libyuv.h +++ b/common_video/libyuv/include/webrtc_libyuv.h @@ -19,10 +19,10 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "common_types.h" // NOLINT(build/include) -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/examples/BUILD.gn b/examples/BUILD.gn index 7676bfac54..f5577b6295 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -504,6 +504,7 @@ if (is_ios || (is_mac && target_cpu != "x86")) { deps = [ "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api/audio_codecs:builtin_audio_decoder_factory", "../api/audio_codecs:builtin_audio_encoder_factory", "../api/video:builtin_video_bitrate_allocator_factory", @@ -692,6 +693,7 @@ if (is_linux || is_win) { "../api:audio_options_api", "../api:create_peerconnection_factory", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api/audio:audio_mixer_api", "../api/audio_codecs:audio_codecs_api", "../api/video:video_frame_i420", diff --git a/examples/androidnativeapi/BUILD.gn b/examples/androidnativeapi/BUILD.gn index 22f70c15c8..4c1abac2f8 100644 --- a/examples/androidnativeapi/BUILD.gn +++ b/examples/androidnativeapi/BUILD.gn @@ -48,6 +48,7 @@ if (is_android) { deps = [ ":generated_jni", + "../../api:scoped_refptr", "//api:libjingle_peerconnection_api", "//api/audio_codecs:builtin_audio_decoder_factory", "//api/audio_codecs:builtin_audio_encoder_factory", diff --git a/examples/androidnativeapi/jni/android_call_client.h b/examples/androidnativeapi/jni/android_call_client.h index 5ab61f4736..979df7abe0 100644 --- a/examples/androidnativeapi/jni/android_call_client.h +++ b/examples/androidnativeapi/jni/android_call_client.h @@ -17,8 +17,8 @@ #include #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_checker.h" #include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/native_api/video/video_source.h" diff --git a/examples/objcnativeapi/objc/objc_call_client.h b/examples/objcnativeapi/objc/objc_call_client.h index 43a48c524d..986014f8c0 100644 --- a/examples/objcnativeapi/objc/objc_call_client.h +++ b/examples/objcnativeapi/objc/objc_call_client.h @@ -15,8 +15,8 @@ #include #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_checker.h" @class RTCVideoCapturer; diff --git a/examples/peerconnection/client/linux/main.cc b/examples/peerconnection/client/linux/main.cc index 74fc17a449..7c073149e3 100644 --- a/examples/peerconnection/client/linux/main.cc +++ b/examples/peerconnection/client/linux/main.cc @@ -12,6 +12,7 @@ #include #include +#include "api/scoped_refptr.h" #include "examples/peerconnection/client/conductor.h" #include "examples/peerconnection/client/flag_defs.h" #include "examples/peerconnection/client/linux/main_wnd.h" @@ -20,7 +21,6 @@ #include "rtc_base/message_queue.h" #include "rtc_base/physical_socket_server.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/ssl_adapter.h" #include "rtc_base/thread.h" #include "system_wrappers/include/field_trial.h" diff --git a/examples/peerconnection/client/linux/main_wnd.h b/examples/peerconnection/client/linux/main_wnd.h index a30ec2726e..2fd3de5fb8 100644 --- a/examples/peerconnection/client/linux/main_wnd.h +++ b/examples/peerconnection/client/linux/main_wnd.h @@ -16,11 +16,11 @@ #include #include "api/media_stream_interface.h" +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_sink_interface.h" #include "examples/peerconnection/client/main_wnd.h" #include "examples/peerconnection/client/peer_connection_client.h" -#include "rtc_base/scoped_ref_ptr.h" // Forward declarations. typedef struct _GtkWidget GtkWidget; diff --git a/logging/BUILD.gn b/logging/BUILD.gn index ed1a9168c1..0e2bd51fa9 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -39,7 +39,7 @@ rtc_source_set("rtc_event_log_api") { deps = [ "../api:libjingle_logging_api", - "../rtc_base:ptr_util", + "../api:scoped_refptr", "../rtc_base:rtc_base_approved", "//third_party/abseil-cpp/absl/memory", ] @@ -65,7 +65,7 @@ rtc_source_set("rtc_event_pacing") { deps = [ ":rtc_event_log_api", - "../rtc_base:ptr_util", + "../api:scoped_refptr", "//third_party/abseil-cpp/absl/memory", ] } @@ -85,9 +85,9 @@ rtc_source_set("rtc_event_audio") { deps = [ ":rtc_event_log_api", ":rtc_stream_config", + "../api:scoped_refptr", "../modules/audio_coding:audio_network_adaptor_config", "../rtc_base:checks", - "../rtc_base:ptr_util", "//third_party/abseil-cpp/absl/memory", ] } @@ -108,8 +108,8 @@ rtc_source_set("rtc_event_bwe") { deps = [ ":rtc_event_log_api", + "../api:scoped_refptr", "../modules/remote_bitrate_estimator:remote_bitrate_estimator", - "../rtc_base:ptr_util", "//third_party/abseil-cpp/absl/memory", ] } @@ -129,9 +129,9 @@ rtc_source_set("rtc_event_rtp_rtcp") { deps = [ ":rtc_event_log_api", "../api:array_view", + "../api:scoped_refptr", "../modules/rtp_rtcp:rtp_rtcp_format", "../rtc_base:checks", - "../rtc_base:ptr_util", "../rtc_base:rtc_base_approved", "//third_party/abseil-cpp/absl/memory", ] @@ -148,8 +148,8 @@ rtc_source_set("rtc_event_video") { deps = [ ":rtc_event_log_api", ":rtc_stream_config", + "../api:scoped_refptr", "../rtc_base:checks", - "../rtc_base:ptr_util", "//third_party/abseil-cpp/absl/memory", ] } diff --git a/media/BUILD.gn b/media/BUILD.gn index 7d2c5f9f95..4c4a9e19dc 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -78,6 +78,7 @@ rtc_static_library("rtc_media_base") { deps = [ "../api:array_view", "../api:audio_options_api", + "../api:scoped_refptr", "../rtc_base:checks", "../rtc_base:rtc_base_approved", "../rtc_base:rtc_task_queue", @@ -190,6 +191,7 @@ rtc_static_library("rtc_simulcast_encoder_adapter") { "engine/simulcast_encoder_adapter.h", ] deps = [ + "../api:scoped_refptr", "../api/video:video_codec_constants", "../api/video:video_frame", "../api/video:video_frame_i420", @@ -302,6 +304,7 @@ rtc_static_library("rtc_audio_video") { defines = [] libs = [] deps = [ + "../api:scoped_refptr", "../api/video:video_bitrate_allocation", "../api/video:video_bitrate_allocator_factory", "../modules/audio_processing:api", @@ -460,6 +463,7 @@ if (rtc_include_tests) { ":rtc_audio_video", ":rtc_simulcast_encoder_adapter", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api/video:encoded_image", "../api/video:video_frame_i420", "../call:video_stream_api", @@ -564,6 +568,7 @@ if (rtc_include_tests) { ":rtc_constants", ":rtc_data", "../:webrtc_common", + "../api:scoped_refptr", "../api/test/video:function_video_factory", "../api/units:time_delta", "../api/video:video_frame_i420", diff --git a/media/base/adapted_video_track_source.cc b/media/base/adapted_video_track_source.cc index 531fa450a3..4ae0d157ee 100644 --- a/media/base/adapted_video_track_source.cc +++ b/media/base/adapted_video_track_source.cc @@ -10,11 +10,11 @@ #include "media/base/adapted_video_track_source.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace rtc { diff --git a/media/base/fake_frame_source.cc b/media/base/fake_frame_source.cc index be8f33f403..8a05536c83 100644 --- a/media/base/fake_frame_source.cc +++ b/media/base/fake_frame_source.cc @@ -10,10 +10,10 @@ #include "media/base/fake_frame_source.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace cricket { diff --git a/media/base/fake_video_capturer.cc b/media/base/fake_video_capturer.cc index 7535b164ae..84bb032af0 100644 --- a/media/base/fake_video_capturer.cc +++ b/media/base/fake_video_capturer.cc @@ -14,11 +14,11 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "rtc_base/arraysize.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace cricket { diff --git a/media/base/fake_video_renderer.h b/media/base/fake_video_renderer.h index 4ffa91ee03..171c0e3ac8 100644 --- a/media/base/fake_video_renderer.h +++ b/media/base/fake_video_renderer.h @@ -13,12 +13,12 @@ #include +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "api/video/video_sink_interface.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" namespace cricket { diff --git a/media/base/video_broadcaster.h b/media/base/video_broadcaster.h index a99e0442d5..20111bcac6 100644 --- a/media/base/video_broadcaster.h +++ b/media/base/video_broadcaster.h @@ -11,11 +11,11 @@ #ifndef MEDIA_BASE_VIDEO_BROADCASTER_H_ #define MEDIA_BASE_VIDEO_BROADCASTER_H_ +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_source_interface.h" #include "media/base/video_source_base.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/thread_checker.h" diff --git a/media/base/video_capturer.cc b/media/base/video_capturer.cc index 76c00473f6..b51f4d89eb 100644 --- a/media/base/video_capturer.cc +++ b/media/base/video_capturer.cc @@ -14,13 +14,13 @@ #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace cricket { diff --git a/media/engine/apm_helpers_unittest.cc b/media/engine/apm_helpers_unittest.cc index fa5b4d32ef..5b0ed23031 100644 --- a/media/engine/apm_helpers_unittest.cc +++ b/media/engine/apm_helpers_unittest.cc @@ -10,8 +10,8 @@ #include "media/engine/apm_helpers.h" +#include "api/scoped_refptr.h" #include "modules/audio_processing/include/audio_processing.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/media/engine/simulcast_encoder_adapter.cc b/media/engine/simulcast_encoder_adapter.cc index 895489ca36..f6d0f24aab 100644 --- a/media/engine/simulcast_encoder_adapter.cc +++ b/media/engine/simulcast_encoder_adapter.cc @@ -17,6 +17,7 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_codec_constants.h" #include "api/video/video_frame_buffer.h" @@ -26,7 +27,6 @@ #include "modules/video_coding/utility/simulcast_rate_allocator.h" #include "rtc_base/atomic_ops.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "system_wrappers/include/field_trial.h" #include "third_party/libyuv/include/libyuv/scale.h" diff --git a/media/engine/webrtc_voice_engine.h b/media/engine/webrtc_voice_engine.h index 335c47d4f8..4ee61a16a7 100644 --- a/media/engine/webrtc_voice_engine.h +++ b/media/engine/webrtc_voice_engine.h @@ -18,6 +18,7 @@ #include "api/audio_codecs/audio_encoder_factory.h" #include "api/rtp_receiver_interface.h" +#include "api/scoped_refptr.h" #include "call/audio_state.h" #include "call/call.h" #include "media/base/rtp_utils.h" @@ -28,7 +29,6 @@ #include "rtc_base/constructor_magic.h" #include "rtc_base/experiments/audio_allocation_settings.h" #include "rtc_base/network_route.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/task_queue.h" #include "rtc_base/thread_checker.h" diff --git a/media/engine/webrtc_voice_engine_unittest.cc b/media/engine/webrtc_voice_engine_unittest.cc index 8204010f56..d05feb5625 100644 --- a/media/engine/webrtc_voice_engine_unittest.cc +++ b/media/engine/webrtc_voice_engine_unittest.cc @@ -15,6 +15,7 @@ #include "api/audio_codecs/builtin_audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_encoder_factory.h" #include "api/rtp_parameters.h" +#include "api/scoped_refptr.h" #include "call/call.h" #include "logging/rtc_event_log/rtc_event_log.h" #include "media/base/fake_media_engine.h" @@ -29,7 +30,6 @@ #include "rtc_base/arraysize.h" #include "rtc_base/byte_order.h" #include "rtc_base/numerics/safe_conversions.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/field_trial.h" #include "test/gtest.h" #include "test/mock_audio_decoder_factory.h" diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index 074ca93d78..2bc9635658 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -391,6 +391,7 @@ rtc_static_library("isac_common") { deps = [ ":isac_bwinfo", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api/audio_codecs:audio_codecs_api", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", @@ -984,6 +985,7 @@ rtc_static_library("neteq") { "../..:webrtc_common", "../../api:array_view", "../../api:libjingle_peerconnection_api", + "../../api:scoped_refptr", "../../api/audio:audio_frame_api", "../../api/audio_codecs:audio_codecs_api", "../../common_audio", @@ -1364,6 +1366,7 @@ if (rtc_include_tests) { defines = audio_coding_defines deps = audio_coding_deps + [ + "../../api:scoped_refptr", "..:module_api", ":audio_coding", "../../api/audio_codecs:audio_codecs_api", diff --git a/modules/audio_coding/acm2/acm_receive_test.h b/modules/audio_coding/acm2/acm_receive_test.h index 23e48a00ee..fce3d6b8b9 100644 --- a/modules/audio_coding/acm2/acm_receive_test.h +++ b/modules/audio_coding/acm2/acm_receive_test.h @@ -16,8 +16,8 @@ #include #include "api/audio_codecs/audio_decoder_factory.h" +#include "api/scoped_refptr.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" #include "system_wrappers/include/clock.h" namespace webrtc { diff --git a/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h b/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h index ab9a6edbae..7cadd919d9 100644 --- a/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h +++ b/modules/audio_coding/codecs/isac/audio_decoder_isac_t.h @@ -15,9 +15,9 @@ #include "absl/types/optional.h" #include "api/audio_codecs/audio_decoder.h" +#include "api/scoped_refptr.h" #include "modules/audio_coding/codecs/isac/locked_bandwidth_info.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h b/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h index 91eb1fd5aa..c6ef7958e2 100644 --- a/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h +++ b/modules/audio_coding/codecs/isac/audio_encoder_isac_t.h @@ -14,9 +14,9 @@ #include #include "api/audio_codecs/audio_encoder.h" +#include "api/scoped_refptr.h" #include "modules/audio_coding/codecs/isac/locked_bandwidth_info.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_coding/neteq/decoder_database.h b/modules/audio_coding/neteq/decoder_database.h index 19922727ba..e0a3fe3509 100644 --- a/modules/audio_coding/neteq/decoder_database.h +++ b/modules/audio_coding/neteq/decoder_database.h @@ -17,10 +17,10 @@ #include "api/audio_codecs/audio_decoder_factory.h" #include "api/audio_codecs/audio_format.h" +#include "api/scoped_refptr.h" #include "modules/audio_coding/codecs/cng/webrtc_cng.h" #include "modules/audio_coding/neteq/packet.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_coding/neteq/include/neteq.h b/modules/audio_coding/neteq/include/neteq.h index d4e842310e..afa52d452b 100644 --- a/modules/audio_coding/neteq/include/neteq.h +++ b/modules/audio_coding/neteq/include/neteq.h @@ -22,9 +22,9 @@ #include "api/audio_codecs/audio_decoder.h" #include "api/audio_codecs/audio_format.h" #include "api/rtp_headers.h" +#include "api/scoped_refptr.h" #include "modules/audio_coding/neteq/defines.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_device/BUILD.gn b/modules/audio_device/BUILD.gn index 0f9d995208..f982196742 100644 --- a/modules/audio_device/BUILD.gn +++ b/modules/audio_device/BUILD.gn @@ -98,6 +98,7 @@ rtc_source_set("audio_device_api") { "include/audio_device_defines.h", ] deps = [ + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:deprecation", "../../rtc_base:rtc_base_approved", @@ -198,6 +199,7 @@ rtc_source_set("audio_device_module_from_input_and_output") { ":audio_device_api", ":audio_device_buffer", ":windows_core_audio_utility", + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "//third_party/abseil-cpp/absl/memory", @@ -216,6 +218,7 @@ rtc_source_set("audio_device_impl") { ":audio_device_default", ":audio_device_generic", "../../api:array_view", + "../../api:scoped_refptr", "../../common_audio", "../../common_audio:common_audio_c", "../../rtc_base:checks", @@ -424,6 +427,7 @@ if (rtc_include_tests) { ":audio_device_impl", ":audio_device_ios_objc", ":mock_audio_device", + "../../api:scoped_refptr", "../../rtc_base:rtc_base_approved", "../../sdk:audio_objc", "../../system_wrappers", @@ -451,6 +455,7 @@ if (rtc_include_tests) { ":audio_device_impl", ":mock_audio_device", "../../api:array_view", + "../../api:scoped_refptr", "../../common_audio", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", diff --git a/modules/audio_device/android/audio_device_unittest.cc b/modules/audio_device/android/audio_device_unittest.cc index 350eae918c..6f899ee6cd 100644 --- a/modules/audio_device/android/audio_device_unittest.cc +++ b/modules/audio_device/android/audio_device_unittest.cc @@ -16,6 +16,7 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/audio_device/android/audio_common.h" #include "modules/audio_device/android/audio_manager.h" #include "modules/audio_device/android/build_info.h" @@ -27,7 +28,6 @@ #include "rtc_base/critical_section.h" #include "rtc_base/event.h" #include "rtc_base/format_macros.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/audio_device/audio_device_impl.cc b/modules/audio_device/audio_device_impl.cc index e44a62db8a..8bea2569dd 100644 --- a/modules/audio_device/audio_device_impl.cc +++ b/modules/audio_device/audio_device_impl.cc @@ -12,12 +12,12 @@ #include +#include "api/scoped_refptr.h" #include "modules/audio_device/audio_device_config.h" // IWYU pragma: keep #include "modules/audio_device/audio_device_generic.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "system_wrappers/include/metrics.h" #if defined(_WIN32) diff --git a/modules/audio_device/audio_device_unittest.cc b/modules/audio_device/audio_device_unittest.cc index f0ede1b1af..9fcc4d8f5b 100644 --- a/modules/audio_device/audio_device_unittest.cc +++ b/modules/audio_device/audio_device_unittest.cc @@ -16,6 +16,7 @@ #include "absl/memory/memory.h" #include "absl/types/optional.h" #include "api/array_view.h" +#include "api/scoped_refptr.h" #include "modules/audio_device/audio_device_impl.h" #include "modules/audio_device/include/audio_device.h" #include "modules/audio_device/include/mock_audio_transport.h" @@ -25,7 +26,6 @@ #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" #include "rtc_base/race_checker.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/thread_checker.h" #include "rtc_base/time_utils.h" diff --git a/modules/audio_device/include/audio_device.h b/modules/audio_device/include/audio_device.h index 1afb4eec96..71a1932b88 100644 --- a/modules/audio_device/include/audio_device.h +++ b/modules/audio_device/include/audio_device.h @@ -11,9 +11,9 @@ #ifndef MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ #define MODULES_AUDIO_DEVICE_INCLUDE_AUDIO_DEVICE_H_ +#include "api/scoped_refptr.h" #include "modules/audio_device/include/audio_device_defines.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_device/include/audio_device_data_observer.h b/modules/audio_device/include/audio_device_data_observer.h index 67ef98f310..270aea8935 100644 --- a/modules/audio_device/include/audio_device_data_observer.h +++ b/modules/audio_device/include/audio_device_data_observer.h @@ -14,8 +14,8 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/audio_device/include/audio_device.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_device/include/test_audio_device.h b/modules/audio_device/include/test_audio_device.h index 6fe1c1a801..d12af8766a 100644 --- a/modules/audio_device/include/test_audio_device.h +++ b/modules/audio_device/include/test_audio_device.h @@ -16,12 +16,12 @@ #include #include "api/array_view.h" +#include "api/scoped_refptr.h" #include "modules/audio_device/include/audio_device.h" #include "modules/audio_device/include/audio_device_defines.h" #include "rtc_base/buffer.h" #include "rtc_base/event.h" #include "rtc_base/platform_file.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_device/ios/audio_device_unittest_ios.mm b/modules/audio_device/ios/audio_device_unittest_ios.mm index c46a853bb8..74cfcc2c51 100644 --- a/modules/audio_device/ios/audio_device_unittest_ios.mm +++ b/modules/audio_device/ios/audio_device_unittest_ios.mm @@ -16,6 +16,7 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/audio_device/audio_device_impl.h" #include "modules/audio_device/include/audio_device.h" #include "modules/audio_device/include/mock_audio_transport.h" @@ -25,7 +26,6 @@ #include "rtc_base/event.h" #include "rtc_base/format_macros.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/audio_device/win/audio_device_core_win.h b/modules/audio_device/win/audio_device_core_win.h index 9945552b2c..3bc1b0cdda 100644 --- a/modules/audio_device/win/audio_device_core_win.h +++ b/modules/audio_device/win/audio_device_core_win.h @@ -26,8 +26,8 @@ #include // IMediaObject #include // MMDevice +#include "api/scoped_refptr.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" // Use Multimedia Class Scheduler Service (MMCSS) to boost the thread priority #pragma comment(lib, "avrt.lib") diff --git a/modules/audio_device/win/audio_device_module_win.h b/modules/audio_device/win/audio_device_module_win.h index e4c5e56b1c..112e5cc50f 100644 --- a/modules/audio_device/win/audio_device_module_win.h +++ b/modules/audio_device/win/audio_device_module_win.h @@ -14,8 +14,8 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/audio_device/include/audio_device.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/audio_mixer/BUILD.gn b/modules/audio_mixer/BUILD.gn index f935e83c5b..39791361d2 100644 --- a/modules/audio_mixer/BUILD.gn +++ b/modules/audio_mixer/BUILD.gn @@ -38,6 +38,7 @@ rtc_static_library("audio_mixer_impl") { deps = [ ":audio_frame_manipulator", "../../api:array_view", + "../../api:scoped_refptr", "../../api/audio:audio_frame_api", "../../api/audio:audio_mixer_api", "../../audio/utility:audio_frame_operations", diff --git a/modules/audio_mixer/audio_mixer_impl.h b/modules/audio_mixer/audio_mixer_impl.h index 94361c739e..c38aff2f59 100644 --- a/modules/audio_mixer/audio_mixer_impl.h +++ b/modules/audio_mixer/audio_mixer_impl.h @@ -17,12 +17,12 @@ #include "api/audio/audio_frame.h" #include "api/audio/audio_mixer.h" +#include "api/scoped_refptr.h" #include "modules/audio_mixer/frame_combiner.h" #include "modules/audio_mixer/output_rate_calculator.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/critical_section.h" #include "rtc_base/race_checker.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_annotations.h" namespace webrtc { diff --git a/modules/audio_processing/BUILD.gn b/modules/audio_processing/BUILD.gn index ab5a70422a..46869d06dd 100644 --- a/modules/audio_processing/BUILD.gn +++ b/modules/audio_processing/BUILD.gn @@ -50,11 +50,11 @@ rtc_source_set("api") { ":audio_processing_statistics", ":config", ":gain_control_interface", + "../../api:scoped_refptr", "../../api/audio:aec3_config", "../../api/audio:echo_control", "../../rtc_base:deprecation", "../../rtc_base:macromagic", - "../../rtc_base:ptr_util", "../../rtc_base:rtc_base_approved", "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/types:optional", @@ -416,6 +416,7 @@ if (rtc_include_tests) { ":mocks", "../..:webrtc_common", "../../api:array_view", + "../../api:scoped_refptr", "../../api/audio:aec3_config", "../../api/audio:aec3_factory", "../../common_audio:common_audio", diff --git a/modules/audio_processing/agc2/rnn_vad/BUILD.gn b/modules/audio_processing/agc2/rnn_vad/BUILD.gn index d1edecea33..b26aef0a92 100644 --- a/modules/audio_processing/agc2/rnn_vad/BUILD.gn +++ b/modules/audio_processing/agc2/rnn_vad/BUILD.gn @@ -52,8 +52,8 @@ if (rtc_include_tests) { ] deps = [ "../../../../api:array_view", + "../../../../api:scoped_refptr", "../../../../rtc_base:checks", - "../../../../rtc_base:ptr_util", "../../../../test:fileutils", "../../../../test:test_support", "//third_party/abseil-cpp/absl/memory", diff --git a/modules/audio_processing/audio_processing_impl_unittest.cc b/modules/audio_processing/audio_processing_impl_unittest.cc index c511cb3b52..abceeec250 100644 --- a/modules/audio_processing/audio_processing_impl_unittest.cc +++ b/modules/audio_processing/audio_processing_impl_unittest.cc @@ -13,12 +13,12 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "modules/audio_processing/include/audio_processing.h" #include "modules/audio_processing/test/echo_control_mock.h" #include "modules/audio_processing/test/test_utils.h" #include "rtc_base/checks.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/audio_processing/include/audio_processing.h b/modules/audio_processing/include/audio_processing.h index afe5f6c713..aba0a13924 100644 --- a/modules/audio_processing/include/audio_processing.h +++ b/modules/audio_processing/include/audio_processing.h @@ -25,6 +25,7 @@ #include "absl/types/optional.h" #include "api/audio/echo_canceller3_config.h" #include "api/audio/echo_control.h" +#include "api/scoped_refptr.h" #include "modules/audio_processing/include/audio_generator.h" #include "modules/audio_processing/include/audio_processing_statistics.h" #include "modules/audio_processing/include/config.h" @@ -33,7 +34,6 @@ #include "rtc_base/deprecation.h" #include "rtc_base/platform_file.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { diff --git a/modules/congestion_controller/BUILD.gn b/modules/congestion_controller/BUILD.gn index 7bd049e3a9..7c683d460d 100644 --- a/modules/congestion_controller/BUILD.gn +++ b/modules/congestion_controller/BUILD.gn @@ -37,6 +37,7 @@ rtc_static_library("congestion_controller") { ":transport_feedback", "..:module_api", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api/transport:field_trial_based_config", "../../api/transport:network_control", "../../api/transport:webrtc_key_value_config", @@ -44,7 +45,6 @@ rtc_static_library("congestion_controller") { "../../api/units:timestamp", "../../rtc_base:checks", "../../rtc_base:deprecation", - "../../rtc_base:ptr_util", "../../rtc_base:rate_limiter", "../../rtc_base/experiments:rate_control_settings", "../../rtc_base/network:sent_packet", diff --git a/modules/desktop_capture/BUILD.gn b/modules/desktop_capture/BUILD.gn index 0677a79ff5..ca13924283 100644 --- a/modules/desktop_capture/BUILD.gn +++ b/modules/desktop_capture/BUILD.gn @@ -30,6 +30,7 @@ rtc_static_library("primitives") { ] deps = [ + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base/system:rtc_export", "//third_party/abseil-cpp/absl/memory", @@ -46,6 +47,7 @@ if (rtc_include_tests) { sources = [] deps = [ + "../../api:scoped_refptr", "../../rtc_base:checks", "//third_party/abseil-cpp/absl/memory", ] @@ -131,6 +133,7 @@ if (rtc_include_tests) { deps = [ ":primitives", + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../system_wrappers", @@ -236,6 +239,7 @@ if (is_mac) { deps = [ ":desktop_capture_generic", ":primitives", + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base", "../../rtc_base:rtc_base_approved", @@ -425,6 +429,7 @@ rtc_static_library("desktop_capture_generic") { deps = [ ":primitives", "../../api:refcountedbase", + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base", # TODO(kjellander): Cleanup in bugs.webrtc.org/3806. "../../rtc_base/synchronization:rw_lock_wrapper", diff --git a/modules/desktop_capture/desktop_capture_options.h b/modules/desktop_capture/desktop_capture_options.h index 9d35836964..94735478f2 100644 --- a/modules/desktop_capture/desktop_capture_options.h +++ b/modules/desktop_capture/desktop_capture_options.h @@ -10,7 +10,7 @@ #ifndef MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ #define MODULES_DESKTOP_CAPTURE_DESKTOP_CAPTURE_OPTIONS_H_ -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/system/rtc_export.h" #if defined(USE_X11) diff --git a/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h index 9925c53e09..37c0b870d4 100644 --- a/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h +++ b/modules/desktop_capture/linux/mouse_cursor_monitor_x11.h @@ -14,12 +14,12 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/linux/shared_x_display.h" #include "modules/desktop_capture/mouse_cursor.h" #include "modules/desktop_capture/mouse_cursor_monitor.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/desktop_capture/linux/shared_x_display.h b/modules/desktop_capture/linux/shared_x_display.h index 0829e09fb1..8f3bb417e1 100644 --- a/modules/desktop_capture/linux/shared_x_display.h +++ b/modules/desktop_capture/linux/shared_x_display.h @@ -17,8 +17,8 @@ #include #include "api/ref_counted_base.h" +#include "api/scoped_refptr.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" // Including Xlib.h will involve evil defines (Bool, Status, True, False), which // easily conflict with other headers. diff --git a/modules/desktop_capture/linux/window_capturer_x11.cc b/modules/desktop_capture/linux/window_capturer_x11.cc index 68302e1c4f..85a51a64c3 100644 --- a/modules/desktop_capture/linux/window_capturer_x11.cc +++ b/modules/desktop_capture/linux/window_capturer_x11.cc @@ -18,6 +18,7 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_frame.h" #include "modules/desktop_capture/desktop_region.h" @@ -26,7 +27,6 @@ #include "modules/desktop_capture/linux/window_list_utils.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/trace_event.h" namespace webrtc { diff --git a/modules/desktop_capture/linux/window_capturer_x11.h b/modules/desktop_capture/linux/window_capturer_x11.h index 0f819507c9..48b255457d 100644 --- a/modules/desktop_capture/linux/window_capturer_x11.h +++ b/modules/desktop_capture/linux/window_capturer_x11.h @@ -16,6 +16,7 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_geometry.h" @@ -24,7 +25,6 @@ #include "modules/desktop_capture/linux/x_atom_cache.h" #include "modules/desktop_capture/linux/x_server_pixel_buffer.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/desktop_capture/mouse_cursor_monitor_mac.mm b/modules/desktop_capture/mouse_cursor_monitor_mac.mm index 814a45a74b..35ef39463b 100644 --- a/modules/desktop_capture/mouse_cursor_monitor_mac.mm +++ b/modules/desktop_capture/mouse_cursor_monitor_mac.mm @@ -18,6 +18,7 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_frame.h" @@ -27,7 +28,6 @@ #include "modules/desktop_capture/mac/window_list_utils.h" #include "modules/desktop_capture/mouse_cursor.h" #include "rtc_base/mac_utils.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/desktop_capture/screen_drawer_linux.cc b/modules/desktop_capture/screen_drawer_linux.cc index 658554e95f..bb5b86f9b5 100644 --- a/modules/desktop_capture/screen_drawer_linux.cc +++ b/modules/desktop_capture/screen_drawer_linux.cc @@ -14,6 +14,7 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_geometry.h" #include "modules/desktop_capture/linux/shared_x_display.h" @@ -21,7 +22,6 @@ #include "modules/desktop_capture/screen_drawer.h" #include "modules/desktop_capture/screen_drawer_lock_posix.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "system_wrappers/include/sleep.h" namespace webrtc { diff --git a/modules/desktop_capture/shared_desktop_frame.h b/modules/desktop_capture/shared_desktop_frame.h index 12671de190..fd862d7f21 100644 --- a/modules/desktop_capture/shared_desktop_frame.h +++ b/modules/desktop_capture/shared_desktop_frame.h @@ -13,10 +13,10 @@ #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_frame.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { diff --git a/modules/desktop_capture/win/dxgi_duplicator_controller.h b/modules/desktop_capture/win/dxgi_duplicator_controller.h index a4f967d89f..cf0067d401 100644 --- a/modules/desktop_capture/win/dxgi_duplicator_controller.h +++ b/modules/desktop_capture/win/dxgi_duplicator_controller.h @@ -17,6 +17,7 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_geometry.h" #include "modules/desktop_capture/shared_desktop_frame.h" #include "modules/desktop_capture/win/d3d_device.h" @@ -25,7 +26,6 @@ #include "modules/desktop_capture/win/dxgi_context.h" #include "modules/desktop_capture/win/dxgi_frame.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/desktop_capture/win/screen_capturer_win_directx.h b/modules/desktop_capture/win/screen_capturer_win_directx.h index 9438bbd0cf..0e3b79ca54 100644 --- a/modules/desktop_capture/win/screen_capturer_win_directx.h +++ b/modules/desktop_capture/win/screen_capturer_win_directx.h @@ -16,13 +16,13 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_region.h" #include "modules/desktop_capture/screen_capture_frame_queue.h" #include "modules/desktop_capture/win/dxgi_duplicator_controller.h" #include "modules/desktop_capture/win/dxgi_frame.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/desktop_capture/window_capturer_mac.mm b/modules/desktop_capture/window_capturer_mac.mm index ae763f1dd5..979b3b87d2 100644 --- a/modules/desktop_capture/window_capturer_mac.mm +++ b/modules/desktop_capture/window_capturer_mac.mm @@ -15,6 +15,7 @@ #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_options.h" #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame.h" @@ -26,7 +27,6 @@ #include "rtc_base/constructor_magic.h" #include "rtc_base/logging.h" #include "rtc_base/mac_utils.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/trace_event.h" namespace webrtc { diff --git a/modules/desktop_capture/window_finder.h b/modules/desktop_capture/window_finder.h index 1a78145a63..4b88bb8e4d 100644 --- a/modules/desktop_capture/window_finder.h +++ b/modules/desktop_capture/window_finder.h @@ -13,9 +13,9 @@ #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_capture_types.h" #include "modules/desktop_capture/desktop_geometry.h" -#include "rtc_base/scoped_ref_ptr.h" #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS) #include "modules/desktop_capture/mac/desktop_configuration_monitor.h" diff --git a/modules/desktop_capture/window_finder_mac.h b/modules/desktop_capture/window_finder_mac.h index db6e926d3c..988dd497dd 100644 --- a/modules/desktop_capture/window_finder_mac.h +++ b/modules/desktop_capture/window_finder_mac.h @@ -11,8 +11,8 @@ #ifndef MODULES_DESKTOP_CAPTURE_WINDOW_FINDER_MAC_H_ #define MODULES_DESKTOP_CAPTURE_WINDOW_FINDER_MAC_H_ +#include "api/scoped_refptr.h" #include "modules/desktop_capture/window_finder.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/desktop_capture/window_finder_unittest.cc b/modules/desktop_capture/window_finder_unittest.cc index b54b304b73..4e01628360 100644 --- a/modules/desktop_capture/window_finder_unittest.cc +++ b/modules/desktop_capture/window_finder_unittest.cc @@ -13,10 +13,10 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/desktop_capture/desktop_geometry.h" #include "modules/desktop_capture/screen_drawer.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" #if defined(USE_X11) diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 80f9e135d0..69fa724304 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -199,6 +199,7 @@ rtc_static_library("rtp_rtcp") { "../..:webrtc_common", "../../api:array_view", "../../api:libjingle_peerconnection_api", + "../../api:scoped_refptr", "../../api:transport_api", "../../api/audio_codecs:audio_codecs_api", "../../api/video:video_bitrate_allocation", @@ -427,6 +428,7 @@ if (rtc_include_tests) { "../..:webrtc_common", "../../api:array_view", "../../api:libjingle_peerconnection_api", + "../../api:scoped_refptr", "../../api:transport_api", "../../api/video:video_bitrate_allocation", "../../api/video:video_bitrate_allocator", diff --git a/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc b/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc index b813340ea6..e3cb0e9e87 100644 --- a/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc +++ b/modules/rtp_rtcp/source/flexfec_header_reader_writer.cc @@ -12,11 +12,11 @@ #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/forward_error_correction_internal.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc b/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc index 5da378cb01..3d19edaa62 100644 --- a/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc +++ b/modules/rtp_rtcp/source/flexfec_header_reader_writer_unittest.cc @@ -13,13 +13,13 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/flexfec_header_reader_writer.h" #include "modules/rtp_rtcp/source/forward_error_correction.h" #include "modules/rtp_rtcp/source/forward_error_correction_internal.h" #include "rtc_base/checks.h" #include "rtc_base/random.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/rtp_rtcp/source/flexfec_receiver.cc b/modules/rtp_rtcp/source/flexfec_receiver.cc index 1a62bced68..4cf58d139d 100644 --- a/modules/rtp_rtcp/source/flexfec_receiver.cc +++ b/modules/rtp_rtcp/source/flexfec_receiver.cc @@ -13,9 +13,9 @@ #include #include "api/array_view.h" +#include "api/scoped_refptr.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/rtp_rtcp/source/forward_error_correction.h b/modules/rtp_rtcp/source/forward_error_correction.h index adb7572ae6..b442273397 100644 --- a/modules/rtp_rtcp/source/forward_error_correction.h +++ b/modules/rtp_rtcp/source/forward_error_correction.h @@ -17,10 +17,10 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/include/module_fec_types.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/forward_error_correction_internal.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/rtp_rtcp/source/ulpfec_header_reader_writer.cc b/modules/rtp_rtcp/source/ulpfec_header_reader_writer.cc index 22af7e7736..7086b13685 100644 --- a/modules/rtp_rtcp/source/ulpfec_header_reader_writer.cc +++ b/modules/rtp_rtcp/source/ulpfec_header_reader_writer.cc @@ -12,10 +12,10 @@ #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/forward_error_correction_internal.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc b/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc index a1d1bd5fb2..2ad1239140 100644 --- a/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc +++ b/modules/rtp_rtcp/source/ulpfec_header_reader_writer_unittest.cc @@ -13,13 +13,13 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/forward_error_correction.h" #include "modules/rtp_rtcp/source/forward_error_correction_internal.h" #include "modules/rtp_rtcp/source/ulpfec_header_reader_writer.h" #include "rtc_base/checks.h" #include "rtc_base/random.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" namespace webrtc { diff --git a/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc b/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc index 0bb4ad8a08..614d4aad22 100644 --- a/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc +++ b/modules/rtp_rtcp/source/ulpfec_receiver_impl.cc @@ -14,9 +14,9 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace webrtc { diff --git a/modules/video_capture/BUILD.gn b/modules/video_capture/BUILD.gn index 6ff80d4caf..bddba89573 100644 --- a/modules/video_capture/BUILD.gn +++ b/modules/video_capture/BUILD.gn @@ -30,6 +30,7 @@ rtc_static_library("video_capture_module") { "..:module_api", "../..:webrtc_common", "../../api:libjingle_peerconnection_api", + "../../api:scoped_refptr", "../../api/video:video_frame", "../../api/video:video_frame_i420", "../../common_video", @@ -52,6 +53,7 @@ rtc_static_library("video_capture") { deps = [ ":video_capture_module", + "../../api:scoped_refptr", "../../rtc_base:rtc_base_approved", "../../system_wrappers", ] @@ -74,6 +76,7 @@ if (!build_with_chromium) { deps = [ ":video_capture_module", + "../../api:scoped_refptr", "../../rtc_base:rtc_base_approved", "../../system_wrappers", ] @@ -96,6 +99,7 @@ if (!build_with_chromium) { rtc_source_set("video_capture_internal_impl") { deps = [ ":video_capture_module", + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base_approved", "../../system_wrappers", @@ -186,6 +190,7 @@ if (!build_with_chromium) { deps = [ ":video_capture_internal_impl", ":video_capture_module", + "../../api:scoped_refptr", "../../api/video:video_frame", "../../api/video:video_frame_i420", "../../common_video:common_video", diff --git a/modules/video_capture/external/video_capture_external.cc b/modules/video_capture/external/video_capture_external.cc index 1c5a90a488..f61e73effd 100644 --- a/modules/video_capture/external/video_capture_external.cc +++ b/modules/video_capture/external/video_capture_external.cc @@ -8,10 +8,10 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "api/scoped_refptr.h" #include "modules/video_capture/video_capture.h" #include "modules/video_capture/video_capture_impl.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/video_capture/linux/video_capture_linux.cc b/modules/video_capture/linux/video_capture_linux.cc index 714a0f9d14..d89046959c 100644 --- a/modules/video_capture/linux/video_capture_linux.cc +++ b/modules/video_capture/linux/video_capture_linux.cc @@ -23,11 +23,11 @@ #include #include +#include "api/scoped_refptr.h" #include "media/base/video_common.h" #include "modules/video_capture/video_capture.h" #include "rtc_base/logging.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { namespace videocapturemodule { diff --git a/modules/video_capture/objc/video_capture.h b/modules/video_capture/objc/video_capture.h index a85c93e0ab..1dc1fbd5f4 100644 --- a/modules/video_capture/objc/video_capture.h +++ b/modules/video_capture/objc/video_capture.h @@ -11,8 +11,8 @@ #ifndef MODULES_VIDEO_CAPTURE_OBJC_VIDEO_CAPTURE_H_ #define MODULES_VIDEO_CAPTURE_OBJC_VIDEO_CAPTURE_H_ +#include "api/scoped_refptr.h" #include "modules/video_capture/video_capture_impl.h" -#include "rtc_base/scoped_ref_ptr.h" @class RTCVideoCaptureIosObjC; diff --git a/modules/video_capture/objc/video_capture.mm b/modules/video_capture/objc/video_capture.mm index 1b173f9d73..9697c287ae 100644 --- a/modules/video_capture/objc/video_capture.mm +++ b/modules/video_capture/objc/video_capture.mm @@ -12,11 +12,11 @@ #error "This file requires ARC support." #endif +#include "api/scoped_refptr.h" #include "modules/video_capture/objc/device_info_objc.h" #include "modules/video_capture/objc/rtc_video_capture_objc.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" using namespace webrtc; using namespace videocapturemodule; diff --git a/modules/video_capture/test/video_capture_unittest.cc b/modules/video_capture/test/video_capture_unittest.cc index 63d5018b2e..4bc68664c0 100644 --- a/modules/video_capture/test/video_capture_unittest.cc +++ b/modules/video_capture/test/video_capture_unittest.cc @@ -15,6 +15,7 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "common_video/libyuv/include/webrtc_libyuv.h" @@ -22,7 +23,6 @@ #include "modules/video_capture/video_capture.h" #include "modules/video_capture/video_capture_factory.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "system_wrappers/include/sleep.h" #include "test/frame_utils.h" diff --git a/modules/video_capture/video_capture_factory.h b/modules/video_capture/video_capture_factory.h index 30fca7d7ac..1901958e31 100644 --- a/modules/video_capture/video_capture_factory.h +++ b/modules/video_capture/video_capture_factory.h @@ -14,9 +14,9 @@ #ifndef MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ #define MODULES_VIDEO_CAPTURE_VIDEO_CAPTURE_FACTORY_H_ +#include "api/scoped_refptr.h" #include "modules/video_capture/video_capture.h" #include "modules/video_capture/video_capture_defines.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/video_capture/video_capture_impl.h b/modules/video_capture/video_capture_impl.h index 2ec3547ed4..516446dd6c 100644 --- a/modules/video_capture/video_capture_impl.h +++ b/modules/video_capture/video_capture_impl.h @@ -18,6 +18,7 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_rotation.h" #include "api/video/video_sink_interface.h" @@ -25,7 +26,6 @@ #include "modules/video_capture/video_capture_config.h" #include "modules/video_capture/video_capture_defines.h" #include "rtc_base/critical_section.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/video_capture/windows/video_capture_factory_windows.cc b/modules/video_capture/windows/video_capture_factory_windows.cc index 9f76902b2a..eacb542774 100644 --- a/modules/video_capture/windows/video_capture_factory_windows.cc +++ b/modules/video_capture/windows/video_capture_factory_windows.cc @@ -8,11 +8,11 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "api/scoped_refptr.h" #include "modules/video_capture/windows/video_capture_ds.h" #include "modules/video_capture/windows/video_capture_mf.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { namespace videocapturemodule { diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index f65715b93f..0c9db0f724 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -85,6 +85,7 @@ rtc_static_library("video_coding") { deps = [ "..:module_fec_api", "../../api:libjingle_peerconnection_api", + "../../api:scoped_refptr", "../../api/video:encoded_image", "../../api/video:video_bitrate_allocation", "../../api/video:video_bitrate_allocator_factory", @@ -379,6 +380,7 @@ rtc_static_library("webrtc_multiplex") { ":video_coding_utility", "..:module_api", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api/video:encoded_image", "../../api/video:video_frame", "../../api/video:video_frame_i420", @@ -417,6 +419,7 @@ rtc_static_library("webrtc_vp8") { ":webrtc_vp8_temporal_layers", "..:module_api", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api/video:encoded_image", "../../api/video:video_frame", "../../api/video:video_frame_i420", @@ -525,6 +528,7 @@ rtc_static_library("webrtc_vp9") { ":webrtc_vp9_helpers", "..:module_api", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api/video:video_frame", "../../api/video:video_frame_i010", "../../api/video_codecs:video_codecs_api", @@ -647,6 +651,7 @@ if (rtc_include_tests) { ":webrtc_vp9_helpers", "..:module_api", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api:videocodec_test_fixture_api", "../../api/video:builtin_video_bitrate_allocator_factory", "../../api/video:encoded_image", @@ -787,6 +792,7 @@ if (rtc_include_tests) { "../../api:mock_video_codec_factory", "../../api:mock_video_decoder", "../../api:mock_video_encoder", + "../../api:scoped_refptr", "../../api:videocodec_test_fixture_api", "../../api/test/video:function_video_factory", "../../api/video:encoded_image", @@ -913,6 +919,7 @@ if (rtc_include_tests) { "../../api:fec_controller_api", "../../api:mock_video_decoder", "../../api:mock_video_encoder", + "../../api:scoped_refptr", "../../api:simulcast_test_fixture_api", "../../api:videocodec_test_fixture_api", "../../api/test/video:function_video_factory", diff --git a/modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h b/modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h index 72c8fb84ba..c45ab3b2a4 100644 --- a/modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h +++ b/modules/video_coding/codecs/multiplex/include/augmented_video_frame_buffer.h @@ -14,8 +14,8 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { class AugmentedVideoFrameBuffer : public VideoFrameBuffer { diff --git a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc index f9444b79bd..4225a59314 100644 --- a/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc +++ b/modules/video_coding/codecs/multiplex/test/multiplex_adapter_unittest.cc @@ -16,6 +16,7 @@ #include "absl/memory/memory.h" #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/test/mock_video_decoder_factory.h" #include "api/test/mock_video_encoder_factory.h" #include "api/video/encoded_image.h" @@ -40,7 +41,6 @@ #include "modules/video_coding/include/video_error_codes.h" #include "rtc_base/keep_ref_until_done.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gmock.h" #include "test/gtest.h" #include "test/video_codec_settings.h" diff --git a/modules/video_coding/codecs/test/videoprocessor.cc b/modules/video_coding/codecs/test/videoprocessor.cc index ea97731cdd..b30c0321ef 100644 --- a/modules/video_coding/codecs/test/videoprocessor.cc +++ b/modules/video_coding/codecs/test/videoprocessor.cc @@ -17,6 +17,7 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/video/builtin_video_bitrate_allocator_factory.h" #include "api/video/i420_buffer.h" #include "api/video/video_bitrate_allocator_factory.h" @@ -30,7 +31,6 @@ #include "modules/video_coding/codecs/interface/common_constants.h" #include "modules/video_coding/include/video_error_codes.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "test/gtest.h" #include "third_party/libyuv/include/libyuv/compare.h" diff --git a/modules/video_coding/codecs/test/videoprocessor_unittest.cc b/modules/video_coding/codecs/test/videoprocessor_unittest.cc index 541fc45cf3..c668f413e3 100644 --- a/modules/video_coding/codecs/test/videoprocessor_unittest.cc +++ b/modules/video_coding/codecs/test/videoprocessor_unittest.cc @@ -11,6 +11,7 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/test/mock_video_decoder.h" #include "api/test/mock_video_encoder.h" #include "api/test/videocodec_test_fixture.h" @@ -18,7 +19,6 @@ #include "media/base/media_constants.h" #include "modules/video_coding/codecs/test/videocodec_test_stats_impl.h" #include "modules/video_coding/codecs/test/videoprocessor.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/task_queue_for_test.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc index de8538e644..000fc3a9be 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_decoder.cc @@ -15,6 +15,7 @@ #include "absl/memory/memory.h" #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" @@ -25,7 +26,6 @@ #include "modules/video_coding/include/video_error_codes.h" #include "rtc_base/checks.h" #include "rtc_base/numerics/exp_filter.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "system_wrappers/include/field_trial.h" #include "system_wrappers/include/metrics.h" diff --git a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc index af435a553f..7af2b520c7 100644 --- a/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc +++ b/modules/video_coding/codecs/vp8/libvpx_vp8_encoder.cc @@ -17,6 +17,7 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/video/video_content_type.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_timing.h" @@ -32,7 +33,6 @@ #include "rtc_base/checks.h" #include "rtc_base/experiments/field_trial_parser.h" #include "rtc_base/experiments/rate_control_settings.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/trace_event.h" #include "system_wrappers/include/field_trial.h" #include "third_party/libyuv/include/libyuv/scale.h" diff --git a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h index fd84b66bbf..df6d45106c 100644 --- a/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h +++ b/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h @@ -16,10 +16,10 @@ #include +#include "api/scoped_refptr.h" #include "rtc_base/buffer.h" #include "rtc_base/critical_section.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" struct vpx_codec_ctx; struct vpx_codec_frame_buffer; diff --git a/modules/video_coding/packet_buffer.h b/modules/video_coding/packet_buffer.h index 73ffb053d0..0da504f83a 100644 --- a/modules/video_coding/packet_buffer.h +++ b/modules/video_coding/packet_buffer.h @@ -16,12 +16,12 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/include/module_common_types.h" #include "modules/video_coding/packet.h" #include "modules/video_coding/rtp_frame_reference_finder.h" #include "rtc_base/critical_section.h" #include "rtc_base/numerics/sequence_number_util.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_annotations.h" namespace webrtc { diff --git a/modules/video_coding/video_codec_initializer.cc b/modules/video_coding/video_codec_initializer.cc index 311fb868ef..d67cf526f4 100644 --- a/modules/video_coding/video_codec_initializer.cc +++ b/modules/video_coding/video_codec_initializer.cc @@ -15,6 +15,7 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/video/video_bitrate_allocation.h" #include "api/video_codecs/video_encoder.h" #include "common_types.h" // NOLINT(build/include) @@ -22,7 +23,6 @@ #include "modules/video_coding/include/video_coding_defines.h" #include "rtc_base/checks.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/modules/video_coding/video_codec_initializer_unittest.cc b/modules/video_coding/video_codec_initializer_unittest.cc index a90b7b7482..6734b7e852 100644 --- a/modules/video_coding/video_codec_initializer_unittest.cc +++ b/modules/video_coding/video_codec_initializer_unittest.cc @@ -15,6 +15,7 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/video/builtin_video_bitrate_allocator_factory.h" #include "api/video/video_bitrate_allocation.h" #include "api/video/video_bitrate_allocator.h" @@ -26,7 +27,6 @@ #include "modules/video_coding/codecs/vp9/include/vp9_globals.h" #include "rtc_base/checks.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" namespace webrtc { diff --git a/modules/video_coding/video_sender.cc b/modules/video_coding/video_sender.cc index 78196ab4c4..5b3a657878 100644 --- a/modules/video_coding/video_sender.cc +++ b/modules/video_coding/video_sender.cc @@ -12,6 +12,7 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_bitrate_allocation.h" #include "api/video/video_bitrate_allocator.h" #include "api/video/video_frame.h" @@ -30,7 +31,6 @@ #include "rtc_base/checks.h" #include "rtc_base/critical_section.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/sequenced_task_checker.h" #include "system_wrappers/include/clock.h" #include "system_wrappers/include/field_trial.h" diff --git a/modules/video_processing/BUILD.gn b/modules/video_processing/BUILD.gn index 2e2a93f05c..afcbf7f33d 100644 --- a/modules/video_processing/BUILD.gn +++ b/modules/video_processing/BUILD.gn @@ -27,6 +27,7 @@ rtc_static_library("video_processing") { deps = [ ":denoiser_filter", "..:module_api", + "../../api:scoped_refptr", "../../api/video:video_frame", "../../api/video:video_frame_i420", "../../common_audio", @@ -114,10 +115,10 @@ if (rtc_include_tests) { deps = [ ":denoiser_filter", ":video_processing", + "../../api:scoped_refptr", "../../api/video:video_frame", "../../api/video:video_frame_i420", "../../common_video:common_video", - "../../rtc_base:ptr_util", "../../test:fileutils", "../../test:test_support", "../../test:video_test_common", diff --git a/modules/video_processing/test/denoiser_test.cc b/modules/video_processing/test/denoiser_test.cc index 223e3ae79b..550e96f958 100644 --- a/modules/video_processing/test/denoiser_test.cc +++ b/modules/video_processing/test/denoiser_test.cc @@ -14,12 +14,12 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "modules/video_processing/util/denoiser_filter.h" #include "modules/video_processing/util/skin_detection.h" #include "modules/video_processing/video_denoiser.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/frame_utils.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" diff --git a/modules/video_processing/video_denoiser.h b/modules/video_processing/video_denoiser.h index 6e743b5b3d..37d624bb25 100644 --- a/modules/video_processing/video_denoiser.h +++ b/modules/video_processing/video_denoiser.h @@ -13,12 +13,12 @@ #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" #include "common_video/include/i420_buffer_pool.h" #include "modules/video_processing/util/denoiser_filter.h" #include "modules/video_processing/util/noise_estimation.h" #include "modules/video_processing/util/skin_detection.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn index dcc7caf66c..775ebbd80a 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn @@ -119,6 +119,7 @@ rtc_static_library("rtc_p2p") { deps = [ "../api:libjingle_peerconnection_api", "../api:ortc_api", + "../api:scoped_refptr", "../api/transport:enums", "../logging:ice_log", "../logging:rtc_event_log_api", @@ -221,6 +222,7 @@ if (rtc_include_tests) { ":rtc_p2p", "../api:libjingle_peerconnection_api", "../api:ortc_api", + "../api:scoped_refptr", "../api/units:time_delta", "../rtc_base:checks", "../rtc_base:gunit_helpers", diff --git a/p2p/base/dtls_transport_internal.h b/p2p/base/dtls_transport_internal.h index 3054169547..b9c399d111 100644 --- a/p2p/base/dtls_transport_internal.h +++ b/p2p/base/dtls_transport_internal.h @@ -17,10 +17,10 @@ #include #include "api/crypto/crypto_options.h" +#include "api/scoped_refptr.h" #include "p2p/base/ice_transport_internal.h" #include "p2p/base/packet_transport_internal.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/ssl_certificate.h" #include "rtc_base/ssl_fingerprint.h" #include "rtc_base/ssl_stream_adapter.h" diff --git a/p2p/base/regathering_controller_unittest.cc b/p2p/base/regathering_controller_unittest.cc index c90beb622a..db1f1bde1a 100644 --- a/p2p/base/regathering_controller_unittest.cc +++ b/p2p/base/regathering_controller_unittest.cc @@ -13,6 +13,7 @@ #include #include +#include "api/scoped_refptr.h" #include "p2p/base/fake_port_allocator.h" #include "p2p/base/mock_ice_transport.h" #include "p2p/base/p2p_constants.h" @@ -21,7 +22,6 @@ #include "p2p/base/stun_server.h" #include "rtc_base/gunit.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/socket_address.h" #include "rtc_base/thread.h" #include "rtc_base/virtual_socket_server.h" diff --git a/pc/BUILD.gn b/pc/BUILD.gn index ce4e6dc5e9..7c16753c13 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -94,6 +94,7 @@ rtc_static_library("rtc_pc_base") { "../api:call_api", "../api:libjingle_peerconnection_api", "../api:ortc_api", + "../api:scoped_refptr", "../api/video:video_frame", "../call:call_interfaces", "../call:rtp_interfaces", @@ -245,6 +246,7 @@ rtc_static_library("peerconnection") { "../api:fec_controller_api", "../api:libjingle_peerconnection_api", "../api:rtc_stats_api", + "../api:scoped_refptr", "../api/video:video_frame", "../api/video_codecs:video_codecs_api", "../call:call_interfaces", @@ -366,6 +368,7 @@ if (rtc_include_tests) { "../api:create_peerconnection_factory", "../api:libjingle_peerconnection_api", "../api:rtc_stats_api", + "../api:scoped_refptr", "../api/audio:audio_mixer_api", "../api/audio_codecs:audio_codecs_api", "../api/audio_codecs:builtin_audio_decoder_factory", @@ -406,6 +409,7 @@ if (rtc_include_tests) { ":pc_test_utils", "../api:libjingle_peerconnection_api", "../api:rtc_stats_api", + "../api:scoped_refptr", "../pc:peerconnection", "../rtc_base:checks", "../rtc_base:gunit_helpers", @@ -473,6 +477,7 @@ if (rtc_include_tests) { "../api:libjingle_peerconnection_api", "../api:libjingle_peerconnection_test_api", "../api:rtc_stats_api", + "../api:scoped_refptr", "../api/audio:audio_mixer_api", "../api/audio_codecs:audio_codecs_api", "../api/video:video_frame", @@ -576,6 +581,7 @@ if (rtc_include_tests) { "../api:libjingle_peerconnection_api", "../api:loopback_media_transport", "../api:mock_rtp", + "../api:scoped_refptr", "../api/audio:audio_mixer_api", "../api/units:time_delta", "../logging:fake_rtc_event_log", diff --git a/pc/audio_track.h b/pc/audio_track.h index 6df8693222..f89bbcdd1d 100644 --- a/pc/audio_track.h +++ b/pc/audio_track.h @@ -14,9 +14,9 @@ #include #include "api/media_stream_interface.h" +#include "api/scoped_refptr.h" #include "pc/media_stream_track.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread_checker.h" namespace webrtc { diff --git a/pc/data_channel.h b/pc/data_channel.h index af8dd938d0..a07c4fb57b 100644 --- a/pc/data_channel.h +++ b/pc/data_channel.h @@ -18,10 +18,10 @@ #include "api/data_channel_interface.h" #include "api/proxy.h" +#include "api/scoped_refptr.h" #include "media/base/media_channel.h" #include "pc/channel.h" #include "rtc_base/async_invoker.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" namespace webrtc { diff --git a/pc/local_audio_source.h b/pc/local_audio_source.h index 0223fd4565..587ce10809 100644 --- a/pc/local_audio_source.h +++ b/pc/local_audio_source.h @@ -14,7 +14,7 @@ #include "api/audio_options.h" #include "api/media_stream_interface.h" #include "api/notifier.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" // LocalAudioSource implements AudioSourceInterface. // This contains settings for switching audio processing on and off. diff --git a/pc/media_stream.h b/pc/media_stream.h index e513226f7a..34299f46e3 100644 --- a/pc/media_stream.h +++ b/pc/media_stream.h @@ -17,7 +17,7 @@ #include "api/media_stream_interface.h" #include "api/notifier.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { diff --git a/pc/media_stream_observer.h b/pc/media_stream_observer.h index faa6772f6f..890600d93b 100644 --- a/pc/media_stream_observer.h +++ b/pc/media_stream_observer.h @@ -12,7 +12,7 @@ #define PC_MEDIA_STREAM_OBSERVER_H_ #include "api/media_stream_interface.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" namespace webrtc { diff --git a/pc/peer_connection_data_channel_unittest.cc b/pc/peer_connection_data_channel_unittest.cc index c120143b0d..754ee0a92e 100644 --- a/pc/peer_connection_data_channel_unittest.cc +++ b/pc/peer_connection_data_channel_unittest.cc @@ -21,6 +21,7 @@ #include "api/media_types.h" #include "api/peer_connection_interface.h" #include "api/peer_connection_proxy.h" +#include "api/scoped_refptr.h" #include "api/test/fake_media_transport.h" #include "media/base/codec.h" #include "media/base/fake_media_engine.h" @@ -39,7 +40,6 @@ #include "rtc_base/checks.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/rtc_certificate_generator.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" #include "test/gtest.h" #ifdef WEBRTC_ANDROID diff --git a/pc/peer_connection_factory.h b/pc/peer_connection_factory.h index 6b1958c9fa..1303d52998 100644 --- a/pc/peer_connection_factory.h +++ b/pc/peer_connection_factory.h @@ -18,10 +18,10 @@ #include "api/media_stream_interface.h" #include "api/media_transport_interface.h" #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "media/sctp/sctp_transport_internal.h" #include "pc/channel_manager.h" #include "rtc_base/rtc_certificate_generator.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" namespace rtc { diff --git a/pc/peer_connection_histogram_unittest.cc b/pc/peer_connection_histogram_unittest.cc index 2bbebdb2c9..596f2f5022 100644 --- a/pc/peer_connection_histogram_unittest.cc +++ b/pc/peer_connection_histogram_unittest.cc @@ -21,6 +21,7 @@ #include "api/peer_connection_interface.h" #include "api/peer_connection_proxy.h" #include "api/rtc_error.h" +#include "api/scoped_refptr.h" #include "media/base/fake_media_engine.h" #include "p2p/base/port_allocator.h" #include "p2p/client/basic_port_allocator.h" @@ -34,7 +35,6 @@ #include "rtc_base/gunit.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/rtc_certificate_generator.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/socket_address.h" #include "rtc_base/thread.h" #include "rtc_base/virtual_socket_server.h" diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc index d39e072a51..9180f1d245 100644 --- a/pc/peer_connection_interface_unittest.cc +++ b/pc/peer_connection_interface_unittest.cc @@ -36,6 +36,7 @@ #include "api/rtp_receiver_interface.h" #include "api/rtp_sender_interface.h" #include "api/rtp_transceiver_interface.h" +#include "api/scoped_refptr.h" #include "api/video_codecs/builtin_video_decoder_factory.h" #include "api/video_codecs/builtin_video_encoder_factory.h" #include "api/video_codecs/video_decoder_factory.h" @@ -80,7 +81,6 @@ #include "rtc_base/platform_file.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/rtc_certificate_generator.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/socket_address.h" #include "rtc_base/string_utils.h" #include "rtc_base/thread.h" diff --git a/pc/peer_connection_rampup_tests.cc b/pc/peer_connection_rampup_tests.cc index 321affdca8..93a2724d95 100644 --- a/pc/peer_connection_rampup_tests.cc +++ b/pc/peer_connection_rampup_tests.cc @@ -25,6 +25,7 @@ #include "api/jsep.h" #include "api/media_stream_interface.h" #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats.h" #include "api/stats/rtc_stats_report.h" #include "api/stats/rtcstats_objects.h" @@ -50,7 +51,6 @@ #include "rtc_base/helpers.h" #include "rtc_base/location.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/socket_address.h" #include "rtc_base/ssl_certificate.h" #include "rtc_base/test_certificate_verifier.h" diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc index 0b95d2d26a..2321ada86f 100644 --- a/pc/peer_connection_rtp_unittest.cc +++ b/pc/peer_connection_rtp_unittest.cc @@ -31,6 +31,7 @@ #include "api/rtp_receiver_interface.h" #include "api/rtp_sender_interface.h" #include "api/rtp_transceiver_interface.h" +#include "api/scoped_refptr.h" #include "api/set_remote_description_observer_interface.h" #include "api/uma_metrics.h" #include "api/video_codecs/builtin_video_decoder_factory.h" @@ -51,7 +52,6 @@ #include "rtc_base/gunit.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/rtc_certificate_generator.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" #include "system_wrappers/include/metrics.h" #include "test/gmock.h" diff --git a/pc/peer_connection_wrapper.h b/pc/peer_connection_wrapper.h index 0acd58f2b9..d7f10b40db 100644 --- a/pc/peer_connection_wrapper.h +++ b/pc/peer_connection_wrapper.h @@ -23,10 +23,10 @@ #include "api/rtc_error.h" #include "api/rtp_sender_interface.h" #include "api/rtp_transceiver_interface.h" +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats_report.h" #include "pc/test/mock_peer_connection_observers.h" #include "rtc_base/function_view.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/pc/remote_audio_source.cc b/pc/remote_audio_source.cc index ac7604db49..c789d4565e 100644 --- a/pc/remote_audio_source.cc +++ b/pc/remote_audio_source.cc @@ -15,11 +15,11 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "rtc_base/checks.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/location.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" #include "rtc_base/thread_checker.h" diff --git a/pc/rtc_stats_collector.h b/pc/rtc_stats_collector.h index e3402df053..a3f159323f 100644 --- a/pc/rtc_stats_collector.h +++ b/pc/rtc_stats_collector.h @@ -18,6 +18,7 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats_collector_callback.h" #include "api/stats/rtc_stats_report.h" #include "api/stats/rtcstats_objects.h" @@ -28,7 +29,6 @@ #include "pc/track_media_info_map.h" #include "rtc_base/async_invoker.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/ssl_identity.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/time_utils.h" diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc index a9ebc800c5..14fd36617a 100644 --- a/pc/rtc_stats_integrationtest.cc +++ b/pc/rtc_stats_integrationtest.cc @@ -26,6 +26,7 @@ #include "api/peer_connection_interface.h" #include "api/rtp_receiver_interface.h" #include "api/rtp_sender_interface.h" +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats.h" #include "api/stats/rtc_stats_report.h" #include "api/stats/rtcstats_objects.h" @@ -37,7 +38,6 @@ #include "rtc_base/event_tracer.h" #include "rtc_base/gunit.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" #include "rtc_base/trace_event.h" #include "rtc_base/virtual_socket_server.h" diff --git a/pc/rtc_stats_traversal.h b/pc/rtc_stats_traversal.h index f648ec66b9..062a665cb8 100644 --- a/pc/rtc_stats_traversal.h +++ b/pc/rtc_stats_traversal.h @@ -14,9 +14,9 @@ #include #include +#include "api/scoped_refptr.h" #include "api/stats/rtc_stats.h" #include "api/stats/rtc_stats_report.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/pc/rtp_receiver.h b/pc/rtp_receiver.h index 86673e871f..469502cdf4 100644 --- a/pc/rtp_receiver.h +++ b/pc/rtp_receiver.h @@ -25,6 +25,7 @@ #include "api/media_types.h" #include "api/rtp_parameters.h" #include "api/rtp_receiver_interface.h" +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_sink_interface.h" #include "api/video/video_source_interface.h" @@ -33,7 +34,6 @@ #include "pc/remote_audio_source.h" #include "pc/video_track_source.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" namespace webrtc { diff --git a/pc/rtp_sender_receiver_unittest.cc b/pc/rtp_sender_receiver_unittest.cc index 5672a9c190..34092fb4eb 100644 --- a/pc/rtp_sender_receiver_unittest.cc +++ b/pc/rtp_sender_receiver_unittest.cc @@ -25,6 +25,7 @@ #include "api/media_stream_interface.h" #include "api/rtc_error.h" #include "api/rtp_parameters.h" +#include "api/scoped_refptr.h" #include "api/test/fake_frame_decryptor.h" #include "api/test/fake_frame_encryptor.h" #include "logging/rtc_event_log/rtc_event_log.h" @@ -53,7 +54,6 @@ #include "pc/video_track.h" #include "rtc_base/checks.h" #include "rtc_base/gunit.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" #include "test/gmock.h" diff --git a/pc/srtp_session.h b/pc/srtp_session.h index dd89e43982..8bfd6d12b9 100644 --- a/pc/srtp_session.h +++ b/pc/srtp_session.h @@ -13,7 +13,7 @@ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/thread_checker.h" // Forward declaration to avoid pulling in libsrtp headers here diff --git a/pc/stats_collector_unittest.cc b/pc/stats_collector_unittest.cc index 4fdb8cd240..dc5a47a8d9 100644 --- a/pc/stats_collector_unittest.cc +++ b/pc/stats_collector_unittest.cc @@ -17,6 +17,7 @@ #include "api/audio_codecs/audio_encoder.h" #include "api/candidate.h" #include "api/data_channel_interface.h" +#include "api/scoped_refptr.h" #include "call/call.h" #include "media/base/media_channel.h" #include "modules/audio_processing/include/audio_processing_statistics.h" @@ -33,7 +34,6 @@ #include "rtc_base/net_helper.h" #include "rtc_base/ref_counted_object.h" #include "rtc_base/rtc_certificate.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/socket_address.h" #include "rtc_base/ssl_identity.h" #include "rtc_base/ssl_stream_adapter.h" diff --git a/pc/test/fake_audio_capture_module.h b/pc/test/fake_audio_capture_module.h index 495cd01064..12eecd9710 100644 --- a/pc/test/fake_audio_capture_module.h +++ b/pc/test/fake_audio_capture_module.h @@ -22,11 +22,11 @@ #include +#include "api/scoped_refptr.h" #include "common_types.h" // NOLINT(build/include) #include "modules/audio_device/include/audio_device.h" #include "rtc_base/critical_section.h" #include "rtc_base/message_handler.h" -#include "rtc_base/scoped_ref_ptr.h" namespace rtc { class Thread; diff --git a/pc/test/fake_audio_capture_module_unittest.cc b/pc/test/fake_audio_capture_module_unittest.cc index 30a8090284..250953f3ad 100644 --- a/pc/test/fake_audio_capture_module_unittest.cc +++ b/pc/test/fake_audio_capture_module_unittest.cc @@ -13,9 +13,9 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/critical_section.h" #include "rtc_base/gunit.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" using std::min; diff --git a/pc/test/peer_connection_test_wrapper.h b/pc/test/peer_connection_test_wrapper.h index 8bbf42f195..67f56734ba 100644 --- a/pc/test/peer_connection_test_wrapper.h +++ b/pc/test/peer_connection_test_wrapper.h @@ -24,10 +24,10 @@ #include "api/peer_connection_interface.h" #include "api/rtc_error.h" #include "api/rtp_receiver_interface.h" +#include "api/scoped_refptr.h" #include "api/test/fake_constraints.h" #include "pc/test/fake_audio_capture_module.h" #include "pc/test/fake_video_track_renderer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" #include "rtc_base/thread_checker.h" diff --git a/pc/video_track.h b/pc/video_track.h index 0111a660af..90e0758a6c 100644 --- a/pc/video_track.h +++ b/pc/video_track.h @@ -14,12 +14,12 @@ #include #include "api/media_stream_interface.h" +#include "api/scoped_refptr.h" #include "api/video/video_frame.h" #include "api/video/video_sink_interface.h" #include "api/video/video_source_interface.h" #include "media/base/video_source_base.h" #include "pc/media_stream_track.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" #include "rtc_base/thread_annotations.h" #include "rtc_base/thread_checker.h" diff --git a/pc/webrtc_session_description_factory.h b/pc/webrtc_session_description_factory.h index a1bd0c7718..af689a990f 100644 --- a/pc/webrtc_session_description_factory.h +++ b/pc/webrtc_session_description_factory.h @@ -18,6 +18,7 @@ #include "api/jsep.h" #include "api/peer_connection_interface.h" +#include "api/scoped_refptr.h" #include "p2p/base/transport_description.h" #include "p2p/base/transport_description_factory.h" #include "pc/media_session.h" @@ -27,7 +28,6 @@ #include "rtc_base/message_queue.h" #include "rtc_base/rtc_certificate.h" #include "rtc_base/rtc_certificate_generator.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn index e38da1f1d8..7d25f1f17d 100644 --- a/rtc_base/BUILD.gn +++ b/rtc_base/BUILD.gn @@ -79,6 +79,7 @@ rtc_source_set("rtc_base_approved") { ":safe_minmax", ":type_traits", "../api:array_view", + "../api:scoped_refptr", "../system_wrappers:field_trial", "experiments:field_trial_parser", "system:arch", @@ -178,7 +179,6 @@ rtc_source_set("rtc_base_approved") { ":macromagic", ":platform_thread", ":platform_thread_types", - ":ptr_util", ":refcount", ":rtc_event", ":safe_conversions", @@ -211,16 +211,6 @@ rtc_source_set("platform_thread_types") { ] } -rtc_source_set("ptr_util") { - visibility = [ "*" ] - sources = [ - "scoped_ref_ptr.h", - ] - deps = [ - "../api:scoped_refptr", - ] -} - rtc_source_set("refcount") { visibility = [ "*" ] sources = [ @@ -533,7 +523,7 @@ rtc_source_set("rtc_task_queue_api") { ] deps = [ ":macromagic", - ":ptr_util", + "../api:scoped_refptr", "../api/task_queue", "system:rtc_export", "//third_party/abseil-cpp/absl/memory", @@ -555,11 +545,11 @@ if (rtc_enable_libevent) { ":macromagic", ":platform_thread", ":platform_thread_types", - ":ptr_util", ":refcount", ":rtc_task_queue_api", ":safe_conversions", ":timeutils", + "../api:scoped_refptr", "system:unused", ] if (rtc_build_libevent) { @@ -579,9 +569,9 @@ if (is_mac || is_ios) { deps = [ ":checks", ":logging", - ":ptr_util", ":refcount", ":rtc_task_queue_api", + "../api:scoped_refptr", ] } } @@ -598,12 +588,12 @@ if (is_win) { ":logging", ":macromagic", ":platform_thread", - ":ptr_util", ":refcount", ":rtc_event", ":rtc_task_queue_api", ":safe_conversions", ":timeutils", + "../api:scoped_refptr", ] } } @@ -619,12 +609,12 @@ rtc_source_set("rtc_task_queue_stdlib") { ":logging", ":macromagic", ":platform_thread", - ":ptr_util", ":refcount", ":rtc_event", ":rtc_task_queue_api", ":safe_conversions", ":timeutils", + "../api:scoped_refptr", ] } @@ -675,9 +665,9 @@ rtc_static_library("weak_ptr") { "weak_ptr.h", ] deps = [ - ":ptr_util", ":refcount", ":sequenced_task_checker", + "../api:scoped_refptr", ] } @@ -867,6 +857,7 @@ rtc_static_library("rtc_base") { ":stringutils", "..:webrtc_common", "../api:array_view", + "../api:scoped_refptr", "network:sent_packet", "system:file_wrapper", "third_party/base64", @@ -1398,6 +1389,7 @@ if (rtc_include_tests) { ":stringutils", ":testclient", "../api:array_view", + "../api:scoped_refptr", "../api/units:time_delta", "../system_wrappers:system_wrappers", "../test:fileutils", diff --git a/rtc_base/async_invoker.h b/rtc_base/async_invoker.h index 805768b9cb..f15955d811 100644 --- a/rtc_base/async_invoker.h +++ b/rtc_base/async_invoker.h @@ -15,12 +15,12 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/async_invoker_inl.h" #include "rtc_base/bind.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/event.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" diff --git a/rtc_base/async_invoker_inl.h b/rtc_base/async_invoker_inl.h index 50ee638193..bd9b0d1aa1 100644 --- a/rtc_base/async_invoker_inl.h +++ b/rtc_base/async_invoker_inl.h @@ -11,12 +11,12 @@ #ifndef RTC_BASE_ASYNC_INVOKER_INL_H_ #define RTC_BASE_ASYNC_INVOKER_INL_H_ +#include "api/scoped_refptr.h" #include "rtc_base/bind.h" #include "rtc_base/critical_section.h" #include "rtc_base/event.h" #include "rtc_base/message_handler.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread.h" #include "rtc_base/thread_annotations.h" diff --git a/rtc_base/bind.h b/rtc_base/bind.h index 9f225f1cae..16ac556b46 100644 --- a/rtc_base/bind.h +++ b/rtc_base/bind.h @@ -64,7 +64,7 @@ #include #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/template_util.h" #define NONAME diff --git a/rtc_base/callback.h b/rtc_base/callback.h index bead5f42d3..47512214e3 100644 --- a/rtc_base/callback.h +++ b/rtc_base/callback.h @@ -62,9 +62,9 @@ #ifndef RTC_BASE_CALLBACK_H_ #define RTC_BASE_CALLBACK_H_ +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace rtc { diff --git a/rtc_base/callback.h.pump b/rtc_base/callback.h.pump index a8a3faa472..dc5fb3ae1d 100644 --- a/rtc_base/callback.h.pump +++ b/rtc_base/callback.h.pump @@ -59,7 +59,7 @@ #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace rtc { diff --git a/rtc_base/copy_on_write_buffer.h b/rtc_base/copy_on_write_buffer.h index e055f8dcce..d0954adec7 100644 --- a/rtc_base/copy_on_write_buffer.h +++ b/rtc_base/copy_on_write_buffer.h @@ -18,10 +18,10 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/buffer.h" #include "rtc_base/checks.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace rtc { diff --git a/rtc_base/keep_ref_until_done.h b/rtc_base/keep_ref_until_done.h index feb1e90328..7bebd82374 100644 --- a/rtc_base/keep_ref_until_done.h +++ b/rtc_base/keep_ref_until_done.h @@ -11,10 +11,10 @@ #ifndef RTC_BASE_KEEP_REF_UNTIL_DONE_H_ #define RTC_BASE_KEEP_REF_UNTIL_DONE_H_ +#include "api/scoped_refptr.h" #include "rtc_base/bind.h" #include "rtc_base/callback.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace rtc { diff --git a/rtc_base/message_queue.h b/rtc_base/message_queue.h index e4845611b0..5a6bd0a842 100644 --- a/rtc_base/message_queue.h +++ b/rtc_base/message_queue.h @@ -19,11 +19,11 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/constructor_magic.h" #include "rtc_base/critical_section.h" #include "rtc_base/location.h" #include "rtc_base/message_handler.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/socket_server.h" #include "rtc_base/third_party/sigslot/sigslot.h" #include "rtc_base/thread_annotations.h" diff --git a/rtc_base/ref_counted_object_unittest.cc b/rtc_base/ref_counted_object_unittest.cc index 9b475e2102..00a9295c42 100644 --- a/rtc_base/ref_counted_object_unittest.cc +++ b/rtc_base/ref_counted_object_unittest.cc @@ -12,9 +12,9 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" namespace rtc { diff --git a/rtc_base/rtc_certificate.h b/rtc_base/rtc_certificate.h index a826af4b1d..d98c4ea231 100644 --- a/rtc_base/rtc_certificate.h +++ b/rtc_base/rtc_certificate.h @@ -15,8 +15,8 @@ #include #include +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace rtc { diff --git a/rtc_base/rtc_certificate_generator.h b/rtc_base/rtc_certificate_generator.h index 75688dd9c3..8cabca4641 100644 --- a/rtc_base/rtc_certificate_generator.h +++ b/rtc_base/rtc_certificate_generator.h @@ -14,9 +14,9 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" #include "rtc_base/rtc_certificate.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/ssl_identity.h" #include "rtc_base/thread.h" diff --git a/rtc_base/scoped_ref_ptr.h b/rtc_base/scoped_ref_ptr.h deleted file mode 100644 index b961ff57e8..0000000000 --- a/rtc_base/scoped_ref_ptr.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2011 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_SCOPED_REF_PTR_H_ -#define RTC_BASE_SCOPED_REF_PTR_H_ - -// TODO(bugs.webrtc.org/9887): This is a forward header for backwards -// compatibility. Remove when downstream clients are updated. - -#include "api/scoped_refptr.h" - -#endif // RTC_BASE_SCOPED_REF_PTR_H_ diff --git a/rtc_base/task_queue.h b/rtc_base/task_queue.h index e2b5348046..d6198a8474 100644 --- a/rtc_base/task_queue.h +++ b/rtc_base/task_queue.h @@ -17,10 +17,10 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/task_queue/queued_task.h" #include "api/task_queue/task_queue_priority.h" #include "rtc_base/constructor_magic.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/rtc_export.h" #include "rtc_base/thread_annotations.h" diff --git a/rtc_base/task_queue_libevent.cc b/rtc_base/task_queue_libevent.cc index ab97b0cf84..5ff177c3d3 100644 --- a/rtc_base/task_queue_libevent.cc +++ b/rtc_base/task_queue_libevent.cc @@ -22,6 +22,7 @@ #include #include +#include "api/scoped_refptr.h" #include "base/third_party/libevent/event.h" #include "rtc_base/checks.h" #include "rtc_base/critical_section.h" @@ -31,7 +32,6 @@ #include "rtc_base/platform_thread_types.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/system/unused.h" #include "rtc_base/task_queue_posix.h" #include "rtc_base/thread_annotations.h" diff --git a/rtc_base/weak_ptr.h b/rtc_base/weak_ptr.h index daeb6712f3..89969d6edb 100644 --- a/rtc_base/weak_ptr.h +++ b/rtc_base/weak_ptr.h @@ -15,9 +15,9 @@ #include +#include "api/scoped_refptr.h" #include "rtc_base/ref_count.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/sequenced_task_checker.h" // The implementation is borrowed from chromium except that it does not diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 4e9e3cf2c8..8ebac7f135 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -65,6 +65,7 @@ rtc_static_library("video_file_reader") { "video_file_reader.h", ] deps = [ + "../api:scoped_refptr", "../api/video:video_frame", "../api/video:video_frame_i420", "../rtc_base:checks", @@ -81,6 +82,7 @@ rtc_static_library("video_file_writer") { ] deps = [ ":video_file_reader", + "../api:scoped_refptr", "../api/video:video_frame", "../api/video:video_frame_i420", "../rtc_base:rtc_base_approved", @@ -105,6 +107,7 @@ rtc_static_library("video_quality_analysis") { deps = [ ":video_file_reader", "../api:array_view", + "../api:scoped_refptr", "../api/video:video_frame", "../api/video:video_frame_i420", "../common_video", @@ -127,7 +130,7 @@ rtc_executable("frame_analyzer") { ":video_file_reader", ":video_file_writer", ":video_quality_analysis", - "../rtc_base:ptr_util", + "../api:scoped_refptr", "../rtc_base:stringutils", "../test:perf_test", "//third_party/abseil-cpp/absl/strings", @@ -159,8 +162,8 @@ if (!build_with_chromium) { ":command_line_parser", ":video_file_reader", ":video_quality_analysis", + "../api:scoped_refptr", "../api/video:video_frame", - "../rtc_base:ptr_util", ] } @@ -173,8 +176,8 @@ if (!build_with_chromium) { deps = [ ":video_file_reader", ":video_quality_analysis", + "../api:scoped_refptr", "../api/video:video_frame", - "../rtc_base:ptr_util", ] } @@ -382,6 +385,7 @@ if (rtc_include_tests) { ":video_file_writer", ":video_quality_analysis", "../:webrtc_common", + "../api:scoped_refptr", "../api/video:video_frame", "../api/video:video_frame_i420", "../common_video:common_video", diff --git a/rtc_tools/frame_analyzer/frame_analyzer.cc b/rtc_tools/frame_analyzer/frame_analyzer.cc index 770c80e2d5..514a456a5f 100644 --- a/rtc_tools/frame_analyzer/frame_analyzer.cc +++ b/rtc_tools/frame_analyzer/frame_analyzer.cc @@ -15,7 +15,7 @@ #include #include "absl/strings/match.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/strings/string_builder.h" #include "rtc_tools/frame_analyzer/video_color_aligner.h" #include "rtc_tools/frame_analyzer/video_geometry_aligner.h" diff --git a/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h b/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h index f2844d2534..f5682edd44 100644 --- a/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h +++ b/rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h @@ -15,7 +15,7 @@ #include #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_tools/video_file_reader.h" // Returns true if the frame is frozen based on psnr and ssim freezing diff --git a/rtc_tools/frame_analyzer/reference_less_video_analysis_unittest.cc b/rtc_tools/frame_analyzer/reference_less_video_analysis_unittest.cc index 2c736d1285..b98a014989 100644 --- a/rtc_tools/frame_analyzer/reference_less_video_analysis_unittest.cc +++ b/rtc_tools/frame_analyzer/reference_less_video_analysis_unittest.cc @@ -9,7 +9,7 @@ */ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_tools/frame_analyzer/reference_less_video_analysis_lib.h" #include "rtc_tools/video_file_reader.h" #include "test/gtest.h" diff --git a/rtc_tools/frame_analyzer/video_color_aligner.h b/rtc_tools/frame_analyzer/video_color_aligner.h index fcb76db12b..b51e06060b 100644 --- a/rtc_tools/frame_analyzer/video_color_aligner.h +++ b/rtc_tools/frame_analyzer/video_color_aligner.h @@ -13,8 +13,8 @@ #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_tools/video_file_reader.h" namespace webrtc { diff --git a/rtc_tools/frame_analyzer/video_quality_analysis.h b/rtc_tools/frame_analyzer/video_quality_analysis.h index ae2a19b9c4..a513a3ef87 100644 --- a/rtc_tools/frame_analyzer/video_quality_analysis.h +++ b/rtc_tools/frame_analyzer/video_quality_analysis.h @@ -15,8 +15,8 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_tools/video_file_reader.h" namespace webrtc { diff --git a/rtc_tools/frame_analyzer/video_temporal_aligner.h b/rtc_tools/frame_analyzer/video_temporal_aligner.h index 31afa1f4c5..9a1bc35383 100644 --- a/rtc_tools/frame_analyzer/video_temporal_aligner.h +++ b/rtc_tools/frame_analyzer/video_temporal_aligner.h @@ -14,7 +14,7 @@ #include #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_tools/video_file_reader.h" namespace webrtc { diff --git a/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc b/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc index 90ab824360..ca97161652 100644 --- a/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc +++ b/rtc_tools/psnr_ssim_analyzer/psnr_ssim_analyzer.cc @@ -13,8 +13,8 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_tools/frame_analyzer/video_quality_analysis.h" #include "rtc_tools/simple_command_line_parser.h" #include "rtc_tools/video_file_reader.h" diff --git a/rtc_tools/video_file_reader.h b/rtc_tools/video_file_reader.h index a0315e34ed..3cdbcffa45 100644 --- a/rtc_tools/video_file_reader.h +++ b/rtc_tools/video_file_reader.h @@ -15,9 +15,9 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" #include "rtc_base/ref_count.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { namespace test { diff --git a/rtc_tools/video_file_writer.h b/rtc_tools/video_file_writer.h index 97b80ea830..ab8db81353 100644 --- a/rtc_tools/video_file_writer.h +++ b/rtc_tools/video_file_writer.h @@ -12,7 +12,7 @@ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_tools/video_file_reader.h" namespace webrtc { diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 8d1ee7e227..77d3c43db8 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -894,6 +894,7 @@ if (is_ios || is_mac) { ":videotoolbox_objc", "../api:create_peerconnection_factory", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api/audio_codecs:audio_codecs_api", "../api/audio_codecs:builtin_audio_decoder_factory", "../api/audio_codecs:builtin_audio_encoder_factory", @@ -1053,6 +1054,7 @@ if (is_ios || is_mac) { ":videoframebuffer_objc", ":videosource_objc", ":videotoolbox_objc", + "../api:scoped_refptr", "../api/video:video_frame_i420", "../common_video:common_video", "../media:rtc_media_base", @@ -1531,6 +1533,7 @@ if (is_ios || is_mac) { ":native_video", ":videoframebuffer_objc", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api/video:video_frame", "../api/video_codecs:video_codecs_api", "../common_video", diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn index c6ffe73481..f8977e2874 100644 --- a/sdk/android/BUILD.gn +++ b/sdk/android/BUILD.gn @@ -557,6 +557,7 @@ if (is_android) { ":internal_jni", ":native_api_jni", "../../api:libjingle_peerconnection_api", + "../../api:scoped_refptr", "../../rtc_base:checks", "../../rtc_base:rtc_base", "../../rtc_base:rtc_base_approved", @@ -616,6 +617,7 @@ if (is_android) { ":video_jni", ":videoframe_jni", "../..:webrtc_common", + "../../api:scoped_refptr", "../../api/video_codecs:video_codecs_api", "../../common_video:common_video", "../../media:rtc_internal_video_codecs", @@ -1109,6 +1111,7 @@ if (is_android) { ":base_jni", ":generated_video_jni", ":native_api_jni", + "../../api:scoped_refptr", "../../api/video:video_frame", "../../common_video:common_video", "../../rtc_base:checks", @@ -1557,6 +1560,7 @@ if (is_android) { ":native_api_video", ":opensles_audio_device_module", ":video_jni", + "../../api:scoped_refptr", "../../api/audio_codecs:builtin_audio_decoder_factory", "../../api/audio_codecs:builtin_audio_encoder_factory", "../../api/video:video_frame", diff --git a/sdk/android/native_unittests/audio_device/audio_device_unittest.cc b/sdk/android/native_unittests/audio_device/audio_device_unittest.cc index 6f52880d27..cacb06929f 100644 --- a/sdk/android/native_unittests/audio_device/audio_device_unittest.cc +++ b/sdk/android/native_unittests/audio_device/audio_device_unittest.cc @@ -11,13 +11,13 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/audio_device/include/audio_device.h" #include "modules/audio_device/include/mock_audio_transport.h" #include "rtc_base/arraysize.h" #include "rtc_base/critical_section.h" #include "rtc_base/event.h" #include "rtc_base/format_macros.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "sdk/android/generated_native_unittests_jni/jni/ApplicationContextProvider_jni.h" #include "sdk/android/generated_native_unittests_jni/jni/BuildInfo_jni.h" diff --git a/sdk/android/src/jni/android_media_decoder.cc b/sdk/android/src/jni/android_media_decoder.cc index 35f415ef1a..71ba3b7c47 100644 --- a/sdk/android/src/jni/android_media_decoder.cc +++ b/sdk/android/src/jni/android_media_decoder.cc @@ -13,6 +13,7 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video_codecs/sdp_video_format.h" #include "common_video/h264/h264_bitstream_parser.h" #include "common_video/include/i420_buffer_pool.h" @@ -23,7 +24,6 @@ #include "rtc_base/checks.h" #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/thread.h" #include "rtc_base/time_utils.h" #include "sdk/android/generated_video_jni/jni/MediaCodecVideoDecoder_jni.h" diff --git a/sdk/android/src/jni/pc/audio.h b/sdk/android/src/jni/pc/audio.h index 49cf0699e1..1e8b3accc2 100644 --- a/sdk/android/src/jni/pc/audio.h +++ b/sdk/android/src/jni/pc/audio.h @@ -13,10 +13,10 @@ // Adding 'nogncheck' to disable the gn include headers check. // We don't want this target depend on audio related targets -#include "api/audio_codecs/audio_decoder_factory.h" // nogncheck -#include "api/audio_codecs/audio_encoder_factory.h" // nogncheck +#include "api/audio_codecs/audio_decoder_factory.h" // nogncheck +#include "api/audio_codecs/audio_encoder_factory.h" // nogncheck +#include "api/scoped_refptr.h" #include "modules/audio_processing/include/audio_processing.h" // nogncheck -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { namespace jni { diff --git a/sdk/android/src/jni/pc/media.h b/sdk/android/src/jni/pc/media.h index 8a0bb52174..f7012805fb 100644 --- a/sdk/android/src/jni/pc/media.h +++ b/sdk/android/src/jni/pc/media.h @@ -13,7 +13,7 @@ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { class AudioDeviceModule; diff --git a/sdk/android/src/jni/pc/video.h b/sdk/android/src/jni/pc/video.h index 04390ea453..32bc6406a1 100644 --- a/sdk/android/src/jni/pc/video.h +++ b/sdk/android/src/jni/pc/video.h @@ -13,7 +13,7 @@ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/thread.h" #include "sdk/android/native_api/jni/scoped_java_ref.h" diff --git a/sdk/android/src/jni/video_frame.cc b/sdk/android/src/jni/video_frame.cc index d196b035fb..0d025272e9 100644 --- a/sdk/android/src/jni/video_frame.cc +++ b/sdk/android/src/jni/video_frame.cc @@ -12,12 +12,12 @@ #include +#include "api/scoped_refptr.h" #include "common_video/include/video_frame_buffer.h" #include "rtc_base/bind.h" #include "rtc_base/checks.h" #include "rtc_base/keep_ref_until_done.h" #include "rtc_base/logging.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" #include "sdk/android/generated_video_jni/jni/VideoFrame_jni.h" #include "sdk/android/src/jni/jni_helpers.h" diff --git a/sdk/objc/api/peerconnection/RTCDataChannel+Private.h b/sdk/objc/api/peerconnection/RTCDataChannel+Private.h index 74d0455859..e327fb4f3e 100644 --- a/sdk/objc/api/peerconnection/RTCDataChannel+Private.h +++ b/sdk/objc/api/peerconnection/RTCDataChannel+Private.h @@ -11,7 +11,7 @@ #import "RTCDataChannel.h" #include "api/data_channel_interface.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" NS_ASSUME_NONNULL_BEGIN diff --git a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Native.h b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Native.h index 2752cf4117..be68f3fdd5 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Native.h +++ b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Native.h @@ -10,7 +10,7 @@ #import "RTCPeerConnectionFactory.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { diff --git a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Private.h b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Private.h index a82c445c00..db7829c977 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Private.h +++ b/sdk/objc/api/peerconnection/RTCPeerConnectionFactory+Private.h @@ -11,7 +11,7 @@ #import "RTCPeerConnectionFactory.h" #include "api/peer_connection_interface.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" NS_ASSUME_NONNULL_BEGIN diff --git a/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h b/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h index cca54462b9..189eb736b2 100644 --- a/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h +++ b/sdk/objc/api/peerconnection/RTCPeerConnectionFactoryBuilder.h @@ -10,7 +10,7 @@ #import "RTCPeerConnectionFactory.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { diff --git a/sdk/objc/api/peerconnection/RTCRtpReceiver+Native.h b/sdk/objc/api/peerconnection/RTCRtpReceiver+Native.h index 419a347a7e..e085529527 100644 --- a/sdk/objc/api/peerconnection/RTCRtpReceiver+Native.h +++ b/sdk/objc/api/peerconnection/RTCRtpReceiver+Native.h @@ -11,7 +11,7 @@ #import "RTCRtpReceiver.h" #include "api/crypto/frame_decryptor_interface.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" NS_ASSUME_NONNULL_BEGIN diff --git a/sdk/objc/api/peerconnection/RTCRtpSender+Native.h b/sdk/objc/api/peerconnection/RTCRtpSender+Native.h index daef7eed56..89a691cd54 100644 --- a/sdk/objc/api/peerconnection/RTCRtpSender+Native.h +++ b/sdk/objc/api/peerconnection/RTCRtpSender+Native.h @@ -11,7 +11,7 @@ #import "RTCRtpSender.h" #include "api/crypto/frame_encryptor_interface.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" NS_ASSUME_NONNULL_BEGIN diff --git a/sdk/objc/native/api/video_capturer.h b/sdk/objc/native/api/video_capturer.h index c0a7760b76..464d148bd1 100644 --- a/sdk/objc/native/api/video_capturer.h +++ b/sdk/objc/native/api/video_capturer.h @@ -14,7 +14,7 @@ #import "base/RTCVideoCapturer.h" #include "api/media_stream_interface.h" -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "rtc_base/thread.h" namespace webrtc { diff --git a/sdk/objc/native/api/video_frame_buffer.h b/sdk/objc/native/api/video_frame_buffer.h index 232e00ab6d..54a73750f7 100644 --- a/sdk/objc/native/api/video_frame_buffer.h +++ b/sdk/objc/native/api/video_frame_buffer.h @@ -13,8 +13,8 @@ #import "base/RTCVideoFrameBuffer.h" +#include "api/scoped_refptr.h" #include "common_video/include/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/sdk/objc/unittests/ObjCVideoTrackSource_xctest.mm b/sdk/objc/unittests/ObjCVideoTrackSource_xctest.mm index 291c9f0f80..8c940e44c3 100644 --- a/sdk/objc/unittests/ObjCVideoTrackSource_xctest.mm +++ b/sdk/objc/unittests/ObjCVideoTrackSource_xctest.mm @@ -19,10 +19,10 @@ #import "components/video_frame_buffer/RTCCVPixelBuffer.h" #import "frame_buffer_helpers.h" +#include "api/scoped_refptr.h" #include "common_video/libyuv/include/webrtc_libyuv.h" #include "media/base/fake_video_renderer.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "sdk/objc/native/api/video_frame.h" typedef void (^VideoSinkCallback)(RTCVideoFrame *); diff --git a/sdk/objc/unittests/RTCAudioDeviceModule_xctest.mm b/sdk/objc/unittests/RTCAudioDeviceModule_xctest.mm index c2b5c6a627..094e2464dc 100644 --- a/sdk/objc/unittests/RTCAudioDeviceModule_xctest.mm +++ b/sdk/objc/unittests/RTCAudioDeviceModule_xctest.mm @@ -14,7 +14,7 @@ #import "sdk/objc/native/api/audio_device_module.h" #endif -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" typedef int32_t(^NeedMorePlayDataBlock)(const size_t nSamples, const size_t nBytesPerSample, diff --git a/test/BUILD.gn b/test/BUILD.gn index fad00e26c2..6165b9585b 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -62,6 +62,7 @@ rtc_source_set("video_test_common") { deps = [ "..:webrtc_common", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api/video:video_frame", "../api/video:video_frame_i010", "../api/video:video_frame_i420", @@ -347,6 +348,7 @@ if (rtc_include_tests) { ":video_test_common", ":video_test_support", "../api:create_simulcast_test_fixture_api", + "../api:scoped_refptr", "../api:simulcast_test_fixture_api", "../api/test/video:function_video_factory", "../api/video:builtin_video_bitrate_allocator_factory", @@ -628,6 +630,7 @@ rtc_source_set("fake_video_codecs") { } deps = [ "..:webrtc_common", + "../api:scoped_refptr", "../api/video:encoded_image", "../api/video:video_bitrate_allocation", "../api/video:video_frame", @@ -703,6 +706,7 @@ rtc_source_set("test_common") { ":video_test_common", "../:webrtc_common", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api:simulated_network_api", "../api:transport_api", "../api/audio_codecs:builtin_audio_decoder_factory", @@ -803,6 +807,7 @@ rtc_source_set("test_renderer_generic") { deps = [ ":test_support", "..:webrtc_common", + "../api:scoped_refptr", "../api/video:video_frame", "../common_video", "../media:rtc_media_base", @@ -863,6 +868,7 @@ rtc_source_set("audio_codec_mocks") { deps = [ ":test_support", "../api:array_view", + "../api:scoped_refptr", "../api/audio_codecs:audio_codecs_api", "../api/audio_codecs:builtin_audio_decoder_factory", "../rtc_base:checks", diff --git a/test/encoder_settings.cc b/test/encoder_settings.cc index e576cc4b22..cc1994f171 100644 --- a/test/encoder_settings.cc +++ b/test/encoder_settings.cc @@ -12,11 +12,11 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video_codecs/sdp_video_format.h" #include "call/rtp_config.h" #include "rtc_base/checks.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { namespace test { diff --git a/test/fake_decoder.cc b/test/fake_decoder.cc index 865bca7983..70fe085335 100644 --- a/test/fake_decoder.cc +++ b/test/fake_decoder.cc @@ -12,13 +12,13 @@ #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "modules/video_coding/include/video_error_codes.h" #include "rtc_base/checks.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace webrtc { diff --git a/test/fake_vp8_decoder.cc b/test/fake_vp8_decoder.cc index ae030a71b0..7a244ca09d 100644 --- a/test/fake_vp8_decoder.cc +++ b/test/fake_vp8_decoder.cc @@ -13,12 +13,12 @@ #include #include "absl/types/optional.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" #include "modules/video_coding/include/video_error_codes.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/time_utils.h" namespace webrtc { diff --git a/test/frame_generator.cc b/test/frame_generator.cc index e37e823dd8..68abede9e7 100644 --- a/test/frame_generator.cc +++ b/test/frame_generator.cc @@ -15,6 +15,7 @@ #include #include "absl/memory/memory.h" +#include "api/scoped_refptr.h" #include "api/video/i010_buffer.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" @@ -26,7 +27,6 @@ #include "rtc_base/checks.h" #include "rtc_base/keep_ref_until_done.h" #include "rtc_base/random.h" -#include "rtc_base/scoped_ref_ptr.h" #include "system_wrappers/include/clock.h" #include "test/frame_utils.h" diff --git a/test/frame_generator_unittest.cc b/test/frame_generator_unittest.cc index fa6da9a3ad..599eac9f20 100644 --- a/test/frame_generator_unittest.cc +++ b/test/frame_generator_unittest.cc @@ -15,8 +15,8 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/frame_generator.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" diff --git a/test/frame_utils.h b/test/frame_utils.h index c829311199..93515848ed 100644 --- a/test/frame_utils.h +++ b/test/frame_utils.h @@ -12,7 +12,7 @@ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { class I420Buffer; diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn index f78669ae96..797c27d917 100644 --- a/test/fuzzers/BUILD.gn +++ b/test/fuzzers/BUILD.gn @@ -121,6 +121,7 @@ webrtc_fuzzer_test("forward_error_correction_fuzzer") { "forward_error_correction_fuzzer.cc", ] deps = [ + "../../api:scoped_refptr", "../../modules/rtp_rtcp", "../../modules/rtp_rtcp:rtp_rtcp_format", "../../rtc_base:rtc_base_approved", @@ -132,6 +133,7 @@ webrtc_fuzzer_test("flexfec_header_reader_fuzzer") { "flexfec_header_reader_fuzzer.cc", ] deps = [ + "../../api:scoped_refptr", "../../modules/rtp_rtcp", "../../modules/rtp_rtcp:rtp_rtcp_format", "../../rtc_base:rtc_base_approved", @@ -154,6 +156,7 @@ webrtc_fuzzer_test("ulpfec_header_reader_fuzzer") { "ulpfec_header_reader_fuzzer.cc", ] deps = [ + "../../api:scoped_refptr", "../../modules/rtp_rtcp", "../../modules/rtp_rtcp:fec_test_helper", "../../modules/rtp_rtcp:rtp_rtcp_format", @@ -482,13 +485,13 @@ webrtc_fuzzer_test("audio_processing_fuzzer") { ] deps = [ ":audio_processing_fuzzer_helper", + "../../api:scoped_refptr", "../../api/audio:aec3_factory", "../../modules/audio_processing", "../../modules/audio_processing:api", "../../modules/audio_processing/aec3", "../../modules/audio_processing/aec_dump", "../../modules/audio_processing/aec_dump:aec_dump_impl", - "../../rtc_base:ptr_util", "../../rtc_base:rtc_base_approved", "../../rtc_base:rtc_task_queue", "../../rtc_base:safe_minmax", @@ -530,8 +533,8 @@ webrtc_fuzzer_test("rtp_frame_reference_finder_fuzzer") { "rtp_frame_reference_finder_fuzzer.cc", ] deps = [ + "../../api:scoped_refptr", "../../modules/video_coding/", - "../../rtc_base:ptr_util", "../../system_wrappers", "//third_party/abseil-cpp/absl/memory", ] diff --git a/test/fuzzers/flexfec_header_reader_fuzzer.cc b/test/fuzzers/flexfec_header_reader_fuzzer.cc index a5694ea300..c887d2eb7d 100644 --- a/test/fuzzers/flexfec_header_reader_fuzzer.cc +++ b/test/fuzzers/flexfec_header_reader_fuzzer.cc @@ -10,10 +10,10 @@ #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/flexfec_header_reader_writer.h" #include "modules/rtp_rtcp/source/forward_error_correction.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/test/fuzzers/forward_error_correction_fuzzer.cc b/test/fuzzers/forward_error_correction_fuzzer.cc index 1385e54c2a..1c37889a53 100644 --- a/test/fuzzers/forward_error_correction_fuzzer.cc +++ b/test/fuzzers/forward_error_correction_fuzzer.cc @@ -10,10 +10,10 @@ #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/source/byte_io.h" #include "modules/rtp_rtcp/source/forward_error_correction.h" #include "rtc_base/byte_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/test/fuzzers/ulpfec_header_reader_fuzzer.cc b/test/fuzzers/ulpfec_header_reader_fuzzer.cc index 6a6394f763..46fe67b1d2 100644 --- a/test/fuzzers/ulpfec_header_reader_fuzzer.cc +++ b/test/fuzzers/ulpfec_header_reader_fuzzer.cc @@ -10,10 +10,10 @@ #include +#include "api/scoped_refptr.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/forward_error_correction.h" #include "modules/rtp_rtcp/source/ulpfec_header_reader_writer.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { diff --git a/test/mock_audio_decoder_factory.h b/test/mock_audio_decoder_factory.h index b54e109a9b..e38b1d2fe0 100644 --- a/test/mock_audio_decoder_factory.h +++ b/test/mock_audio_decoder_factory.h @@ -16,8 +16,8 @@ #include "api/audio_codecs/audio_decoder_factory.h" #include "api/audio_codecs/builtin_audio_decoder_factory.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gmock.h" namespace webrtc { diff --git a/test/mock_audio_encoder_factory.h b/test/mock_audio_encoder_factory.h index 55fe2591b4..373bbb6628 100644 --- a/test/mock_audio_encoder_factory.h +++ b/test/mock_audio_encoder_factory.h @@ -15,8 +15,8 @@ #include #include "api/audio_codecs/audio_encoder_factory.h" +#include "api/scoped_refptr.h" #include "rtc_base/ref_counted_object.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gmock.h" namespace webrtc { diff --git a/test/test_video_capturer.cc b/test/test_video_capturer.cc index ef3d8582ca..fa43f9f7f0 100644 --- a/test/test_video_capturer.cc +++ b/test/test_video_capturer.cc @@ -12,10 +12,10 @@ #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc { namespace test { diff --git a/test/testsupport/frame_reader.h b/test/testsupport/frame_reader.h index 4c0f206426..7f313e8b82 100644 --- a/test/testsupport/frame_reader.h +++ b/test/testsupport/frame_reader.h @@ -15,7 +15,7 @@ #include -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" namespace webrtc { class I420Buffer; diff --git a/test/testsupport/y4m_frame_reader.cc b/test/testsupport/y4m_frame_reader.cc index 00ced05cc2..5e50d86fb8 100644 --- a/test/testsupport/y4m_frame_reader.cc +++ b/test/testsupport/y4m_frame_reader.cc @@ -11,8 +11,8 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/testsupport/file_utils.h" #include "test/testsupport/frame_reader.h" diff --git a/test/testsupport/y4m_frame_reader_unittest.cc b/test/testsupport/y4m_frame_reader_unittest.cc index 957b88d0cb..72b421d913 100644 --- a/test/testsupport/y4m_frame_reader_unittest.cc +++ b/test/testsupport/y4m_frame_reader_unittest.cc @@ -14,9 +14,9 @@ #include #include "absl/strings/string_view.h" +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" #include "test/testsupport/frame_reader.h" diff --git a/test/testsupport/yuv_frame_reader.cc b/test/testsupport/yuv_frame_reader.cc index c502ee7de5..2e788b9143 100644 --- a/test/testsupport/yuv_frame_reader.cc +++ b/test/testsupport/yuv_frame_reader.cc @@ -11,8 +11,8 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/frame_utils.h" #include "test/testsupport/file_utils.h" #include "test/testsupport/frame_reader.h" diff --git a/test/testsupport/yuv_frame_reader_unittest.cc b/test/testsupport/yuv_frame_reader_unittest.cc index cd405f5588..9e16307d72 100644 --- a/test/testsupport/yuv_frame_reader_unittest.cc +++ b/test/testsupport/yuv_frame_reader_unittest.cc @@ -13,9 +13,9 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" #include "test/testsupport/frame_reader.h" diff --git a/test/vcm_capturer.h b/test/vcm_capturer.h index 59000ae4ee..5418dc9596 100644 --- a/test/vcm_capturer.h +++ b/test/vcm_capturer.h @@ -13,8 +13,8 @@ #include #include +#include "api/scoped_refptr.h" #include "modules/video_capture/video_capture.h" -#include "rtc_base/scoped_ref_ptr.h" #include "test/test_video_capturer.h" namespace webrtc { diff --git a/test/win/d3d_renderer.h b/test/win/d3d_renderer.h index a43be447f6..9e5e23c328 100644 --- a/test/win/d3d_renderer.h +++ b/test/win/d3d_renderer.h @@ -14,7 +14,7 @@ #include #pragma comment(lib, "d3d9.lib") // located in DirectX SDK -#include "rtc_base/scoped_ref_ptr.h" +#include "api/scoped_refptr.h" #include "test/video_renderer.h" namespace webrtc { diff --git a/video/BUILD.gn b/video/BUILD.gn index a56e506f7f..d9667c69b0 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -59,6 +59,7 @@ rtc_static_library("video") { "../api:array_view", "../api:fec_controller_api", "../api:libjingle_peerconnection_api", + "../api:scoped_refptr", "../api:transport_api", "../api/video:encoded_image", "../api/video:video_bitrate_allocation", @@ -498,6 +499,7 @@ if (rtc_include_tests) { "../api:fake_frame_encryptor", "../api:libjingle_peerconnection_api", "../api:mock_frame_decryptor", + "../api:scoped_refptr", "../api:simulated_network_api", "../api/test/video:function_video_factory", "../api/video:builtin_video_bitrate_allocator_factory", diff --git a/video/receive_statistics_proxy_unittest.cc b/video/receive_statistics_proxy_unittest.cc index 29e4483c2b..43ee08032f 100644 --- a/video/receive_statistics_proxy_unittest.cc +++ b/video/receive_statistics_proxy_unittest.cc @@ -14,11 +14,11 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "api/video/video_rotation.h" -#include "rtc_base/scoped_ref_ptr.h" #include "system_wrappers/include/metrics.h" #include "test/gtest.h" diff --git a/video/video_send_stream_impl.cc b/video/video_send_stream_impl.cc index 22c485ddbb..2a8e646b54 100644 --- a/video/video_send_stream_impl.cc +++ b/video/video_send_stream_impl.cc @@ -17,6 +17,7 @@ #include "api/crypto/crypto_options.h" #include "api/rtp_parameters.h" +#include "api/scoped_refptr.h" #include "api/video_codecs/video_codec.h" #include "call/rtp_transport_controller_send_interface.h" #include "call/video_send_stream.h" @@ -28,7 +29,6 @@ #include "rtc_base/experiments/rate_control_settings.h" #include "rtc_base/logging.h" #include "rtc_base/numerics/safe_conversions.h" -#include "rtc_base/scoped_ref_ptr.h" #include "rtc_base/sequenced_task_checker.h" #include "rtc_base/thread_checker.h" #include "rtc_base/time_utils.h" diff --git a/video/video_stream_decoder.h b/video/video_stream_decoder.h index 5a62d2c239..114c953c85 100644 --- a/video/video_stream_decoder.h +++ b/video/video_stream_decoder.h @@ -16,12 +16,12 @@ #include #include +#include "api/scoped_refptr.h" #include "api/video/video_sink_interface.h" #include "modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" #include "modules/video_coding/include/video_coding_defines.h" #include "rtc_base/critical_section.h" #include "rtc_base/platform_thread.h" -#include "rtc_base/scoped_ref_ptr.h" namespace webrtc {