| # Copyright 2020 The Fuchsia 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/cipd.gni") |
| import("//build/components.gni") |
| import("//src/camera/drivers/controller/camera_controller_driver.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":sherlock_configs_unittest" ] |
| } |
| |
| group("sherlock") { |
| public_deps = [ ":sherlock-camera-controller" ] |
| } |
| |
| source_set("config") { |
| sources = [ |
| "common_util.cc", |
| "common_util.h", |
| "isp_debug_config.cc", |
| "isp_debug_config.h", |
| "monitoring_config.cc", |
| "monitoring_config.h", |
| "sherlock_product_config.cc", |
| "sherlock_product_config.h", |
| "video_conferencing_config.cc", |
| "video_conferencing_config.h", |
| ] |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.ge2d:fuchsia.hardware.ge2d_banjo_cpp", |
| "//sdk/banjo/fuchsia.hardware.sysmem:fuchsia.hardware.sysmem_banjo_cpp", |
| "//sdk/fidl/fuchsia.camera2", |
| "//sdk/fidl/fuchsia.camera2.hal", |
| "//src/camera/drivers/controller/configs", |
| "//src/camera/lib/stream_utils:stream_configs", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| camera_controller_driver("sherlock-camera-controller") { |
| deps = [ ":config" ] |
| |
| # The following config files are currently gated behind internal |
| # access to the CIPD repository. |
| if (internal_access) { |
| gdc_config_files = [ |
| "config_001_2176x2720-to-640x512-RS-YUV420SemiPlanar.bin", |
| "config_001_2240x1792-to-640x512-S-YUV420SemiPlanar.bin", |
| "config_002_1152x1440-to-1440x1152-DKCR-YUV420SemiPlanar.bin", |
| "config_002_2176x2720-to-2240x1792-DKCR-YUV420SemiPlanar.bin", |
| "config_003_2176x2720-to-2240x1792-DKCR-YUV420SemiPlanar.bin", |
| "config_1152x1440_to_1152x864_Crop_Rotate.bin", |
| "config_1152x1440_to_512x384_Crop_Rotate.bin", |
| "config_1152x1440_to_720x540_Crop_Rotate.bin", |
| ] |
| watermark_files = [ |
| "watermark-360p.rgba", |
| "watermark-480p.rgba", |
| "watermark-720p.rgba", |
| ] |
| } |
| } |
| |
| executable("sherlock_configs_unittest_bin") { |
| testonly = true |
| sources = [ "configs_unittest.cc" ] |
| deps = [ |
| "//src/camera/drivers/controller/sherlock:config", |
| "//src/camera/drivers/controller/test:constants", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| ] |
| |
| # Increase the default stack size from 256 KB because creating the configs can take up a very |
| # large amount of stack and would otherwise cause crashes on ASAN builds. |
| ldflags = [ "-Wl,-z,stack-size=0x100000" ] |
| } |
| |
| fuchsia_unittest_package("sherlock_configs_unittest") { |
| manifest = "meta/sherlock_configs_unittest.cml" |
| deps = [ ":sherlock_configs_unittest_bin" ] |
| test_specs = { |
| # This is not necessary |
| environments = [ sherlock_env ] |
| } |
| } |