diff --git a/BUILD.gn b/BUILD.gn index 9207a1d690..baedb3992c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -400,7 +400,9 @@ if (!build_with_chromium) { deps = [ ":webrtc_common", "api:libjingle_peerconnection_api", + "api:rtc_error", "api:transport_api", + "api/crypto", "api/rtc_event_log:rtc_event_log_factory", "audio", "call", diff --git a/api/BUILD.gn b/api/BUILD.gn index ee384c8462..71226e94ce 100644 --- a/api/BUILD.gn +++ b/api/BUILD.gn @@ -107,10 +107,6 @@ rtc_static_library("libjingle_peerconnection_api") { "candidate.cc", "candidate.h", "congestion_control_interface.h", - "crypto/crypto_options.cc", - "crypto/crypto_options.h", - "crypto/frame_decryptor_interface.h", - "crypto/frame_encryptor_interface.h", "crypto_params.h", "data_channel_interface.cc", "data_channel_interface.h", @@ -169,6 +165,9 @@ rtc_static_library("libjingle_peerconnection_api") { ":scoped_refptr", "audio:audio_mixer_api", "audio_codecs:audio_codecs_api", + "crypto:frame_decryptor_interface", + "crypto:frame_encryptor_interface", + "crypto:options", "rtc_event_log", "task_queue", "transport:bitrate_settings", @@ -726,6 +725,7 @@ if (rtc_include_tests) { # For api/crypto/frame_encryptor_interface.h ":libjingle_peerconnection_api", "../test:test_support", + "crypto:frame_encryptor_interface", ] } @@ -738,6 +738,7 @@ if (rtc_include_tests) { deps = [ ":libjingle_peerconnection_api", "../test:test_support", + "crypto:frame_decryptor_interface", ] } @@ -754,6 +755,7 @@ if (rtc_include_tests) { "..:webrtc_common", "../rtc_base:checks", "../rtc_base:rtc_base_approved", + "crypto:frame_encryptor_interface", ] } @@ -770,6 +772,7 @@ if (rtc_include_tests) { "..:webrtc_common", "../rtc_base:checks", "../rtc_base:rtc_base_approved", + "crypto:frame_decryptor_interface", ] } diff --git a/api/crypto/BUILD.gn b/api/crypto/BUILD.gn new file mode 100644 index 0000000000..a9bd479b6e --- /dev/null +++ b/api/crypto/BUILD.gn @@ -0,0 +1,52 @@ +# Copyright (c) 2019 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. + +import("../../webrtc.gni") + +group("crypto") { + deps = [ + ":frame_decryptor_interface", + ":frame_encryptor_interface", + ":options", + ] +} + +rtc_source_set("options") { + visibility = [ "*" ] + sources = [ + "crypto_options.cc", + "crypto_options.h", + ] + deps = [ + "../../rtc_base:rtc_base", + ] +} + +rtc_source_set("frame_decryptor_interface") { + visibility = [ "*" ] + sources = [ + "frame_decryptor_interface.h", + ] + deps = [ + "..:array_view", + "..:rtp_parameters", + "../../rtc_base:refcount", + ] +} + +rtc_source_set("frame_encryptor_interface") { + visibility = [ "*" ] + sources = [ + "frame_encryptor_interface.h", + ] + deps = [ + "..:array_view", + "..:rtp_parameters", + "../../rtc_base:refcount", + ] +} diff --git a/audio/BUILD.gn b/audio/BUILD.gn index dba7b583a1..bf8e253a24 100644 --- a/audio/BUILD.gn +++ b/audio/BUILD.gn @@ -41,9 +41,6 @@ rtc_static_library("audio") { "../api:array_view", "../api:call_api", "../api:function_view", - - # For api/crypto/crypto_options.h - "../api:libjingle_peerconnection_api", "../api:rtp_headers", "../api:rtp_parameters", "../api:scoped_refptr", @@ -52,6 +49,9 @@ rtc_static_library("audio") { "../api/audio:audio_frame_api", "../api/audio:audio_mixer_api", "../api/audio_codecs:audio_codecs_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:frame_encryptor_interface", + "../api/crypto:options", "../api/rtc_event_log", "../api/task_queue", "../api/transport/media:media_transport_interface", diff --git a/call/BUILD.gn b/call/BUILD.gn index f35c1f0a14..6c2141b1c6 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -31,17 +31,18 @@ rtc_source_set("call_interfaces") { ":rtp_interfaces", ":video_stream_api", "../api:fec_controller_api", - "../api:rtc_error", - - # For api/crypto/crypto_options.h - "../api:libjingle_peerconnection_api", + "../api:libjingle_peerconnection_api", # For api/bitrate_constraints.h "../api:network_state_predictor_api", + "../api:rtc_error", "../api:rtp_headers", "../api:rtp_parameters", "../api:scoped_refptr", "../api:transport_api", "../api/audio:audio_mixer_api", "../api/audio_codecs:audio_codecs_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:frame_encryptor_interface", + "../api/crypto:options", "../api/task_queue", "../api/transport:network_control", "../api/transport/media:media_transport_interface", @@ -80,11 +81,10 @@ rtc_source_set("rtp_interfaces") { deps = [ "../api:array_view", "../api:fec_controller_api", - - # For api/crypto/crypto_options.h - "../api:libjingle_peerconnection_api", + "../api:libjingle_peerconnection_api", # For api/bitrate_constraints.h "../api:rtp_headers", "../api:rtp_parameters", + "../api/crypto:options", "../api/rtc_event_log", "../api/transport:bitrate_settings", "../api/units:timestamp", @@ -283,10 +283,12 @@ rtc_source_set("video_stream_api") { ] deps = [ ":rtp_interfaces", - "../api:libjingle_peerconnection_api", "../api:rtp_headers", "../api:rtp_parameters", "../api:transport_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:frame_encryptor_interface", + "../api/crypto:options", "../api/transport/media:media_transport_interface", "../api/transport/rtp:rtp_source", "../api/video:video_frame", @@ -488,6 +490,8 @@ if (rtc_include_tests) { deps = [ ":rtp_interfaces", "../api:libjingle_peerconnection_api", + "../api/crypto:frame_encryptor_interface", + "../api/crypto:options", "../modules/pacing", "../rtc_base", "../rtc_base:rate_limiter", diff --git a/media/BUILD.gn b/media/BUILD.gn index be5b2b3fc3..8de518ddf4 100644 --- a/media/BUILD.gn +++ b/media/BUILD.gn @@ -79,6 +79,9 @@ rtc_static_library("rtc_media_base") { "../api:rtp_parameters", "../api:scoped_refptr", "../api/audio_codecs:audio_codecs_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:frame_encryptor_interface", + "../api/crypto:options", "../api/transport/media:media_transport_interface", "../api/transport/rtp:rtp_source", "../api/video:video_bitrate_allocation", diff --git a/modules/rtp_rtcp/BUILD.gn b/modules/rtp_rtcp/BUILD.gn index eac4c0831c..c0b35cf1ae 100644 --- a/modules/rtp_rtcp/BUILD.gn +++ b/modules/rtp_rtcp/BUILD.gn @@ -225,6 +225,7 @@ rtc_static_library("rtp_rtcp") { "../../api:scoped_refptr", "../../api:transport_api", "../../api/audio_codecs:audio_codecs_api", + "../../api/crypto:frame_encryptor_interface", "../../api/rtc_event_log", "../../api/transport:field_trial_based_config", "../../api/transport:webrtc_key_value_config", diff --git a/p2p/BUILD.gn b/p2p/BUILD.gn index 6a9438d638..130d3405a1 100644 --- a/p2p/BUILD.gn +++ b/p2p/BUILD.gn @@ -102,6 +102,7 @@ rtc_static_library("rtc_p2p") { "../api:packet_socket_factory", "../api:rtc_error", "../api:scoped_refptr", + "../api/crypto:options", "../api/rtc_event_log", "../api/transport:enums", "../logging:ice_log", @@ -174,6 +175,7 @@ if (rtc_include_tests) { ":stun_types", "../api:libjingle_peerconnection_api", "../api:packet_socket_factory", + "../api/crypto:options", "../rtc_base", "../rtc_base:gunit_helpers", "../rtc_base:rtc_base_approved", diff --git a/pc/BUILD.gn b/pc/BUILD.gn index e75188d376..44341398aa 100644 --- a/pc/BUILD.gn +++ b/pc/BUILD.gn @@ -87,6 +87,7 @@ rtc_static_library("rtc_pc_base") { "../api:rtp_parameters", "../api:rtp_parameters", "../api:scoped_refptr", + "../api/crypto:options", "../api/rtc_event_log", "../api/transport:datagram_transport_interface", "../api/transport/media:media_transport_interface", @@ -227,6 +228,7 @@ rtc_static_library("peerconnection") { "../api:rtc_stats_api", "../api:rtp_parameters", "../api:scoped_refptr", + "../api/crypto:frame_decryptor_interface", "../api/rtc_event_log", "../api/task_queue", "../api/transport:datagram_transport_interface", @@ -549,6 +551,9 @@ if (rtc_include_tests) { "../api:rtc_error", "../api:scoped_refptr", "../api/audio:audio_mixer_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:frame_encryptor_interface", + "../api/crypto:options", "../api/rtc_event_log", "../api/rtc_event_log:rtc_event_log_factory", "../api/task_queue:default_task_queue_factory", diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn index 125c6cb9cc..6fa4971556 100644 --- a/sdk/BUILD.gn +++ b/sdk/BUILD.gn @@ -927,6 +927,8 @@ if (is_ios || is_mac) { "../api/audio_codecs:audio_codecs_api", "../api/audio_codecs:builtin_audio_decoder_factory", "../api/audio_codecs:builtin_audio_encoder_factory", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:frame_encryptor_interface", "../api/rtc_event_log:rtc_event_log_factory", "../api/task_queue:default_task_queue_factory", "../api/transport/media:media_transport_interface", diff --git a/sdk/android/BUILD.gn b/sdk/android/BUILD.gn index 5b0a7fe8ee..d94bfe5176 100644 --- a/sdk/android/BUILD.gn +++ b/sdk/android/BUILD.gn @@ -761,6 +761,7 @@ if (current_os == "linux" || is_android) { "../../api:libjingle_peerconnection_api", "../../api:rtc_event_log_output_file", "../../api:rtp_parameters", + "../../api/crypto:options", "../../api/rtc_event_log:rtc_event_log_factory", "../../api/task_queue:default_task_queue_factory", "../../api/video_codecs:video_codecs_api", diff --git a/video/BUILD.gn b/video/BUILD.gn index af34436158..09ea987ae5 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -58,6 +58,8 @@ rtc_static_library("video") { "../api:rtp_parameters", "../api:scoped_refptr", "../api:transport_api", + "../api/crypto:frame_decryptor_interface", + "../api/crypto:options", "../api/rtc_event_log", "../api/task_queue", "../api/transport/media:media_transport_interface", @@ -574,6 +576,7 @@ if (rtc_include_tests) { "../api:rtp_parameters", "../api:scoped_refptr", "../api:simulated_network_api", + "../api/crypto:options", "../api/rtc_event_log", "../api/task_queue:default_task_queue_factory", "../api/test/video:function_video_factory",