blob: e9425b0313ef876843de015c02898042d046fa61 [file] [log] [blame]
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromecast_build.gni")
import("//third_party/webrtc/webrtc.gni")
webrtc_configs = [ "//third_party/webrtc:common_config" ]
webrtc_public_configs = [ "//third_party/webrtc:common_inherited_config" ]
webrtc_public_deps = [
":init_webrtc",
":metrics",
":task_queue_factory",
"//third_party/webrtc/api:array_view",
"//third_party/webrtc/api:callfactory_api",
"//third_party/webrtc/api:frame_transformer_interface",
"//third_party/webrtc/api:ice_transport_factory",
"//third_party/webrtc/api:libjingle_logging_api",
"//third_party/webrtc/api:libjingle_peerconnection_api",
"//third_party/webrtc/api:media_stream_interface",
"//third_party/webrtc/api:packet_socket_factory",
"//third_party/webrtc/api:rtc_error",
"//third_party/webrtc/api:rtc_stats_api",
"//third_party/webrtc/api:rtp_headers",
"//third_party/webrtc/api:rtp_packet_info",
"//third_party/webrtc/api:rtp_parameters",
"//third_party/webrtc/api:scoped_refptr",
"//third_party/webrtc/api/adaptation:resource_adaptation_api",
"//third_party/webrtc/api/audio:aec3_config",
"//third_party/webrtc/api/audio:aec3_config_json",
"//third_party/webrtc/api/audio:aec3_factory",
"//third_party/webrtc/api/audio_codecs:audio_codecs_api",
"//third_party/webrtc/api/audio_codecs/L16:audio_decoder_L16",
"//third_party/webrtc/api/audio_codecs/L16:audio_encoder_L16",
"//third_party/webrtc/api/audio_codecs/g711:audio_decoder_g711",
"//third_party/webrtc/api/audio_codecs/g711:audio_encoder_g711",
"//third_party/webrtc/api/audio_codecs/g722:audio_decoder_g722",
"//third_party/webrtc/api/audio_codecs/g722:audio_encoder_g722",
"//third_party/webrtc/api/audio_codecs/isac:audio_decoder_isac",
"//third_party/webrtc/api/audio_codecs/isac:audio_encoder_isac",
"//third_party/webrtc/api/audio_codecs/opus:audio_decoder_multiopus",
"//third_party/webrtc/api/audio_codecs/opus:audio_decoder_opus",
"//third_party/webrtc/api/audio_codecs/opus:audio_encoder_multiopus",
"//third_party/webrtc/api/audio_codecs/opus:audio_encoder_opus",
"//third_party/webrtc/api/rtc_event_log:rtc_event_log_factory",
"//third_party/webrtc/api/transport:enums",
"//third_party/webrtc/api/transport/rtp:rtp_source",
"//third_party/webrtc/api/video:recordable_encoded_frame",
"//third_party/webrtc/api/video:video_bitrate_allocation",
"//third_party/webrtc/api/video:video_frame",
"//third_party/webrtc/api/video:video_frame_metadata",
"//third_party/webrtc/api/video:video_rtp_headers",
"//third_party/webrtc/api/video_codecs:builtin_video_decoder_factory",
"//third_party/webrtc/api/video_codecs:rtc_software_fallback_wrappers",
"//third_party/webrtc/api/video_codecs:video_codecs_api",
"//third_party/webrtc/common_video",
"//third_party/webrtc/common_video:common_video",
"//third_party/webrtc/media:rtc_audio_video",
"//third_party/webrtc/media:rtc_h264_profile_id",
"//third_party/webrtc/media:rtc_internal_video_codecs",
"//third_party/webrtc/media:rtc_media",
"//third_party/webrtc/media:rtc_media_base",
"//third_party/webrtc/media:rtc_simulcast_encoder_adapter",
"//third_party/webrtc/media:rtc_vp9_profile",
"//third_party/webrtc/modules/audio_device",
"//third_party/webrtc/modules/audio_device:audio_device_api",
"//third_party/webrtc/modules/audio_processing",
"//third_party/webrtc/modules/audio_processing:api",
"//third_party/webrtc/modules/audio_processing:audio_processing_statistics",
"//third_party/webrtc/modules/audio_processing/aec_dump",
"//third_party/webrtc/modules/audio_processing/aec_dump:aec_dump",
"//third_party/webrtc/modules/desktop_capture",
"//third_party/webrtc/modules/desktop_capture:primitives",
"//third_party/webrtc/modules/video_coding:video_codec_interface",
"//third_party/webrtc/modules/video_coding:webrtc_h264",
"//third_party/webrtc/p2p:libstunprober",
"//third_party/webrtc/p2p:rtc_p2p",
"//third_party/webrtc/pc:libjingle_peerconnection",
"//third_party/webrtc/pc:peerconnection",
"//third_party/webrtc/pc:rtc_pc",
"//third_party/webrtc/pc:rtc_pc_base",
"//third_party/webrtc/rtc_base",
"//third_party/webrtc/rtc_base:async_resolver_interface",
"//third_party/webrtc/rtc_base:ip_address",
"//third_party/webrtc/rtc_base:rtc_base",
"//third_party/webrtc/rtc_base:rtc_base_approved",
"//third_party/webrtc/rtc_base:rtc_task_queue",
"//third_party/webrtc/rtc_base:socket_address",
"//third_party/webrtc/rtc_base:threading",
"//third_party/webrtc/rtc_base:timeutils",
"//third_party/webrtc/rtc_base/third_party/base64",
"//third_party/webrtc/rtc_base/third_party/sigslot",
"//third_party/webrtc/rtc_base/third_party/sigslot:sigslot",
"//third_party/webrtc/stats",
"//third_party/webrtc/stats:rtc_stats",
"//third_party/webrtc/stats:rtc_stats_test_utils",
"//third_party/webrtc/system_wrappers",
]
if (defined(rtc_exclude_system_time) && rtc_exclude_system_time) {
webrtc_public_deps += [ ":system_time" ]
}
if (is_chromecast) {
webrtc_public_deps += [
"//third_party/webrtc/api:network_state_predictor_api",
"//third_party/webrtc/api/audio:audio_frame_api",
"//third_party/webrtc/api/task_queue",
"//third_party/webrtc/api/transport:goog_cc",
"//third_party/webrtc/api/transport:network_control",
"//third_party/webrtc/api/units:time_delta",
"//third_party/webrtc/api/video:encoded_image",
"//third_party/webrtc/call:call_interfaces",
"//third_party/webrtc/media:rtc_h264_profile_id",
"//third_party/webrtc/media:rtc_media_engine_defaults",
"//third_party/webrtc/modules/audio_device:audio_device_default",
"//third_party/webrtc/modules/audio_mixer:audio_mixer_impl",
"//third_party/webrtc/modules/video_coding:codec_globals_headers",
]
}
if (is_chromecast || is_nacl) {
# For chromecast and NaCL, provide a default field trial implementation.
webrtc_public_deps += [ "//third_party/webrtc/system_wrappers:field_trial" ]
} else {
# Other Chromium flavors get a custom implementation.
# See the default value of "rtc_exclude_field_trial_default"
# in https://cs.chromium.org/chromium/src/third_party/webrtc/webrtc.gni
# for how that is done.
webrtc_public_deps += [ ":field_trial" ]
}
component("webrtc_component") {
configs += webrtc_configs
public_configs = webrtc_public_configs
public_deps = webrtc_public_deps
}
if (rtc_include_tests) {
component("webrtc_test_component") {
configs += webrtc_configs
public_configs = webrtc_public_configs
testonly = true
public_deps = webrtc_public_deps
public_deps += [
"//third_party/webrtc/api:audio_quality_analyzer_api",
"//third_party/webrtc/api:create_frame_generator",
"//third_party/webrtc/api:create_network_emulation_manager",
"//third_party/webrtc/api:create_peer_connection_quality_test_frame_generator",
"//third_party/webrtc/api:create_simulcast_test_fixture_api",
"//third_party/webrtc/api:create_time_controller",
"//third_party/webrtc/api:create_videocodec_test_fixture_api",
"//third_party/webrtc/api:dummy_peer_connection",
"//third_party/webrtc/api:fake_frame_decryptor",
"//third_party/webrtc/api:fake_frame_encryptor",
"//third_party/webrtc/api:frame_generator_api",
"//third_party/webrtc/api:mock_audio_mixer",
"//third_party/webrtc/api:mock_data_channel",
"//third_party/webrtc/api:mock_fec_controller_override",
"//third_party/webrtc/api:mock_frame_decryptor",
"//third_party/webrtc/api:mock_frame_encryptor",
"//third_party/webrtc/api:mock_media_stream_interface",
"//third_party/webrtc/api:mock_peer_connection_factory_interface",
"//third_party/webrtc/api:mock_peerconnectioninterface",
"//third_party/webrtc/api:mock_rtp",
"//third_party/webrtc/api:mock_transformable_video_frame",
"//third_party/webrtc/api:mock_video_bitrate_allocator",
"//third_party/webrtc/api:mock_video_bitrate_allocator_factory",
"//third_party/webrtc/api:mock_video_codec_factory",
"//third_party/webrtc/api:mock_video_decoder",
"//third_party/webrtc/api:mock_video_encoder",
"//third_party/webrtc/api:peer_connection_quality_test_fixture_api",
"//third_party/webrtc/api:simulcast_test_fixture_api",
"//third_party/webrtc/api:stats_observer_interface",
"//third_party/webrtc/api:test_dependency_factory",
"//third_party/webrtc/api:video_quality_analyzer_api",
"//third_party/webrtc/api:video_quality_test_fixture_api",
"//third_party/webrtc/api:videocodec_test_fixture_api",
"//third_party/webrtc/media:rtc_media_tests_utils",
]
}
}
source_set("init_webrtc") {
visibility = [ ":*" ]
sources = [
"init_webrtc.cc",
"init_webrtc.h",
]
configs += [
"//third_party/webrtc:common_config",
"//third_party/webrtc:library_impl_config",
]
public_configs = [
"//third_party/webrtc:common_inherited_config",
# TODO(mbonadei): Abseil config propagation is needed because
# WebRTC's BUILD.gn files don't use `public_deps`, there are
# good reasons for this, but they may disappear in the future.
# In that case it is ok to remove these two lines.
"//third_party/abseil-cpp:absl_include_config",
"//third_party/abseil-cpp:absl_define_config",
]
deps = [
"//base",
"//third_party/webrtc/rtc_base",
"//third_party/webrtc/rtc_base/system:rtc_export",
"//third_party/webrtc/system_wrappers",
]
}
source_set("metrics") {
# TODO(mbonadei): Migrate WebRTC deps to webrtc_component and uncomment.
# visibility = [ ":*" ]
sources = [ "metrics.cc" ]
deps = [ "//base" ]
}
source_set("field_trial") {
# TODO(mbonadei): Migrate WebRTC deps to webrtc_component and uncomment.
# visibility = [ ":*" ]
sources = [ "field_trial.cc" ]
deps = [ "//base" ]
}
source_set("task_queue_factory") {
visibility = [ ":*" ]
sources = [
"task_queue_factory.cc",
"task_queue_factory.h",
]
configs += [ "//third_party/webrtc:library_impl_config" ]
deps = [
"//base",
"//third_party/webrtc/api/task_queue",
"//third_party/webrtc/rtc_base/system:rtc_export",
]
}
source_set("system_time") {
# TODO(mbonadei): Migrate WebRTC deps to webrtc_component and uncomment.
# visibility = [ ":*" ]
sources = [ "rtc_base/system_time.cc" ]
deps = [ "//base" ]
}