From 3e9cb2cbf2e0ac05306e64d7771a52d92dc35231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Thu, 14 Jan 2021 12:00:57 +0100 Subject: [PATCH] Move deprecated code to their own build targets. Moves the deprecated version of RtpRtcp module, and related classes in video/. Bug: webrtc:11581 Change-Id: Icc4cedb844fcd7c7372e8a907e5252f5b4fd955e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196904 Reviewed-by: Mirko Bonadei Reviewed-by: Tommi Commit-Queue: Niels Moller Cr-Commit-Position: refs/heads/master@{#33025} --- call/BUILD.gn | 1 + call/call_unittest.cc | 1 + modules/rtp_rtcp/BUILD.gn | 38 +++++-- modules/rtp_rtcp/include/receive_statistics.h | 1 - video/BUILD.gn | 98 +++++++++++++------ 5 files changed, 99 insertions(+), 40 deletions(-) diff --git a/call/BUILD.gn b/call/BUILD.gn index 7730382b22..dd24fada92 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -427,6 +427,7 @@ if (rtc_include_tests) { "../api/video:video_frame", "../api/video:video_rtp_headers", "../audio", + "../modules:module_api", "../modules/audio_device:mock_audio_device", "../modules/audio_mixer", "../modules/audio_mixer:audio_mixer_impl", diff --git a/call/call_unittest.cc b/call/call_unittest.cc index b6be941e53..d836362416 100644 --- a/call/call_unittest.cc +++ b/call/call_unittest.cc @@ -30,6 +30,7 @@ #include "call/audio_state.h" #include "modules/audio_device/include/mock_audio_device.h" #include "modules/audio_processing/include/mock_audio_processing.h" +#include "modules/include/module.h" #include "modules/rtp_rtcp/source/rtp_rtcp_interface.h" #include "test/fake_encoder.h" #include "test/gtest.h" diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index ecac3e505f..23cbd47cfd 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -135,7 +135,6 @@ rtc_library("rtp_rtcp") { "include/flexfec_sender.h", "include/receive_statistics.h", "include/remote_ntp_time_estimator.h", - "include/rtp_rtcp.h", # deprecated "include/ulpfec_receiver.h", "source/absolute_capture_time_receiver.cc", "source/absolute_capture_time_receiver.h", @@ -145,8 +144,6 @@ rtc_library("rtp_rtcp") { "source/active_decode_targets_helper.h", "source/create_video_rtp_depacketizer.cc", "source/create_video_rtp_depacketizer.h", - "source/deprecated/deprecated_rtp_sender_egress.cc", - "source/deprecated/deprecated_rtp_sender_egress.h", "source/dtmf_queue.cc", "source/dtmf_queue.h", "source/fec_private_tables_bursty.cc", @@ -191,8 +188,6 @@ rtc_library("rtp_rtcp") { "source/rtp_packetizer_av1.cc", "source/rtp_packetizer_av1.h", "source/rtp_rtcp_config.h", - "source/rtp_rtcp_impl.cc", - "source/rtp_rtcp_impl.h", "source/rtp_rtcp_impl2.cc", "source/rtp_rtcp_impl2.h", "source/rtp_rtcp_interface.h", @@ -248,7 +243,6 @@ rtc_library("rtp_rtcp") { deps = [ ":rtp_rtcp_format", ":rtp_video_header", - "..:module_api", "..:module_api_public", "..:module_fec_api", "../../api:array_view", @@ -319,8 +313,36 @@ rtc_library("rtp_rtcp") { } rtc_source_set("rtp_rtcp_legacy") { - # TODO(bugs.webrtc.org/11581): The files "source/rtp_rtcp_impl.cc" - # and "source/rtp_rtcp_impl.h" should be moved to this target. + sources = [ + "include/rtp_rtcp.h", + "source/deprecated/deprecated_rtp_sender_egress.cc", + "source/deprecated/deprecated_rtp_sender_egress.h", + "source/rtp_rtcp_impl.cc", + "source/rtp_rtcp_impl.h", + ] + deps = [ + ":rtp_rtcp", + ":rtp_rtcp_format", + "..:module_api", + "..:module_fec_api", + "../../api:rtp_headers", + "../../api:transport_api", + "../../api/rtc_event_log", + "../../api/transport:field_trial_based_config", + "../../api/units:data_rate", + "../../api/video:video_bitrate_allocation", + "../../logging:rtc_event_rtp_rtcp", + "../../rtc_base:checks", + "../../rtc_base:deprecation", + "../../rtc_base:gtest_prod", + "../../rtc_base:rtc_base_approved", + "../../rtc_base/synchronization:mutex", + "../remote_bitrate_estimator", + ] + absl_deps = [ + "//third_party/abseil-cpp/absl/strings", + "//third_party/abseil-cpp/absl/types:optional", + ] } rtc_library("rtcp_transceiver") { diff --git a/modules/rtp_rtcp/include/receive_statistics.h b/modules/rtp_rtcp/include/receive_statistics.h index 4e6441340c..062c90bdbe 100644 --- a/modules/rtp_rtcp/include/receive_statistics.h +++ b/modules/rtp_rtcp/include/receive_statistics.h @@ -17,7 +17,6 @@ #include "absl/types/optional.h" #include "call/rtp_packet_sink_interface.h" -#include "modules/include/module.h" #include "modules/rtp_rtcp/include/rtcp_statistics.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/rtcp_packet/report_block.h" diff --git a/video/BUILD.gn b/video/BUILD.gn index acd1616ee3..e7d48194da 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -12,8 +12,6 @@ rtc_library("video") { sources = [ "buffered_frame_decryptor.cc", "buffered_frame_decryptor.h", - "call_stats.cc", - "call_stats.h", "call_stats2.cc", "call_stats2.h", "encoder_rtcp_feedback.cc", @@ -22,18 +20,12 @@ rtc_library("video") { "quality_limitation_reason_tracker.h", "quality_threshold.cc", "quality_threshold.h", - "receive_statistics_proxy.cc", - "receive_statistics_proxy.h", "receive_statistics_proxy2.cc", "receive_statistics_proxy2.h", "report_block_stats.cc", "report_block_stats.h", - "rtp_streams_synchronizer.cc", - "rtp_streams_synchronizer.h", "rtp_streams_synchronizer2.cc", "rtp_streams_synchronizer2.h", - "rtp_video_stream_receiver.cc", - "rtp_video_stream_receiver.h", "rtp_video_stream_receiver2.cc", "rtp_video_stream_receiver2.h", "rtp_video_stream_receiver_frame_transformer_delegate.cc", @@ -48,20 +40,14 @@ rtc_library("video") { "stream_synchronization.h", "transport_adapter.cc", "transport_adapter.h", - "video_quality_observer.cc", - "video_quality_observer.h", "video_quality_observer2.cc", "video_quality_observer2.h", - "video_receive_stream.cc", - "video_receive_stream.h", "video_receive_stream2.cc", "video_receive_stream2.h", "video_send_stream.cc", "video_send_stream.h", "video_send_stream_impl.cc", "video_send_stream_impl.h", - "video_stream_decoder.cc", - "video_stream_decoder.h", "video_stream_decoder2.cc", "video_stream_decoder2.h", ] @@ -111,7 +97,6 @@ rtc_library("video") { "../modules/video_coding:nack_module", "../modules/video_coding:video_codec_interface", "../modules/video_coding:video_coding_utility", - "../modules/video_coding/deprecated:nack_module", "../modules/video_processing", "../rtc_base:checks", "../rtc_base:rate_limiter", @@ -155,22 +140,73 @@ rtc_library("video") { } rtc_source_set("video_legacy") { - # TODO(bugs.webrtc.org/11581): These files should be moved to this target: - # - # "call_stats.cc", - # "call_stats.h", - # "receive_statistics_proxy.cc", - # "receive_statistics_proxy.h", - # "rtp_streams_synchronizer.cc", - # "rtp_streams_synchronizer.h", - # "rtp_video_stream_receiver.cc", - # "rtp_video_stream_receiver.h", - # "video_quality_observer.cc", - # "video_quality_observer.h", - # "video_receive_stream.cc", - # "video_receive_stream.h", - # "video_stream_decoder.cc", - # "video_stream_decoder.h", + sources = [ + "call_stats.cc", + "call_stats.h", + "receive_statistics_proxy.cc", + "receive_statistics_proxy.h", + "rtp_streams_synchronizer.cc", + "rtp_streams_synchronizer.h", + "rtp_video_stream_receiver.cc", + "rtp_video_stream_receiver.h", + "video_quality_observer.cc", + "video_quality_observer.h", + "video_receive_stream.cc", + "video_receive_stream.h", + "video_stream_decoder.cc", + "video_stream_decoder.h", + ] + deps = [ + ":frame_dumping_decoder", + ":video", + "../api:array_view", + "../api:scoped_refptr", + "../api/crypto:frame_decryptor_interface", + "../api/task_queue", + "../api/video:encoded_image", + "../api/video:recordable_encoded_frame", + "../api/video:video_frame", + "../api/video:video_rtp_headers", + "../api/video_codecs:video_codecs_api", + "../call:call_interfaces", + "../call:rtp_interfaces", + "../call:rtp_receiver", # For RtxReceiveStream. + "../call:video_stream_api", + "../common_video", + "../media:rtc_h264_profile_id", + "../modules:module_api", + "../modules/pacing", + "../modules/remote_bitrate_estimator", + "../modules/rtp_rtcp", + "../modules/rtp_rtcp:rtp_rtcp_format", + "../modules/rtp_rtcp:rtp_rtcp_legacy", + "../modules/rtp_rtcp:rtp_video_header", + "../modules/utility", + "../modules/video_coding", + "../modules/video_coding:video_codec_interface", + "../modules/video_coding:video_coding_utility", + "../modules/video_coding/deprecated:nack_module", + "../rtc_base:checks", + "../rtc_base:rtc_base_approved", + "../rtc_base:rtc_numerics", + "../rtc_base:rtc_task_queue", + "../rtc_base/experiments:field_trial_parser", + "../rtc_base/experiments:keyframe_interval_settings_experiment", + "../rtc_base/synchronization:mutex", + "../rtc_base/system:no_unique_address", + "../rtc_base/system:thread_registry", + "../rtc_base/task_utils:to_queued_task", + "../system_wrappers", + "../system_wrappers:field_trial", + "../system_wrappers:metrics", + ] + if (!build_with_mozilla) { + deps += [ "../media:rtc_media_base" ] + } + absl_deps = [ + "//third_party/abseil-cpp/absl/algorithm:container", + "//third_party/abseil-cpp/absl/types:optional", + ] } rtc_library("video_stream_decoder_impl") {