1f6603c60Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2f6603c60Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3f6603c60Sopenharmony_ci# you may not use this file except in compliance with the License. 4f6603c60Sopenharmony_ci# You may obtain a copy of the License at 5f6603c60Sopenharmony_ci# 6f6603c60Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7f6603c60Sopenharmony_ci# 8f6603c60Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9f6603c60Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10f6603c60Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11f6603c60Sopenharmony_ci# See the License for the specific language governing permissions and 12f6603c60Sopenharmony_ci# limitations under the License. 13f6603c60Sopenharmony_ci 14f6603c60Sopenharmony_ciimport("//foundation/multimedia/av_codec/config.gni") 15f6603c60Sopenharmony_ciimport("//test/xts/tools/build/suite.gni") 16f6603c60Sopenharmony_ci 17f6603c60Sopenharmony_ciMEDIA_ROOT_DIR = "//foundation/multimedia/av_codec/" 18f6603c60Sopenharmony_cimodule_output_path = "acts/ActsDemuxerTest" 19f6603c60Sopenharmony_ci 20f6603c60Sopenharmony_cidemuxer_moduletest_native_include_dirs = [ 21f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 22f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c", 23f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/services/services/factory", 24f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/services/utils", 25f6603c60Sopenharmony_ci] 26f6603c60Sopenharmony_ci 27f6603c60Sopenharmony_cidemuxer_moduletest_cflags = [ 28f6603c60Sopenharmony_ci "-std=c++17", 29f6603c60Sopenharmony_ci "-fno-rtti", 30f6603c60Sopenharmony_ci "-fno-exceptions", 31f6603c60Sopenharmony_ci "-Wall", 32f6603c60Sopenharmony_ci "-fno-common", 33f6603c60Sopenharmony_ci "-fstack-protector-strong", 34f6603c60Sopenharmony_ci "-Wshadow", 35f6603c60Sopenharmony_ci "-FPIC", 36f6603c60Sopenharmony_ci "-FS", 37f6603c60Sopenharmony_ci "-O2", 38f6603c60Sopenharmony_ci "-D_FORTIFY_SOURCE=2", 39f6603c60Sopenharmony_ci "-fvisibility=hidden", 40f6603c60Sopenharmony_ci "-Wformat=2", 41f6603c60Sopenharmony_ci "-Wdate-time", 42f6603c60Sopenharmony_ci "-Werror", 43f6603c60Sopenharmony_ci "-Wextra", 44f6603c60Sopenharmony_ci "-Wimplicit-fallthrough", 45f6603c60Sopenharmony_ci "-Wsign-compare", 46f6603c60Sopenharmony_ci "-Wunused-parameter", 47f6603c60Sopenharmony_ci] 48f6603c60Sopenharmony_ci 49f6603c60Sopenharmony_ci################################################################################################################## 50f6603c60Sopenharmony_ciohos_moduletest_suite("ActsDemuxerTest") { 51f6603c60Sopenharmony_ci sanitize = av_codec_test_sanitize 52f6603c60Sopenharmony_ci module_out_path = module_output_path 53f6603c60Sopenharmony_ci include_dirs = demuxer_moduletest_native_include_dirs 54f6603c60Sopenharmony_ci include_dirs += [ "./" ] 55f6603c60Sopenharmony_ci 56f6603c60Sopenharmony_ci cflags = demuxer_moduletest_cflags 57f6603c60Sopenharmony_ci 58f6603c60Sopenharmony_ci if (av_codec_support_codec) { 59f6603c60Sopenharmony_ci sources = [ 60f6603c60Sopenharmony_ci "./src/api_test.cpp", 61f6603c60Sopenharmony_ci "./src/func_test.cpp", 62f6603c60Sopenharmony_ci "./src/proc_test.cpp", 63f6603c60Sopenharmony_ci ] 64f6603c60Sopenharmony_ci } 65f6603c60Sopenharmony_ci 66f6603c60Sopenharmony_ci external_deps = [ 67f6603c60Sopenharmony_ci "c_utils:utils", 68f6603c60Sopenharmony_ci "graphic_2d:librender_service_client", 69f6603c60Sopenharmony_ci "graphic_surface:surface", 70f6603c60Sopenharmony_ci "media_foundation:media_foundation", 71f6603c60Sopenharmony_ci "media_foundation:native_media_core", 72f6603c60Sopenharmony_ci "window_manager:libwm", 73f6603c60Sopenharmony_ci ] 74f6603c60Sopenharmony_ci 75f6603c60Sopenharmony_ci public_deps = 76f6603c60Sopenharmony_ci [ "$av_codec_root_dir/test/unittest/common:av_codec_inner_unit_test" ] 77f6603c60Sopenharmony_ci 78f6603c60Sopenharmony_ci if (target_cpu == "arm64") { 79f6603c60Sopenharmony_ci av_codec_path = "\"/system/lib64\"" 80f6603c60Sopenharmony_ci } else { 81f6603c60Sopenharmony_ci av_codec_path = "\"/system/lib\"" 82f6603c60Sopenharmony_ci } 83f6603c60Sopenharmony_ci defines = [ "AV_CODEC_PATH=${av_codec_path}" ] 84f6603c60Sopenharmony_ci 85f6603c60Sopenharmony_ci deps = [ 86f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avdemuxer", 87f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_avsource", 88f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase", 89f6603c60Sopenharmony_ci "$MEDIA_ROOT_DIR/services/services:av_codec_service", 90f6603c60Sopenharmony_ci ] 91f6603c60Sopenharmony_ci 92f6603c60Sopenharmony_ci part_name = "av_codec" 93f6603c60Sopenharmony_ci subsystem_name = "multimedia" 94f6603c60Sopenharmony_ci} 95