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_demo_muxer_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/inner_api/native", 44 "$av_codec_root_dir/interfaces/kits/c", 45 "$av_codec_root_dir/interfaces/plugin", 46 "$av_codec_root_dir/services/dfx/include", 47 "$av_codec_root_dir/services/media_engine/modules/muxer", 48 "$c_utils_root_dir/base/include", 49 ] 50} 51 52ohos_static_library("av_codec_demo_muxer") { 53 sources = [ 54 "avmuxer_demo.cpp", 55 "avmuxer_demo_base.cpp", 56 "avmuxer_demo_common.c", 57 "avmuxer_demo_runner.cpp", 58 "avmuxer_engine_demo.cpp", 59 "avmuxer_ffmpeg_demo.cpp", 60 "native_avmuxer_demo.c", 61 ] 62 public_configs = [ ":av_codec_demo_muxer_config" ] 63 64 public_external_deps = [ 65 "ffmpeg:libohosffmpeg", 66 "media_foundation:media_foundation", 67 ] 68 69 defines = [] 70 defines += av_codec_defines 71 deps = [ 72 "$av_codec_root_dir/interfaces/inner_api/native:av_codec_client", 73 "$av_codec_root_dir/interfaces/kits/c:capi_packages", 74 "$av_codec_root_dir/services/media_engine:av_codec_media_engine_package", 75 ] 76 77 external_deps = [ 78 "c_utils:utils", 79 "graphic_surface:surface", 80 "graphic_surface:sync_fence", 81 "media_foundation:media_foundation", 82 "media_foundation:native_media_core", 83 ] 84 85 subsystem_name = "multimedia" 86 part_name = "av_codec" 87} 88