1# Copyright (C) 2023 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 16MEDIA_ROOT_DIR = "../../../../../.." 17 18config("gst_subtitle_sink_config") { 19 visibility = [ ":*" ] 20 21 cflags = [ 22 "-fno-rtti", 23 "-fno-exceptions", 24 "-Wall", 25 "-fno-common", 26 "-fstack-protector-strong", 27 "-Wshadow", 28 "-FPIC", 29 "-FS", 30 "-O2", 31 "-D_FORTIFY_SOURCE=2", 32 "-fvisibility=hidden", 33 "-Wformat=2", 34 "-Wfloat-equal", 35 "-Wdate-time", 36 "-Werror", 37 "-Wextra", 38 "-Wimplicit-fallthrough", 39 "-Wsign-compare", 40 "-Wunused-parameter", 41 "-DOHOS_EXT_FUNC", 42 ] 43 44 include_dirs = [ 45 "../../common", 46 "../subtitle_sink", 47 "$MEDIA_ROOT_DIR/services/utils/include", 48 "$MEDIA_ROOT_DIR/interfaces/inner_api/native", 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", 54 "//third_party/glib/glib", 55 "//third_party/glib/gmodule", 56 ] 57} 58 59ohos_shared_library("gst_subtitle_sink") { 60 install_enable = true 61 62 sanitize = { 63 cfi = true 64 cfi_cross_dso = true 65 debug = false 66 blocklist = "../../../../../../cfi_blocklist.txt" 67 } 68 69 sources = [ 70 "gst_subtitle_display_sink.cpp", 71 "gst_subtitle_sink_plugins.cpp", 72 ] 73 74 configs = [ ":gst_subtitle_sink_config" ] 75 76 deps = [ 77 "../../common:gst_media_common", 78 "//third_party/glib:glib", 79 "//third_party/glib:gmodule", 80 "//third_party/glib:gobject", 81 "//third_party/gstreamer/gstplugins_base:gstapp_plugin", 82 "//third_party/gstreamer/gstreamer:gstbase", 83 "//third_party/gstreamer/gstreamer:gstreamer", 84 ] 85 86 external_deps = [ 87 "media_foundation:media_foundation", 88 "qos_manager:qos", 89 ] 90 91 relative_install_dir = "media/plugins" 92 subsystem_name = "multimedia" 93 part_name = "player_framework" 94} 95 96ohos_static_library("gst_subtitle_sink_base") { 97 sources = [ "gst_subtitle_sink.cpp" ] 98 configs = [ ":gst_subtitle_sink_config" ] 99 deps = [ 100 "../../../../../utils:media_service_utils", 101 "//third_party/gstreamer/gstplugins_base:gstapp_plugin", 102 ] 103 104 external_deps = [ 105 "media_foundation:media_foundation", 106 "qos_manager:qos", 107 ] 108 subsystem_name = "multimedia" 109 part_name = "player_framework" 110} 111