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