From 65685a65f261dbfe0556a3509c468367c2080c8e Mon Sep 17 00:00:00 2001 From: Harald Alvestrand Date: Wed, 27 Apr 2022 12:15:49 +0000 Subject: [PATCH] Move pc/channel.h to only be used in .cc files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is an implementation API, user classes should in principle only use the channel_interface.h Bug: webrtc:13931 Change-Id: I85c285217858dc087c90a50792e980f731f4439f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/260185 Reviewed-by: Henrik Boström Commit-Queue: Harald Alvestrand Cr-Commit-Position: refs/heads/main@{#36674} --- pc/BUILD.gn | 6 +++++- pc/channel_manager.cc | 1 + pc/channel_manager.h | 1 - pc/channel_manager_unittest.cc | 1 + pc/jsep_transport_controller.h | 1 - pc/remote_audio_source.h | 1 - pc/sdp_offer_answer.cc | 1 + pc/sdp_offer_answer.h | 1 - pc/test/fake_peer_connection_for_stats.h | 1 + test/peer_scenario/BUILD.gn | 1 + test/peer_scenario/scenario_connection.cc | 1 + 11 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pc/BUILD.gn b/pc/BUILD.gn index e0a9b972a8..e40df741ca 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -59,7 +59,10 @@ rtc_library("proxy") { } rtc_source_set("channel") { - visibility = [ ":*" ] + visibility = [ + ":*", + "../test/peer_scenario", + ] sources = [ "channel.cc", "channel.h", @@ -2617,6 +2620,7 @@ if (rtc_include_tests && !build_with_chromium) { ] deps = [ + ":channel", ":channel_interface", ":jitter_buffer_delay", ":libjingle_peerconnection", diff --git a/pc/channel_manager.cc b/pc/channel_manager.cc index 1482d7f862..9cdba420c2 100644 --- a/pc/channel_manager.cc +++ b/pc/channel_manager.cc @@ -18,6 +18,7 @@ #include "api/media_types.h" #include "api/sequence_checker.h" #include "media/base/media_constants.h" +#include "pc/channel.h" #include "rtc_base/checks.h" #include "rtc_base/location.h" #include "rtc_base/trace_event.h" diff --git a/pc/channel_manager.h b/pc/channel_manager.h index 0e95c96c18..b4de2d1b8f 100644 --- a/pc/channel_manager.h +++ b/pc/channel_manager.h @@ -26,7 +26,6 @@ #include "media/base/media_channel.h" #include "media/base/media_config.h" #include "media/base/media_engine.h" -#include "pc/channel.h" #include "pc/channel_interface.h" #include "pc/session_description.h" #include "rtc_base/system/file_wrapper.h" diff --git a/pc/channel_manager_unittest.cc b/pc/channel_manager_unittest.cc index 7b0146c976..ebc3873a27 100644 --- a/pc/channel_manager_unittest.cc +++ b/pc/channel_manager_unittest.cc @@ -17,6 +17,7 @@ #include "media/engine/fake_webrtc_call.h" #include "p2p/base/fake_dtls_transport.h" #include "p2p/base/p2p_constants.h" +#include "pc/channel.h" #include "pc/dtls_srtp_transport.h" #include "pc/rtp_transport_internal.h" #include "rtc_base/arraysize.h" diff --git a/pc/jsep_transport_controller.h b/pc/jsep_transport_controller.h index e79ab0533c..3b7832c018 100644 --- a/pc/jsep_transport_controller.h +++ b/pc/jsep_transport_controller.h @@ -46,7 +46,6 @@ #include "p2p/base/port_allocator.h" #include "p2p/base/transport_description.h" #include "p2p/base/transport_info.h" -#include "pc/channel.h" #include "pc/dtls_srtp_transport.h" #include "pc/dtls_transport.h" #include "pc/jsep_transport.h" diff --git a/pc/remote_audio_source.h b/pc/remote_audio_source.h index 2eae073272..89af4db714 100644 --- a/pc/remote_audio_source.h +++ b/pc/remote_audio_source.h @@ -21,7 +21,6 @@ #include "api/media_stream_interface.h" #include "api/notifier.h" #include "media/base/media_channel.h" -#include "pc/channel.h" #include "rtc_base/message_handler.h" #include "rtc_base/synchronization/mutex.h" #include "rtc_base/thread.h" diff --git a/pc/sdp_offer_answer.cc b/pc/sdp_offer_answer.cc index 0e5ca0e2be..325e033ea5 100644 --- a/pc/sdp_offer_answer.cc +++ b/pc/sdp_offer_answer.cc @@ -39,6 +39,7 @@ #include "p2p/base/transport_description.h" #include "p2p/base/transport_description_factory.h" #include "p2p/base/transport_info.h" +#include "pc/channel.h" #include "pc/channel_interface.h" #include "pc/dtls_transport.h" #include "pc/media_stream.h" diff --git a/pc/sdp_offer_answer.h b/pc/sdp_offer_answer.h index 532d8cc596..ae5b668415 100644 --- a/pc/sdp_offer_answer.h +++ b/pc/sdp_offer_answer.h @@ -41,7 +41,6 @@ #include "media/base/media_channel.h" #include "media/base/stream_params.h" #include "p2p/base/port_allocator.h" -#include "pc/channel.h" #include "pc/channel_manager.h" #include "pc/connection_context.h" #include "pc/data_channel_controller.h" diff --git a/pc/test/fake_peer_connection_for_stats.h b/pc/test/fake_peer_connection_for_stats.h index 132174ed82..44b2f5b33b 100644 --- a/pc/test/fake_peer_connection_for_stats.h +++ b/pc/test/fake_peer_connection_for_stats.h @@ -19,6 +19,7 @@ #include #include "media/base/fake_media_engine.h" +#include "pc/channel.h" #include "pc/stream_collection.h" #include "pc/test/fake_data_channel_provider.h" #include "pc/test/fake_peer_connection_base.h" diff --git a/test/peer_scenario/BUILD.gn b/test/peer_scenario/BUILD.gn index 44bd7a313d..bea18bf65f 100644 --- a/test/peer_scenario/BUILD.gn +++ b/test/peer_scenario/BUILD.gn @@ -43,6 +43,7 @@ if (rtc_include_tests) { "../../modules/audio_device:audio_device_impl", "../../modules/rtp_rtcp:rtp_rtcp_format", "../../p2p:rtc_p2p", + "../../pc:channel", "../../pc:jsep_transport_controller", "../../pc:pc_test_utils", "../../pc:rtp_transport_internal", diff --git a/test/peer_scenario/scenario_connection.cc b/test/peer_scenario/scenario_connection.cc index 07da453b8a..9b240b8387 100644 --- a/test/peer_scenario/scenario_connection.cc +++ b/test/peer_scenario/scenario_connection.cc @@ -13,6 +13,7 @@ #include "media/base/rtp_utils.h" #include "modules/rtp_rtcp/source/rtp_packet_received.h" #include "p2p/client/basic_port_allocator.h" +#include "pc/channel.h" #include "pc/jsep_transport_controller.h" #include "pc/rtp_transport_internal.h" #include "pc/session_description.h"