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