1ba487d97Sopenharmony_ci# Copyright (c) 2020 Huawei Device Co., Ltd. 2ba487d97Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3ba487d97Sopenharmony_ci# you may not use this file except in compliance with the License. 4ba487d97Sopenharmony_ci# You may obtain a copy of the License at 5ba487d97Sopenharmony_ci# 6ba487d97Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7ba487d97Sopenharmony_ci# 8ba487d97Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9ba487d97Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10ba487d97Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11ba487d97Sopenharmony_ci# See the License for the specific language governing permissions and 12ba487d97Sopenharmony_ci# limitations under the License. 13ba487d97Sopenharmony_ci 14ba487d97Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 15ba487d97Sopenharmony_ci 16ba487d97Sopenharmony_cilite_library("media_common") { 17ba487d97Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 18ba487d97Sopenharmony_ci target_type = "static_library" 19ba487d97Sopenharmony_ci } else { 20ba487d97Sopenharmony_ci target_type = "shared_library" 21ba487d97Sopenharmony_ci } 22ba487d97Sopenharmony_ci sources = [ 23ba487d97Sopenharmony_ci "src/format.cpp", 24ba487d97Sopenharmony_ci "src/source.cpp", 25ba487d97Sopenharmony_ci ] 26ba487d97Sopenharmony_ci include_dirs = [ 27ba487d97Sopenharmony_ci "interfaces/kits", 28ba487d97Sopenharmony_ci "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog", 29ba487d97Sopenharmony_ci ] 30ba487d97Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 31ba487d97Sopenharmony_ci public_deps = [ "//third_party/bounds_checking_function:libsec_static" ] 32ba487d97Sopenharmony_ci } else { 33ba487d97Sopenharmony_ci public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 34ba487d97Sopenharmony_ci } 35ba487d97Sopenharmony_ci 36ba487d97Sopenharmony_ci if (ohos_kernel_type == "liteos_m") { 37ba487d97Sopenharmony_ci public_deps += 38ba487d97Sopenharmony_ci [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static" ] 39ba487d97Sopenharmony_ci public_configs = [ ":media_common_public_config" ] 40ba487d97Sopenharmony_ci } else { 41ba487d97Sopenharmony_ci public_deps += [ "//foundation/graphic/surface_lite:surface_lite" ] 42ba487d97Sopenharmony_ci if (board_name == "hispark_taurus" || board_name == "hispark_aries") { 43ba487d97Sopenharmony_ci public_deps += [ 44ba487d97Sopenharmony_ci "$ohos_board_adapter_dir/media:hardware_media_sdk", 45ba487d97Sopenharmony_ci "$ohos_board_adapter_dir/middleware:middleware_source_sdk", 46ba487d97Sopenharmony_ci ] 47ba487d97Sopenharmony_ci } 48ba487d97Sopenharmony_ci } 49ba487d97Sopenharmony_ci} 50ba487d97Sopenharmony_ci 51ba487d97Sopenharmony_ciconfig("media_common_public_config") { 52ba487d97Sopenharmony_ci defines = [ "SURFACE_DISABLED" ] 53ba487d97Sopenharmony_ci} 54