1# Copyright (C) 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("//build/ohos.gni") 15import("//foundation/multimedia/av_codec/config.gni") 16 17config("audio_server_sink_plugin_config") { 18 defines = [ 19 "HST_ANY_WITH_NO_RTTI", 20 "MEDIA_OHOS", 21 ] 22 23 cflags = [ 24 "-O2", 25 "-fPIC", 26 "-Wall", 27 "-fexceptions", 28 "-fno-rtti", 29 "-Wno-unused-but-set-variable", 30 "-Wno-format", 31 ] 32 cflags_cc = cflags 33 34 include_dirs = [ 35 "$av_codec_root_dir/interfaces", 36 "$av_codec_root_dir/interfaces/inner_api/native", 37 "$av_codec_root_dir/services/media_engine/plugins/ffmpeg_adapter/common", 38 "$av_codec_root_dir/services/media_engine/plugins/sink", 39 "$media_foundation_root_dir/interface/inner_api", 40 "$media_foundation_root_dir/src", 41 "//third_party/ffmpeg", 42 "$audio_framework_root_dir/interfaces/inner_api/native/audiocommon/include", 43 ] 44} 45 46ohos_shared_library("media_plugin_AudioServerSink") { 47 install_enable = true 48 49 sanitize = av_codec_sanitize 50 51 configs = [ 52 ":audio_server_sink_plugin_config", 53 "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config", 54 ] 55 56 deps = [ "$av_codec_root_dir/services/dfx:av_codec_service_dfx" ] 57 58 public_deps = [ "//third_party/ffmpeg:libohosffmpeg" ] 59 60 sources = [ 61 "../ffmpeg_adapter/common/ffmpeg_convert.cpp", 62 "../ffmpeg_adapter/common/ffmpeg_utils.cpp", 63 "audio_server_sink_plugin.cpp", 64 ] 65 66 external_deps = [ 67 "audio_framework:audio_renderer", 68 "c_utils:utils", 69 "graphic_surface:surface", 70 "graphic_surface:sync_fence", 71 "hilog:libhilog", 72 "init:libbegetutil", 73 "ipc:ipc_single", 74 "media_foundation:media_foundation", 75 "safwk:system_ability_fwk", 76 ] 77 78 relative_install_dir = "media/media_plugins" 79 subsystem_name = "multimedia" 80 part_name = "av_codec" 81} 82