1# Copyright (C) 2024 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("//build/ohos.gni") 15import("//foundation/multimedia/player_framework/config.gni") 16 17config("media_engine_histreamer_transcoder_config") { 18 visibility = [ ":*" ] 19 20 defines = [ 21 "HST_ANY_WITH_NO_RTTI", 22 "MEDIA_OHOS", 23 ] 24 25 if (player_framework_support_drm) { 26 defines += [ "SUPPORT_AVPLAYER_DRM" ] 27 } 28 29 cflags = [ 30 "-O2", 31 "-fPIC", 32 "-Wall", 33 "-fexceptions", 34 "-fno-rtti", 35 "-Wno-unused-but-set-variable", 36 "-Wno-format", 37 ] 38 cflags_cc = cflags 39 40 include_dirs = [ 41 "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/transcoder", 42 "$MEDIA_PLAYER_ROOT_DIR/services/utils/include", 43 "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native", 44 "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf", 45 ] 46} 47 48ohos_static_library("media_engine_histreamer_transcoder") { 49 sanitize = { 50 cfi = true 51 cfi_cross_dso = true 52 debug = false 53 } 54 sources = [ 55 "hitranscoder_callback_looper.cpp", 56 "hitranscoder_impl.cpp", 57 ] 58 59 configs = [ 60 ":media_engine_histreamer_transcoder_config", 61 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config", 62 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils_public_config", 63 ] 64 65 deps = [ 66 "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx", 67 "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils", 68 ] 69 70 external_deps = [ 71 "audio_framework:audio_capturer", 72 "av_codec:av_codec_client", 73 "av_codec:av_codec_media_engine_filters", 74 "c_utils:utils", 75 "graphic_surface:surface", 76 "graphic_surface:sync_fence", 77 "hilog:libhilog", 78 "hisysevent:libhisysevent", 79 "ipc:ipc_single", 80 "media_foundation:media_foundation", 81 "safwk:system_ability_fwk", 82 ] 83 84 if (player_framework_support_drm) { 85 external_deps += [ "drm_framework:drm_framework" ] 86 } 87 88 subsystem_name = "multimedia" 89 part_name = "player_framework" 90} 91