• 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("av_codec_media_engine_modules_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    "$av_codec_root_dir/services/media_engine/modules",
46    "$media_foundation_root_dir/interface/inner_api",
47    "$media_foundation_root_dir/src",
48    "//commonlibrary/c_utils/base/include/",
49    "//third_party/ffmpeg",
50  ]
51}
52
53ohos_shared_library("av_codec_media_engine_modules") {
54  install_enable = true
55
56  sanitize = av_codec_sanitize
57
58  configs = [
59    ":av_codec_media_engine_modules_config",
60    "$av_codec_root_dir/services/dfx:av_codec_service_log_dfx_public_config",
61  ]
62
63  sources = [
64    "demuxer/data_packer.cpp",
65    "demuxer/frame_detector.cpp",
66    "demuxer/media_demuxer.cpp",
67    "demuxer/type_finder.cpp",
68    "media_codec/media_codec.cpp",
69    "muxer/data_sink_fd.cpp",
70    "muxer/data_sink_file.cpp",
71    "muxer/media_muxer.cpp",
72    "sink/audio_sink.cpp",
73    "sink/media_sync_manager.cpp",
74    "sink/media_synchronous_sink.cpp",
75    "sink/video_sink.cpp",
76    "source/audio_capture/audio_capture_module.cpp",
77    "source/audio_capture/audio_type_translate.cpp",
78    "source/source.cpp",
79  ]
80
81  deps = [ "$av_codec_root_dir/services/engine/base:av_codec_codec_base" ]
82
83  public_configs = [ "$audio_framework_root_dir/frameworks/native/audiocapturer:audio_capturer_config" ]
84
85  external_deps = [
86    "audio_framework:audio_capturer",
87    "c_utils:utils",
88    "graphic_surface:surface",
89    "graphic_surface:sync_fence",
90    "hilog:libhilog",
91    "init:libbegetutil",
92    "ipc:ipc_single",
93    "media_foundation:media_foundation",
94    "safwk:system_ability_fwk",
95  ]
96
97  subsystem_name = "multimedia"
98  part_name = "av_codec"
99}
100