# Copyright (c) 2024 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//foundation/multimedia/media_foundation/config.gni") import("$histreamer_root_dir/video_processing_engine/config.gni") if (hst_is_standard_sys) { config("vpe_capi_config") { cflags = [ "-fno-exceptions", "-Wall", "-fno-common", "-fstack-protector-all", "-Wshadow", "-FPIC", "-FS", "-O2", "-D_FORTIFY_SOURCE=2", "-Wformat=2", "-Wdate-time", ] cflags_cc = [ "-std=c++17", "-fno-rtti", ] } config("vpe_capi_public_config") { include_dirs = [ "$vpe_interface_capi_dir", "$vpe_interface_inner_dir", ] } ohos_shared_library("image_processing") { stack_protector_ret = true install_enable = true sanitize = { boundary_sanitize = true cfi = true cfi_cross_dso = true integer_overflow = true ubsan = true debug = false } configs = [ ":vpe_capi_config" ] public_configs = [ ":vpe_capi_public_config" ] include_dirs = [ "$vpe_interface_capi_dir", "$vpe_interface_inner_dir", "$vpe_dfx_dir/include", "$vpe_capi_image_dir/include", "$vpe_capi_image_dir/detail_enhancer/include", "$vpe_algorithm_dir/include", "$vpe_algorithm_dir/detail_enhancer/include", ] sources = [ "$vpe_algorithm_dir/detail_enhancer/detail_enhancer.cpp", "$vpe_capi_image_dir/detail_enhancer/detail_enhancer_image_native.cpp", "$vpe_capi_image_dir/image_processing.cpp", "$vpe_capi_image_dir/image_processing_capability.cpp", "$vpe_capi_image_dir/image_processing_impl.cpp", "$vpe_capi_image_dir/image_processing_loader.cpp", "$vpe_capi_image_dir/image_processing_native.cpp", ] defines = [] deps = [ "$vpe_base_root_dir/src:media_foundation" ] external_deps = [ "c_utils:utils", "graphic_2d:2d_graphics", "hilog:libhilog", "hitrace:hitrace_meter", "image_framework:image_native", "image_framework:pixelmap", "ipc:ipc_single", ] if (has_skia) { defines += [ "SKIA_ENABLE" ] external_deps += [ "skia:skia_canvaskit" ] include_dirs += [ "$vpe_algorithm_dir/detail_enhancer/skia/include" ] sources += [ "$vpe_algorithm_dir/detail_enhancer/skia/skia_impl.cpp" ] } innerapi_tags = [ "ndk" ] output_extension = "so" subsystem_name = "multimedia" part_name = "media_foundation" } ohos_shared_library("video_processing") { stack_protector_ret = true install_enable = true sanitize = { boundary_sanitize = true cfi = true cfi_cross_dso = true integer_overflow = true ubsan = true debug = false } configs = [ ":vpe_capi_config" ] public_configs = [ ":vpe_capi_public_config" ] include_dirs = [ "$vpe_interface_capi_dir", "$vpe_interface_inner_dir", "$vpe_dfx_dir/include", "$vpe_capi_video_dir/include", "$vpe_capi_video_dir/detail_enhancer/include", "$vpe_algorithm_dir/include", "$vpe_algorithm_dir/detail_enhancer/include", ] sources = [ "$vpe_algorithm_dir/detail_enhancer/detail_enhancer.cpp", "$vpe_capi_video_dir/detail_enhancer/detail_enhancer_video_native.cpp", "$vpe_capi_video_dir/video_processing.cpp", "$vpe_capi_video_dir/video_processing_callback_impl.cpp", "$vpe_capi_video_dir/video_processing_callback_native.cpp", "$vpe_capi_video_dir/video_processing_capability.cpp", "$vpe_capi_video_dir/video_processing_impl.cpp", "$vpe_capi_video_dir/video_processing_loader.cpp", "$vpe_capi_video_dir/video_processing_native.cpp", ] defines = [] deps = [ "$vpe_base_root_dir/src:media_foundation" ] external_deps = [ "c_utils:utils", "graphic_surface:surface", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", ] if (has_skia) { defines += [ "SKIA_ENABLE" ] external_deps += [ "skia:skia_canvaskit" ] include_dirs += [ "$vpe_algorithm_dir/detail_enhancer/skia/include" ] sources += [ "$vpe_algorithm_dir/detail_enhancer/skia/skia_impl.cpp" ] } innerapi_tags = [ "ndk" ] output_extension = "so" subsystem_name = "multimedia" part_name = "media_foundation" } } else { group("image_processing") { } group("video_processing") { } }