From cc7bd85748397047b869dffa58434deb71b889dc Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Tue, 28 Jun 2022 09:21:44 +0200 Subject: [PATCH] Don't add libopus to public_deps, its headers are only used directly Bug: webrtc:8603 Change-Id: I2ce1f96a80dd23e420b3693b899d2b14382fd2d7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266765 Reviewed-by: Ivo Creusen Reviewed-by: Harald Alvestrand Reviewed-by: Mirko Bonadei Commit-Queue: Harald Alvestrand Auto-Submit: Oleh Prypin Cr-Commit-Position: refs/heads/main@{#37363} --- modules/audio_coding/BUILD.gn | 25 ++++++-------------- modules/audio_coding/codecs/opus/DEPS | 5 ++++ modules/audio_coding/codecs/opus/opus_inst.h | 4 ++-- 3 files changed, 14 insertions(+), 20 deletions(-) create mode 100644 modules/audio_coding/codecs/opus/DEPS diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn index e411819d2a..fd1237b8a6 100644 --- a/modules/audio_coding/BUILD.gn +++ b/modules/audio_coding/BUILD.gn @@ -773,12 +773,6 @@ rtc_library("webrtc_opus") { [ ":webrtc_opus_wrapper" ] defines = audio_codec_defines - - if (rtc_build_opus) { - public_deps += [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603) - } else if (build_with_mozilla) { - include_dirs = [ "/media/libopus/include" ] - } } rtc_library("webrtc_multiopus") { @@ -813,12 +807,6 @@ rtc_library("webrtc_multiopus") { [ ":webrtc_opus_wrapper" ] defines = audio_codec_defines - - if (rtc_build_opus) { - public_deps += [ rtc_opus_dir ] - } else if (build_with_mozilla) { - include_dirs = [ "/media/libopus/include" ] - } } rtc_library("webrtc_opus_wrapper") { @@ -831,18 +819,19 @@ rtc_library("webrtc_opus_wrapper") { defines = audio_coding_defines - if (rtc_build_opus) { - public_deps = [ rtc_opus_dir ] # no-presubmit-check TODO(webrtc:8603) - } else if (build_with_mozilla) { - include_dirs = [ getenv("DIST") + "/include/opus" ] - } - deps = [ "../../api:array_view", "../../rtc_base:checks", "../../rtc_base:ignore_wundef", "../../system_wrappers:field_trial", ] + + if (rtc_build_opus) { + deps += [ rtc_opus_dir ] + public_configs = [ "//third_party/opus:opus_config" ] + } else if (build_with_mozilla) { + include_dirs = [ getenv("DIST") + "/include/opus" ] + } } if (rtc_enable_protobuf) { diff --git a/modules/audio_coding/codecs/opus/DEPS b/modules/audio_coding/codecs/opus/DEPS new file mode 100644 index 0000000000..c2530726ad --- /dev/null +++ b/modules/audio_coding/codecs/opus/DEPS @@ -0,0 +1,5 @@ +specific_include_rules = { + "opus_inst\.h": [ + "+third_party/opus", + ], +} diff --git a/modules/audio_coding/codecs/opus/opus_inst.h b/modules/audio_coding/codecs/opus/opus_inst.h index 2c25e43f25..92c5c354a7 100644 --- a/modules/audio_coding/codecs/opus/opus_inst.h +++ b/modules/audio_coding/codecs/opus/opus_inst.h @@ -16,8 +16,8 @@ #include "rtc_base/ignore_wundef.h" RTC_PUSH_IGNORING_WUNDEF() -#include "opus.h" -#include "opus_multistream.h" +#include "third_party/opus/src/include/opus.h" +#include "third_party/opus/src/include/opus_multistream.h" RTC_POP_IGNORING_WUNDEF() struct WebRtcOpusEncInst {