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("//build/test.gni") 15import("//foundation/multimedia/av_codec/config.gni") 16 17MEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 18THIRD_ROOT_DIR = "//third_party/" 19module_output_path = "av_codec/moduletest" 20 21ohos_unittest("capability_module_test") { 22 module_out_path = module_output_path 23 sources = [ 24 "./src/InnerAPI/cap_test.cpp", 25 "./src/cap_test.cpp", 26 ] 27 28 include_dirs = [ 29 "Avbuffer/include", 30 "Common/include", 31 "$MEDIA_ROOT_DIR/test/moduletest/vcodec/encoder/include", 32 "$MEDIA_ROOT_DIR/test/nativedemo/avmuxer", 33 "$MEDIA_ROOT_DIR/interfaces/kits/c", 34 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 35 "$MEDIA_ROOT_DIR/services/services/factory", 36 "$MEDIA_ROOT_DIR/services/engine/plugin/common", 37 "$MEDIA_ROOT_DIR/services/engine/plugin/core", 38 "$MEDIA_ROOT_DIR/services/engine/plugin/interface", 39 "$THIRD_ROOT_DIR/ffmpeg", 40 "$MEDIA_ROOT_DIR/frameworks/native/capi/common", 41 "$MEDIA_ROOT_DIR/services/dfx/include", 42 "$MEDIA_ROOT_DIR/services/engine/base/include", 43 "$MEDIA_ROOT_DIR/services/engine/codec/include/video", 44 "$MEDIA_ROOT_DIR/services/engine/common/include", 45 "$MEDIA_ROOT_DIR/services/engine/source/hst_releated", 46 "$MEDIA_ROOT_DIR/services/services/factory", 47 "$MEDIA_ROOT_DIR/services/utils/include", 48 "$MEDIA_ROOT_DIR/test/nativedemo/include", 49 "$MEDIA_ROOT_DIR/../../../third_party/openssl/ohos_lite/include", 50 "$MEDIA_ROOT_DIR/../../graphic/graphic_2d/interfaces/inner_api", 51 ] 52 53 cflags = [ 54 "-std=c++17", 55 "-fno-rtti", 56 "-fno-exceptions", 57 "-Wall", 58 "-fno-common", 59 "-fstack-protector-strong", 60 "-Wshadow", 61 "-FPIC", 62 "-FS", 63 "-O2", 64 "-D_FORTIFY_SOURCE=2", 65 "-fvisibility=hidden", 66 "-Wformat=2", 67 "-Wdate-time", 68 "-Werror", 69 "-Wextra", 70 "-Wimplicit-fallthrough", 71 "-Wsign-compare", 72 "-Wunused-parameter", 73 ] 74 75 deps = [ 76 "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client", 77 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase", 78 "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_venc", 79 ] 80 81 external_deps = [ 82 "c_utils:utils", 83 "graphic_2d:libgraphic_utils", 84 "graphic_2d:librender_service_client", 85 "graphic_surface:surface", 86 "hilog:libhilog", 87 "ipc:ipc_core", 88 "media_foundation:media_foundation", 89 "media_foundation:native_media_core", 90 "window_manager:libwm", 91 ] 92 93 resource_config_file = 94 "$MEDIA_ROOT_DIR/test/moduletest/resources/ohos_test.xml" 95} 96