1 Star 0 Fork 0

Sun Moon Fan/libwebrtc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 7.50 KB
一键复制 编辑 原始数据 按行查看 历史
CloudWebRTC 提交于 2023-07-13 09:00 . m114 release (#81)
import("../webrtc.gni")
declare_args() {
libwebrtc_intel_media_sdk = false
libwebrtc_desktop_capture = true
}
if (is_android) {
import("//build/config/android/config.gni")
import("//build/config/android/rules.gni")
} else if (is_mac) {
import("//build/config/mac/rules.gni")
} else if (is_ios) {
import("//build/config/ios/rules.gni")
} else if (is_linux) {
import("//build/config/linux/pkg_config.gni")
}
if (is_linux) {
pkg_config("gio") {
packages = [
"gio-2.0",
"gio-unix-2.0",
]
}
}
config("external_config") {
include_dirs = [ "include" ]
if (is_win) {
defines = [ "LIB_WEBRTC_API_DLL" ]
}
}
rtc_shared_library("libwebrtc") {
libs = []
include_dirs = [
".",
"include",
]
defines = [
"USE_LIBYUV",
"WEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE",
]
if (is_win) {
defines += [
"LIB_WEBRTC_API_EXPORTS",
"WEBRTC_WIN",
]
}
if (is_linux) {
defines += [
"WEBRTC_LINUX",
"WEBRTC_POSIX",
]
}
public_configs = [ ":external_config" ]
sources = [
"include/base/atomicops.h",
"include/base/fixed_size_function.h",
"include/base/portable.h",
"include/base/refcount.h",
"include/base/refcountedobject.h",
"include/base/scoped_ref_ptr.h",
"include/libwebrtc.h",
"include/rtc_audio_device.h",
"include/rtc_audio_source.h",
"include/rtc_audio_track.h",
"include/rtc_data_channel.h",
"include/rtc_dtls_transport.h",
"include/rtc_dtmf_sender.h",
"include/rtc_frame_cryptor.h",
"include/rtc_ice_candidate.h",
"include/rtc_media_stream.h",
"include/rtc_media_track.h",
"include/rtc_mediaconstraints.h",
"include/rtc_peerconnection.h",
"include/rtc_peerconnection_factory.h",
"include/rtc_rtp_capabilities.h",
"include/rtc_rtp_parameters.h",
"include/rtc_rtp_receiver.h",
"include/rtc_rtp_sender.h",
"include/rtc_rtp_transceiver.h",
"include/rtc_session_description.h",
"include/rtc_types.h",
"include/rtc_video_device.h",
"include/rtc_video_frame.h",
"include/rtc_video_renderer.h",
"include/rtc_video_source.h",
"include/rtc_video_track.h",
"include/helper.h",
"src/helper.cc",
"src/base/portable.cc",
"src/internal/vcm_capturer.cc",
"src/internal/vcm_capturer.h",
"src/internal/video_capturer.cc",
"src/internal/video_capturer.h",
"src/libwebrtc.cc",
"src/rtc_audio_device_impl.cc",
"src/rtc_audio_device_impl.h",
"src/rtc_audio_source_impl.cc",
"src/rtc_audio_source_impl.h",
"src/rtc_audio_track_impl.cc",
"src/rtc_audio_track_impl.h",
"src/rtc_data_channel_impl.cc",
"src/rtc_data_channel_impl.h",
"src/rtc_dtls_transport_impl.cc",
"src/rtc_dtls_transport_impl.h",
"src/rtc_dtmf_sender_impl.cc",
"src/rtc_dtmf_sender_impl.h",
"src/rtc_frame_cryptor_impl.cc",
"src/rtc_frame_cryptor_impl.h",
"src/rtc_ice_candidate_impl.cc",
"src/rtc_ice_candidate_impl.h",
"src/rtc_media_stream_impl.cc",
"src/rtc_media_stream_impl.h",
"src/rtc_mediaconstraints_impl.cc",
"src/rtc_mediaconstraints_impl.h",
"src/rtc_peerconnection_factory_impl.cc",
"src/rtc_peerconnection_factory_impl.h",
"src/rtc_peerconnection_impl.cc",
"src/rtc_peerconnection_impl.h",
"src/rtc_rtp_capabilities_impl.cc",
"src/rtc_rtp_capabilities_impl.h",
"src/rtc_rtp_parameters_impl.cc",
"src/rtc_rtp_parameters_impl.h",
"src/rtc_rtp_receiver_impl.cc",
"src/rtc_rtp_receiver_impl.h",
"src/rtc_rtp_sender_impl.cc",
"src/rtc_rtp_sender_impl.h",
"src/rtc_rtp_transceiver_impl.cc",
"src/rtc_rtp_transceiver_impl.h",
"src/rtc_session_description_impl.cc",
"src/rtc_session_description_impl.h",
"src/rtc_video_device_impl.cc",
"src/rtc_video_device_impl.h",
"src/rtc_video_frame_impl.cc",
"src/rtc_video_frame_impl.h",
"src/rtc_video_sink_adapter.cc",
"src/rtc_video_sink_adapter.h",
"src/rtc_video_source_impl.cc",
"src/rtc_video_source_impl.h",
"src/rtc_video_track_impl.cc",
"src/rtc_video_track_impl.h",
]
# intel media sdk
if (is_win && libwebrtc_intel_media_sdk) {
sources += [
"src/win/base_allocator.cc",
"src/win/base_allocator.h",
"src/win/codecutils.cc",
"src/win/codecutils.h",
"src/win/commontypes.h",
"src/win/d3d11_allocator.cc",
"src/win/d3d11_allocator.h",
"src/win/d3d11_manager.h",
"src/win/d3d_allocator.cc",
"src/win/d3d_allocator.h",
"src/win/d3dnativeframe.h",
"src/win/mediacapabilities.cc",
"src/win/mediacapabilities.h",
"src/win/mediautils.cc",
"src/win/mediautils.h",
"src/win/msdkcommon.h",
"src/win/msdkvideobase.cc",
"src/win/msdkvideobase.h",
"src/win/msdkvideodecoder.cc",
"src/win/msdkvideodecoder.h",
"src/win/msdkvideodecoderfactory.cc",
"src/win/msdkvideodecoderfactory.h",
"src/win/msdkvideoencoder.cc",
"src/win/msdkvideoencoder.h",
"src/win/msdkvideoencoderfactory.cc",
"src/win/msdkvideoencoderfactory.h",
"src/win/nativehandlebuffer.h",
"src/win/sysmem_allocator.cc",
"src/win/sysmem_allocator.h",
]
include_dirs += [ "src/win/include" ]
defines += [ "USE_INTEL_MEDIA_SDK" ]
configs += [ "//build/config/win:windowed" ]
libs += [
"libmfx_vs2015.lib",
"dxgi.lib",
"d3d11.lib",
]
lib_dirs = [ "src\win\lib\x64" ]
ldflags = [
"/ignore:4098",
"/ignore:4099",
]
}
if (is_win && is_clang) {
cflags = [
"-Wno-microsoft-extra-qualification",
"-Wno-reorder",
]
}
if (is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
#suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
deps = [
"../api:create_peerconnection_factory",
"../api:libjingle_peerconnection_api",
"../api/audio_codecs:builtin_audio_decoder_factory",
"../api/audio_codecs:builtin_audio_encoder_factory",
"../api/crypto:frame_crypto_transformer",
"../api/video:video_frame",
"../api/video_codecs:builtin_video_decoder_factory",
"../api/video_codecs:builtin_video_encoder_factory",
"../media:rtc_audio_video",
"../media:rtc_internal_video_codecs",
"../media:rtc_media",
"../media:rtc_media_base",
"../modules/audio_device:audio_device",
"../modules/audio_processing:api",
"../modules/audio_processing:audio_processing",
"../modules/video_capture:video_capture_module",
"../pc:libjingle_peerconnection",
"../rtc_base:threading",
"../sdk:media_constraints",
"//third_party/abseil-cpp/absl/memory",
"//third_party/boringssl:boringssl",
"//third_party/libyuv",
]
# screen capture device
if (libwebrtc_desktop_capture) {
defines += [ "RTC_DESKTOP_DEVICE" ]
sources += [
"include/rtc_desktop_capturer.h",
"include/rtc_desktop_device.h",
"include/rtc_desktop_media_list.h",
"src/internal/desktop_capturer.h",
"src/internal/desktop_capturer.cc",
"src/internal/jpeg_util.cc",
"src/internal/jpeg_util.h",
"src/rtc_desktop_capturer_impl.cc",
"src/rtc_desktop_capturer_impl.h",
"src/rtc_desktop_device_impl.cc",
"src/rtc_desktop_device_impl.h",
"src/rtc_desktop_media_list_impl.cc",
"src/rtc_desktop_media_list_impl.h",
]
deps += [
"../modules/desktop_capture",
]
if (is_linux) {
configs += [ ":gio" ]
}
if(is_mac || is_win || is_linux) {
deps += [
"//third_party/libjpeg_turbo:libjpeg",
]
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sun-moon-fan/libwebrtc.git
[email protected]:sun-moon-fan/libwebrtc.git
sun-moon-fan
libwebrtc
libwebrtc
main

搜索帮助