This reverts commit c73e1f437889d882cbf2987f7fb3a029a6150613. Reason for revert: The problem with failed deps in chrome content/renderer had already been fixed in https://webrtc-review.googlesource.com/c/src/+/38660 Original change's description: > Revert "GN rtc_* templates: Set default visibility to webrtc_root + "/*"" > > This reverts commit 588c548657b3ddf76e7b3f241263eef7f5799f16. > > Reason for revert: > > Breaks Chrome FYI: > > /b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check > -> returned 1 > ERROR at //build/split_static_library.gni:12:5: Dependency not allowed. > static_library(target_name) { > ^---------------------------- > The item //content/renderer:renderer > can not depend on //third_party/webrtc/media:rtc_internal_video_codecs > because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [ > //third_party/webrtc/* > //third_party/webrtc_overrides/* > ] > > https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout > > Original change's description: > > GN rtc_* templates: Set default visibility to webrtc_root + "/*" > > > > This means that by default, targets are visible to everything under > > the WebRTC root, but not visible to anything else. > > > > API targets are manually tagged with visibility "*", so that targets > > outside the WebRTC tree can see them. > > > > BUG=webrtc:8254 > > > > Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509 > > Reviewed-on: https://webrtc-review.googlesource.com/24140 > > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> > > Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#21548} > > TBR=mbonadei@webrtc.org,kwiberg@webrtc.org > > Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:8254 > Reviewed-on: https://webrtc-review.googlesource.com/38760 > Reviewed-by: Per Kjellander <perkj@webrtc.org> > Commit-Queue: Per Kjellander <perkj@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#21555} TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,perkj@webrtc.org Change-Id: I6f720078ce21bd172e0a6471bae8c4c011e4a657 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: webrtc:8254 Reviewed-on: https://webrtc-review.googlesource.com/38860 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Per Kjellander <perkj@webrtc.org> Cr-Commit-Position: refs/heads/master@{#21558}
231 lines
6.4 KiB
Plaintext
231 lines
6.4 KiB
Plaintext
# Copyright (c) 2014 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")
|
|
|
|
# Note this target is missing an implementation for the video capture.
|
|
# Targets must link with either 'video_capture' or
|
|
# 'video_capture_internal_impl' depending on whether they want to
|
|
# use the internal capturer.
|
|
rtc_static_library("video_capture_module") {
|
|
sources = [
|
|
"device_info_impl.cc",
|
|
"device_info_impl.h",
|
|
"video_capture.h",
|
|
"video_capture_config.h",
|
|
"video_capture_defines.h",
|
|
"video_capture_factory.cc",
|
|
"video_capture_factory.h",
|
|
"video_capture_impl.cc",
|
|
"video_capture_impl.h",
|
|
]
|
|
|
|
deps = [
|
|
"..:module_api",
|
|
"../..:webrtc_common",
|
|
"../../:typedefs",
|
|
"../../api:libjingle_peerconnection_api",
|
|
"../../api:video_frame_api",
|
|
"../../api:video_frame_api_i420",
|
|
"../../common_video",
|
|
"../../media:rtc_media_base",
|
|
"../../rtc_base:rtc_base_approved",
|
|
"../../rtc_base:stringutils",
|
|
"../../system_wrappers",
|
|
"//third_party/libyuv",
|
|
]
|
|
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
|
|
rtc_static_library("video_capture") {
|
|
visibility = [ "*" ]
|
|
sources = [
|
|
"external/device_info_external.cc",
|
|
"external/video_capture_external.cc",
|
|
]
|
|
|
|
deps = [
|
|
":video_capture_module",
|
|
"../../rtc_base:rtc_base_approved",
|
|
"../../system_wrappers",
|
|
]
|
|
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
|
|
if (!build_with_chromium) {
|
|
config("video_capture_internal_impl_config") {
|
|
if (is_ios || is_mac) {
|
|
libs = [
|
|
"AVFoundation.framework",
|
|
"CoreMedia.framework",
|
|
"CoreVideo.framework",
|
|
]
|
|
}
|
|
}
|
|
|
|
config("video_capture_internal_impl_warnings_config") {
|
|
if (is_win && is_clang) {
|
|
cflags = [
|
|
"-Wno-comment",
|
|
"-Wno-ignored-attributes",
|
|
|
|
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=6269
|
|
# for -Wno-ignored-qualifiers
|
|
"-Wno-ignored-qualifiers",
|
|
"-Wno-microsoft-extra-qualification",
|
|
"-Wno-missing-braces",
|
|
"-Wno-overloaded-virtual",
|
|
"-Wno-reorder",
|
|
"-Wno-writable-strings",
|
|
]
|
|
}
|
|
}
|
|
|
|
if (is_ios || is_mac) {
|
|
rtc_source_set("video_capture_internal_impl_objc") {
|
|
visibility = [ ":video_capture_internal_impl" ]
|
|
configs += [ ":video_capture_internal_impl_warnings_config" ]
|
|
|
|
deps = [
|
|
":video_capture_module",
|
|
"../../rtc_base:rtc_base_approved",
|
|
"../../system_wrappers",
|
|
]
|
|
|
|
sources = [
|
|
"objc/device_info.h",
|
|
"objc/device_info.mm",
|
|
"objc/device_info_objc.h",
|
|
"objc/device_info_objc.mm",
|
|
"objc/rtc_video_capture_objc.h",
|
|
"objc/rtc_video_capture_objc.mm",
|
|
"objc/video_capture.h",
|
|
"objc/video_capture.mm",
|
|
]
|
|
|
|
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
|
|
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
}
|
|
|
|
rtc_source_set("video_capture_internal_impl") {
|
|
configs += [ ":video_capture_internal_impl_warnings_config" ]
|
|
|
|
deps = [
|
|
":video_capture_module",
|
|
"../../rtc_base:checks",
|
|
"../../rtc_base:rtc_base_approved",
|
|
"../../system_wrappers",
|
|
]
|
|
|
|
if (is_linux) {
|
|
sources = [
|
|
"linux/device_info_linux.cc",
|
|
"linux/device_info_linux.h",
|
|
"linux/video_capture_linux.cc",
|
|
"linux/video_capture_linux.h",
|
|
]
|
|
deps += [
|
|
"../..:webrtc_common",
|
|
"../../media:rtc_media_base",
|
|
]
|
|
}
|
|
if (is_win) {
|
|
sources = [
|
|
"windows/device_info_ds.cc",
|
|
"windows/device_info_ds.h",
|
|
"windows/device_info_mf.cc",
|
|
"windows/device_info_mf.h",
|
|
"windows/help_functions_ds.cc",
|
|
"windows/help_functions_ds.h",
|
|
"windows/sink_filter_ds.cc",
|
|
"windows/sink_filter_ds.h",
|
|
"windows/video_capture_ds.cc",
|
|
"windows/video_capture_ds.h",
|
|
"windows/video_capture_factory_windows.cc",
|
|
"windows/video_capture_mf.cc",
|
|
"windows/video_capture_mf.h",
|
|
]
|
|
|
|
libs = [ "Strmiids.lib" ]
|
|
|
|
deps += [ "//third_party/winsdk_samples" ]
|
|
}
|
|
if (is_ios || is_mac) {
|
|
deps += [ ":video_capture_internal_impl_objc" ]
|
|
}
|
|
|
|
all_dependent_configs = [ ":video_capture_internal_impl_config" ]
|
|
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
|
|
if (!is_android && rtc_include_tests) {
|
|
rtc_test("video_capture_tests") {
|
|
sources = [
|
|
"test/video_capture_unittest.cc",
|
|
]
|
|
|
|
cflags = []
|
|
if (is_linux || is_mac) {
|
|
cflags += [ "-Wno-write-strings" ]
|
|
}
|
|
|
|
ldflags = []
|
|
if (is_linux || is_mac) {
|
|
ldflags += [
|
|
"-lpthread",
|
|
"-lm",
|
|
]
|
|
}
|
|
if (is_linux) {
|
|
ldflags += [
|
|
"-lrt",
|
|
"-lXext",
|
|
"-lX11",
|
|
]
|
|
}
|
|
|
|
deps = [
|
|
":video_capture_internal_impl",
|
|
":video_capture_module",
|
|
"../../api:video_frame_api",
|
|
"../../api:video_frame_api_i420",
|
|
"../../common_video:common_video",
|
|
"../../rtc_base:rtc_base_approved",
|
|
"../../system_wrappers:system_wrappers",
|
|
"../../system_wrappers:system_wrappers_default",
|
|
"../../test:video_test_common",
|
|
"../utility",
|
|
"//testing/gtest",
|
|
]
|
|
deps += [ "../../test:test_main" ]
|
|
|
|
if (!build_with_chromium && is_clang) {
|
|
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
|
|
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
}
|
|
}
|
|
}
|