|  | # Copyright (c) 2016 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("//build/config/linux/pkg_config.gni") | 
|  | import("//third_party/libaom/options.gni") | 
|  | import("../webrtc.gni") | 
|  |  | 
|  | group("media") { | 
|  | deps = [] | 
|  | if (!build_with_mozilla) { | 
|  | deps += [ | 
|  | ":rtc_media", | 
|  | ":rtc_media_base", | 
|  | ] | 
|  | } | 
|  | } | 
|  |  | 
|  | config("rtc_media_defines_config") { | 
|  | defines = [ "HAVE_WEBRTC_VIDEO" ] | 
|  | } | 
|  |  | 
|  | rtc_source_set("rtc_media_config") { | 
|  | visibility = [ "*" ] | 
|  | sources = [ "base/media_config.h" ] | 
|  | } | 
|  |  | 
|  | rtc_library("rtc_sdp_video_format_utils") { | 
|  | visibility = [ "*" ] | 
|  | sources = [ | 
|  | "base/sdp_video_format_utils.cc", | 
|  | "base/sdp_video_format_utils.h", | 
|  | ] | 
|  |  | 
|  | deps = [ | 
|  | ":media_constants", | 
|  | "../api:rtp_parameters", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:stringutils", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("rtc_media_base") { | 
|  | visibility = [ "*" ] | 
|  | defines = [] | 
|  | libs = [] | 
|  | sources = [ | 
|  | "base/adapted_video_track_source.h",  # Used downstream | 
|  | "base/video_adapter.h",  # Used once downstream | 
|  | "base/video_broadcaster.h",  # Used downstream | 
|  | "base/video_common.h",  # Used downstream | 
|  | ] | 
|  | deps = [ | 
|  | ":adapted_video_track_source", | 
|  | ":codec", | 
|  | ":media_channel", | 
|  | ":media_channel_impl", | 
|  | ":rid_description", | 
|  | ":rtc_media_config", | 
|  | ":rtp_utils", | 
|  | ":stream_params", | 
|  | ":video_adapter", | 
|  | ":video_broadcaster", | 
|  | ":video_common", | 
|  | ":video_source_base", | 
|  | "../api:array_view", | 
|  | "../api:audio_options_api", | 
|  | "../api:call_api", | 
|  | "../api:field_trials_view", | 
|  | "../api:frame_transformer_interface", | 
|  | "../api:media_stream_interface", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_sender_interface", | 
|  | "../api:scoped_refptr", | 
|  | "../api:sequence_checker", | 
|  | "../api:transport_api", | 
|  | "../api:video_track_source_constraints", | 
|  | "../api/audio:audio_frame_processor", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/crypto:frame_decryptor_interface", | 
|  | "../api/crypto:frame_encryptor_interface", | 
|  | "../api/crypto:options", | 
|  | "../api/task_queue", | 
|  | "../api/task_queue:pending_task_safety_flag", | 
|  | "../api/transport:datagram_transport_interface", | 
|  | "../api/transport:stun_types", | 
|  | "../api/transport/rtp:rtp_source", | 
|  | "../api/units:time_delta", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:resolution", | 
|  | "../api/video:video_bitrate_allocation", | 
|  | "../api/video:video_bitrate_allocator_factory", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../call:call_interfaces", | 
|  | "../common_video", | 
|  | "../modules/async_audio_processing", | 
|  | "../modules/audio_device", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:buffer", | 
|  | "../rtc_base:byte_order", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:dscp", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:network_route", | 
|  | "../rtc_base:sanitizer", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base:unique_id_generator", | 
|  | "../rtc_base/network:sent_packet", | 
|  | "../rtc_base/synchronization:mutex", | 
|  | "../rtc_base/system:file_wrapper", | 
|  | "../rtc_base/system:no_unique_address", | 
|  | "../rtc_base/system:rtc_export", | 
|  | "../rtc_base/third_party/sigslot", | 
|  | "../video/config:encoder_config", | 
|  | "//third_party/abseil-cpp/absl/base:core_headers", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("adapted_video_track_source") { | 
|  | sources = [ | 
|  | "base/adapted_video_track_source.cc", | 
|  | "base/adapted_video_track_source.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":video_adapter", | 
|  | ":video_broadcaster", | 
|  | "../api:media_stream_interface", | 
|  | "../api:scoped_refptr", | 
|  | "../api:video_track_source_constraints", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base/synchronization:mutex", | 
|  | "../rtc_base/system:rtc_export", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_source_set("audio_source") { | 
|  | sources = [ "base/audio_source.h" ] | 
|  | } | 
|  |  | 
|  | rtc_library("video_adapter") { | 
|  | sources = [ | 
|  | "base/video_adapter.cc", | 
|  | "base/video_adapter.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":video_common", | 
|  | "../api/video:resolution", | 
|  | "../api/video:video_frame", | 
|  | "../common_video", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base/synchronization:mutex", | 
|  | "../rtc_base/system:rtc_export", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("video_source_base") { | 
|  | sources = [ | 
|  | "base/video_source_base.cc", | 
|  | "base/video_source_base.h", | 
|  | ] | 
|  | deps = [ | 
|  | "../api:sequence_checker", | 
|  | "../api/video:video_frame", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base/system:no_unique_address", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("video_broadcaster") { | 
|  | sources = [ | 
|  | "base/video_broadcaster.cc", | 
|  | "base/video_broadcaster.h",  # Used downstream | 
|  | ] | 
|  | deps = [ | 
|  | ":video_common", | 
|  | ":video_source_base", | 
|  | "../api:media_stream_interface", | 
|  | "../api:scoped_refptr", | 
|  | "../api:sequence_checker", | 
|  | "../api:video_track_source_constraints", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base/synchronization:mutex", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("video_common") { | 
|  | sources = [ | 
|  | "base/video_common.cc", | 
|  | "base/video_common.h", | 
|  | ] | 
|  | deps = [ | 
|  | "../api:array_view", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base/system:rtc_export", | 
|  | "//third_party/abseil-cpp/absl/base:core_headers", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("media_engine") { | 
|  | sources = [ | 
|  | "base/media_engine.cc", | 
|  | "base/media_engine.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":codec", | 
|  | ":media_channel", | 
|  | ":media_channel_impl", | 
|  | ":rid_description", | 
|  | ":rtc_media_config", | 
|  | ":stream_params", | 
|  | ":video_common", | 
|  | "../api:array_view", | 
|  | "../api:audio_options_api", | 
|  | "../api:field_trials_view", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_headers", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_transceiver_direction", | 
|  | "../api:scoped_refptr", | 
|  | "../api/audio:audio_device", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/crypto:options", | 
|  | "../api/environment", | 
|  | "../api/video:video_bitrate_allocation", | 
|  | "../api/video:video_bitrate_allocator_factory", | 
|  | "../api/video:video_codec_constants", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../call:call_interfaces", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base/system:file_wrapper", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("media_channel_impl") { | 
|  | sources = [ | 
|  | "base/media_channel_impl.cc", | 
|  | "base/media_channel_impl.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":codec", | 
|  | ":media_channel", | 
|  | ":rtp_utils", | 
|  | ":stream_params", | 
|  | "../api:array_view", | 
|  | "../api:audio_options_api", | 
|  | "../api:call_api", | 
|  | "../api:frame_transformer_interface", | 
|  | "../api:media_stream_interface", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_headers", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_sender_interface", | 
|  | "../api:scoped_refptr", | 
|  | "../api:sequence_checker", | 
|  | "../api:transport_api", | 
|  | "../api/crypto:frame_decryptor_interface", | 
|  | "../api/crypto:frame_encryptor_interface", | 
|  | "../api/task_queue", | 
|  | "../api/task_queue:pending_task_safety_flag", | 
|  | "../api/transport/rtp:rtp_source", | 
|  | "../api/units:time_delta", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../common_video", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:dscp", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:network_route", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base/network:sent_packet", | 
|  | "//third_party/abseil-cpp/absl/functional:any_invocable", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_source_set("media_channel") { | 
|  | sources = [ "base/media_channel.h" ] | 
|  | deps = [ | 
|  | ":audio_source", | 
|  | ":codec", | 
|  | ":media_constants", | 
|  | ":rtp_utils", | 
|  | ":stream_params", | 
|  | "../api:audio_options_api", | 
|  | "../api:call_api", | 
|  | "../api:frame_transformer_interface", | 
|  | "../api:media_stream_interface", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_headers", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_sender_interface", | 
|  | "../api:scoped_refptr", | 
|  | "../api/audio:audio_processing_statistics", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/crypto:frame_decryptor_interface", | 
|  | "../api/crypto:frame_encryptor_interface", | 
|  | "../api/task_queue:pending_task_safety_flag", | 
|  | "../api/transport:datagram_transport_interface", | 
|  | "../api/transport/rtp:rtp_source", | 
|  | "../api/units:data_rate", | 
|  | "../api/units:time_delta", | 
|  | "../api/units:timestamp", | 
|  | "../api/video:encoded_image", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../common_video", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:buffer", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:dscp", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:network_route", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base/network:sent_packet", | 
|  | "../video/config:encoder_config", | 
|  | "//third_party/abseil-cpp/absl/functional:any_invocable", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("codec") { | 
|  | sources = [ | 
|  | "base/codec.cc", | 
|  | "base/codec.h", | 
|  |  | 
|  | # Because Codec::Matches uses a function from codec_comparators, | 
|  | # there's a mutual dependency between these two files. | 
|  | "base/codec_comparators.cc", | 
|  | "base/codec_comparators.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":media_constants", | 
|  | "../api:rtp_parameters", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base/system:rtc_export", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | "//third_party/abseil-cpp/absl/base:core_headers", | 
|  | "//third_party/abseil-cpp/absl/container:inlined_vector", | 
|  | "//third_party/abseil-cpp/absl/functional:any_invocable", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | "//third_party/abseil-cpp/absl/strings:str_format", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("codec_list") { | 
|  | sources = [ | 
|  | "base/codec_list.cc", | 
|  | "base/codec_list.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":codec", | 
|  | ":media_constants", | 
|  | "../api:rtc_error", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:stringutils", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("rtp_utils") { | 
|  | sources = [ | 
|  | "base/rtp_utils.cc", | 
|  | "base/rtp_utils.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":turn_utils", | 
|  | "../api:array_view", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:byte_order", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:digest", | 
|  | "../rtc_base/system:rtc_export", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("stream_params") { | 
|  | sources = [ | 
|  | "base/stream_params.cc", | 
|  | "base/stream_params.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":rid_description", | 
|  | "../api:array_view", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:unique_id_generator", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("media_constants") { | 
|  | sources = [ | 
|  | "base/media_constants.cc", | 
|  | "base/media_constants.h", | 
|  | ] | 
|  | deps = [ "../rtc_base/system:rtc_export" ] | 
|  | } | 
|  |  | 
|  | rtc_library("turn_utils") { | 
|  | sources = [ | 
|  | "base/turn_utils.cc", | 
|  | "base/turn_utils.h", | 
|  | ] | 
|  | deps = [ | 
|  | "../api/transport:stun_types", | 
|  | "../rtc_base:byte_order", | 
|  | "../rtc_base/system:rtc_export", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("rid_description") { | 
|  | sources = [ | 
|  | "base/rid_description.cc", | 
|  | "base/rid_description.h", | 
|  | ] | 
|  | deps = [ ":codec" ] | 
|  | } | 
|  |  | 
|  | rtc_library("rtc_simulcast_encoder_adapter") { | 
|  | visibility = [ "*" ] | 
|  | defines = [] | 
|  | libs = [] | 
|  | sources = [ | 
|  | "engine/simulcast_encoder_adapter.cc", | 
|  | "engine/simulcast_encoder_adapter.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":rtc_sdp_video_format_utils", | 
|  | ":video_common", | 
|  | "../api:array_view", | 
|  | "../api:fec_controller_api", | 
|  | "../api:field_trials_view", | 
|  | "../api:scoped_refptr", | 
|  | "../api:sequence_checker", | 
|  | "../api/environment", | 
|  | "../api/units:data_rate", | 
|  | "../api/units:timestamp", | 
|  | "../api/video:encoded_image", | 
|  | "../api/video:video_bitrate_allocation", | 
|  | "../api/video:video_bitrate_allocator", | 
|  | "../api/video:video_codec_constants", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_frame_type", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:rtc_software_fallback_wrappers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../common_video", | 
|  | "../media:media_constants", | 
|  | "../modules/video_coding:video_codec_interface", | 
|  | "../modules/video_coding:video_coding_utility", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base/experiments:encoder_info_settings", | 
|  | "../rtc_base/experiments:rate_control_settings", | 
|  | "../rtc_base/system:no_unique_address", | 
|  | "../rtc_base/system:rtc_export", | 
|  | "../system_wrappers", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | "//third_party/abseil-cpp/absl/base:nullability", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("rtc_internal_video_codecs") { | 
|  | visibility = [ "*" ] | 
|  | allow_poison = [ "software_video_codecs" ] | 
|  | defines = [] | 
|  | libs = [] | 
|  | deps = [ | 
|  | ":codec", | 
|  | ":media_constants", | 
|  | ":rtc_simulcast_encoder_adapter", | 
|  | "../api/environment", | 
|  | "../api/video:encoded_image", | 
|  | "../api/video:video_bitrate_allocation", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:rtc_software_fallback_wrappers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../api/video_codecs:video_encoder_factory_template", | 
|  | "../api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter", | 
|  | "../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter", | 
|  | "../api/video_codecs:video_encoder_factory_template_open_h264_adapter", | 
|  | "../call:call_interfaces", | 
|  | "../modules/video_coding:video_codec_interface", | 
|  | "../modules/video_coding:webrtc_h264", | 
|  | "../modules/video_coding:webrtc_vp8", | 
|  | "../modules/video_coding:webrtc_vp9", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base/system:rtc_export", | 
|  | "../test:fake_video_codecs", | 
|  | "//third_party/abseil-cpp/absl/container:inlined_vector", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | ] | 
|  |  | 
|  | if (enable_libaom) { | 
|  | defines += [ "RTC_USE_LIBAOM_AV1_ENCODER" ] | 
|  | deps += [ | 
|  | "../api/video_codecs:video_encoder_factory_template_libaom_av1_adapter", | 
|  | ] | 
|  | } | 
|  |  | 
|  | if (rtc_include_dav1d_in_internal_decoder_factory) { | 
|  | deps += [ "../modules/video_coding/codecs/av1:dav1d_decoder" ] | 
|  | } | 
|  | sources = [ | 
|  | "engine/fake_video_codec_factory.cc", | 
|  | "engine/fake_video_codec_factory.h", | 
|  | "engine/internal_decoder_factory.cc", | 
|  | "engine/internal_decoder_factory.h", | 
|  | "engine/internal_encoder_factory.cc", | 
|  | "engine/internal_encoder_factory.h", | 
|  | ] | 
|  | } | 
|  |  | 
|  | rtc_library("rtc_audio_video") { | 
|  | visibility = [ "*" ] | 
|  | allow_poison = [ "audio_codecs" ]  # TODO(bugs.webrtc.org/8396): Remove. | 
|  | defines = [] | 
|  | libs = [] | 
|  | deps = [ | 
|  | ":audio_source", | 
|  | ":codec", | 
|  | ":media_channel", | 
|  | ":media_channel_impl", | 
|  | ":media_constants", | 
|  | ":media_engine", | 
|  | ":rid_description", | 
|  | ":rtc_media_config", | 
|  | ":rtp_utils", | 
|  | ":stream_params", | 
|  | "../api:array_view", | 
|  | "../api:audio_options_api", | 
|  | "../api:call_api", | 
|  | "../api:field_trials_view", | 
|  | "../api:frame_transformer_interface", | 
|  | "../api:make_ref_counted", | 
|  | "../api:media_stream_interface", | 
|  | "../api:priority", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_headers", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_sender_interface", | 
|  | "../api:rtp_transceiver_direction", | 
|  | "../api:scoped_refptr", | 
|  | "../api:sequence_checker", | 
|  | "../api/audio:audio_device", | 
|  | "../api/audio:audio_frame_api", | 
|  | "../api/audio:audio_frame_processor", | 
|  | "../api/audio:audio_mixer_api", | 
|  | "../api/audio:audio_processing", | 
|  | "../api/audio:audio_processing_statistics", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/crypto:frame_decryptor_interface", | 
|  | "../api/crypto:frame_encryptor_interface", | 
|  | "../api/crypto:options", | 
|  | "../api/environment", | 
|  | "../api/task_queue", | 
|  | "../api/task_queue:pending_task_safety_flag", | 
|  | "../api/transport:bitrate_settings", | 
|  | "../api/transport/rtp:rtp_source", | 
|  | "../api/units:data_rate", | 
|  | "../api/units:time_delta", | 
|  | "../api/units:timestamp", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:video_bitrate_allocator_factory", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_stream_encoder", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../call", | 
|  | "../call:call_interfaces", | 
|  | "../call:payload_type", | 
|  | "../call:payload_type_picker", | 
|  | "../call:receive_stream_interface", | 
|  | "../call:rtp_interfaces", | 
|  | "../call:video_receive_stream_api", | 
|  | "../call:video_send_stream_api", | 
|  | "../common_video:frame_counts", | 
|  | "../modules/async_audio_processing", | 
|  | "../modules/audio_mixer:audio_mixer_impl", | 
|  | "../modules/rtp_rtcp", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../modules/video_coding/svc:scalability_mode_util", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:dscp", | 
|  | "../rtc_base:event_tracer", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:network_route", | 
|  | "../rtc_base:race_checker", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base/experiments:field_trial_parser", | 
|  | "../rtc_base/network:sent_packet", | 
|  | "../rtc_base/synchronization:mutex", | 
|  | "../rtc_base/system:file_wrapper", | 
|  | "../rtc_base/system:no_unique_address", | 
|  | "../system_wrappers", | 
|  | "../system_wrappers:metrics", | 
|  | "../video/config:encoder_config", | 
|  | "//third_party/abseil-cpp/absl/algorithm", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | "//third_party/abseil-cpp/absl/functional:any_invocable", | 
|  | "//third_party/abseil-cpp/absl/functional:bind_front", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  |  | 
|  | sources = [ | 
|  | "engine/adm_helpers.cc", | 
|  | "engine/adm_helpers.h", | 
|  | "engine/webrtc_media_engine.cc", | 
|  | "engine/webrtc_media_engine.h", | 
|  | "engine/webrtc_video_engine.cc", | 
|  | "engine/webrtc_video_engine.h", | 
|  | "engine/webrtc_voice_engine.cc", | 
|  | "engine/webrtc_voice_engine.h", | 
|  | ] | 
|  |  | 
|  | public_configs = [] | 
|  | if (!build_with_chromium) { | 
|  | public_configs += [ ":rtc_media_defines_config" ] | 
|  | deps += [ "../modules/video_capture:video_capture_internal_impl" ] | 
|  | } | 
|  |  | 
|  | if (rtc_include_internal_audio_device) { | 
|  | deps += [ "../api/audio:create_audio_device_module" ] | 
|  | } | 
|  |  | 
|  | if (rtc_enable_protobuf) { | 
|  | deps += [ | 
|  | "../modules/audio_coding:ana_config_proto", | 
|  | "../modules/audio_processing/aec_dump:aec_dump_impl", | 
|  | ] | 
|  | } else { | 
|  | deps += [ "../modules/audio_processing/aec_dump:null_aec_dump_factory" ] | 
|  | } | 
|  | } | 
|  |  | 
|  | rtc_source_set("rtc_data_sctp_transport_internal") { | 
|  | sources = [ "sctp/sctp_transport_internal.h" ] | 
|  | deps = [ | 
|  | ":media_channel", | 
|  | "../api:libjingle_peerconnection_api", | 
|  | "../api:priority", | 
|  | "../api:rtc_error", | 
|  | "../api/transport:datagram_transport_interface", | 
|  | "../p2p:dtls_transport_internal", | 
|  | "../p2p:packet_transport_internal", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:threading", | 
|  | ] | 
|  | } | 
|  |  | 
|  | if (rtc_build_dcsctp) { | 
|  | rtc_library("rtc_data_dcsctp_transport") { | 
|  | sources = [ | 
|  | "sctp/dcsctp_transport.cc", | 
|  | "sctp/dcsctp_transport.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":media_channel", | 
|  | ":rtc_data_sctp_transport_internal", | 
|  | "../api:array_view", | 
|  | "../api:dtls_transport_interface", | 
|  | "../api:libjingle_peerconnection_api", | 
|  | "../api:priority", | 
|  | "../api:rtc_error", | 
|  | "../api:sequence_checker", | 
|  | "../api/environment", | 
|  | "../api/task_queue", | 
|  | "../api/task_queue:pending_task_safety_flag", | 
|  | "../api/transport:datagram_transport_interface", | 
|  | "../net/dcsctp/public:factory", | 
|  | "../net/dcsctp/public:socket", | 
|  | "../net/dcsctp/public:types", | 
|  | "../net/dcsctp/public:utils", | 
|  | "../net/dcsctp/timer:task_queue_timeout", | 
|  | "../p2p:dtls_transport_internal", | 
|  | "../p2p:packet_transport_internal", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:event_tracer", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:random", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:threading", | 
|  | "../rtc_base/containers:flat_map", | 
|  | "../rtc_base/network:received_packet", | 
|  | "../rtc_base/third_party/sigslot", | 
|  | "../system_wrappers", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | ] | 
|  | } | 
|  | } | 
|  |  | 
|  | rtc_library("rtc_data_sctp_transport_factory") { | 
|  | defines = [] | 
|  | sources = [ | 
|  | "sctp/sctp_transport_factory.cc", | 
|  | "sctp/sctp_transport_factory.h", | 
|  | ] | 
|  | deps = [ | 
|  | ":rtc_data_sctp_transport_internal", | 
|  | "../api/environment", | 
|  | "../api/transport:sctp_transport_factory_interface", | 
|  | "../p2p:dtls_transport_internal", | 
|  | "../rtc_base:threading", | 
|  | "../rtc_base/system:unused", | 
|  | ] | 
|  |  | 
|  | if (rtc_enable_sctp) { | 
|  | assert(rtc_build_dcsctp, "An SCTP backend is required to enable SCTP") | 
|  | } | 
|  |  | 
|  | if (rtc_build_dcsctp) { | 
|  | defines += [ "WEBRTC_HAVE_DCSCTP" ] | 
|  | deps += [ | 
|  | ":rtc_data_dcsctp_transport", | 
|  | "../system_wrappers", | 
|  | ] | 
|  | } | 
|  | } | 
|  |  | 
|  | rtc_source_set("rtc_media") { | 
|  | visibility = [ "*" ] | 
|  | allow_poison = [ "audio_codecs" ]  # TODO(bugs.webrtc.org/8396): Remove. | 
|  | deps = [ ":rtc_audio_video" ] | 
|  | } | 
|  |  | 
|  | if (rtc_include_tests) { | 
|  | rtc_library("rtc_media_tests_utils") { | 
|  | testonly = true | 
|  |  | 
|  | defines = [] | 
|  | deps = [ | 
|  | ":audio_source", | 
|  | ":codec", | 
|  | ":media_channel", | 
|  | ":media_channel_impl", | 
|  | ":media_constants", | 
|  | ":media_engine", | 
|  | ":rtc_audio_video", | 
|  | ":rtc_internal_video_codecs", | 
|  | ":rtc_media", | 
|  | ":rtc_media_config", | 
|  | ":rtc_simulcast_encoder_adapter", | 
|  | ":rtp_utils", | 
|  | ":stream_params", | 
|  | ":video_common", | 
|  | "../api:array_view", | 
|  | "../api:audio_options_api", | 
|  | "../api:call_api", | 
|  | "../api:fec_controller_api", | 
|  | "../api:field_trials_view", | 
|  | "../api:frame_transformer_interface", | 
|  | "../api:make_ref_counted", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_headers", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_sender_interface", | 
|  | "../api:scoped_refptr", | 
|  | "../api/adaptation:resource_adaptation_api", | 
|  | "../api/audio:audio_device", | 
|  | "../api/audio:audio_frame_api", | 
|  | "../api/audio:audio_mixer_api", | 
|  | "../api/audio:audio_processing", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/crypto:frame_decryptor_interface", | 
|  | "../api/crypto:frame_encryptor_interface", | 
|  | "../api/crypto:options", | 
|  | "../api/environment", | 
|  | "../api/task_queue", | 
|  | "../api/task_queue:pending_task_safety_flag", | 
|  | "../api/transport:bitrate_settings", | 
|  | "../api/transport/rtp:rtp_source", | 
|  | "../api/units:time_delta", | 
|  | "../api/units:timestamp", | 
|  | "../api/video:encoded_image", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:video_bitrate_allocation", | 
|  | "../api/video:video_bitrate_allocator_factory", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_frame_type", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../call:call_interfaces", | 
|  | "../call:fake_payload_type_suggester", | 
|  | "../call:mock_rtp_interfaces", | 
|  | "../call:payload_type", | 
|  | "../call:payload_type_picker", | 
|  | "../call:rtp_interfaces", | 
|  | "../call:video_receive_stream_api", | 
|  | "../call:video_send_stream_api", | 
|  | "../common_video", | 
|  | "../modules/audio_processing", | 
|  | "../modules/rtp_rtcp", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../modules/video_coding:video_codec_interface", | 
|  | "../modules/video_coding:video_coding_utility", | 
|  | "../modules/video_coding/svc:scalability_mode_util", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:buffer", | 
|  | "../rtc_base:byte_order", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:dscp", | 
|  | "../rtc_base:gunit_helpers", | 
|  | "../rtc_base:logging", | 
|  | "../rtc_base:macromagic", | 
|  | "../rtc_base:network_route", | 
|  | "../rtc_base:rtc_event", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base:stringutils", | 
|  | "../rtc_base:threading", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base/network:sent_packet", | 
|  | "../rtc_base/synchronization:mutex", | 
|  | "../rtc_base/system:file_wrapper", | 
|  | "../rtc_base/third_party/sigslot", | 
|  | "../test:create_test_field_trials", | 
|  | "../test:test_support", | 
|  | "../video/config:encoder_config", | 
|  | "../video/config:streams_config", | 
|  | "//testing/gtest", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | "//third_party/abseil-cpp/absl/base:nullability", | 
|  | "//third_party/abseil-cpp/absl/functional:any_invocable", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  | sources = [ | 
|  | "base/fake_frame_source.cc", | 
|  | "base/fake_frame_source.h", | 
|  | "base/fake_media_engine.cc", | 
|  | "base/fake_media_engine.h", | 
|  | "base/fake_network_interface.h", | 
|  | "base/fake_rtp.cc", | 
|  | "base/fake_rtp.h", | 
|  | "base/fake_video_renderer.cc", | 
|  | "base/fake_video_renderer.h", | 
|  | "base/test_utils.cc", | 
|  | "base/test_utils.h", | 
|  | "engine/fake_webrtc_call.cc", | 
|  | "engine/fake_webrtc_call.h", | 
|  | "engine/fake_webrtc_video_engine.cc", | 
|  | "engine/fake_webrtc_video_engine.h", | 
|  | ] | 
|  | } | 
|  |  | 
|  | if (!build_with_chromium) { | 
|  | rtc_media_unittests_resources = [ | 
|  | "../resources/media/captured-320x240-2s-48.frames", | 
|  | "../resources/media/faces.1280x720_P420.yuv", | 
|  | "../resources/media/faces_I400.jpg", | 
|  | "../resources/media/faces_I411.jpg", | 
|  | "../resources/media/faces_I420.jpg", | 
|  | "../resources/media/faces_I422.jpg", | 
|  | "../resources/media/faces_I444.jpg", | 
|  | ] | 
|  |  | 
|  | if (is_ios) { | 
|  | bundle_data("rtc_media_unittests_bundle_data") { | 
|  | testonly = true | 
|  | sources = rtc_media_unittests_resources | 
|  | outputs = [ "{{bundle_resources_dir}}/{{source_file_part}}" ] | 
|  | } | 
|  | } | 
|  |  | 
|  | rtc_test("rtc_media_unittests") { | 
|  | testonly = true | 
|  |  | 
|  | defines = [] | 
|  | deps = [ | 
|  | ":audio_source", | 
|  | ":codec", | 
|  | ":codec_list", | 
|  | ":media_channel", | 
|  | ":media_constants", | 
|  | ":media_engine", | 
|  | ":rid_description", | 
|  | ":rtc_audio_video", | 
|  | ":rtc_internal_video_codecs", | 
|  | ":rtc_media_base", | 
|  | ":rtc_media_config", | 
|  | ":rtc_media_tests_utils", | 
|  | ":rtc_sdp_video_format_utils", | 
|  | ":rtc_simulcast_encoder_adapter", | 
|  | ":rtp_utils", | 
|  | ":stream_params", | 
|  | ":turn_utils", | 
|  | ":video_common", | 
|  | "../api:array_view", | 
|  | "../api:audio_options_api", | 
|  | "../api:call_api", | 
|  | "../api:create_simulcast_test_fixture_api", | 
|  | "../api:fec_controller_api", | 
|  | "../api:field_trials", | 
|  | "../api:make_ref_counted", | 
|  | "../api:mock_encoder_selector", | 
|  | "../api:mock_video_bitrate_allocator", | 
|  | "../api:mock_video_bitrate_allocator_factory", | 
|  | "../api:mock_video_codec_factory", | 
|  | "../api:mock_video_decoder", | 
|  | "../api:priority", | 
|  | "../api:ref_count", | 
|  | "../api:rtc_error", | 
|  | "../api:rtp_headers", | 
|  | "../api:rtp_parameters", | 
|  | "../api:rtp_transceiver_direction", | 
|  | "../api:scoped_refptr", | 
|  | "../api:simulcast_test_fixture_api", | 
|  | "../api:transport_api", | 
|  | "../api:video_track_source_constraints", | 
|  | "../api/audio:audio_device", | 
|  | "../api/audio:audio_processing", | 
|  | "../api/audio:builtin_audio_processing_builder", | 
|  | "../api/audio_codecs:audio_codecs_api", | 
|  | "../api/audio_codecs:builtin_audio_decoder_factory", | 
|  | "../api/audio_codecs:builtin_audio_encoder_factory", | 
|  | "../api/crypto:options", | 
|  | "../api/environment", | 
|  | "../api/environment:environment_factory", | 
|  | "../api/test/video:function_video_factory", | 
|  | "../api/transport:bitrate_settings", | 
|  | "../api/transport:datagram_transport_interface", | 
|  | "../api/transport/rtp:rtp_source", | 
|  | "../api/units:data_rate", | 
|  | "../api/units:time_delta", | 
|  | "../api/units:timestamp", | 
|  | "../api/video:builtin_video_bitrate_allocator_factory", | 
|  | "../api/video:encoded_image", | 
|  | "../api/video:recordable_encoded_frame", | 
|  | "../api/video:resolution", | 
|  | "../api/video:video_bitrate_allocation", | 
|  | "../api/video:video_bitrate_allocator", | 
|  | "../api/video:video_bitrate_allocator_factory", | 
|  | "../api/video:video_codec_constants", | 
|  | "../api/video:video_frame", | 
|  | "../api/video:video_frame_type", | 
|  | "../api/video:video_rtp_headers", | 
|  | "../api/video_codecs:scalability_mode", | 
|  | "../api/video_codecs:video_codecs_api", | 
|  | "../api/video_codecs:video_decoder_factory_template", | 
|  | "../api/video_codecs:video_decoder_factory_template_dav1d_adapter", | 
|  | "../api/video_codecs:video_decoder_factory_template_libvpx_vp8_adapter", | 
|  | "../api/video_codecs:video_decoder_factory_template_libvpx_vp9_adapter", | 
|  | "../api/video_codecs:video_decoder_factory_template_open_h264_adapter", | 
|  | "../api/video_codecs:video_encoder_factory_template", | 
|  | "../api/video_codecs:video_encoder_factory_template_libaom_av1_adapter", | 
|  | "../api/video_codecs:video_encoder_factory_template_libvpx_vp8_adapter", | 
|  | "../api/video_codecs:video_encoder_factory_template_libvpx_vp9_adapter", | 
|  | "../api/video_codecs:video_encoder_factory_template_open_h264_adapter", | 
|  | "../call:call_interfaces", | 
|  | "../call:payload_type_picker", | 
|  | "../call:video_receive_stream_api", | 
|  | "../call:video_send_stream_api", | 
|  | "../common_video", | 
|  | "../modules/audio_device:mock_audio_device", | 
|  | "../modules/audio_mixer:audio_mixer_impl", | 
|  | "../modules/audio_processing:mocks", | 
|  | "../modules/rtp_rtcp:rtp_rtcp_format", | 
|  | "../modules/video_coding:simulcast_test_fixture_impl", | 
|  | "../modules/video_coding:video_codec_interface", | 
|  | "../modules/video_coding:video_coding_utility", | 
|  | "../modules/video_coding:webrtc_h264", | 
|  | "../modules/video_coding:webrtc_vp8", | 
|  | "../modules/video_coding/svc:scalability_mode_util", | 
|  | "../net/dcsctp/public:types", | 
|  | "../p2p:p2p_test_utils", | 
|  | "../rtc_base:async_packet_socket", | 
|  | "../rtc_base:byte_order", | 
|  | "../rtc_base:checks", | 
|  | "../rtc_base:copy_on_write_buffer", | 
|  | "../rtc_base:dscp", | 
|  | "../rtc_base:safe_conversions", | 
|  | "../rtc_base:socket", | 
|  | "../rtc_base:threading", | 
|  | "../rtc_base:timeutils", | 
|  | "../rtc_base:unique_id_generator", | 
|  | "../rtc_base/experiments:min_video_bitrate_experiment", | 
|  | "../rtc_base/system:file_wrapper", | 
|  | "../system_wrappers", | 
|  | "../test:audio_codec_mocks", | 
|  | "../test:create_test_environment", | 
|  | "../test:create_test_field_trials", | 
|  | "../test:fake_video_codecs", | 
|  | "../test:rtp_test_utils", | 
|  | "../test:test_main", | 
|  | "../test:test_support", | 
|  | "../test:video_test_common", | 
|  | "../test/time_controller", | 
|  | "../video/config:encoder_config", | 
|  | "../video/config:streams_config", | 
|  | "//third_party/abseil-cpp/absl/algorithm:container", | 
|  | "//third_party/abseil-cpp/absl/container:inlined_vector", | 
|  | "//third_party/abseil-cpp/absl/strings", | 
|  | "//third_party/abseil-cpp/absl/strings:string_view", | 
|  | ] | 
|  |  | 
|  | if (enable_libaom) { | 
|  | defines += [ "RTC_USE_LIBAOM_AV1_ENCODER" ] | 
|  | } | 
|  |  | 
|  | sources = [ | 
|  | "base/codec_comparators_unittest.cc", | 
|  | "base/codec_list_unittest.cc", | 
|  | "base/codec_unittest.cc", | 
|  | "base/media_engine_unittest.cc", | 
|  | "base/rtp_utils_unittest.cc", | 
|  | "base/sdp_video_format_utils_unittest.cc", | 
|  | "base/stream_params_unittest.cc", | 
|  | "base/turn_utils_unittest.cc", | 
|  | "base/video_adapter_unittest.cc", | 
|  | "base/video_broadcaster_unittest.cc", | 
|  | "base/video_common_unittest.cc", | 
|  | "engine/internal_decoder_factory_unittest.cc", | 
|  | "engine/internal_encoder_factory_unittest.cc", | 
|  | "engine/simulcast_encoder_adapter_unittest.cc", | 
|  | "engine/webrtc_media_engine_unittest.cc", | 
|  | "engine/webrtc_video_engine_unittest.cc", | 
|  | ] | 
|  |  | 
|  | # TODO(kthelgason): Reenable this test on iOS. | 
|  | # See bugs.webrtc.org/5569 | 
|  | if (!is_ios) { | 
|  | sources += [ "engine/webrtc_voice_engine_unittest.cc" ] | 
|  | } | 
|  |  | 
|  | if (rtc_opus_support_120ms_ptime) { | 
|  | defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=1" ] | 
|  | } else { | 
|  | defines += [ "WEBRTC_OPUS_SUPPORT_120MS_PTIME=0" ] | 
|  | } | 
|  |  | 
|  | data = rtc_media_unittests_resources | 
|  |  | 
|  | if (is_android) { | 
|  | shard_timeout = 900 | 
|  | } | 
|  |  | 
|  | if (is_ios) { | 
|  | deps += [ ":rtc_media_unittests_bundle_data" ] | 
|  | } | 
|  |  | 
|  | if (rtc_build_dcsctp) { | 
|  | sources += [ "sctp/dcsctp_transport_unittest.cc" ] | 
|  | deps += [ | 
|  | ":rtc_data_dcsctp_transport", | 
|  | "../net/dcsctp/public:factory", | 
|  | "../net/dcsctp/public:mocks", | 
|  | "../net/dcsctp/public:socket", | 
|  | ] | 
|  | } | 
|  | } | 
|  | } | 
|  | } |