From d8bddfef88ca4e91c17c70bd05926b80d2fb3074 Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Sun, 13 Oct 2024 21:08:30 +0000 Subject: [PATCH] Split up the call/video_stream_api target The split shows that some places don't need it at all. Most other places will depend on both send and receive stream targets. Bug: webrtc:373151158 Change-Id: I788136a2ee84180c16345a7929b7f7bf3f97507b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365460 Reviewed-by: Mirko Bonadei Commit-Queue: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#43230} --- call/BUILD.gn | 70 +++++++++++++++++-- logging/BUILD.gn | 1 - media/BUILD.gn | 13 ++-- .../congestion_controller/goog_cc/BUILD.gn | 2 +- modules/rtp_rtcp/BUILD.gn | 4 +- modules/video_coding/BUILD.gn | 1 - pc/BUILD.gn | 2 +- rtc_tools/BUILD.gn | 3 +- test/BUILD.gn | 9 +-- test/scenario/BUILD.gn | 1 - video/BUILD.gn | 6 +- 11 files changed, 83 insertions(+), 29 deletions(-) diff --git a/call/BUILD.gn b/call/BUILD.gn index c51e0d2204..0c4255a593 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -41,7 +41,8 @@ rtc_library("call_interfaces") { ":payload_type", ":receive_stream_interface", ":rtp_interfaces", - ":video_stream_api", + ":video_receive_stream_api", + ":video_send_stream_api", "../api:fec_controller_api", "../api:field_trials_view", "../api:frame_transformer_interface", @@ -318,7 +319,8 @@ rtc_library("call") { ":rtp_sender", ":simulated_network", ":version", - ":video_stream_api", + ":video_receive_stream_api", + ":video_send_stream_api", "../api:array_view", "../api:fec_controller_api", "../api:field_trials_view", @@ -420,16 +422,19 @@ rtc_source_set("receive_stream_interface") { ] } +# A temporary target to allow including the files from downstream users +# that have not changed the target name. +# TODO: https://issues.webrtc.org/373151158 - Remove this when downstream users have updated. rtc_library("video_stream_api") { sources = [ - "video_receive_stream.cc", "video_receive_stream.h", - "video_send_stream.cc", "video_send_stream.h", ] deps = [ ":receive_stream_interface", ":rtp_interfaces", + ":video_receive_stream_api", + ":video_send_stream_api", "../api:frame_transformer_interface", "../api:rtp_headers", "../api:rtp_parameters", @@ -438,7 +443,6 @@ rtc_library("video_stream_api") { "../api:transport_api", "../api/adaptation:resource_adaptation_api", "../api/crypto:frame_decryptor_interface", - "../api/crypto:frame_encryptor_interface", "../api/crypto:options", "../api/units:time_delta", "../api/video:recordable_encoded_frame", @@ -450,11 +454,61 @@ rtc_library("video_stream_api") { "../common_video", "../common_video:frame_counts", "../modules/rtp_rtcp:rtp_rtcp_format", + "../video/config:encoder_config", + ] +} + +rtc_library("video_send_stream_api") { + sources = [ + "video_send_stream.cc", + "video_send_stream.h", + ] + deps = [ + ":rtp_interfaces", + "../api:frame_transformer_interface", + "../api:rtp_parameters", + "../api:rtp_sender_interface", + "../api:scoped_refptr", + "../api:transport_api", + "../api/adaptation:resource_adaptation_api", + "../api/crypto:options", + "../api/video:video_frame", + "../api/video:video_rtp_headers", + "../api/video:video_stream_encoder", + "../api/video_codecs:scalability_mode", + "../api/video_codecs:video_codecs_api", + "../common_video", + "../common_video:frame_counts", + "../modules/rtp_rtcp:rtp_rtcp_format", "../rtc_base:checks", "../rtc_base:stringutils", "../video/config:encoder_config", ] } +rtc_library("video_receive_stream_api") { + sources = [ + "video_receive_stream.cc", + "video_receive_stream.h", + ] + deps = [ + ":receive_stream_interface", + ":rtp_interfaces", + "../api:frame_transformer_interface", + "../api:rtp_headers", + "../api:scoped_refptr", + "../api:transport_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:options", + "../api/units:time_delta", + "../api/video:recordable_encoded_frame", + "../api/video:video_frame", + "../api/video:video_rtp_headers", + "../api/video_codecs:video_codecs_api", + "../common_video:frame_counts", + "../modules/rtp_rtcp:rtp_rtcp_format", + "../rtc_base:stringutils", + ] +} rtc_library("simulated_network") { # TODO(bugs.webrtc.org/14525): Remove target and directly depend on test/network:simulated_network. @@ -525,7 +579,8 @@ if (rtc_include_tests) { ":rtp_receiver", ":rtp_sender", ":simulated_network", - ":video_stream_api", + ":video_receive_stream_api", + ":video_send_stream_api", "../api:array_view", "../api:bitrate_allocation", "../api:create_frame_generator", @@ -629,7 +684,8 @@ if (rtc_include_tests) { deps = [ ":call_interfaces", ":simulated_network", - ":video_stream_api", + ":video_receive_stream_api", + ":video_send_stream_api", "../api:array_view", "../api:field_trials_view", "../api:make_ref_counted", diff --git a/logging/BUILD.gn b/logging/BUILD.gn index 39a5171908..3a498b6855 100644 --- a/logging/BUILD.gn +++ b/logging/BUILD.gn @@ -538,7 +538,6 @@ if (rtc_enable_protobuf) { "../api/units:time_delta", "../api/units:timestamp", "../api/video:video_frame", - "../call:video_stream_api", "../modules:module_api_public", "../modules/audio_coding:audio_network_adaptor", "../modules/rtp_rtcp:rtp_rtcp_format", diff --git a/media/BUILD.gn b/media/BUILD.gn index d6c3ba58e2..5126519d81 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -100,7 +100,6 @@ rtc_library("rtc_media_base") { "../api/video_codecs:scalability_mode", "../api/video_codecs:video_codecs_api", "../call:call_interfaces", - "../call:video_stream_api", "../common_video", "../modules/async_audio_processing", "../modules/audio_device", @@ -332,7 +331,6 @@ rtc_source_set("media_channel") { "../api/video:video_rtp_headers", "../api/video_codecs:scalability_mode", "../api/video_codecs:video_codecs_api", - "../call:video_stream_api", "../common_video", "../modules/rtp_rtcp:rtp_rtcp_format", "../rtc_base:async_packet_socket", @@ -469,7 +467,6 @@ rtc_library("rtc_simulcast_encoder_adapter") { "../api/video_codecs:rtc_software_fallback_wrappers", "../api/video_codecs:scalability_mode", "../api/video_codecs:video_codecs_api", - "../call:video_stream_api", "../common_video", "../media:media_constants", "../modules/video_coding:video_codec_interface", @@ -507,7 +504,6 @@ rtc_library("rtc_internal_video_codecs") { "../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter", "../api/video_codecs:video_encoder_factory_template_open_h264_adapter", "../call:call_interfaces", - "../call:video_stream_api", "../modules/video_coding:video_codec_interface", "../modules/video_coding:webrtc_h264", "../modules/video_coding:webrtc_vp8", @@ -607,7 +603,8 @@ rtc_library("rtc_audio_video") { "../call:payload_type_picker", "../call:receive_stream_interface", "../call:rtp_interfaces", - "../call:video_stream_api", + "../call:video_receive_stream_api", + "../call:video_send_stream_api", "../common_video", "../common_video:frame_counts", "../modules/async_audio_processing:async_audio_processing", @@ -825,7 +822,8 @@ if (rtc_include_tests) { "../call:payload_type", "../call:payload_type_picker", "../call:rtp_interfaces", - "../call:video_stream_api", + "../call:video_receive_stream_api", + "../call:video_send_stream_api", "../common_video", "../modules/audio_processing", "../modules/rtp_rtcp", @@ -978,7 +976,8 @@ if (rtc_include_tests) { "../api/video_codecs:video_encoder_factory_template_open_h264_adapter", "../audio", "../call:call_interfaces", - "../call:video_stream_api", + "../call:video_receive_stream_api", + "../call:video_send_stream_api", "../common_video", "../modules/audio_device:mock_audio_device", "../modules/audio_mixer:audio_mixer_impl", diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn index f82a54ae8c..17ef3055cd 100644 --- a/modules/congestion_controller/goog_cc/BUILD.gn +++ b/modules/congestion_controller/goog_cc/BUILD.gn @@ -319,7 +319,7 @@ if (rtc_include_tests) { "../../../api/units:data_size", "../../../api/units:time_delta", "../../../api/units:timestamp", - "../../../call:video_stream_api", + "../../../call:video_receive_stream_api", "../../../logging:mocks", "../../../logging:rtc_event_bwe", "../../../rtc_base:checks", diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index f7513bd43f..c0318eb650 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -705,7 +705,7 @@ if (rtc_include_tests) { "../../api/video:video_rtp_headers", "../../api/video_codecs:video_codecs_api", "../../call:rtp_receiver", - "../../call:video_stream_api", + "../../call:video_receive_stream_api", "../../common_video", "../../common_video:corruption_detection_message", "../../common_video:frame_instrumentation_data", @@ -752,7 +752,7 @@ if (rtc_include_tests) { "../../api:mock_transformable_audio_frame", "../../api:mock_transformable_video_frame", "../../api:transport_api", - "../../call:video_stream_api", + "../../call:video_receive_stream_api", "../../modules/rtp_rtcp", "../../rtc_base:rtc_event", "../../test:test_support", diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn index ae832adb64..241de922a4 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -922,7 +922,6 @@ if (rtc_include_tests) { "../../api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter", "../../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter", "../../api/video_codecs:video_encoder_factory_template_open_h264_adapter", - "../../call:video_stream_api", "../../common_video", "../../media:media_constants", "../../media:rtc_audio_video", diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 706f7bda2b..e1372979a7 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -500,7 +500,7 @@ rtc_source_set("rtp_transport") { "../api/task_queue:pending_task_safety_flag", "../api/units:timestamp", "../call:rtp_receiver", - "../call:video_stream_api", + "../call:video_receive_stream_api", "../media:rtp_utils", "../modules/rtp_rtcp:rtp_rtcp_format", "../p2p:packet_transport_internal", diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 2c99a6275d..a5fa6c84b6 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -196,7 +196,7 @@ if (!is_component_build) { "../call:rtp_interfaces", "../call:rtp_sender", "../call:simulated_packet_receiver", - "../call:video_stream_api", + "../call:video_send_stream_api", "../media:media_constants", "../media:rtc_audio_video", "../rtc_base:rtc_json", @@ -372,7 +372,6 @@ if (!build_with_chromium) { "../api/units:time_delta", "../api/units:timestamp", "../call:call_interfaces", - "../call:video_stream_api", "../logging:ice_log", "../logging:rtc_event_audio", "../logging:rtc_event_audio", diff --git a/test/BUILD.gn b/test/BUILD.gn index 33e920f8ba..ed210b327b 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -735,7 +735,7 @@ if (rtc_include_tests) { "../api/video_codecs:builtin_video_encoder_factory", "../api/video_codecs:scalability_mode", "../api/video_codecs:video_codecs_api", - "../call:video_stream_api", + "../call:video_receive_stream_api", "../common_video", "../media:codec", "../media:media_constants", @@ -1026,7 +1026,8 @@ rtc_library("encoder_settings") { "../api:scoped_refptr", "../api/video_codecs:video_codecs_api", "../call:rtp_interfaces", - "../call:video_stream_api", + "../call:video_receive_stream_api", + "../call:video_send_stream_api", "../rtc_base:checks", "../rtc_base:refcount", "../video/config:encoder_config", @@ -1264,7 +1265,7 @@ if (!build_with_chromium) { "../call:call_interfaces", "../call:fake_network", "../call:simulated_packet_receiver", - "../call:video_stream_api", + "../call:video_send_stream_api", "../modules/audio_device:test_audio_device_module", "../modules/audio_mixer:audio_mixer_impl", "../modules/rtp_rtcp", @@ -1313,7 +1314,7 @@ rtc_library("call_config_utils") { "call_config_utils.h", ] deps = [ - "../call:video_stream_api", + "../call:video_receive_stream_api", "../rtc_base:rtc_json", ] } diff --git a/test/scenario/BUILD.gn b/test/scenario/BUILD.gn index f055bbdd93..49b0739baf 100644 --- a/test/scenario/BUILD.gn +++ b/test/scenario/BUILD.gn @@ -112,7 +112,6 @@ if (rtc_include_tests && !build_with_chromium) { "../../call", "../../call:call_interfaces", "../../call:rtp_sender", - "../../call:video_stream_api", "../../common_video", "../../media:media_constants", "../../media:rtc_audio_video", diff --git a/video/BUILD.gn b/video/BUILD.gn index 0f81b79f2b..f384b93a55 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -115,7 +115,8 @@ rtc_library("video") { "../call:rtp_interfaces", "../call:rtp_receiver", "../call:rtp_sender", - "../call:video_stream_api", + "../call:video_receive_stream_api", + "../call:video_send_stream_api", "../common_video", "../common_video:corruption_detection_converters", "../common_video:corruption_detection_message", @@ -878,7 +879,8 @@ if (rtc_include_tests) { "../call:rtp_receiver", "../call:rtp_sender", "../call:simulated_packet_receiver", - "../call:video_stream_api", + "../call:video_receive_stream_api", + "../call:video_send_stream_api", "../call/adaptation:resource_adaptation", "../call/adaptation:resource_adaptation_test_utilities", "../common_video",