• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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")
15import("//foundation/multimedia/av_codec/config.gni")
16
17config("Source_config") {
18  defines = [
19    "HST_ANY_WITH_NO_RTTI",
20    "MEDIA_OHOS",
21  ]
22
23  cflags = [
24    "-fno-exceptions",
25    "-Wall",
26    "-fno-common",
27    "-fstack-protector-all",
28    "-Wshadow",
29    "-FPIC",
30    "-FS",
31    "-O2",
32    "-D_FORTIFY_SOURCE=2",
33    "-Wformat=2",
34    "-Wdate-time",
35  ]
36
37  cflags_cc = [
38    "-std=c++17",
39    "-fno-rtti",
40  ]
41
42  include_dirs = [
43    "$av_codec_root_dir/interfaces",
44    "$av_codec_root_dir/interfaces/inner_api/native",
45  ]
46}
47
48ohos_shared_library("media_plugin_FileFdSource") {
49  branch_protector_ret = "pac_ret"
50  install_enable = true
51
52  sanitize = av_codec_sanitize
53
54  configs = [
55    ":Source_config",
56    "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config",
57  ]
58
59  sources = [ "file_fd_source_plugin.cpp" ]
60
61  external_deps = [
62    "c_utils:utils",
63    "ffmpeg:libohosffmpeg",
64    "hilog:libhilog",
65    "ipc:ipc_single",
66    "media_foundation:media_foundation",
67    "safwk:system_ability_fwk",
68  ]
69
70  relative_install_dir = "media/media_plugins"
71  subsystem_name = "multimedia"
72  part_name = "av_codec"
73}
74
75ohos_shared_library("media_plugin_FileSource") {
76  branch_protector_ret = "pac_ret"
77  install_enable = true
78
79  sanitize = {
80    integer_overflow = true
81    ubsan = true
82    boundary_sanitize = true
83    cfi = true
84    cfi_cross_dso = true
85    debug = false
86  }
87
88  configs = [
89    ":Source_config",
90    "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config",
91  ]
92
93  sources = [ "file_source_plugin.cpp" ]
94
95  external_deps = [
96    "c_utils:utils",
97    "ffmpeg:libohosffmpeg",
98    "hilog:libhilog",
99    "ipc:ipc_single",
100    "media_foundation:media_foundation",
101    "safwk:system_ability_fwk",
102  ]
103
104  relative_install_dir = "media/media_plugins"
105  subsystem_name = "multimedia"
106  part_name = "av_codec"
107}
108
109ohos_shared_library("media_plugin_DataStreamSource") {
110  branch_protector_ret = "pac_ret"
111  install_enable = true
112
113  sanitize = av_codec_sanitize
114
115  configs = [
116    ":Source_config",
117    "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config",
118  ]
119
120  sources = [ "data_stream_source_plugin.cpp" ]
121
122  external_deps = [
123    "c_utils:utils",
124    "ffmpeg:libohosffmpeg",
125    "hilog:libhilog",
126    "ipc:ipc_single",
127    "media_foundation:media_foundation",
128    "safwk:system_ability_fwk",
129  ]
130
131  relative_install_dir = "media/media_plugins"
132  subsystem_name = "multimedia"
133  part_name = "av_codec"
134}
135