# Copyright (c) 2021-2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") group("gst_libav_packages") { deps = [ ":gstlibav" ] } config("gstlibav_config") { visibility = [ ":*" ] include_dirs = [ "./", "./ext/libav/", "//third_party/gstreamer/gstreamer", "//third_party/gstreamer/gstreamer/libs", "//third_party/gstreamer/gstplugins_base", "//third_party/gstreamer/gstplugins_base/gst-libs", "//third_party/ffmpeg", "//third_party/glib", "//third_party/glib/glib", "//third_party/glib/gmodule", ] cflags = [ "-Wall", "-Werror", "-DHAVE_CONFIG_H", "-DHAVE_UNISTD_H", "-fno-strict-aliasing", "-Wno-sign-compare", "-Wno-deprecated-declarations", "-Wno-builtin-requires-header", "-Wno-macro-redefined", "-Wno-implicit-function-declaration", "-Wno-unused-function", "-DOHOS_OPT_COMPAT", "-DOHOS_OPT_MEMLEAK", "-DOHOS_EXT_FUNC", "-DOHOS_OPT_PERFORMANCE", "-DG_LOG_DOMAIN=\"GStreamer\"", ] } ohos_source_set("gstlibav_source") { sources = [ "ext/libav/gstav.c", "ext/libav/gstavauddec.c", "ext/libav/gstavaudenc.c", "ext/libav/gstavcfg.c", "ext/libav/gstavcodecmap.c", "ext/libav/gstavdeinterlace.c", "ext/libav/gstavdemux.c", "ext/libav/gstavmux.c", "ext/libav/gstavprotocol.c", "ext/libav/gstavutils.c", "ext/libav/gstavviddec.c", "ext/libav/gstavvidenc.c", ] configs = [ ":gstlibav_config" ] } ohos_shared_library("gstlibav") { deps = [ ":gstlibav_source", "//third_party/ffmpeg:libohosffmpeg", "//third_party/glib:glib", "//third_party/glib:gobject", "//third_party/gstreamer/gstplugins_base:gstaudio", "//third_party/gstreamer/gstplugins_base:gstpbutils", "//third_party/gstreamer/gstplugins_base:gsttag", "//third_party/gstreamer/gstplugins_base:gstvideo", "//third_party/gstreamer/gstreamer:gstbase", "//third_party/gstreamer/gstreamer:gstreamer", ] relative_install_dir = "media/plugins" part_name = "multimedia_player_framework" subsystem_name = "multimedia" }