From 36df2d76c5dd65cf300f9c833311af2ca3694f3f Mon Sep 17 00:00:00 2001 From: ehmaldonado Date: Thu, 8 Dec 2016 09:56:16 -0800 Subject: [PATCH] Refactor webrtc/modules/video_{capture,coding} for GN check This moves some GN check configurations out of .gn to individual targets. The now checked target is: "//webrtc/modules/video_capture/*", "//webrtc/modules/video_coding/*", BUG=webrtc:6828 NOTRY=True R=kjellander@webrtc.org Review-Url: https://codereview.webrtc.org/2555333004 Cr-Commit-Position: refs/heads/master@{#15488} --- .gn | 2 ++ webrtc/modules/video_capture/BUILD.gn | 6 +++++ webrtc/modules/video_coding/BUILD.gn | 34 +++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) diff --git a/.gn b/.gn index cdb8794617..a0fd50aead 100644 --- a/.gn +++ b/.gn @@ -28,6 +28,8 @@ check_targets = [ "//webrtc/modules/audio_device/*", "//webrtc/modules/audio_mixer/*", "//webrtc/modules/audio_processing/*", + "//webrtc/modules/video_capture/*", + "//webrtc/modules/video_coding/*", "//webrtc/stats:rtc_stats", "//webrtc/voice_engine", "//webrtc/voice_engine:level_indicator", diff --git a/webrtc/modules/video_capture/BUILD.gn b/webrtc/modules/video_capture/BUILD.gn index 887bd2c2bf..6887552b58 100644 --- a/webrtc/modules/video_capture/BUILD.gn +++ b/webrtc/modules/video_capture/BUILD.gn @@ -28,6 +28,7 @@ rtc_static_library("video_capture_module") { deps = [ "../..:webrtc_common", + "../../base:rtc_base_approved", "../../common_video", "../../system_wrappers", "../utility", @@ -47,6 +48,7 @@ rtc_static_library("video_capture") { deps = [ ":video_capture_module", + "../../base:rtc_base_approved", "../../system_wrappers", ] @@ -90,6 +92,7 @@ if (!build_with_chromium) { deps = [ ":video_capture_module", + "../../base:rtc_base_approved", "../../system_wrappers", ] @@ -182,6 +185,9 @@ if (!build_with_chromium) { deps = [ ":video_capture_internal_impl", ":video_capture_module", + "../../base:rtc_base_approved", + "../../common_video:common_video", + "../../system_wrappers:system_wrappers", "../../system_wrappers:system_wrappers_default", "../../test:video_test_common", "../utility", diff --git a/webrtc/modules/video_coding/BUILD.gn b/webrtc/modules/video_coding/BUILD.gn index 4e933e5c58..cd198324ea 100644 --- a/webrtc/modules/video_coding/BUILD.gn +++ b/webrtc/modules/video_coding/BUILD.gn @@ -94,12 +94,21 @@ rtc_static_library("video_coding") { ":webrtc_vp9", "../..:webrtc_common", "../../base:rtc_analytics", + "../../base:rtc_base", + "../../base:rtc_base_approved", + "../../base:rtc_task_queue", "../../common_video", "../../system_wrappers", + "../rtp_rtcp:rtp_rtcp", + "../utility:utility", ] } rtc_static_library("video_coding_utility") { + # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828) + # Errors on cyclic dependency with :video_coding if enabled. + check_includes = false + sources = [ "utility/default_video_bitrate_allocator.cc", "utility/default_video_bitrate_allocator.h", @@ -125,13 +134,25 @@ rtc_static_library("video_coding_utility") { } deps = [ + "../..:webrtc_common", "../../base:rtc_analytics", + "../../base:rtc_base_approved", "../../common_video", "../../system_wrappers", ] } rtc_static_library("webrtc_h264") { + # TODO(ehmaldonado): Remove (bugs.webrtc.org/6828) + # Errors on cyclic dependency if enabled: + # //webrtc/call:call -> + # //webrtc/video:video -> + # //webrtc/modules/video_coding:video_coding -> + # //webrtc/modules/video_coding:webrtc_h264 -> + # //webrtc/media:rtc_media -> + # //webrtc/call:call + check_includes = false + sources = [ "codecs/h264/h264.cc", "codecs/h264/include/h264.h", @@ -144,6 +165,8 @@ rtc_static_library("webrtc_h264") { defines = [] deps = [ + ":video_coding_utility", + "../../base:rtc_base_approved", "../../system_wrappers", ] @@ -179,6 +202,9 @@ rtc_static_library("webrtc_i420") { } deps = [ + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../common_video:common_video", "../../system_wrappers", ] } @@ -212,6 +238,7 @@ rtc_static_library("webrtc_vp8") { deps = [ ":video_coding_utility", "../..:webrtc_common", + "../../base:rtc_base_approved", "../../common_video", "../../system_wrappers", ] @@ -244,6 +271,7 @@ rtc_static_library("webrtc_vp9") { deps = [ ":video_coding_utility", + "../../base:rtc_base_approved", "../../common_video", "../../system_wrappers", ] @@ -273,6 +301,12 @@ if (rtc_include_tests) { } deps = [ + ":video_coding", + ":video_coding_utility", + "../..:webrtc_common", + "../../base:rtc_base_approved", + "../../common_video:common_video", + "../../system_wrappers:system_wrappers", "../../test:test_support", ] }