mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
298 lines
9.1 KiB
Plaintext
298 lines
9.1 KiB
Plaintext
# Copyright 2016 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/features.gni")
|
|
import("//media/media_options.gni")
|
|
import("//testing/test.gni")
|
|
|
|
group("capture") {
|
|
public_deps = [
|
|
":capture_lib",
|
|
"//media/capture/mojo:capture_types",
|
|
"//services/service_manager/public/cpp",
|
|
]
|
|
}
|
|
|
|
# Things needed by //media/capture/mojo:capture_types.
|
|
component("capture_base") {
|
|
defines = [ "CAPTURE_IMPLEMENTATION" ]
|
|
sources = [
|
|
"capture_export.h",
|
|
"video/video_capture_device_descriptor.cc",
|
|
"video/video_capture_device_descriptor.h",
|
|
"video/video_capture_device_info.cc",
|
|
"video/video_capture_device_info.h",
|
|
"video_capture_types.cc",
|
|
"video_capture_types.h",
|
|
]
|
|
deps = [
|
|
"//base",
|
|
"//base:i18n",
|
|
"//media",
|
|
"//ui/gfx",
|
|
]
|
|
}
|
|
|
|
# Target which allows breakout of Android BUILD.gn files.
|
|
source_set("capture_device_specific") {
|
|
visibility = [
|
|
":capture_lib",
|
|
"//media/capture/content/android",
|
|
"//media/capture/video/android",
|
|
]
|
|
if (is_win) {
|
|
# TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations.
|
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
|
}
|
|
defines = [ "CAPTURE_IMPLEMENTATION" ]
|
|
sources = [
|
|
"content/animated_content_sampler.cc",
|
|
"content/animated_content_sampler.h",
|
|
"content/capture_resolution_chooser.cc",
|
|
"content/capture_resolution_chooser.h",
|
|
"content/screen_capture_device_core.cc",
|
|
"content/screen_capture_device_core.h",
|
|
"content/smooth_event_sampler.cc",
|
|
"content/smooth_event_sampler.h",
|
|
"content/thread_safe_capture_oracle.cc",
|
|
"content/thread_safe_capture_oracle.h",
|
|
"content/video_capture_oracle.cc",
|
|
"content/video_capture_oracle.h",
|
|
"video/fake_video_capture_device.cc",
|
|
"video/fake_video_capture_device.h",
|
|
"video/fake_video_capture_device_factory.cc",
|
|
"video/fake_video_capture_device_factory.h",
|
|
"video/file_video_capture_device.cc",
|
|
"video/file_video_capture_device.h",
|
|
"video/file_video_capture_device_factory.cc",
|
|
"video/file_video_capture_device_factory.h",
|
|
"video/video_capture_buffer_handle.h",
|
|
"video/video_capture_device.cc",
|
|
"video/video_capture_device.h",
|
|
"video/video_capture_device_factory.cc",
|
|
"video/video_capture_device_factory.h",
|
|
]
|
|
public_deps = [
|
|
":capture_base",
|
|
]
|
|
deps = [
|
|
"//base",
|
|
"//base:i18n",
|
|
"//gpu/command_buffer/client",
|
|
"//media",
|
|
"//media/capture/mojo:image_capture",
|
|
"//ui/gfx",
|
|
]
|
|
}
|
|
|
|
component("capture_lib") {
|
|
defines = [ "CAPTURE_IMPLEMENTATION" ]
|
|
sources = [
|
|
"video/linux/camera_config_chromeos.cc",
|
|
"video/linux/camera_config_chromeos.h",
|
|
"video/linux/v4l2_capture_delegate.cc",
|
|
"video/linux/v4l2_capture_delegate.h",
|
|
"video/linux/video_capture_device_chromeos.cc",
|
|
"video/linux/video_capture_device_chromeos.h",
|
|
"video/linux/video_capture_device_factory_linux.cc",
|
|
"video/linux/video_capture_device_factory_linux.h",
|
|
"video/linux/video_capture_device_linux.cc",
|
|
"video/linux/video_capture_device_linux.h",
|
|
"video/mac/video_capture_device_avfoundation_mac.h",
|
|
"video/mac/video_capture_device_avfoundation_mac.mm",
|
|
"video/mac/video_capture_device_decklink_mac.h",
|
|
"video/mac/video_capture_device_decklink_mac.mm",
|
|
"video/mac/video_capture_device_factory_mac.h",
|
|
"video/mac/video_capture_device_factory_mac.mm",
|
|
"video/mac/video_capture_device_mac.h",
|
|
"video/mac/video_capture_device_mac.mm",
|
|
"video/shared_memory_buffer_tracker.cc",
|
|
"video/shared_memory_buffer_tracker.h",
|
|
"video/shared_memory_handle_provider.cc",
|
|
"video/shared_memory_handle_provider.h",
|
|
"video/video_capture_buffer_pool.h",
|
|
"video/video_capture_buffer_pool_impl.cc",
|
|
"video/video_capture_buffer_pool_impl.h",
|
|
"video/video_capture_buffer_tracker.h",
|
|
"video/video_capture_buffer_tracker_factory.h",
|
|
"video/video_capture_buffer_tracker_factory_impl.cc",
|
|
"video/video_capture_buffer_tracker_factory_impl.h",
|
|
"video/video_capture_device_client.cc",
|
|
"video/video_capture_device_client.h",
|
|
"video/video_capture_jpeg_decoder.h",
|
|
"video/video_capture_system.h",
|
|
"video/video_capture_system_impl.cc",
|
|
"video/video_capture_system_impl.h",
|
|
"video/video_frame_receiver.h",
|
|
"video/video_frame_receiver_on_task_runner.cc",
|
|
"video/video_frame_receiver_on_task_runner.h",
|
|
"video/win/capability_list_win.cc",
|
|
"video/win/capability_list_win.h",
|
|
"video/win/filter_base_win.cc",
|
|
"video/win/filter_base_win.h",
|
|
"video/win/pin_base_win.cc",
|
|
"video/win/pin_base_win.h",
|
|
"video/win/sink_filter_observer_win.h",
|
|
"video/win/sink_filter_win.cc",
|
|
"video/win/sink_filter_win.h",
|
|
"video/win/sink_input_pin_win.cc",
|
|
"video/win/sink_input_pin_win.h",
|
|
"video/win/video_capture_device_factory_win.cc",
|
|
"video/win/video_capture_device_factory_win.h",
|
|
"video/win/video_capture_device_mf_win.cc",
|
|
"video/win/video_capture_device_mf_win.h",
|
|
"video/win/video_capture_device_win.cc",
|
|
"video/win/video_capture_device_win.h",
|
|
"video_capturer_source.cc",
|
|
"video_capturer_source.h",
|
|
]
|
|
|
|
public_deps = [
|
|
":capture_base",
|
|
":capture_device_specific",
|
|
]
|
|
|
|
deps = [
|
|
"//base",
|
|
"//base:i18n",
|
|
"//media",
|
|
"//media/capture/mojo:capture_types",
|
|
"//media/capture/mojo:image_capture",
|
|
"//media/mojo/interfaces:interfaces",
|
|
"//services/service_manager/public/cpp",
|
|
"//third_party/libyuv",
|
|
"//ui/display",
|
|
"//ui/gfx",
|
|
]
|
|
|
|
if (is_android) {
|
|
public_deps += [
|
|
"content/android",
|
|
"video/android",
|
|
]
|
|
deps += [
|
|
"content/android:screen_capture_jni_headers",
|
|
"video/android:capture_jni_headers",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
deps += [ "//third_party/decklink" ]
|
|
libs = [
|
|
"AVFoundation.framework",
|
|
"CoreFoundation.framework",
|
|
"CoreGraphics.framework",
|
|
"CoreMedia.framework",
|
|
"CoreVideo.framework",
|
|
"Foundation.framework",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
deps += [ "//media/base/win" ]
|
|
libs = [
|
|
"mf.lib",
|
|
"mfplat.lib",
|
|
"mfreadwrite.lib",
|
|
"mfuuid.lib",
|
|
]
|
|
ldflags = [
|
|
"/DELAYLOAD:mf.dll",
|
|
"/DELAYLOAD:mfplat.dll",
|
|
"/DELAYLOAD:mfreadwrite.dll",
|
|
]
|
|
|
|
# TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations.
|
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
|
}
|
|
|
|
if (is_linux || is_chromeos || is_win) {
|
|
sources += [
|
|
"video/blob_utils.cc",
|
|
"video/blob_utils.h",
|
|
]
|
|
}
|
|
|
|
if (is_chromeos) {
|
|
sources += [
|
|
"video/chromeos/camera_buffer_factory.cc",
|
|
"video/chromeos/camera_device_context.cc",
|
|
"video/chromeos/camera_device_delegate.cc",
|
|
"video/chromeos/camera_hal_delegate.cc",
|
|
"video/chromeos/camera_hal_dispatcher_impl.cc",
|
|
"video/chromeos/camera_metadata_utils.cc",
|
|
"video/chromeos/display_rotation_observer.cc",
|
|
"video/chromeos/pixel_format_utils.cc",
|
|
"video/chromeos/stream_buffer_manager.cc",
|
|
"video/chromeos/video_capture_device_arc_chromeos.cc",
|
|
"video/chromeos/video_capture_device_factory_chromeos.cc",
|
|
]
|
|
deps += [
|
|
"//media/capture/video/chromeos/mojo:arc_camera3",
|
|
"//mojo/edk/system",
|
|
"//third_party/libsync",
|
|
]
|
|
}
|
|
}
|
|
|
|
test("capture_unittests") {
|
|
sources = [
|
|
"content/animated_content_sampler_unittest.cc",
|
|
"content/capture_resolution_chooser_unittest.cc",
|
|
"content/smooth_event_sampler_unittest.cc",
|
|
"content/video_capture_oracle_unittest.cc",
|
|
"video/fake_video_capture_device_unittest.cc",
|
|
"video/linux/camera_config_chromeos_unittest.cc",
|
|
"video/linux/v4l2_capture_delegate_unittest.cc",
|
|
"video/mac/video_capture_device_factory_mac_unittest.mm",
|
|
"video/video_capture_device_client_unittest.cc",
|
|
"video/video_capture_device_unittest.cc",
|
|
"video_capture_types_unittest.cc",
|
|
]
|
|
|
|
deps = [
|
|
":capture",
|
|
"//base/test:run_all_unittests",
|
|
"//base/test:test_support",
|
|
"//media:test_support",
|
|
"//media/capture/mojo:image_capture",
|
|
"//mojo/edk/system",
|
|
"//testing/gmock",
|
|
"//testing/gtest",
|
|
"//ui/gfx:test_support",
|
|
]
|
|
|
|
if (is_android) {
|
|
deps += [
|
|
"//media/capture/video/android",
|
|
"//media/capture/video/android:capture_java",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
# TODO(jschuh): https://crbug.com/167187 fix size_t to int truncations.
|
|
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
|
|
}
|
|
|
|
if (is_chromeos) {
|
|
sources += [
|
|
"video/chromeos/camera_device_delegate_unittest.cc",
|
|
"video/chromeos/camera_hal_delegate_unittest.cc",
|
|
"video/chromeos/camera_hal_dispatcher_impl_unittest.cc",
|
|
"video/chromeos/local_gpu_memory_buffer_manager.cc",
|
|
"video/chromeos/mock_camera_module.cc",
|
|
"video/chromeos/mock_gpu_memory_buffer_manager.cc",
|
|
"video/chromeos/mock_video_capture_client.cc",
|
|
"video/chromeos/stream_buffer_manager_unittest.cc",
|
|
]
|
|
deps += [
|
|
"//media/capture/video/chromeos/mojo:arc_camera3",
|
|
"//mojo/edk/system",
|
|
"//third_party/libdrm",
|
|
"//third_party/libsync",
|
|
"//third_party/minigbm",
|
|
]
|
|
}
|
|
}
|