1# Copyright (C) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//foundation/multimedia/media_foundation/config.gni") 15import("//foundation/multimedia/video_processing_engine/config.gni") 16import("//test/xts/tools/build/suite.gni") 17 18module_output_path = "acts/ActsDetailEnhancerVideoNdkUnitTest" 19 20################################################################################################################# 21detail_enhancer_video_ndk_unit_test_cflags = [ 22 "-std=c++17", 23 "-fno-rtti", 24 "-fexceptions", 25 "-Wall", 26 "-fno-common", 27 "-fstack-protector-strong", 28 "-Wshadow", 29 "-FPIC", 30 "-FS", 31 "-O2", 32 "-D_FORTIFY_SOURCE=2", 33 "-fvisibility=hidden", 34 "-Wformat=2", 35 "-Wdate-time", 36 "-Wextra", 37 "-Wimplicit-fallthrough", 38 "-Wsign-compare", 39 "-Dprivate=public", 40 "-Dprotected=public", 41] 42 43ohos_moduletest_suite("ActsDetailEnhancerVideoNdkUnitTest") { 44 module_out_path = module_output_path 45 46 sanitize = { 47 cfi = true 48 cfi_cross_dso = true 49 debug = false 50 } 51 52 include_dirs = [ 53 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/interfaces/kits/c", 54 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/interfaces/inner_api", 55 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework/dfx/include", 56 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework/capi/video_processing/include", 57 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework/capi/video_processing/detail_enhancer/include", 58 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework/algorithm/detail_enhancer/include", 59 "./include", 60 ] 61 62 sources = [ 63 "./src/detail_enhancer_video_ndk_unit_test.cpp", 64 "./src/video_sample.cpp", 65 ] 66 67 cflags = detail_enhancer_video_ndk_unit_test_cflags 68 69 defines = [] 70 71 deps = [ 72 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework:video_processing", 73 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework:videoprocessingengine", 74 "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/interfaces/kits/c/video_processing:libvideo_processing_ndk", 75 "$histreamer_root_dir/interface/kits/ndk/core:libnative_media_core", 76 "$histreamer_root_dir/src:media_foundation", 77 ] 78 79 external_deps = [ 80 "c_utils:utils", 81 "drivers_interface_display:libdisplay_buffer_proxy_1.0", 82 "drivers_interface_display:libdisplay_commontype_proxy_1.0", 83 "graphic_2d:libgraphic_utils", 84 "graphic_2d:librender_service_client", 85 "graphic_surface:surface", 86 "hilog:libhilog", 87 "hitrace:hitrace_meter", 88 "media_foundation:native_media_core", 89 ] 90 91 if (has_skia) { 92 defines += [ "SKIA_ENABLE" ] 93 include_dirs += [ "$VIDEO_PROCESSING_ENGINE_ROOT_DIR/framework/algorithm/extensions/skia/include" ] 94 } 95 96 part_name = "video_processing_engine" 97 subsystem_name = "multimedia" 98} 99