• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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")
15
16group("gst_libav_packages") {
17  deps = [ ":gstlibav" ]
18}
19
20config("gstlibav_config") {
21  visibility = [ ":*" ]
22
23  include_dirs = [
24    "./",
25    "./ext/libav/",
26    "//third_party/gstreamer/gstreamer",
27    "//third_party/gstreamer/gstreamer/libs",
28    "//third_party/gstreamer/gstplugins_base",
29    "//third_party/gstreamer/gstplugins_base/gst-libs",
30    "//third_party/ffmpeg",
31    "//third_party/glib",
32    "//third_party/glib/glib",
33    "//third_party/glib/gmodule",
34  ]
35
36  cflags = [
37    "-Wall",
38    "-Werror",
39    "-DHAVE_CONFIG_H",
40    "-DHAVE_UNISTD_H",
41    "-fno-strict-aliasing",
42    "-Wno-sign-compare",
43    "-Wno-deprecated-declarations",
44    "-Wno-builtin-requires-header",
45    "-Wno-macro-redefined",
46    "-Wno-implicit-function-declaration",
47    "-Wno-unused-function",
48    "-DOHOS_OPT_COMPAT",
49    "-DOHOS_OPT_MEMLEAK",
50    "-DOHOS_EXT_FUNC",
51    "-DOHOS_OPT_PERFORMANCE",
52    "-DG_LOG_DOMAIN=\"GStreamer\"",
53  ]
54}
55
56ohos_source_set("gstlibav_source") {
57  sources = [
58    "ext/libav/gstav.c",
59    "ext/libav/gstavauddec.c",
60    "ext/libav/gstavaudenc.c",
61    "ext/libav/gstavcfg.c",
62    "ext/libav/gstavcodecmap.c",
63    "ext/libav/gstavdeinterlace.c",
64    "ext/libav/gstavdemux.c",
65    "ext/libav/gstavmux.c",
66    "ext/libav/gstavprotocol.c",
67    "ext/libav/gstavutils.c",
68    "ext/libav/gstavviddec.c",
69    "ext/libav/gstavvidenc.c",
70  ]
71
72  configs = [ ":gstlibav_config" ]
73}
74
75ohos_shared_library("gstlibav") {
76  deps = [
77    ":gstlibav_source",
78    "//third_party/ffmpeg:libohosffmpeg",
79    "//third_party/glib:glib",
80    "//third_party/glib:gobject",
81    "//third_party/gstreamer/gstplugins_base:gstaudio",
82    "//third_party/gstreamer/gstplugins_base:gstpbutils",
83    "//third_party/gstreamer/gstplugins_base:gsttag",
84    "//third_party/gstreamer/gstplugins_base:gstvideo",
85    "//third_party/gstreamer/gstreamer:gstbase",
86    "//third_party/gstreamer/gstreamer:gstreamer",
87  ]
88
89  relative_install_dir = "media/plugins"
90  part_name = "gstreamer"
91  subsystem_name = "thirdparty"
92}
93