1# Copyright (C) 2024 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
17config("media_engine_histreamer_transcoder_config") {
18  visibility = [ ":*" ]
19
20  defines = [
21    "HST_ANY_WITH_NO_RTTI",
22    "MEDIA_OHOS",
23  ]
24
25  cflags = [
26    "-O2",
27    "-fPIC",
28    "-Wall",
29    "-fexceptions",
30    "-fno-rtti",
31    "-Wno-unused-but-set-variable",
32    "-Wno-format",
33  ]
34  cflags_cc = cflags
35
36  include_dirs = [
37    "$MEDIA_PLAYER_ROOT_DIR/services/engine/histreamer/transcoder",
38    "$MEDIA_PLAYER_ROOT_DIR/services/utils/include",
39    "$MEDIA_PLAYER_ROOT_DIR/interfaces/inner_api/native",
40    "$MEDIA_PLAYER_ROOT_DIR/services/services/engine_intf",
41  ]
42}
43
44ohos_static_library("media_engine_histreamer_transcoder") {
45  sanitize = {
46    cfi = true
47    cfi_cross_dso = true
48    debug = false
49  }
50  sources = [
51    "hitranscoder_callback_looper.cpp",
52    "hitranscoder_impl.cpp",
53  ]
54
55  configs = [
56    ":media_engine_histreamer_transcoder_config",
57    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx_public_config",
58    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils_public_config",
59  ]
60
61  deps = [
62    "$MEDIA_PLAYER_ROOT_DIR/services/dfx:media_service_log_dfx",
63    "$MEDIA_PLAYER_ROOT_DIR/services/utils:media_service_utils",
64  ]
65
66  external_deps = [
67    "audio_framework:audio_capturer",
68    "av_codec:av_codec_client",
69    "av_codec:av_codec_media_engine_filters",
70    "c_utils:utils",
71    "graphic_surface:surface",
72    "graphic_surface:sync_fence",
73    "hilog:libhilog",
74    "ipc:ipc_single",
75    "media_foundation:media_foundation",
76    "safwk:system_ability_fwk",
77  ]
78
79  subsystem_name = "multimedia"
80  part_name = "player_framework"
81}
82