• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16declare_args() {
17  multimedia_player_framework_no_stride = true
18}
19
20config("gst_plugins_common_config") {
21  visibility = [ ":*" ]
22
23  cflags = [
24    "-fno-rtti",
25    "-fno-exceptions",
26    "-Wall",
27    "-fno-common",
28    "-fstack-protector-strong",
29    "-FPIC",
30    "-FS",
31    "-O2",
32    "-D_FORTIFY_SOURCE=2",
33    "-fvisibility=hidden",
34    "-Wformat=2",
35    "-Wfloat-equal",
36    "-Wdate-time",
37    "-Werror",
38    "-Wextra",
39    "-Wimplicit-fallthrough",
40    "-Wsign-compare",
41    "-Wunused-parameter",
42  ]
43
44  if (multimedia_player_framework_no_stride) {
45    cflags += [ "-DSURFACE_MEM_NO_STRIDE" ]
46  }
47
48  include_dirs = [
49    "include",
50    "//commonlibrary/c_utils/base/include",
51    "//foundation/multimedia/player_framework/services/utils/include",
52    "//foundation/multimedia/player_framework/services/dfx",
53    "//foundation/multimedia/player_framework/interfaces/inner_api/native",
54    "//third_party/gstreamer/gstreamer",
55    "//third_party/gstreamer/gstreamer/libs",
56    "//third_party/gstreamer/gstplugins_base",
57    "//third_party/gstreamer/gstplugins_base/gst-libs",
58    "//third_party/glib/glib",
59    "//third_party/glib",
60    "//third_party/glib/gmodule",
61  ]
62}
63
64ohos_shared_library("gst_media_common") {
65  install_enable = true
66
67  sanitize = {
68    cfi = true
69    cfi_cross_dso = true
70    debug = false
71    blocklist = "../../../../../cfi_blocklist.txt"
72  }
73
74  configs = [
75    ":gst_plugins_common_config",
76    "//foundation/multimedia/player_framework/services/dfx:media_service_log_dfx_public_config",
77  ]
78
79  sources = [
80    "buffer_type_meta.c",
81    "gst_producer_surface_pool.cpp",
82    "gst_shmem_allocator.cpp",
83    "gst_shmem_pool.cpp",
84    "gst_shmemory_wrap_allocator.cpp",
85    "gst_surface_allocator.cpp",
86  ]
87
88  deps = [
89    "../../../../utils:media_service_utils",
90    "../codec/common:gst_codec_plugins_common",
91    "../sink/memsink:gst_mem_sink_base",
92    "../sink/subtitlesink:gst_subtitle_sink_base",
93    "../source/memsource:gst_mem_src_base",
94    "//third_party/glib:glib",
95    "//third_party/glib:gmodule",
96    "//third_party/glib:gobject",
97    "//third_party/gstreamer/gstreamer:gstreamer",
98  ]
99
100  external_deps = [
101    "drivers_peripheral_display:hdi_gralloc_client",
102    "graphic_surface:surface",
103    "graphic_surface:sync_fence",
104    "hilog:libhilog",
105    "media_foundation:media_foundation",
106    "qos_manager:qos",
107  ]
108
109  subsystem_name = "multimedia"
110  part_name = "player_framework"
111}
112