From 6f64ae1ff563defaf0915e0ad13e1278d4e5d464 Mon Sep 17 00:00:00 2001 From: Fanny Linderborg Date: Fri, 6 Sep 2024 14:06:17 +0200 Subject: [PATCH] Extract corruption detection message to its own target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: webrtc:358039777 Change-Id: I6bc064aaba4c5b7f9b55215414e70e55eb0e0f64 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361864 Reviewed-by: Erik Språng Commit-Queue: Fanny Linderborg Cr-Commit-Position: refs/heads/main@{#42977} --- common_video/BUILD.gn | 22 ++++++++++++++++++---- modules/rtp_rtcp/BUILD.gn | 5 ++--- test/fuzzers/BUILD.gn | 2 +- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/common_video/BUILD.gn b/common_video/BUILD.gn index 54c346e10e..6b42a3721e 100644 --- a/common_video/BUILD.gn +++ b/common_video/BUILD.gn @@ -8,6 +8,14 @@ import("../webrtc.gni") +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" ] } @@ -17,7 +25,6 @@ rtc_library("common_video") { sources = [ "bitrate_adjuster.cc", - "corruption_detection_message.h", "frame_rate_estimator.cc", "frame_rate_estimator.h", "framerate_controller.cc", @@ -60,7 +67,6 @@ rtc_library("common_video") { } deps = [ - ":frame_instrumentation_data", "../api:array_view", "../api:make_ref_counted", "../api:scoped_refptr", @@ -91,7 +97,6 @@ rtc_library("common_video") { "../rtc_base/synchronization:mutex", "../rtc_base/system:rtc_export", "../system_wrappers:metrics", - "//third_party/abseil-cpp/absl/container:inlined_vector", "//third_party/abseil-cpp/absl/numeric:bits", "//third_party/libyuv", ] @@ -120,12 +125,20 @@ 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", + ] + } + rtc_test("common_video_unittests") { testonly = true sources = [ "bitrate_adjuster_unittest.cc", - "corruption_detection_message_unittest.cc", "frame_rate_estimator_unittest.cc", "framerate_controller_unittest.cc", "h264/h264_bitstream_parser_unittest.cc", @@ -148,6 +161,7 @@ if (rtc_include_tests && !build_with_chromium) { deps = [ ":common_video", + ":corruption_detection_message_unittest", "../api:scoped_refptr", "../api/units:time_delta", "../api/video:video_frame", diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index 31894305e5..0b9caefb19 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -126,7 +126,7 @@ rtc_library("rtp_rtcp_format") { "../../api/units:timestamp", "../../api/video:video_layers_allocation", "../../api/video:video_rtp_headers", - "../../common_video:common_video", + "../../common_video:corruption_detection_message", "../../rtc_base:bit_buffer", "../../rtc_base:bitstream_reader", "../../rtc_base:buffer", @@ -139,7 +139,6 @@ rtc_library("rtp_rtcp_format") { "../../rtc_base:safe_conversions", "../../rtc_base:stringutils", "../../rtc_base/network:ecn_marking", - "../../rtc_base/synchronization:mutex", "../../system_wrappers", "../video_coding:codec_globals_headers", "//third_party/abseil-cpp/absl/algorithm:container", @@ -763,7 +762,7 @@ if (rtc_include_tests) { sources = [ "source/corruption_detection_extension_unittest.cc" ] deps = [ ":rtp_rtcp_format", - "../../common_video:common_video", + "../../common_video:corruption_detection_message", "../../test:test_support", ] } diff --git a/test/fuzzers/BUILD.gn b/test/fuzzers/BUILD.gn index 6d28c7b5b2..34b765b964 100644 --- a/test/fuzzers/BUILD.gn +++ b/test/fuzzers/BUILD.gn @@ -236,7 +236,7 @@ webrtc_fuzzer_test("rtcp_receiver_fuzzer") { webrtc_fuzzer_test("rtp_packet_fuzzer") { sources = [ "rtp_packet_fuzzer.cc" ] deps = [ - "../../common_video:common_video", + "../../common_video:corruption_detection_message", "../../modules/rtp_rtcp:rtp_rtcp_format", ] seed_corpus = "corpora/rtp-corpus"