diff --git a/BUILD.gn b/BUILD.gn index f8707dae8f..e7ac7e83b9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -261,7 +261,7 @@ config("common_config") { } if (rtc_enable_sctp) { - defines += [ "HAVE_SCTP" ] + defines += [ "WEBRTC_HAVE_SCTP" ] } if (rtc_enable_external_auth) { diff --git a/pc/BUILD.gn b/pc/BUILD.gn index 0155bc7c2e..bf12e8d40c 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -19,7 +19,7 @@ group("pc") { config("rtc_pc_config") { defines = [] if (rtc_enable_sctp) { - defines += [ "HAVE_SCTP" ] + defines += [ "WEBRTC_HAVE_SCTP" ] } } @@ -1031,7 +1031,7 @@ if (rtc_include_tests) { ] if (rtc_enable_sctp) { - defines = [ "HAVE_SCTP" ] + defines = [ "WEBRTC_HAVE_SCTP" ] } deps = [ diff --git a/pc/connection_context.cc b/pc/connection_context.cc index 727fbd6542..5f9dcb96aa 100644 --- a/pc/connection_context.cc +++ b/pc/connection_context.cc @@ -63,7 +63,7 @@ std::unique_ptr MaybeCreateSctpFactory( if (factory) { return factory; } -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP return std::make_unique(network_thread); #else return nullptr; diff --git a/pc/peer_connection_bundle_unittest.cc b/pc/peer_connection_bundle_unittest.cc index c544db396f..2d8338b793 100644 --- a/pc/peer_connection_bundle_unittest.cc +++ b/pc/peer_connection_bundle_unittest.cc @@ -755,7 +755,7 @@ TEST_P(PeerConnectionBundleTest, RejectDescriptionChangingBundleTag) { // (https://bugs.chromium.org/p/chromium/issues/detail?id=827917) TEST_P(PeerConnectionBundleTest, RemovingContentAndRejectBundleGroup) { RTCConfiguration config; -#ifndef HAVE_SCTP +#ifndef WEBRTC_HAVE_SCTP config.enable_rtp_data_channel = true; #endif config.bundle_policy = BundlePolicy::kBundlePolicyMaxBundle; diff --git a/pc/peer_connection_end_to_end_unittest.cc b/pc/peer_connection_end_to_end_unittest.cc index 24ef69c111..b29371c59b 100644 --- a/pc/peer_connection_end_to_end_unittest.cc +++ b/pc/peer_connection_end_to_end_unittest.cc @@ -465,7 +465,7 @@ TEST_P(PeerConnectionEndToEndTest, CallWithCustomCodec) { EXPECT_NE(encoder_id1, encoder_id2); } -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP // Verifies that a DataChannel created before the negotiation can transition to // "OPEN" and transfer data. TEST_P(PeerConnectionEndToEndTest, CreateDataChannelBeforeNegotiate) { @@ -735,7 +735,7 @@ TEST_P(PeerConnectionEndToEndTest, TooManyDataChannelsOpenedBeforeConnecting) { channels[cricket::kMaxSctpStreams / 2]->state()); } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP TEST_P(PeerConnectionEndToEndTest, CanRestartIce) { rtc::scoped_refptr real_decoder_factory = diff --git a/pc/peer_connection_histogram_unittest.cc b/pc/peer_connection_histogram_unittest.cc index 39b9a73a46..97fbde2f86 100644 --- a/pc/peer_connection_histogram_unittest.cc +++ b/pc/peer_connection_histogram_unittest.cc @@ -497,7 +497,7 @@ TEST_F(PeerConnectionUsageHistogramTest, FingerprintWithMdnsCallee) { expected_fingerprint_callee)); } -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP TEST_F(PeerConnectionUsageHistogramTest, FingerprintDataOnly) { auto caller = CreatePeerConnection(); auto callee = CreatePeerConnection(); @@ -521,7 +521,7 @@ TEST_F(PeerConnectionUsageHistogramTest, FingerprintDataOnly) { expected_fingerprint | static_cast(UsageEvent::PRIVATE_CANDIDATE_COLLECTED)) == 2); } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP #endif // WEBRTC_ANDROID TEST_F(PeerConnectionUsageHistogramTest, FingerprintStunTurn) { @@ -628,7 +628,7 @@ TEST_F(PeerConnectionUsageHistogramTest, FingerprintWithPrivateIpv6Callee) { } #ifndef WEBRTC_ANDROID -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP // Test that the usage pattern bits for adding remote (private IPv6) candidates // are set when the remote candidates are retrieved from the Offer SDP instead // of trickled ICE messages. diff --git a/pc/peer_connection_integrationtest.cc b/pc/peer_connection_integrationtest.cc index a7841261e3..00055527d1 100644 --- a/pc/peer_connection_integrationtest.cc +++ b/pc/peer_connection_integrationtest.cc @@ -3705,7 +3705,7 @@ TEST_P(PeerConnectionIntegrationTest, AddRtpDataChannelInSubsequentOffer) { kDefaultTimeout); } -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP // This test sets up a call between two parties with audio, video and an SCTP // data channel. @@ -3931,7 +3931,7 @@ TEST_P(PeerConnectionIntegrationTest, kDefaultTimeout); } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP // Test that the ICE connection and gathering states eventually reach // "complete". @@ -5188,7 +5188,7 @@ TEST_P(PeerConnectionIntegrationTest, ClosingConnectionStopsPacketFlow) { ASSERT_TRUE(CreatePeerConnectionWrappers()); ConnectFakeSignaling(); caller()->AddAudioVideoTracks(); -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP caller()->CreateDataChannel(); #endif caller()->CreateAndSetAndSignalOffer(); @@ -5208,7 +5208,7 @@ TEST_P(PeerConnectionIntegrationTest, ClosingConnectionStopsPacketFlow) { // Test that transport stats are generated by the RTCStatsCollector for a // connection that only involves data channels. This is a regression test for // crbug.com/826972. -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP TEST_P(PeerConnectionIntegrationTest, TransportStatsReportedForDataChannelOnlyConnection) { ASSERT_TRUE(CreatePeerConnectionWrappers()); @@ -5224,7 +5224,7 @@ TEST_P(PeerConnectionIntegrationTest, auto callee_report = callee()->NewGetStats(); EXPECT_EQ(1u, callee_report->GetStatsOfType().size()); } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP TEST_P(PeerConnectionIntegrationTest, IceEventsGeneratedAndLoggedInRtcEventLog) { @@ -5910,7 +5910,7 @@ TEST_F(PeerConnectionIntegrationTestUnifiedPlan, callee_track->state()); } -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP TEST_F(PeerConnectionIntegrationTestUnifiedPlan, EndToEndCallWithBundledSctpDataChannel) { @@ -5978,7 +5978,7 @@ TEST_F(PeerConnectionIntegrationTestUnifiedPlan, ASSERT_TRUE_WAIT(!callee()->data_observer()->IsOpen(), kDefaultTimeout); } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP } // namespace } // namespace webrtc diff --git a/pc/peer_connection_interface_unittest.cc b/pc/peer_connection_interface_unittest.cc index b7be44ddb5..505fe6b9b1 100644 --- a/pc/peer_connection_interface_unittest.cc +++ b/pc/peer_connection_interface_unittest.cc @@ -2255,7 +2255,7 @@ TEST_P(PeerConnectionInterfaceTest, TestRejectRtpDataChannelInAnswer) { EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); } -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP // This tests that SCTP data channels can be rejected in an answer. TEST_P(PeerConnectionInterfaceTest, TestRejectSctpDataChannelInAnswer) #else @@ -2310,7 +2310,7 @@ TEST_P(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { cricket::GetFirstVideoContent(pc_->local_description()->description()); ASSERT_TRUE(content != NULL); EXPECT_FALSE(content->rejected); -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP content = cricket::GetFirstDataContent(pc_->local_description()->description()); ASSERT_TRUE(content != NULL); @@ -3593,12 +3593,12 @@ TEST_F(PeerConnectionInterfaceTestPlanB, // Test that negotiation can succeed with a data channel only, and with the max // bundle policy. Previously there was a bug that prevented this. -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP TEST_P(PeerConnectionInterfaceTest, DataChannelOnlyOfferWithMaxBundlePolicy) { #else TEST_P(PeerConnectionInterfaceTest, DISABLED_DataChannelOnlyOfferWithMaxBundlePolicy) { -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP PeerConnectionInterface::RTCConfiguration config; config.bundle_policy = PeerConnectionInterface::kBundlePolicyMaxBundle; CreatePeerConnection(config); diff --git a/pc/peer_connection_rtp_unittest.cc b/pc/peer_connection_rtp_unittest.cc index 4d6da66943..3614f0c749 100644 --- a/pc/peer_connection_rtp_unittest.cc +++ b/pc/peer_connection_rtp_unittest.cc @@ -1844,7 +1844,7 @@ TEST_F(PeerConnectionMsidSignalingTest, PureUnifiedPlanToUs) { class SdpFormatReceivedTest : public PeerConnectionRtpTestUnifiedPlan {}; -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP TEST_F(SdpFormatReceivedTest, DataChannelOnlyIsReportedAsNoTracks) { auto caller = CreatePeerConnectionWithUnifiedPlan(); caller->CreateDataChannel("dc"); @@ -1856,7 +1856,7 @@ TEST_F(SdpFormatReceivedTest, DataChannelOnlyIsReportedAsNoTracks) { metrics::Samples("WebRTC.PeerConnection.SdpFormatReceived"), ElementsAre(Pair(kSdpFormatReceivedNoTracks, 1))); } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP TEST_F(SdpFormatReceivedTest, SimpleUnifiedPlanIsReportedAsSimple) { auto caller = CreatePeerConnectionWithUnifiedPlan(); diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc index ee68ec9a0b..e2d7c35654 100644 --- a/pc/rtc_stats_integrationtest.cc +++ b/pc/rtc_stats_integrationtest.cc @@ -1091,7 +1091,7 @@ class RTCStatsReportVerifier { rtc::scoped_refptr report_; }; -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP TEST_F(RTCStatsIntegrationTest, GetStatsFromCaller) { StartCall(); @@ -1254,7 +1254,7 @@ TEST_F(RTCStatsIntegrationTest, GetStatsReferencedIds) { } } } -#endif // HAVE_SCTP +#endif // WEBRTC_HAVE_SCTP } // namespace diff --git a/pc/test/test_sdp_strings.h b/pc/test/test_sdp_strings.h index 849757d300..6394ac5f5e 100644 --- a/pc/test/test_sdp_strings.h +++ b/pc/test/test_sdp_strings.h @@ -60,7 +60,7 @@ static const char kFireFoxSdpOffer[] = "a=candidate:4 2 UDP 2113667326 10.0.254.2 58890 typ host\r\n" "a=candidate:5 2 UDP 1694302206 74.95.2.170 33611 typ srflx raddr" " 10.0.254.2 rport 58890\r\n" -#ifdef HAVE_SCTP +#ifdef WEBRTC_HAVE_SCTP "m=application 45536 DTLS/SCTP 5000\r\n" "c=IN IP4 74.95.2.170\r\n" "a=fmtp:5000 protocol=webrtc-datachannel;streams=16\r\n"