# Copyright (c) 2023-2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # import("//build/ohos.gni") import("//foundation/multimedia/av_codec/config.gni") config("http_source_plugin_config") { defines = [ "HST_ANY_WITH_NO_RTTI", "MEDIA_OHOS", ] cflags = [ "-Wno-sign-compare", "-fno-exceptions", "-fno-common", "-fstack-protector-all", "-Wshadow", "-FPIC", "-FS", "-O2", "-D_FORTIFY_SOURCE=2", "-Wformat=2", "-Wdate-time", ] cflags_cc = [ "-std=c++17", "-fno-rtti", ] include_dirs = [ "$av_codec_root_dir/interfaces", "$av_codec_root_dir/interfaces/inner_api/native", "$av_codec_root_dir/services/media_engine/plugins/source/http_source", "$av_codec_root_dir/services/media_engine/plugins/source/http_source/base64", "$av_codec_root_dir/services/media_engine/plugins/source/http_source/xml", "$av_codec_root_dir/services/media_engine/plugins/source/http_source/dash", "$av_codec_root_dir/services/media_engine/plugins/source/http_source/dash/include", "$av_codec_root_dir/services/media_engine/plugins/source/http_source/dash/include/mpd_parser", ] } ohos_shared_library("media_plugin_HttpSource") { branch_protector_ret = "pac_ret" install_enable = true sanitize = av_codec_sanitize configs = [ ":http_source_plugin_config", "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config", ] deps = [ ":media_plugin_HttpSource_static", "$av_codec_root_dir/services/media_engine/plugins/source/http_source/download/network_client:http_curl_client", ] relative_install_dir = "media/media_plugins" subsystem_name = "multimedia" part_name = "av_codec" } ohos_static_library("media_plugin_HttpSource_static") { branch_protector_ret = "pac_ret" sanitize = av_codec_sanitize configs = [ ":http_source_plugin_config", "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config", ] sources = [ "base64/base64_utils.cpp", "dash/dash_media_downloader.cpp", "dash/dash_mpd_downloader.cpp", "dash/dash_segment_downloader.cpp", "dash/mpd_parser/dash_adpt_set_manager.cpp", "dash/mpd_parser/dash_adpt_set_node.cpp", "dash/mpd_parser/dash_com_attrs_elements.cpp", "dash/mpd_parser/dash_content_comp_node.cpp", "dash/mpd_parser/dash_descriptor_node.cpp", "dash/mpd_parser/dash_manager_util.cpp", "dash/mpd_parser/dash_mpd_manager.cpp", "dash/mpd_parser/dash_mpd_node.cpp", "dash/mpd_parser/dash_mpd_parser.cpp", "dash/mpd_parser/dash_mpd_util.cpp", "dash/mpd_parser/dash_mult_seg_base_node.cpp", "dash/mpd_parser/dash_period_manager.cpp", "dash/mpd_parser/dash_period_node.cpp", "dash/mpd_parser/dash_representation_manager.cpp", "dash/mpd_parser/dash_representation_node.cpp", "dash/mpd_parser/dash_seg_base_node.cpp", "dash/mpd_parser/dash_seg_list_node.cpp", "dash/mpd_parser/dash_seg_template_node.cpp", "dash/mpd_parser/dash_seg_tmline_node.cpp", "dash/mpd_parser/dash_seg_url_node.cpp", "dash/mpd_parser/dash_url_type_node.cpp", "dash/mpd_parser/i_dash_mpd_node.cpp", "dash/mpd_parser/sidx_box_parser.cpp", "download/downloader.cpp", "hls/hls_media_downloader.cpp", "hls/hls_playlist_downloader.cpp", "hls/hls_tags.cpp", "hls/m3u8.cpp", "hls/playlist_downloader.cpp", "http/http_media_downloader.cpp", "http_source_plugin.cpp", "monitor/download_monitor.cpp", "utils/media_cached_buffer.cpp", "xml/xml_element.cpp", "xml/xml_parser.cpp", ] deps = [ "$av_codec_root_dir/services/dfx:av_codec_service_dfx" ] public_external_deps = [ "c_utils:utils", "ffmpeg:libohosffmpeg", "graphic_surface:surface", "hilog:libhilog", "init:libbegetutil", "ipc:ipc_single", "libxml2:libxml2", "media_foundation:media_foundation", "netmanager_base:net_conn_manager_if", "openssl:libcrypto_shared", "safwk:system_ability_fwk", ] subsystem_name = "multimedia" part_name = "av_codec" }