summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/modules/video_capture/BUILD.gn
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /third_party/libwebrtc/modules/video_capture/BUILD.gn
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/modules/video_capture/BUILD.gn')
-rw-r--r--third_party/libwebrtc/modules/video_capture/BUILD.gn188
1 files changed, 188 insertions, 0 deletions
diff --git a/third_party/libwebrtc/modules/video_capture/BUILD.gn b/third_party/libwebrtc/modules/video_capture/BUILD.gn
new file mode 100644
index 0000000000..45a0272eee
--- /dev/null
+++ b/third_party/libwebrtc/modules/video_capture/BUILD.gn
@@ -0,0 +1,188 @@
+# 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_library("video_capture_module") {
+ visibility = [ "*" ]
+ sources = [
+ "device_info_impl.cc",
+ "device_info_impl.h",
+ "raw_video_sink_interface.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 = [
+ "../../api:scoped_refptr",
+ "../../api:sequence_checker",
+ "../../api/video:video_frame",
+ "../../api/video:video_rtp_headers",
+ "../../common_video",
+ "../../media:rtc_media_base",
+ "../../rtc_base:event_tracer",
+ "../../rtc_base:logging",
+ "../../rtc_base:macromagic",
+ "../../rtc_base:race_checker",
+ "../../rtc_base:refcount",
+ "../../rtc_base:stringutils",
+ "../../rtc_base:timeutils",
+ "../../rtc_base/synchronization:mutex",
+ "../../rtc_base/system:rtc_export",
+ "../../system_wrappers",
+ "//third_party/libyuv",
+ ]
+ absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
+}
+
+if (!build_with_chromium || is_linux || is_chromeos) {
+ rtc_source_set("video_capture_internal_impl") {
+ visibility = [ "*" ]
+ deps = [
+ ":video_capture_module",
+ "../../api:scoped_refptr",
+ "../../api:sequence_checker",
+ "../../rtc_base:checks",
+ "../../rtc_base:logging",
+ "../../rtc_base:macromagic",
+ "../../rtc_base:platform_thread",
+ "../../rtc_base:refcount",
+ "../../rtc_base:stringutils",
+ "../../rtc_base/synchronization:mutex",
+ "../../rtc_base/system:rtc_export",
+ "../../system_wrappers",
+ ]
+ sources = [
+ "video_capture_options.cc",
+ "video_capture_options.h",
+ ]
+
+ if (is_linux || is_bsd || is_chromeos) {
+ sources += [
+ "linux/device_info_linux.cc",
+ "linux/device_info_v4l2.cc",
+ "linux/device_info_v4l2.h",
+ "linux/video_capture_linux.cc",
+ "linux/video_capture_v4l2.cc",
+ "linux/video_capture_v4l2.h",
+ ]
+ deps += [ "../../media:rtc_media_base" ]
+
+ if (rtc_use_pipewire) {
+ sources += [
+ "linux/camera_portal.cc",
+ "linux/camera_portal.h",
+ "linux/device_info_pipewire.cc",
+ "linux/device_info_pipewire.h",
+ "linux/pipewire_session.cc",
+ "linux/pipewire_session.h",
+ "linux/video_capture_pipewire.cc",
+ "linux/video_capture_pipewire.h",
+ ]
+
+ configs += [ "../portal:pipewire_base" ]
+
+ public_configs = [ "../portal:pipewire_config" ]
+
+ deps += [
+ "../../api:refcountedbase",
+ "../../common_video",
+ "../../media:rtc_media_base",
+ "../portal",
+ ]
+ if (build_with_mozilla) {
+ configs -= [ "../portal:pipewire_base" ]
+ public_deps = [ "//third_party/pipewire" ]
+ }
+ }
+ }
+ if (is_win) {
+ sources += [
+ "windows/device_info_ds.cc",
+ "windows/device_info_ds.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",
+ ]
+
+ libs = [
+ "ole32.lib",
+ "oleaut32.lib",
+ "strmiids.lib",
+ "user32.lib",
+ ]
+ }
+ if (is_fuchsia) {
+ sources += [ "video_capture_factory_null.cc" ]
+ }
+
+ if (!build_with_mozilla && is_android) {
+ include_dirs = [
+ "/config/external/nspr",
+ "/nsprpub/lib/ds",
+ "/nsprpub/pr/include",
+ ]
+
+ sources += [
+ "android/device_info_android.cc",
+ "android/video_capture_android.cc",
+ ]
+ }
+ }
+
+ if (!is_android && rtc_include_tests) {
+ rtc_test("video_capture_tests") {
+ sources = [ "test/video_capture_unittest.cc" ]
+ ldflags = []
+ if (is_linux || is_chromeos || is_mac) {
+ ldflags += [
+ "-lpthread",
+ "-lm",
+ ]
+ }
+ if (is_linux || is_chromeos) {
+ ldflags += [
+ "-lrt",
+ "-lXext",
+ "-lX11",
+ ]
+ }
+
+ deps = [
+ ":video_capture_internal_impl",
+ ":video_capture_module",
+ "../../api:scoped_refptr",
+ "../../api/video:video_frame",
+ "../../api/video:video_rtp_headers",
+ "../../common_video",
+ "../../rtc_base:timeutils",
+ "../../rtc_base/synchronization:mutex",
+ "../../system_wrappers",
+ "../../test:frame_utils",
+ "../../test:test_main",
+ "../../test:test_support",
+ "../../test:video_test_common",
+ "//testing/gtest",
+ "//third_party/abseil-cpp/absl/memory",
+ ]
+ }
+ }
+}