1# Copyright (c) 2023-2023 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("//foundation/multimedia/media_foundation/config.gni") 15group("plugin_codec_adapter") { 16 deps = [] 17 if (hst_is_lite_sys) { 18 print("std hdi codec adapter is not available on lite systems") 19 } else { 20 deps += [ ":histreamer_plugin_CodecAdapter" ] 21 } 22} 23 24config("plugin_codec_adapter_config") { 25 include_dirs = [ "//foundation/multimedia/media_foundation/engine/include/" ] 26} 27 28ohos_source_set("std_plugin_codec_adapter") { 29 subsystem_name = "multimedia" 30 part_name = "media_foundation" 31 sources = [ 32 "codec_buffer.cpp", 33 "codec_buffer_pool.cpp", 34 "codec_cmd_executor.cpp", 35 "codec_port.cpp", 36 "codec_utils.cpp", 37 "hdi_codec_adapter.cpp", 38 "hdi_codec_manager.cpp", 39 ] 40 public_deps = [ 41 "//foundation/multimedia/media_foundation/engine/foundation:histreamer_foundation", 42 "//foundation/multimedia/media_foundation/engine/plugin:histreamer_plugin_base", 43 ] 44 external_deps = [ "hdf_core:libpub_utils" ] 45 if (!hst_is_lite_sys) { 46 external_deps += [ 47 "graphic_surface:surface", 48 "hilog:libhilog", 49 "ipc:ipc_core", 50 ] 51 } 52 public_configs = [ 53 ":plugin_codec_adapter_config", 54 "//foundation/multimedia/media_foundation:histreamer_presets", 55 ] 56 public_external_deps = [ 57 "drivers_peripheral_codec:libcodec_hdi_omx_client", 58 "drivers_peripheral_display:hdi_gralloc_client", 59 "openmax:libopenmax_static", 60 ] 61} 62 63if (hst_is_lite_sys) { 64 print("std hdi codec adapter is not available on lite systems") 65} else { 66 import("//build/ohos.gni") 67 ohos_shared_library("histreamer_plugin_CodecAdapter") { 68 sanitize = { 69 cfi = true 70 cfi_cross_dso = true 71 debug = false 72 integer_overflow = true 73 } 74 deps = [ ":std_plugin_codec_adapter" ] 75 76 external_deps = [ 77 "drivers_peripheral_codec:libcodec_hdi_omx_client", 78 "hilog:libhilog", 79 ] 80 relative_install_dir = "media/histreamer_plugins" 81 subsystem_name = "multimedia" 82 part_name = "media_foundation" 83 } 84} 85