From 39da6f3a7543d2371d099881f569ae9b1d6a1fdf Mon Sep 17 00:00:00 2001 From: Fanny Linderborg Date: Fri, 24 Jan 2025 10:50:45 +0100 Subject: [PATCH] Move corruption_detection_message from common_video to api/transport/rtp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:358039777 Change-Id: Ic27e162d67c64958844908cdd8413c406e88ea39 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375201 Reviewed-by: Harald Alvestrand Reviewed-by: Erik Språng Commit-Queue: Fanny Linderborg Cr-Commit-Position: refs/heads/main@{#43804} --- BUILD.gn | 1 + api/transport/rtp/BUILD.gn | 19 ++++++++++++++++ .../rtp}/corruption_detection_message.h | 6 ++--- .../corruption_detection_message_unittest.cc | 2 +- common_video/BUILD.gn | 22 ++----------------- .../corruption_detection_converters.cc | 2 +- .../corruption_detection_converters.h | 2 +- ...orruption_detection_converters_unittest.cc | 2 +- modules/rtp_rtcp/BUILD.gn | 8 +++---- .../source/corruption_detection_extension.cc | 2 +- .../source/corruption_detection_extension.h | 2 +- ...corruption_detection_extension_unittest.cc | 2 +- modules/rtp_rtcp/source/rtp_sender_video.cc | 2 +- .../source/rtp_sender_video_unittest.cc | 2 +- test/fuzzers/BUILD.gn | 2 +- test/fuzzers/rtp_packet_fuzzer.cc | 2 +- video/BUILD.gn | 2 +- video/rtp_video_stream_receiver2.cc | 2 +- 18 files changed, 42 insertions(+), 40 deletions(-) rename {common_video => api/transport/rtp}/corruption_detection_message.h (96%) rename {common_video => api/transport/rtp}/corruption_detection_message_unittest.cc (98%) diff --git a/BUILD.gn b/BUILD.gn index 5833911122..253f5d00e3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -639,6 +639,7 @@ if (rtc_include_tests && !build_with_chromium) { "api/task_queue:pending_task_safety_flag_unittests", "api/test/metrics:metrics_unittests", "api/transport:stun_unittest", + "api/transport/rtp:corruption_detection_message_unittest", "api/video/test:rtc_api_video_unittests", "api/video_codecs:libaom_av1_encoder_factory_test", "api/video_codecs:simple_encoder_wrapper_unittests", diff --git a/api/transport/rtp/BUILD.gn b/api/transport/rtp/BUILD.gn index c4c43fa270..51ee4c2f77 100644 --- a/api/transport/rtp/BUILD.gn +++ b/api/transport/rtp/BUILD.gn @@ -32,3 +32,22 @@ rtc_source_set("dependency_descriptor") { "//third_party/abseil-cpp/absl/strings:string_view", ] } + +rtc_source_set("corruption_detection_message") { + sources = [ "corruption_detection_message.h" ] + deps = [ + "../../../api:array_view", + "//third_party/abseil-cpp/absl/container:inlined_vector", + ] +} + +if (rtc_include_tests && !build_with_chromium) { + rtc_library("corruption_detection_message_unittest") { + testonly = true + sources = [ "corruption_detection_message_unittest.cc" ] + deps = [ + ":corruption_detection_message", + "../../../test:test_support", + ] + } +} diff --git a/common_video/corruption_detection_message.h b/api/transport/rtp/corruption_detection_message.h similarity index 96% rename from common_video/corruption_detection_message.h rename to api/transport/rtp/corruption_detection_message.h index 5fa2aed12d..5ea0eba74c 100644 --- a/common_video/corruption_detection_message.h +++ b/api/transport/rtp/corruption_detection_message.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef COMMON_VIDEO_CORRUPTION_DETECTION_MESSAGE_H_ -#define COMMON_VIDEO_CORRUPTION_DETECTION_MESSAGE_H_ +#ifndef API_TRANSPORT_RTP_CORRUPTION_DETECTION_MESSAGE_H_ +#define API_TRANSPORT_RTP_CORRUPTION_DETECTION_MESSAGE_H_ #include #include @@ -150,4 +150,4 @@ class CorruptionDetectionMessage::Builder { } // namespace webrtc -#endif // COMMON_VIDEO_CORRUPTION_DETECTION_MESSAGE_H_ +#endif // API_TRANSPORT_RTP_CORRUPTION_DETECTION_MESSAGE_H_ diff --git a/common_video/corruption_detection_message_unittest.cc b/api/transport/rtp/corruption_detection_message_unittest.cc similarity index 98% rename from common_video/corruption_detection_message_unittest.cc rename to api/transport/rtp/corruption_detection_message_unittest.cc index 4bb47ce056..1da692534a 100644 --- a/common_video/corruption_detection_message_unittest.cc +++ b/api/transport/rtp/corruption_detection_message_unittest.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include #include diff --git a/common_video/BUILD.gn b/common_video/BUILD.gn index 4c4c8c90d0..1a69762a65 100644 --- a/common_video/BUILD.gn +++ b/common_video/BUILD.gn @@ -14,20 +14,12 @@ rtc_library("corruption_detection_converters") { "corruption_detection_converters.h", ] deps = [ - ":corruption_detection_message", ":frame_instrumentation_data", + "../api/transport/rtp:corruption_detection_message", "../rtc_base:checks", ] } -rtc_library("corruption_detection_message") { - sources = [ "corruption_detection_message.h" ] - deps = [ - "../api:array_view", - "//third_party/abseil-cpp/absl/container:inlined_vector", - ] -} - rtc_library("frame_instrumentation_data") { sources = [ "frame_instrumentation_data.h" ] } @@ -150,17 +142,8 @@ if (rtc_include_tests && !build_with_chromium) { sources = [ "corruption_detection_converters_unittest.cc" ] deps = [ ":corruption_detection_converters", - ":corruption_detection_message", ":frame_instrumentation_data", - "../test:test_support", - ] - } - - rtc_library("corruption_detection_message_unittest") { - testonly = true - sources = [ "corruption_detection_message_unittest.cc" ] - deps = [ - ":corruption_detection_message", + "../api/transport/rtp:corruption_detection_message", "../test:test_support", ] } @@ -193,7 +176,6 @@ if (rtc_include_tests && !build_with_chromium) { deps = [ ":common_video", ":corruption_detection_converters_unittest", - ":corruption_detection_message_unittest", "../api:scoped_refptr", "../api/units:time_delta", "../api/video:video_frame", diff --git a/common_video/corruption_detection_converters.cc b/common_video/corruption_detection_converters.cc index bc329abf67..dfd1c38201 100644 --- a/common_video/corruption_detection_converters.cc +++ b/common_video/corruption_detection_converters.cc @@ -13,7 +13,7 @@ #include #include -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "common_video/frame_instrumentation_data.h" #include "rtc_base/checks.h" diff --git a/common_video/corruption_detection_converters.h b/common_video/corruption_detection_converters.h index 8bc4b26382..370f924800 100644 --- a/common_video/corruption_detection_converters.h +++ b/common_video/corruption_detection_converters.h @@ -13,7 +13,7 @@ #include -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "common_video/frame_instrumentation_data.h" namespace webrtc { diff --git a/common_video/corruption_detection_converters_unittest.cc b/common_video/corruption_detection_converters_unittest.cc index 1a95a05363..8b3372e653 100644 --- a/common_video/corruption_detection_converters_unittest.cc +++ b/common_video/corruption_detection_converters_unittest.cc @@ -13,7 +13,7 @@ #include #include -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "common_video/frame_instrumentation_data.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 1f4a0ca48d..72552fc920 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -120,13 +120,13 @@ rtc_library("rtp_rtcp_format") { "../../api:scoped_refptr", "../../api/audio_codecs:audio_codecs_api", "../../api/transport:network_control", + "../../api/transport/rtp:corruption_detection_message", "../../api/transport/rtp:dependency_descriptor", "../../api/units:data_rate", "../../api/units:time_delta", "../../api/units:timestamp", "../../api/video:video_layers_allocation", "../../api/video:video_rtp_headers", - "../../common_video:corruption_detection_message", "../../rtc_base:bit_buffer", "../../rtc_base:bitstream_reader", "../../rtc_base:buffer", @@ -298,6 +298,7 @@ rtc_library("rtp_rtcp") { "../../api/task_queue", "../../api/task_queue:pending_task_safety_flag", "../../api/transport:network_control", + "../../api/transport/rtp:corruption_detection_message", "../../api/transport/rtp:dependency_descriptor", "../../api/transport/rtp:rtp_source", "../../api/units:data_rate", @@ -318,7 +319,6 @@ rtc_library("rtp_rtcp") { "../../call:rtp_interfaces", "../../common_video", "../../common_video:corruption_detection_converters", - "../../common_video:corruption_detection_message", "../../common_video:frame_instrumentation_data", "../../logging:rtc_event_rtp_rtcp", "../../rtc_base:bit_buffer", @@ -692,6 +692,7 @@ if (rtc_include_tests) { "../../api/rtc_event_log", "../../api/task_queue", "../../api/transport:network_control", + "../../api/transport/rtp:corruption_detection_message", "../../api/transport/rtp:dependency_descriptor", "../../api/units:data_rate", "../../api/units:data_size", @@ -710,7 +711,6 @@ if (rtc_include_tests) { "../../call:rtp_receiver", "../../call:video_receive_stream_api", "../../common_video", - "../../common_video:corruption_detection_message", "../../common_video:frame_instrumentation_data", "../../common_video/generic_frame_descriptor", "../../common_video/test:utilities", @@ -770,7 +770,7 @@ if (rtc_include_tests) { sources = [ "source/corruption_detection_extension_unittest.cc" ] deps = [ ":rtp_rtcp_format", - "../../common_video:corruption_detection_message", + "../../api/transport/rtp:corruption_detection_message", "../../test:test_support", ] } diff --git a/modules/rtp_rtcp/source/corruption_detection_extension.cc b/modules/rtp_rtcp/source/corruption_detection_extension.cc index 408f1ebe59..4cc42dabe3 100644 --- a/modules/rtp_rtcp/source/corruption_detection_extension.cc +++ b/modules/rtp_rtcp/source/corruption_detection_extension.cc @@ -16,7 +16,7 @@ #include "absl/container/inlined_vector.h" #include "api/array_view.h" -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" namespace webrtc { namespace { diff --git a/modules/rtp_rtcp/source/corruption_detection_extension.h b/modules/rtp_rtcp/source/corruption_detection_extension.h index 63e770dd61..a72a581a93 100644 --- a/modules/rtp_rtcp/source/corruption_detection_extension.h +++ b/modules/rtp_rtcp/source/corruption_detection_extension.h @@ -17,7 +17,7 @@ #include "absl/strings/string_view.h" #include "api/array_view.h" #include "api/rtp_parameters.h" -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" namespace webrtc { diff --git a/modules/rtp_rtcp/source/corruption_detection_extension_unittest.cc b/modules/rtp_rtcp/source/corruption_detection_extension_unittest.cc index 356feb1220..58f888f65b 100644 --- a/modules/rtp_rtcp/source/corruption_detection_extension_unittest.cc +++ b/modules/rtp_rtcp/source/corruption_detection_extension_unittest.cc @@ -14,7 +14,7 @@ #include #include -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/modules/rtp_rtcp/source/rtp_sender_video.cc b/modules/rtp_rtcp/source/rtp_sender_video.cc index 248658ef4f..9ba860836a 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video.cc @@ -28,6 +28,7 @@ #include "api/field_trials_view.h" #include "api/make_ref_counted.h" #include "api/media_types.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "api/transport/rtp/dependency_descriptor.h" #include "api/units/data_rate.h" #include "api/units/frequency.h" @@ -41,7 +42,6 @@ #include "api/video/video_rotation.h" #include "api/video/video_timing.h" #include "common_video/corruption_detection_converters.h" -#include "common_video/corruption_detection_message.h" #include "common_video/frame_instrumentation_data.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" #include "modules/rtp_rtcp/source/absolute_capture_time_sender.h" diff --git a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc index 92076d8172..ecf8e909e3 100644 --- a/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc +++ b/modules/rtp_rtcp/source/rtp_sender_video_unittest.cc @@ -25,12 +25,12 @@ #include "api/task_queue/task_queue_factory.h" #include "api/test/mock_frame_encryptor.h" #include "api/test/mock_frame_transformer.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "api/transport/rtp/dependency_descriptor.h" #include "api/units/timestamp.h" #include "api/video/video_codec_constants.h" #include "api/video/video_frame_type.h" #include "api/video/video_timing.h" -#include "common_video/corruption_detection_message.h" #include "common_video/frame_instrumentation_data.h" #include "modules/rtp_rtcp/include/rtp_cvo.h" #include "modules/rtp_rtcp/include/rtp_header_extension_map.h" diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn index 773dca56e6..9c3b9c89b1 100644 --- a/test/fuzzers/BUILD.gn +++ b/test/fuzzers/BUILD.gn @@ -250,7 +250,7 @@ webrtc_fuzzer_test("rtcp_receiver_fuzzer") { webrtc_fuzzer_test("rtp_packet_fuzzer") { sources = [ "rtp_packet_fuzzer.cc" ] deps = [ - "../../common_video:corruption_detection_message", + "../../api/transport/rtp:corruption_detection_message", "../../modules/rtp_rtcp:rtp_rtcp_format", ] seed_corpus = "corpora/rtp-corpus" diff --git a/test/fuzzers/rtp_packet_fuzzer.cc b/test/fuzzers/rtp_packet_fuzzer.cc index eaa423e855..46948a6bcb 100644 --- a/test/fuzzers/rtp_packet_fuzzer.cc +++ b/test/fuzzers/rtp_packet_fuzzer.cc @@ -12,7 +12,7 @@ #include #include -#include "common_video/corruption_detection_message.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "modules/rtp_rtcp/include/rtp_header_extension_map.h" #include "modules/rtp_rtcp/source/corruption_detection_extension.h" #include "modules/rtp_rtcp/source/rtp_generic_frame_descriptor_extension.h" diff --git a/video/BUILD.gn b/video/BUILD.gn index 3012f35f97..7cca46263c 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -95,6 +95,7 @@ rtc_library("video") { "../api/metronome", "../api/task_queue", "../api/task_queue:pending_task_safety_flag", + "../api/transport/rtp:corruption_detection_message", "../api/units:data_rate", "../api/units:frequency", "../api/units:time_delta", @@ -119,7 +120,6 @@ rtc_library("video") { "../call:video_send_stream_api", "../common_video", "../common_video:corruption_detection_converters", - "../common_video:corruption_detection_message", "../common_video:corruption_score_calculator", "../common_video:frame_instrumentation_data", "../media:media_constants", diff --git a/video/rtp_video_stream_receiver2.cc b/video/rtp_video_stream_receiver2.cc index 2405d08401..89b3151cdc 100644 --- a/video/rtp_video_stream_receiver2.cc +++ b/video/rtp_video_stream_receiver2.cc @@ -20,9 +20,9 @@ #include "absl/algorithm/container.h" #include "absl/memory/memory.h" #include "absl/types/variant.h" +#include "api/transport/rtp/corruption_detection_message.h" #include "api/video/video_codec_type.h" #include "common_video/corruption_detection_converters.h" -#include "common_video/corruption_detection_message.h" #include "common_video/frame_instrumentation_data.h" #include "media/base/media_constants.h" #include "modules/pacing/packet_router.h"