1# Copyright (C) 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("//build/ohos.gni") 15 16config("gst_mem_src_config") { 17 visibility = [ ":*" ] 18 19 cflags = [ 20 "-fno-rtti", 21 "-fno-exceptions", 22 "-Wall", 23 "-fno-common", 24 "-fstack-protector-strong", 25 "-Wshadow", 26 "-FPIC", 27 "-FS", 28 "-O2", 29 "-D_FORTIFY_SOURCE=2", 30 "-fvisibility=hidden", 31 "-Wformat=2", 32 "-Wfloat-equal", 33 "-Wdate-time", 34 "-Werror", 35 "-Wextra", 36 "-Wimplicit-fallthrough", 37 "-Wsign-compare", 38 "-Wunused-parameter", 39 ] 40 41 include_dirs = [ 42 "//drivers/peripheral/display/interfaces/include", 43 "//commonlibrary/c_utils/base/include", 44 "//foundation/multimedia/player_framework/services/utils/include", 45 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 46 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/common", 47 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/source/memsource", 48 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/source/videocapture/include", 49 "//third_party/gstreamer/gstreamer", 50 "//third_party/gstreamer/gstreamer/libs", 51 "//third_party/gstreamer/gstplugins_base", 52 "//third_party/gstreamer/gstplugins_base/gst-libs", 53 "//third_party/glib/glib", 54 "//third_party/glib", 55 "//third_party/glib/gmodule", 56 "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", 57 ] 58} 59 60ohos_shared_library("gst_mem_src") { 61 install_enable = true 62 63 sanitize = { 64 cfi = true 65 cfi_cross_dso = true 66 debug = false 67 blocklist = "../../../../../../cfi_blocklist.txt" 68 } 69 70 sources = [ 71 "../videocapture/src/gst_video_capture_pool.cpp", 72 "../videocapture/src/gst_video_capture_src.cpp", 73 "../videocapture/src/video_pool_manager.cpp", 74 "gst_consumer_surface_allocator.cpp", 75 "gst_consumer_surface_pool.cpp", 76 "gst_mem_source_plugins.cpp", 77 "gst_shmem_src.cpp", 78 "gst_surface_src.cpp", 79 ] 80 81 configs = [ ":gst_mem_src_config" ] 82 83 deps = [ 84 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/common:gst_media_common", 85 "//foundation/multimedia/player_framework/services/utils:media_service_utils", 86 "//third_party/glib:glib", 87 "//third_party/glib:gmodule", 88 "//third_party/glib:gobject", 89 "//third_party/gstreamer/gstplugins_base:gstvideo", 90 "//third_party/gstreamer/gstreamer:gstbase", 91 "//third_party/gstreamer/gstreamer:gstreamer", 92 ] 93 94 external_deps = [ 95 "c_utils:utils", 96 "drivers_peripheral_display:hdi_gralloc_client", 97 "graphic_surface:surface", 98 "graphic_surface:sync_fence", 99 "hilog:libhilog", 100 "init:libbegetutil", 101 "media_foundation:media_foundation", 102 "qos_manager:qos", 103 ] 104 105 relative_install_dir = "media/plugins" 106 subsystem_name = "multimedia" 107 part_name = "player_framework" 108} 109 110ohos_static_library("gst_mem_src_base") { 111 sources = [ "gst_mem_src.cpp" ] 112 configs = [ ":gst_mem_src_config" ] 113 external_deps = [ "media_foundation:media_foundation" ] 114 subsystem_name = "multimedia" 115 part_name = "player_framework" 116} 117