diff --git a/api/DEPS b/api/DEPS index 3bc7287ddc..cf10f55bf0 100644 --- a/api/DEPS +++ b/api/DEPS @@ -24,5 +24,6 @@ specific_include_rules = { "+modules/audio_coding", "+modules/audio_processing", "+modules/video_coding", + "+modules/congestion_controller", ], } diff --git a/api/transport/BUILD.gn b/api/transport/BUILD.gn index f473179dd1..5466061123 100644 --- a/api/transport/BUILD.gn +++ b/api/transport/BUILD.gn @@ -35,6 +35,18 @@ rtc_static_library("network_control") { ] } +rtc_static_library("goog_cc") { + sources = [ + "goog_cc_factory.cc", + "goog_cc_factory.h", + ] + deps = [ + ":network_control", + "../../modules/congestion_controller/goog_cc", + "//third_party/abseil-cpp/absl/memory", + ] +} + if (rtc_include_tests) { rtc_source_set("network_control_test") { testonly = true diff --git a/modules/congestion_controller/goog_cc/goog_cc_factory.cc b/api/transport/goog_cc_factory.cc similarity index 95% rename from modules/congestion_controller/goog_cc/goog_cc_factory.cc rename to api/transport/goog_cc_factory.cc index 2e0ccc17ca..119e2dcf84 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_factory.cc +++ b/api/transport/goog_cc_factory.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "modules/congestion_controller/goog_cc/include/goog_cc_factory.h" +#include "api/transport/goog_cc_factory.h" #include "absl/memory/memory.h" #include "modules/congestion_controller/goog_cc/goog_cc_network_control.h" diff --git a/modules/congestion_controller/goog_cc/include/goog_cc_factory.h b/api/transport/goog_cc_factory.h similarity index 85% rename from modules/congestion_controller/goog_cc/include/goog_cc_factory.h rename to api/transport/goog_cc_factory.h index 0d91fff65f..2e3b3172d0 100644 --- a/modules/congestion_controller/goog_cc/include/goog_cc_factory.h +++ b/api/transport/goog_cc_factory.h @@ -8,14 +8,13 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef MODULES_CONGESTION_CONTROLLER_GOOG_CC_INCLUDE_GOOG_CC_FACTORY_H_ -#define MODULES_CONGESTION_CONTROLLER_GOOG_CC_INCLUDE_GOOG_CC_FACTORY_H_ +#ifndef API_TRANSPORT_GOOG_CC_FACTORY_H_ +#define API_TRANSPORT_GOOG_CC_FACTORY_H_ #include #include "api/transport/network_control.h" namespace webrtc { -class Clock; class RtcEventLog; class GoogCcNetworkControllerFactory @@ -45,4 +44,4 @@ class GoogCcFeedbackNetworkControllerFactory }; } // namespace webrtc -#endif // MODULES_CONGESTION_CONTROLLER_GOOG_CC_INCLUDE_GOOG_CC_FACTORY_H_ +#endif // API_TRANSPORT_GOOG_CC_FACTORY_H_ diff --git a/modules/congestion_controller/goog_cc/BUILD.gn b/modules/congestion_controller/goog_cc/BUILD.gn index b12690b817..3fbc09e65b 100644 --- a/modules/congestion_controller/goog_cc/BUILD.gn +++ b/modules/congestion_controller/goog_cc/BUILD.gn @@ -19,10 +19,8 @@ config("bwe_test_logging") { rtc_static_library("goog_cc") { configs += [ ":bwe_test_logging" ] sources = [ - "goog_cc_factory.cc", "goog_cc_network_control.cc", "goog_cc_network_control.h", - "include/goog_cc_factory.h", ] deps = [ @@ -149,6 +147,7 @@ if (rtc_include_tests) { ":estimators", ":goog_cc", "..:test_controller_printer", + "../../../api/transport:goog_cc", ] } rtc_source_set("goog_cc_unittests") { @@ -175,6 +174,7 @@ if (rtc_include_tests) { ":estimators", ":goog_cc", ":probe_controller", + "../../../api/transport:goog_cc", "../../../api/transport:network_control", "../../../api/transport:network_control_test", "../../../logging:mocks", diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc index b095c2c1c4..79c5375933 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control.cc @@ -22,7 +22,6 @@ #include "absl/memory/memory.h" #include "modules/congestion_controller/goog_cc/acknowledged_bitrate_estimator.h" #include "modules/congestion_controller/goog_cc/alr_detector.h" -#include "modules/congestion_controller/goog_cc/include/goog_cc_factory.h" #include "modules/congestion_controller/goog_cc/probe_controller.h" #include "modules/remote_bitrate_estimator/include/bwe_defines.h" #include "modules/remote_bitrate_estimator/test/bwe_test_logging.h" diff --git a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc index e3f3abf2b1..0b838f655d 100644 --- a/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc +++ b/modules/congestion_controller/goog_cc/goog_cc_network_control_unittest.cc @@ -8,9 +8,9 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "api/transport/goog_cc_factory.h" #include "api/transport/test/network_control_tester.h" #include "logging/rtc_event_log/mock/mock_rtc_event_log.h" -#include "modules/congestion_controller/goog_cc/include/goog_cc_factory.h" #include "test/scenario/scenario.h" #include "test/gtest.h" diff --git a/modules/congestion_controller/goog_cc/test/goog_cc_printer.h b/modules/congestion_controller/goog_cc/test/goog_cc_printer.h index 4dfc059b47..5d4f2c1840 100644 --- a/modules/congestion_controller/goog_cc/test/goog_cc_printer.h +++ b/modules/congestion_controller/goog_cc/test/goog_cc_printer.h @@ -12,8 +12,8 @@ #include +#include "api/transport/goog_cc_factory.h" #include "modules/congestion_controller/goog_cc/goog_cc_network_control.h" -#include "modules/congestion_controller/goog_cc/include/goog_cc_factory.h" #include "modules/congestion_controller/test/controller_printer.h" namespace webrtc { diff --git a/modules/congestion_controller/rtp/BUILD.gn b/modules/congestion_controller/rtp/BUILD.gn index 134fb940fd..b637faeaab 100644 --- a/modules/congestion_controller/rtp/BUILD.gn +++ b/modules/congestion_controller/rtp/BUILD.gn @@ -36,6 +36,7 @@ rtc_static_library("congestion_controller") { "../:congestion_controller", "../..:module_api", "../../..:webrtc_common", + "../../../api/transport:goog_cc", "../../../api/transport:network_control", "../../../rtc_base:checks", "../../../rtc_base:rate_limiter", @@ -48,7 +49,6 @@ rtc_static_library("congestion_controller") { "../../pacing", "../../remote_bitrate_estimator", "../../rtp_rtcp:rtp_rtcp_format", - "../goog_cc", "//third_party/abseil-cpp/absl/memory", ] diff --git a/modules/congestion_controller/rtp/send_side_congestion_controller.cc b/modules/congestion_controller/rtp/send_side_congestion_controller.cc index 3970f1325b..cb65b25151 100644 --- a/modules/congestion_controller/rtp/send_side_congestion_controller.cc +++ b/modules/congestion_controller/rtp/send_side_congestion_controller.cc @@ -15,9 +15,9 @@ #include #include #include "absl/memory/memory.h" +#include "api/transport/goog_cc_factory.h" #include "api/transport/network_types.h" #include "modules/congestion_controller/congestion_window_pushback_controller.h" -#include "modules/congestion_controller/goog_cc/include/goog_cc_factory.h" #include "modules/remote_bitrate_estimator/include/bwe_defines.h" #include "rtc_base/bind.h" #include "rtc_base/checks.h"