1# Copyright (C) 2021 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 16config("gst_codec_plugins_common_config") { 17 visibility = [ ":*" ] 18 19 cflags = [ 20 "-fno-exceptions", 21 "-Wall", 22 "-fno-common", 23 "-fstack-protector-strong", 24 "-FPIC", 25 "-FS", 26 "-O2", 27 "-D_FORTIFY_SOURCE=2", 28 "-fvisibility=hidden", 29 "-Wformat=2", 30 "-Wfloat-equal", 31 "-Wdate-time", 32 "-DOHOS_EXT_FUNC", 33 "-DOHOS_OPT_COMPAT", 34 "-DOHOS_OPT_PERFORMANCE", 35 "-Werror", 36 "-Wextra", 37 "-Wimplicit-fallthrough", 38 "-Wsign-compare", 39 "-Wunused-parameter", 40 ] 41 cflags_cc = [ "-frtti" ] 42 43 include_dirs = [ 44 "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", 45 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/codec/common/vdec", 46 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/codec/common/venc", 47 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/codec/common/video", 48 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/codec/common", 49 "//base/hiviewdfx/interfaces/innerkits/libhilog/include", 50 "//commonlibrary/c_utils/base/include", 51 "//foundation/multimedia/player_framework/services/utils/include", 52 "//foundation/multimedia/player_framework/interfaces/inner_api/native", 53 "//foundation/multimedia/player_framework/services/engine/gstreamer/plugins/common", 54 "//third_party/gstreamer/gstreamer", 55 "//third_party/gstreamer/gstreamer/libs", 56 "//third_party/gstreamer/gstplugins_base", 57 "//third_party/gstreamer/gstplugins_base/gst-libs", 58 "//third_party/glib/glib", 59 "//third_party/glib", 60 "//third_party/glib/gmodule", 61 ] 62} 63 64ohos_static_library("gst_codec_plugins_common") { 65 sources = [ 66 "vdec/gst_vdec_base.cpp", 67 "vdec/gst_vdec_base_cenc_dec.cpp", 68 "vdec/gst_vdec_h264.cpp", 69 "vdec/gst_vdec_h265.cpp", 70 "venc/gst_venc_base.cpp", 71 "venc/gst_venc_h264.cpp", 72 "venc/gst_venc_h265.cpp", 73 "venc/gst_venc_mpeg4.cpp", 74 ] 75 76 configs = [ ":gst_codec_plugins_common_config" ] 77 78 deps = [ 79 "//foundation/multimedia/player_framework/services/utils:media_service_utils", 80 "//third_party/glib:glib", 81 "//third_party/glib:gmodule", 82 "//third_party/glib:gobject", 83 "//third_party/gstreamer/gstplugins_base:gstvideo", 84 "//third_party/gstreamer/gstreamer:gstbase", 85 "//third_party/gstreamer/gstreamer:gstreamer", 86 ] 87 88 external_deps = [ 89 "c_utils:utils", 90 "graphic_surface:surface", 91 "hilog:libhilog", 92 "init:libbegetutil", 93 "media_foundation:media_foundation", 94 "qos_manager:qos", 95 ] 96 97 subsystem_name = "multimedia" 98 part_name = "player_framework" 99} 100