• 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/player_framework/config.gni")
16
17group("capi_packages") {
18  deps = []
19  if (multimedia_player_framework_support_capi) {
20    deps +=
21        [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c:native_avscreen_capture" ]
22  }
23}
24
25config("media_capi_config") {
26  include_dirs = [
27    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
28    "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c",
29    "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/common",
30    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
31    "$MEDIA_PLAYER_GRAPHIC/frameworks/surface/include",
32  ]
33
34  cflags = [
35    "-fno-exceptions",
36    "-Wall",
37    "-fno-common",
38    "-fstack-protector-all",
39    "-Wshadow",
40    "-FPIC",
41    "-FS",
42    "-O2",
43    "-D_FORTIFY_SOURCE=2",
44    "-Wformat=2",
45    "-Wdate-time",
46  ]
47
48  cflags_cc = [
49    "-std=c++17",
50    "-fno-rtti",
51  ]
52}
53
54config("media_capi_public_config") {
55  include_dirs = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/kits/c" ]
56}
57
58ohos_shared_library("native_avscreen_capture") {
59  install_enable = true
60
61  sanitize = {
62    cfi = true
63    cfi_cross_dso = true
64    debug = false
65    blocklist = "../../../cfi_blocklist.txt"
66  }
67
68  sources = [ "$MEDIA_PLAYER_ROOT_DIR/frameworks/native/capi/screencapture/native_avscreen_capture.cpp" ]
69
70  configs = [ ":media_capi_config" ]
71
72  public_configs = [ ":media_capi_public_config" ]
73
74  deps = [ "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native:media_client" ]
75
76  external_deps = [
77    "c_utils:utils",
78    "graphic_2d:surface",
79    "hilog:libhilog",
80    "window_manager:libdm",
81  ]
82  output_extension = "so"
83  subsystem_name = "multimedia"
84  part_name = "player_framework"
85}
86