sctp: Reorganize build targets
Bug: webrtc:12614 Change-Id: I2d276139746bb8cafdd5c50fe4595e60a6b1c7fc Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215234 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33745}
This commit is contained in:
parent
6c7c495764
commit
a80c3e5352
@ -392,15 +392,29 @@ rtc_library("rtc_media_engine_defaults") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_library("rtc_data") {
|
rtc_source_set("rtc_data_sctp_transport_internal") {
|
||||||
|
sources = [ "sctp/sctp_transport_internal.h" ]
|
||||||
|
deps = [
|
||||||
|
"../media:rtc_media_base",
|
||||||
|
"../p2p:rtc_p2p",
|
||||||
|
"../rtc_base:rtc_base_approved",
|
||||||
|
"../rtc_base:threading",
|
||||||
|
"../rtc_base/third_party/sigslot",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rtc_build_usrsctp) {
|
||||||
|
rtc_library("rtc_data_usrsctp_transport") {
|
||||||
defines = [
|
defines = [
|
||||||
# "SCTP_DEBUG" # Uncomment for SCTP debugging.
|
# "SCTP_DEBUG" # Uncomment for SCTP debugging.
|
||||||
]
|
]
|
||||||
|
sources = [
|
||||||
|
"sctp/usrsctp_transport.cc",
|
||||||
|
"sctp/usrsctp_transport.h",
|
||||||
|
]
|
||||||
deps = [
|
deps = [
|
||||||
":rtc_media_base",
|
":rtc_data_sctp_transport_internal",
|
||||||
"../api:call_api",
|
"../media:rtc_media_base",
|
||||||
"../api:sequence_checker",
|
|
||||||
"../api:transport_api",
|
|
||||||
"../p2p:rtc_p2p",
|
"../p2p:rtc_p2p",
|
||||||
"../rtc_base",
|
"../rtc_base",
|
||||||
"../rtc_base:rtc_base_approved",
|
"../rtc_base:rtc_base_approved",
|
||||||
@ -408,43 +422,43 @@ rtc_library("rtc_data") {
|
|||||||
"../rtc_base/synchronization:mutex",
|
"../rtc_base/synchronization:mutex",
|
||||||
"../rtc_base/task_utils:pending_task_safety_flag",
|
"../rtc_base/task_utils:pending_task_safety_flag",
|
||||||
"../rtc_base/task_utils:to_queued_task",
|
"../rtc_base/task_utils:to_queued_task",
|
||||||
"../rtc_base/third_party/sigslot",
|
"../rtc_base/third_party/sigslot:sigslot",
|
||||||
"../system_wrappers",
|
"//third_party/usrsctp",
|
||||||
]
|
]
|
||||||
absl_deps = [
|
absl_deps = [
|
||||||
"//third_party/abseil-cpp/absl/algorithm:container",
|
"//third_party/abseil-cpp/absl/algorithm:container",
|
||||||
"//third_party/abseil-cpp/absl/base:core_headers",
|
|
||||||
"//third_party/abseil-cpp/absl/types:optional",
|
"//third_party/abseil-cpp/absl/types:optional",
|
||||||
]
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (rtc_enable_sctp) {
|
rtc_library("rtc_data_sctp_transport_factory") {
|
||||||
|
defines = []
|
||||||
sources = [
|
sources = [
|
||||||
"sctp/sctp_transport_factory.cc",
|
"sctp/sctp_transport_factory.cc",
|
||||||
"sctp/sctp_transport_factory.h",
|
"sctp/sctp_transport_factory.h",
|
||||||
"sctp/sctp_transport_internal.h",
|
|
||||||
"sctp/usrsctp_transport.cc",
|
|
||||||
"sctp/usrsctp_transport.h",
|
|
||||||
]
|
]
|
||||||
} else {
|
deps = [
|
||||||
# libtool on mac does not like empty targets.
|
":rtc_data_sctp_transport_internal",
|
||||||
sources = [ "sctp/noop.cc" ]
|
"../api/transport:sctp_transport_factory_interface",
|
||||||
|
"../rtc_base:threading",
|
||||||
|
"../rtc_base/system:unused",
|
||||||
|
]
|
||||||
|
|
||||||
|
if (rtc_enable_sctp) {
|
||||||
|
assert(rtc_build_usrsctp, "An SCTP backend is required to enable SCTP")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_enable_sctp && rtc_build_usrsctp) {
|
if (rtc_build_usrsctp) {
|
||||||
deps += [
|
defines += [ "WEBRTC_HAVE_USRSCTP" ]
|
||||||
"../api/transport:sctp_transport_factory_interface",
|
deps += [ ":rtc_data_usrsctp_transport" ]
|
||||||
"//third_party/usrsctp",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rtc_source_set("rtc_media") {
|
rtc_source_set("rtc_media") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
|
allow_poison = [ "audio_codecs" ] # TODO(bugs.webrtc.org/8396): Remove.
|
||||||
deps = [
|
deps = [ ":rtc_audio_video" ]
|
||||||
":rtc_audio_video",
|
|
||||||
":rtc_data",
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_include_tests) {
|
if (rtc_include_tests) {
|
||||||
@ -537,7 +551,6 @@ if (rtc_include_tests) {
|
|||||||
defines = []
|
defines = []
|
||||||
deps = [
|
deps = [
|
||||||
":rtc_audio_video",
|
":rtc_audio_video",
|
||||||
":rtc_data",
|
|
||||||
":rtc_encoder_simulcast_proxy",
|
":rtc_encoder_simulcast_proxy",
|
||||||
":rtc_internal_video_codecs",
|
":rtc_internal_video_codecs",
|
||||||
":rtc_media",
|
":rtc_media",
|
||||||
@ -641,15 +654,18 @@ if (rtc_include_tests) {
|
|||||||
sources += [ "engine/webrtc_voice_engine_unittest.cc" ]
|
sources += [ "engine/webrtc_voice_engine_unittest.cc" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_enable_sctp) {
|
if (rtc_build_usrsctp) {
|
||||||
sources += [
|
sources += [
|
||||||
"sctp/usrsctp_transport_reliability_unittest.cc",
|
"sctp/usrsctp_transport_reliability_unittest.cc",
|
||||||
"sctp/usrsctp_transport_unittest.cc",
|
"sctp/usrsctp_transport_unittest.cc",
|
||||||
]
|
]
|
||||||
deps += [
|
deps += [
|
||||||
|
":rtc_data_sctp_transport_internal",
|
||||||
|
":rtc_data_usrsctp_transport",
|
||||||
"../rtc_base:rtc_event",
|
"../rtc_base:rtc_event",
|
||||||
"../rtc_base/task_utils:pending_task_safety_flag",
|
"../rtc_base/task_utils:pending_task_safety_flag",
|
||||||
"../rtc_base/task_utils:to_queued_task",
|
"../rtc_base/task_utils:to_queued_task",
|
||||||
|
"//third_party/usrsctp",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -669,10 +685,6 @@ if (rtc_include_tests) {
|
|||||||
if (is_ios) {
|
if (is_ios) {
|
||||||
deps += [ ":rtc_media_unittests_bundle_data" ]
|
deps += [ ":rtc_media_unittests_bundle_data" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtc_enable_sctp && rtc_build_usrsctp) {
|
|
||||||
deps += [ "//third_party/usrsctp" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2017 The WebRTC Project Authors. All rights reserved.
|
|
||||||
*
|
|
||||||
* Use of this source code is governed by a BSD-style license
|
|
||||||
* that can be found in the LICENSE file in the root of the source
|
|
||||||
* tree. An additional intellectual property rights grant can be found
|
|
||||||
* in the file PATENTS. All contributing project authors may
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
// This file is only needed to make ninja happy on some platforms.
|
|
||||||
// On some platforms it is not possible to link an rtc_static_library
|
|
||||||
// without any source file listed in the GN target.
|
|
||||||
@ -10,16 +10,30 @@
|
|||||||
|
|
||||||
#include "media/sctp/sctp_transport_factory.h"
|
#include "media/sctp/sctp_transport_factory.h"
|
||||||
|
|
||||||
|
#include "rtc_base/system/unused.h"
|
||||||
|
|
||||||
|
#ifdef WEBRTC_HAVE_USRSCTP
|
||||||
|
#include "media/sctp/usrsctp_transport.h" // nogncheck
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace cricket {
|
namespace cricket {
|
||||||
|
|
||||||
SctpTransportFactory::SctpTransportFactory(rtc::Thread* network_thread)
|
SctpTransportFactory::SctpTransportFactory(rtc::Thread* network_thread)
|
||||||
: network_thread_(network_thread) {}
|
: network_thread_(network_thread) {
|
||||||
|
RTC_UNUSED(network_thread_);
|
||||||
|
}
|
||||||
|
|
||||||
std::unique_ptr<SctpTransportInternal>
|
std::unique_ptr<SctpTransportInternal>
|
||||||
SctpTransportFactory::CreateSctpTransport(
|
SctpTransportFactory::CreateSctpTransport(
|
||||||
rtc::PacketTransportInternal* transport) {
|
rtc::PacketTransportInternal* transport) {
|
||||||
return std::unique_ptr<SctpTransportInternal>(
|
std::unique_ptr<SctpTransportInternal> result;
|
||||||
|
#ifdef WEBRTC_HAVE_USRSCTP
|
||||||
|
if (!result) {
|
||||||
|
result = std::unique_ptr<SctpTransportInternal>(
|
||||||
new UsrsctpTransport(network_thread_, transport));
|
new UsrsctpTransport(network_thread_, transport));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace cricket
|
} // namespace cricket
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "api/transport/sctp_transport_factory_interface.h"
|
#include "api/transport/sctp_transport_factory_interface.h"
|
||||||
#include "media/sctp/usrsctp_transport.h"
|
#include "media/sctp/sctp_transport_internal.h"
|
||||||
#include "rtc_base/thread.h"
|
#include "rtc_base/thread.h"
|
||||||
|
|
||||||
namespace cricket {
|
namespace cricket {
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "absl/types/optional.h"
|
#include "absl/types/optional.h"
|
||||||
#include "api/transport/sctp_transport_factory_interface.h"
|
|
||||||
#include "rtc_base/buffer.h"
|
#include "rtc_base/buffer.h"
|
||||||
#include "rtc_base/constructor_magic.h"
|
#include "rtc_base/constructor_magic.h"
|
||||||
#include "rtc_base/copy_on_write_buffer.h"
|
#include "rtc_base/copy_on_write_buffer.h"
|
||||||
|
|||||||
16
pc/BUILD.gn
16
pc/BUILD.gn
@ -108,7 +108,7 @@ rtc_library("rtc_pc_base") {
|
|||||||
"../common_video",
|
"../common_video",
|
||||||
"../common_video:common_video",
|
"../common_video:common_video",
|
||||||
"../logging:ice_log",
|
"../logging:ice_log",
|
||||||
"../media:rtc_data",
|
"../media:rtc_data_sctp_transport_internal",
|
||||||
"../media:rtc_h264_profile_id",
|
"../media:rtc_h264_profile_id",
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../media:rtc_media_config",
|
"../media:rtc_media_config",
|
||||||
@ -281,7 +281,7 @@ rtc_library("peerconnection") {
|
|||||||
"../call:call_interfaces",
|
"../call:call_interfaces",
|
||||||
"../common_video",
|
"../common_video",
|
||||||
"../logging:ice_log",
|
"../logging:ice_log",
|
||||||
"../media:rtc_data",
|
"../media:rtc_data_sctp_transport_internal",
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../media:rtc_media_config",
|
"../media:rtc_media_config",
|
||||||
"../modules/audio_processing:audio_processing_statistics",
|
"../modules/audio_processing:audio_processing_statistics",
|
||||||
@ -336,7 +336,7 @@ rtc_library("connection_context") {
|
|||||||
"../api/transport:field_trial_based_config",
|
"../api/transport:field_trial_based_config",
|
||||||
"../api/transport:sctp_transport_factory_interface",
|
"../api/transport:sctp_transport_factory_interface",
|
||||||
"../api/transport:webrtc_key_value_config",
|
"../api/transport:webrtc_key_value_config",
|
||||||
"../media:rtc_data",
|
"../media:rtc_data_sctp_transport_factory",
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../p2p:rtc_p2p",
|
"../p2p:rtc_p2p",
|
||||||
"../rtc_base",
|
"../rtc_base",
|
||||||
@ -869,7 +869,7 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||||||
"../api/video/test:mock_recordable_encoded_frame",
|
"../api/video/test:mock_recordable_encoded_frame",
|
||||||
"../call:rtp_interfaces",
|
"../call:rtp_interfaces",
|
||||||
"../call:rtp_receiver",
|
"../call:rtp_receiver",
|
||||||
"../media:rtc_data",
|
"../media:rtc_data_sctp_transport_internal",
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../media:rtc_media_tests_utils",
|
"../media:rtc_media_tests_utils",
|
||||||
"../modules/rtp_rtcp:rtp_rtcp_format",
|
"../modules/rtp_rtcp:rtp_rtcp_format",
|
||||||
@ -1011,10 +1011,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||||||
"webrtc_sdp_unittest.cc",
|
"webrtc_sdp_unittest.cc",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (rtc_enable_sctp) {
|
|
||||||
defines = [ "WEBRTC_HAVE_SCTP" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
":audio_rtp_receiver",
|
":audio_rtp_receiver",
|
||||||
":audio_track",
|
":audio_track",
|
||||||
@ -1065,6 +1061,7 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||||||
"../api/video:video_rtp_headers",
|
"../api/video:video_rtp_headers",
|
||||||
"../call/adaptation:resource_adaptation_test_utilities",
|
"../call/adaptation:resource_adaptation_test_utilities",
|
||||||
"../logging:fake_rtc_event_log",
|
"../logging:fake_rtc_event_log",
|
||||||
|
"../media:rtc_data_sctp_transport_internal",
|
||||||
"../media:rtc_media_config",
|
"../media:rtc_media_config",
|
||||||
"../media:rtc_media_engine_defaults",
|
"../media:rtc_media_engine_defaults",
|
||||||
"../modules/audio_device:audio_device_api",
|
"../modules/audio_device:audio_device_api",
|
||||||
@ -1118,8 +1115,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||||||
"../api/video_codecs:video_codecs_api",
|
"../api/video_codecs:video_codecs_api",
|
||||||
"../call:call_interfaces",
|
"../call:call_interfaces",
|
||||||
"../media:rtc_audio_video",
|
"../media:rtc_audio_video",
|
||||||
"../media:rtc_data", # TODO(phoglund): AFAIK only used for one sctp
|
|
||||||
# constant.
|
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../media:rtc_media_tests_utils",
|
"../media:rtc_media_tests_utils",
|
||||||
"../modules/audio_processing",
|
"../modules/audio_processing",
|
||||||
@ -1328,7 +1323,6 @@ if (rtc_include_tests && !build_with_chromium) {
|
|||||||
"../api/video_codecs:builtin_video_encoder_factory",
|
"../api/video_codecs:builtin_video_encoder_factory",
|
||||||
"../api/video_codecs:video_codecs_api",
|
"../api/video_codecs:video_codecs_api",
|
||||||
"../call:call_interfaces",
|
"../call:call_interfaces",
|
||||||
"../media:rtc_data",
|
|
||||||
"../media:rtc_media",
|
"../media:rtc_media",
|
||||||
"../media:rtc_media_base",
|
"../media:rtc_media_base",
|
||||||
"../media:rtc_media_tests_utils",
|
"../media:rtc_media_tests_utils",
|
||||||
|
|||||||
@ -22,7 +22,6 @@
|
|||||||
#include "api/transport/sctp_transport_factory_interface.h"
|
#include "api/transport/sctp_transport_factory_interface.h"
|
||||||
#include "api/transport/webrtc_key_value_config.h"
|
#include "api/transport/webrtc_key_value_config.h"
|
||||||
#include "media/base/media_engine.h"
|
#include "media/base/media_engine.h"
|
||||||
#include "media/sctp/sctp_transport_internal.h"
|
|
||||||
#include "p2p/base/basic_packet_socket_factory.h"
|
#include "p2p/base/basic_packet_socket_factory.h"
|
||||||
#include "pc/channel_manager.h"
|
#include "pc/channel_manager.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
|
|||||||
@ -37,7 +37,6 @@
|
|||||||
#include "api/transport/sctp_transport_factory_interface.h"
|
#include "api/transport/sctp_transport_factory_interface.h"
|
||||||
#include "api/transport/webrtc_key_value_config.h"
|
#include "api/transport/webrtc_key_value_config.h"
|
||||||
#include "call/call.h"
|
#include "call/call.h"
|
||||||
#include "media/sctp/sctp_transport_internal.h"
|
|
||||||
#include "p2p/base/port_allocator.h"
|
#include "p2p/base/port_allocator.h"
|
||||||
#include "pc/channel_manager.h"
|
#include "pc/channel_manager.h"
|
||||||
#include "pc/connection_context.h"
|
#include "pc/connection_context.h"
|
||||||
|
|||||||
@ -777,7 +777,6 @@ if (current_os == "linux" || is_android) {
|
|||||||
"../../api/video_codecs:video_codecs_api",
|
"../../api/video_codecs:video_codecs_api",
|
||||||
"../../call:call_interfaces",
|
"../../call:call_interfaces",
|
||||||
"../../media:rtc_audio_video",
|
"../../media:rtc_audio_video",
|
||||||
"../../media:rtc_data",
|
|
||||||
"../../media:rtc_media_base",
|
"../../media:rtc_media_base",
|
||||||
"../../modules/audio_device",
|
"../../modules/audio_device",
|
||||||
"../../modules/audio_processing:api",
|
"../../modules/audio_processing:api",
|
||||||
|
|||||||
@ -11,5 +11,5 @@ import("../../../webrtc.gni")
|
|||||||
rtc_source_set("fake_sctp_transport") {
|
rtc_source_set("fake_sctp_transport") {
|
||||||
visibility = [ "*" ]
|
visibility = [ "*" ]
|
||||||
sources = [ "fake_sctp_transport.h" ]
|
sources = [ "fake_sctp_transport.h" ]
|
||||||
deps = [ "../../../media:rtc_data" ]
|
deps = [ "../../../media:rtc_data_sctp_transport_internal" ]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -233,7 +233,6 @@ declare_args() {
|
|||||||
rtc_libvpx_build_vp9 = !build_with_mozilla
|
rtc_libvpx_build_vp9 = !build_with_mozilla
|
||||||
rtc_build_opus = !build_with_mozilla
|
rtc_build_opus = !build_with_mozilla
|
||||||
rtc_build_ssl = !build_with_mozilla
|
rtc_build_ssl = !build_with_mozilla
|
||||||
rtc_build_usrsctp = !build_with_mozilla
|
|
||||||
|
|
||||||
# Enable libevent task queues on platforms that support it.
|
# Enable libevent task queues on platforms that support it.
|
||||||
if (is_win || is_mac || is_ios || is_nacl || is_fuchsia ||
|
if (is_win || is_mac || is_ios || is_nacl || is_fuchsia ||
|
||||||
@ -290,6 +289,11 @@ declare_args() {
|
|||||||
rtc_exclude_transient_suppressor = false
|
rtc_exclude_transient_suppressor = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare_args() {
|
||||||
|
# Enable the usrsctp backend for DataChannels and related unittests
|
||||||
|
rtc_build_usrsctp = !build_with_mozilla && rtc_enable_sctp
|
||||||
|
}
|
||||||
|
|
||||||
# Make it possible to provide custom locations for some libraries (move these
|
# Make it possible to provide custom locations for some libraries (move these
|
||||||
# up into declare_args should we need to actually use them for the GN build).
|
# up into declare_args should we need to actually use them for the GN build).
|
||||||
rtc_libvpx_dir = "//third_party/libvpx"
|
rtc_libvpx_dir = "//third_party/libvpx"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user