• 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/media_foundation/config.gni")
16
17if (hst_is_standard_sys) {
18  group("capi_packages") {
19    deps = [ ":native_media_core" ]
20  }
21
22  config("media_foundation_capi_public_config") {
23    include_dirs = [
24      "./",
25      "./common",
26      "$histreamer_root_dir/interface/inner_api",
27    ]
28    defines = [
29      "HST_ANY_WITH_NO_RTTI",
30      "MEDIA_OHOS",
31    ]
32  }
33
34  config("media_foundation_capi_config") {
35    include_dirs =
36        [ "$histreamer_root_dir/../../graphic/graphic_surface/surface/include" ]
37    cflags = [
38      "-fno-exceptions",
39      "-Wall",
40      "-fno-common",
41      "-fstack-protector-all",
42      "-Wshadow",
43      "-FPIC",
44      "-FS",
45      "-O2",
46      "-D_FORTIFY_SOURCE=2",
47      "-Wformat=2",
48      "-Wdate-time",
49    ]
50
51    cflags_cc = [
52      "-std=c++17",
53      "-fno-rtti",
54    ]
55  }
56
57  ohos_shared_library("native_media_core") {
58    install_enable = true
59
60    sanitize = {
61      cfi = true
62      cfi_cross_dso = true
63      debug = false
64      integer_overflow = true
65    }
66
67    configs = [ ":media_foundation_capi_config" ]
68    public_configs = [ ":media_foundation_capi_public_config" ]
69
70    deps = [ "$histreamer_root_dir/src:media_foundation" ]
71
72    sources = [
73      "./native_avbuffer.cpp",
74      "./native_avformat.cpp",
75      "./native_avmemory.cpp",
76    ]
77
78    external_deps = [
79      "c_utils:utils",
80      "graphic_surface:surface",
81      "graphic_surface:sync_fence",
82      "hilog:libhilog",
83    ]
84
85    output_extension = "so"
86    subsystem_name = "multimedia"
87    part_name = "media_foundation"
88  }
89} else {
90  group("capi_packages") {
91  }
92  group("native_media_core") {
93  }
94}
95