1f6603c60Sopenharmony_ci# Copyright (c) 2023 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/ActsHdrcodecTest"
19f6603c60Sopenharmony_ci
20f6603c60Sopenharmony_cihdrcodec_moduletest_native_include_dirs = [
21f6603c60Sopenharmony_ci  "./include",
22f6603c60Sopenharmony_ci  "$MEDIA_ROOT_DIR/../../graphic/graphic_2d/interfaces/inner_api",
23f6603c60Sopenharmony_ci  "$MEDIA_ROOT_DIR/interfaces/inner_api/native",
24f6603c60Sopenharmony_ci  "$MEDIA_ROOT_DIR/interfaces/kits/c",
25f6603c60Sopenharmony_ci  "$MEDIA_ROOT_DIR/../../../third_party/openssl/ohos_lite/include",
26f6603c60Sopenharmony_ci]
27f6603c60Sopenharmony_ci
28f6603c60Sopenharmony_cihdrcodec_moduletest_cflags = [
29f6603c60Sopenharmony_ci  "-std=c++17",
30f6603c60Sopenharmony_ci  "-fno-rtti",
31f6603c60Sopenharmony_ci  "-fno-exceptions",
32f6603c60Sopenharmony_ci  "-Wall",
33f6603c60Sopenharmony_ci  "-fno-common",
34f6603c60Sopenharmony_ci  "-fstack-protector-strong",
35f6603c60Sopenharmony_ci  "-Wshadow",
36f6603c60Sopenharmony_ci  "-FPIC",
37f6603c60Sopenharmony_ci  "-FS",
38f6603c60Sopenharmony_ci  "-O2",
39f6603c60Sopenharmony_ci  "-D_FORTIFY_SOURCE=2",
40f6603c60Sopenharmony_ci  "-fvisibility=hidden",
41f6603c60Sopenharmony_ci  "-Wformat=2",
42f6603c60Sopenharmony_ci  "-Wdate-time",
43f6603c60Sopenharmony_ci  "-Werror",
44f6603c60Sopenharmony_ci  "-Wextra",
45f6603c60Sopenharmony_ci  "-Wimplicit-fallthrough",
46f6603c60Sopenharmony_ci  "-Wsign-compare",
47f6603c60Sopenharmony_ci  "-Wunused-parameter",
48f6603c60Sopenharmony_ci]
49f6603c60Sopenharmony_ci
50f6603c60Sopenharmony_ci##################################################################################################################
51f6603c60Sopenharmony_ciohos_moduletest_suite("ActsHdrcodecTest") {
52f6603c60Sopenharmony_ci  sanitize = av_codec_test_sanitize
53f6603c60Sopenharmony_ci  module_out_path = module_output_path
54f6603c60Sopenharmony_ci  include_dirs = hdrcodec_moduletest_native_include_dirs
55f6603c60Sopenharmony_ci  include_dirs += [ "./" ]
56f6603c60Sopenharmony_ci
57f6603c60Sopenharmony_ci  cflags = hdrcodec_moduletest_cflags
58f6603c60Sopenharmony_ci
59f6603c60Sopenharmony_ci  if (av_codec_support_codec) {
60f6603c60Sopenharmony_ci    sources = [
61f6603c60Sopenharmony_ci      "./src/func_test.cpp",
62f6603c60Sopenharmony_ci      "./src/hdrcodec_ndk_sample.cpp",
63f6603c60Sopenharmony_ci    ]
64f6603c60Sopenharmony_ci  }
65f6603c60Sopenharmony_ci
66f6603c60Sopenharmony_ci  deps = [
67f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/inner_api/native:av_codec_client",
68f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_codecbase",
69f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_vdec",
70f6603c60Sopenharmony_ci    "$MEDIA_ROOT_DIR/interfaces/kits/c:native_media_venc",
71f6603c60Sopenharmony_ci  ]
72f6603c60Sopenharmony_ci  external_deps = [
73f6603c60Sopenharmony_ci    "c_utils:utils",
74f6603c60Sopenharmony_ci    "graphic_2d:libgraphic_utils",
75f6603c60Sopenharmony_ci    "graphic_2d:librender_service_client",
76f6603c60Sopenharmony_ci    "graphic_surface:surface",
77f6603c60Sopenharmony_ci    "graphic_surface:sync_fence",
78f6603c60Sopenharmony_ci    "hilog:libhilog",
79f6603c60Sopenharmony_ci    "ipc:ipc_core",
80f6603c60Sopenharmony_ci    "media_foundation:media_foundation",
81f6603c60Sopenharmony_ci    "media_foundation:native_media_core",
82f6603c60Sopenharmony_ci    "window_manager:libwm",
83f6603c60Sopenharmony_ci  ]
84f6603c60Sopenharmony_ci  part_name = "av_codec"
85f6603c60Sopenharmony_ci  subsystem_name = "multimedia"
86f6603c60Sopenharmony_ci}
87