# Copyright (C) 2023 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("//build/ohos.gni") import("//foundation/multimedia/media_foundation/config.gni") if (hst_is_standard_sys) { group("capi_packages") { deps = [ ":native_media_core" ] } config("media_foundation_capi_public_config") { include_dirs = [ "./", "./common", "$histreamer_root_dir/interface/inner_api", ] defines = [ "HST_ANY_WITH_NO_RTTI", "MEDIA_OHOS", ] } config("media_foundation_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", ] } ohos_shared_library("native_media_core") { stack_protector_ret = true install_enable = true sanitize = { ubsan = true boundary_sanitize = true cfi = true cfi_cross_dso = true debug = false integer_overflow = true } configs = [ ":media_foundation_capi_config" ] public_configs = [ ":media_foundation_capi_public_config" ] deps = [ "$histreamer_root_dir/src:media_foundation" ] sources = [ "./native_avbuffer.cpp", "./native_avformat.cpp", "./native_avmemory.cpp", ] external_deps = [ "c_utils:utils", "graphic_surface:surface", "graphic_surface:sync_fence", "hilog:libhilog", "ipc:ipc_core", ] output_extension = "so" subsystem_name = "multimedia" part_name = "media_foundation" } } else { group("capi_packages") { } group("native_media_core") { } }