1# Copyright (c) 2022 Shenzhen Kaihong DID 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/ohos.gni") 15import("//build/test.gni") 16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 17 18declare_args() { 19 drivers_peripheral_codec_support_omx = false 20} 21 22ohos_unittest("codec_hdi_omx_test") { 23 module_out_path = "drivers_peripheral_codec/codec" 24 include_dirs = [ 25 "//drivers/hdf_core/adapter/uhdf2/include/hdi", 26 "//drivers/peripheral/codec/interfaces/include", 27 "//drivers/peripheral/codec/hal/include", 28 "//third_party/openmax/api/1.1.2", 29 "//drivers/peripheral/display/hdi_service/gralloc/include", 30 ] 31 sources = [ 32 "codec_hdi_manger_test.cpp", 33 "codec_hdi_omx_test.cpp", 34 ] 35 deps = [ 36 "//drivers/peripheral/codec/hal:libcodec_hdi_omx_client", 37 "//third_party/googletest:gtest_main", 38 ] 39 40 if (is_standard_system) { 41 external_deps = [ 42 "c_utils:utils", 43 "drivers_peripheral_display:hdi_gralloc_client", 44 "graphic_chipsetsdk:buffer_handle", 45 "hdf_core:libhdf_host", 46 "hdf_core:libhdf_ipc_adapter", 47 "hdf_core:libhdf_utils", 48 "hdf_core:libhdi", 49 "hiviewdfx_hilog_native:libhilog", 50 ] 51 } else { 52 external_deps = [ "hilog:libhilog" ] 53 } 54 defines = [] 55 if (drivers_peripheral_codec_support_omx) { 56 defines += [ "SUPPORT_OMX" ] 57 } 58} 59 60group("codec_hdi_2.0_test") { 61 testonly = true 62 deps = [ ":codec_hdi_omx_test" ] 63} 64