1# Copyright (c) 2021-2021 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# 14 15import("//foundation/multimedia/histreamer/config.gni") 16 17if (!hst_is_lite_sys) { 18 ohos_kernel_type = "" 19} 20 21print("histreamer plugin: ffmpeg_adapter =", 22 histreamer_enable_plugin_ffmpeg_adapter) 23print("histreamer plugin: wav_demuxer =", histreamer_enable_plugin_wav_demuxer) 24print("histreamer plugin: hdi_adapter =", histreamer_enable_plugin_hdi_adapter) 25print("histreamer plugin: file_source =", histreamer_enable_plugin_file_source) 26print("histreamer plugin: file_fd_source =", 27 histreamer_enable_plugin_file_fd_source) 28print("histreamer plugin: std_stream_source =", 29 histreamer_enable_plugin_std_stream_source) 30print("histreamer plugin: http_source =", histreamer_enable_plugin_http_source) 31print("histreamer plugin: stream_source =", 32 histreamer_enable_plugin_stream_source) 33print("histreamer plugin: audio_server_sink =", 34 histreamer_enable_plugin_audio_server_sink) 35print("histreamer plugin: lite_aac_decoder =", 36 histreamer_enable_plugin_lite_aac_decoder) 37print("histreamer plugin: std_video_surface_sink =", 38 histreamer_enable_plugin_std_video_surface_sink) 39print("histreamer plugin: std_video_capture =", 40 histreamer_enable_plugin_std_video_capture) 41print("histreamer plugin: file_fd_sink =", 42 histreamer_enable_plugin_file_fd_sink) 43print("histreamer plugin: codec_adapter =", 44 histreamer_enable_plugin_codec_adapter) 45 46group("histreamer_plugin_store") { 47 deps = [] 48 if (histreamer_enable_plugin_ffmpeg_adapter) { 49 deps += [ "ffmpeg_adapter:plugin_ffmpeg_adapter" ] 50 } 51 52 if (histreamer_enable_plugin_minimp3_adapter) { 53 deps += [ "minimp3_adapter:plugin_minimp3_adapter" ] 54 } 55 56 if (histreamer_enable_plugin_minimp4_demuxer) { 57 deps += [ "demuxer/minimp4_demuxer:plugin_minimp4_demuxer" ] 58 } 59 60 if (histreamer_enable_plugin_aac_demuxer) { 61 deps += [ "demuxer/aac_demuxer:plugin_aac_demuxer" ] 62 } 63 64 if (histreamer_enable_plugin_lite_aac_decoder) { 65 deps += [ "lite_aac_decoder:plugin_lite_aac_decoder_adapter" ] 66 } 67 68 if (histreamer_enable_plugin_file_source) { 69 deps += [ "source/file_source:plugin_file_source" ] 70 } 71 72 if (histreamer_enable_plugin_file_fd_source) { 73 deps += [ "source/file_source:plugin_file_fd_source" ] 74 } 75 76 if (histreamer_enable_plugin_std_stream_source) { 77 deps += [ "source/std_stream_source:plugin_std_stream_source" ] 78 } 79 80 if (histreamer_enable_plugin_http_source) { 81 deps += [ "source/http_source:plugin_http_source" ] 82 } 83 84 if (histreamer_enable_plugin_hdi_adapter) { 85 deps += [ "hdi_adapter:plugin_hdi_adapter" ] 86 } 87 88 if (histreamer_enable_plugin_stream_source) { 89 deps += [ "source/stream_source:plugin_stream_source" ] 90 } 91 92 if (histreamer_enable_plugin_http_lite_source) { 93 deps += [ "source/http_lite_source:plugin_http_lite_source" ] 94 } 95 96 if (histreamer_enable_plugin_std_audio_capture) { 97 deps += [ "source/audio_capture:plugin_standard_audio_capture" ] 98 } 99 100 if (histreamer_enable_plugin_audio_server_sink) { 101 deps += [ "sink/audio_server_sink:plugin_audio_server_sink" ] 102 } 103 104 if (histreamer_enable_plugin_file_fd_sink) { 105 deps += [ "sink/file_sink:plugin_file_fd_sink" ] 106 } 107 108 if (histreamer_enable_plugin_std_video_surface_sink) { 109 deps += [ "sink/video_surface_sink:plugin_standard_video_surface_sink" ] 110 } 111 112 if (histreamer_enable_plugin_std_video_capture) { 113 deps += [ "source/video_capture:plugin_standard_video_capture" ] 114 } 115 116 if (histreamer_enable_plugin_wav_demuxer) { 117 deps += [ "demuxer/wav_demuxer:plugin_wav_demuxer" ] 118 } 119 120 if (histreamer_enable_plugin_avs3_audio_decoder) { 121 deps += [ "//foundation/multimedia/histreamer_ext/codec/avs3_audio_decoder:plugin_avs3_audio_decoder" ] 122 } 123 124 if (histreamer_enable_plugin_codec_adapter) { 125 deps += [ "codec_adapter:plugin_codec_adapter" ] 126 } 127} 128 129config("gen_plugin_static_header_config") { 130 include_dirs = [ "${target_gen_dir}/include/" ] 131} 132 133action("gen_plugin_static_header") { 134 script = "//foundation/multimedia/histreamer/engine/plugin/plugins/plugin_config.py" 135 136 args = [ 137 rebase_path("//foundation/multimedia/histreamer/engine/plugin/plugins", 138 root_build_dir), 139 rebase_path("${target_gen_dir}/include/", root_build_dir), 140 ] 141 142 if (ohos_kernel_type == "liteos_m") { 143 if (histreamer_enable_plugin_ffmpeg_adapter) { 144 args += [ 145 "FFmpegDemuxer", 146 "FFmpegAudioDecoders", 147 ] 148 } 149 150 if (histreamer_enable_plugin_wav_demuxer) { 151 args += [ "WavDemuxer" ] 152 } 153 154 if (histreamer_enable_plugin_minimp3_adapter) { 155 args += [ 156 "Minimp3Demuxer", 157 "Minimp3Decoder", 158 ] 159 } 160 161 if (histreamer_enable_plugin_minimp4_demuxer) { 162 args += [ "MiniMP4Demuxer" ] 163 } 164 165 if (histreamer_enable_plugin_lite_aac_decoder) { 166 args += [ "LiteAACDecoder" ] 167 } 168 169 if (histreamer_enable_plugin_aac_demuxer) { 170 args += [ "AACDemuxer" ] 171 } 172 173 if (histreamer_enable_plugin_file_source) { 174 args += [ "FileSource" ] 175 } 176 177 if (histreamer_enable_plugin_file_fd_source) { 178 args += [ "FileFdSource" ] 179 } 180 181 if (histreamer_enable_plugin_http_source) { 182 args += [ "HttpSource" ] 183 } 184 185 if (histreamer_enable_plugin_hdi_adapter) { 186 args += [ "HdiAuSink" ] 187 } 188 189 if (histreamer_enable_plugin_stream_source) { 190 args += [ "StreamSource" ] 191 } 192 193 if (histreamer_enable_plugin_http_lite_source) { 194 args += [ "HttpLiteSource" ] 195 } 196 197 if (histreamer_enable_plugin_file_fd_sink) { 198 args += [ "FileFdSink" ] 199 } 200 } 201 202 outputs = [ "${target_gen_dir}/include/all_plugin_static.h" ] 203 204 public_configs = [ ":gen_plugin_static_header_config" ] 205} 206