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