1# Copyright (c) 2025 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("//build/test.gni") 15import("//foundation/multimedia/media_foundation/config.gni") 16 17module_output_path = "media_foundation/media_foundation/unittest" 18 19avmemory_unittest_cflags = [ 20 "-std=c++17", 21 "-fno-rtti", 22 "-fexceptions", 23 "-Wall", 24 "-fno-common", 25 "-fstack-protector-strong", 26 "-Wshadow", 27 "-FPIC", 28 "-FS", 29 "-O2", 30 "-D_FORTIFY_SOURCE=2", 31 "-fvisibility=hidden", 32 "-Wformat=2", 33 "-Wdate-time", 34 "-Wimplicit-fallthrough", 35 "-Wsign-compare", 36 "-Dprivate=public", 37 "-Dprotected=public", 38] 39 40#################################################################################################################videodec 41ohos_unittest("avmemory_unittest") { 42 module_out_path = module_output_path 43 include_dirs = [ 44 "./", 45 "../../../interface/inner_api", 46 "$histreamer_root_dir/interface/kits/c", 47 ] 48 49 defines = [ 50 "HST_ANY_WITH_NO_RTTI", 51 "MEDIA_OHOS", 52 ] 53 54 sources = [ 55 "../../../src/buffer/avbuffer/avmemory.cpp", 56 "./avmemory_unittest.cpp", 57 "./mock/parcel.cpp", 58 ] 59 60 cflags = avmemory_unittest_cflags 61 62 public_deps = [ "../common:media_foundation_inner_unit_test" ] 63 64 external_deps = [ 65 "c_utils:utils", 66 "googletest:gmock", 67 "googletest:gtest", 68 "graphic_surface:surface", 69 "graphic_surface:sync_fence", 70 "hilog:libhilog", 71 "ipc:ipc_core", 72 "memory_utils:libdmabufheap", 73 ] 74}