1# Copyright (c) 2021 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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") 16 17group("hdf_media_codec") { 18 deps = [ 19 "hal:codec_hdi_omx", 20 "hal/passthrough:codec_hdi_passthrough", 21 "hal/v1.0/buffer_manager:codec_buffer_manager", 22 ] 23 OMX_IL_PATH = rebase_path( 24 "//device/soc/${device_company}/${product_name}/hardware/omx_il") 25 cmd = "if [ -f ${OMX_IL_PATH}/BUILD.gn ]; then echo true; else echo false; fi" 26 HAVE_OMX_IL_PATH = 27 exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value") 28 29 if (HAVE_OMX_IL_PATH) { 30 deps += [ "${OMX_IL_PATH}:lib_omx" ] 31 } 32 CODEC_OEM_PATH = rebase_path( 33 "//device/soc/${device_company}/${product_name}/hardware/codec") 34 cmd = "if [ -f ${CODEC_OEM_PATH}/BUILD.gn ]; then echo true; else echo false; fi" 35 HAVE_CODEC_OEM_PATH = 36 exec_script("//build/lite/run_shell_cmd.py", [ cmd ], "value") 37 38 if (HAVE_CODEC_OEM_PATH) { 39 deps += [ "${CODEC_OEM_PATH}:codec_oem_interface" ] 40 } 41} 42