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# 14import("//foundation/multimedia/histreamer/config.gni") 15group("plugin_http_source") { 16 deps = [ ":histreamer_plugin_HttpSource" ] 17} 18 19config("plugin_http_source_config") { 20 include_dirs = [ 21 "//third_party/curl/include", 22 "//foundation/multimedia/histreamer/engine/include", 23 ] 24} 25 26ohos_source_set("httpsource") { 27 subsystem_name = "multimedia" 28 part_name = "histreamer" 29 sources = [ 30 "download/downloader.cpp", 31 "download/http_curl_client.cpp", 32 "hls/hls_media_downloader.cpp", 33 "hls/hls_playlist_downloader.cpp", 34 "hls/hls_tags.cpp", 35 "hls/m3u8.cpp", 36 "hls/playlist_downloader.cpp", 37 "http/http_media_downloader.cpp", 38 "http_source_plugin.cpp", 39 "monitor/download_monitor.cpp", 40 ] 41 public_deps = [ 42 "//foundation/multimedia/histreamer/engine/foundation:histreamer_foundation", 43 "//foundation/multimedia/histreamer/engine/plugin:histreamer_plugin_base", 44 ] 45 if (!hst_is_lite_sys) { 46 external_deps = [ "graphic_2d:surface" ] 47 } 48 if (hst_is_lite_sys) { 49 if (ohos_kernel_type == "liteos_m") { 50 public_deps += [ "//third_party/curl:libcurl_static" ] 51 } else { 52 public_deps += [ "//third_party/curl:libcurl_shared" ] 53 } 54 } else { 55 public_deps += [ "//third_party/curl:curl_shared" ] 56 } 57 58 public_configs = [ 59 ":plugin_http_source_config", 60 "//foundation/multimedia/histreamer:histreamer_presets", 61 ] 62} 63 64if (hst_is_lite_sys) { 65 # lite 66 import("//build/lite/config/component/lite_component.gni") 67 lite_library("histreamer_plugin_HttpSource") { 68 if (ohos_kernel_type == "liteos_m") { 69 target_type = "static_library" 70 } else { 71 target_type = "shared_library" 72 } 73 sources = [] 74 deps = [ ":httpsource" ] 75 } 76} else { 77 # standard 78 import("//build/ohos.gni") 79 ohos_shared_library("histreamer_plugin_HttpSource") { 80 sanitize = { 81 cfi = true 82 cfi_cross_dso = true 83 debug = false 84 integer_overflow = true 85 } 86 deps = [ ":httpsource" ] 87 relative_install_dir = "media/histreamer_plugins" 88 subsystem_name = "multimedia" 89 part_name = "histreamer" 90 } 91} 92