1# Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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("//build/test.gni") 16import("//foundation/CastEngine/castengine_wifi_display/config.gni") 17 18module_out_path = "sharing/mediachannel" 19 20ohos_unittest("media_channel_unit_test") { 21 module_out_path = module_out_path 22 23 include_dirs = [ 24 "$SHARING_ROOT_DIR/services", 25 "$SHARING_ROOT_DIR/services/mediachannel", 26 "$SHARING_ROOT_DIR/frameworks/innerkitsimpl", 27 "$SHARING_ROOT_DIR/services/utils/native/base/include", 28 "$SHARING_ROOT_DIR/services/mediaplayer/include", 29 "$SHARING_ROOT_DIR/services/utils/native/base/include", 30 "$SHARING_ROOT_DIR/services/codec/include", 31 "$SHARING_ROOT_DIR/services/utils", 32 "$SHARING_ROOT_DIR/services/common", 33 "$SHARING_ROOT_DIR/services/protocol", 34 "$SHARING_ROOT_DIR/services/protocol/frame", 35 "$SHARING_ROOT_DIR/services/protocol/rtp", 36 "$SHARING_ROOT_DIR/services/protocol/rtp/interfaces", 37 "$SHARING_ROOT_DIR/services/extend/magic_enum", 38 ] 39 40 sources = [ "media_channel_unit_test.cpp" ] 41 42 cflags = [ 43 "-Wall", 44 "-fno-rtti", 45 "-fno-exceptions", 46 "-fno-common", 47 "-fstack-protector-strong", 48 "-Wshadow", 49 "-FPIC", 50 "-FS", 51 "-O2", 52 "-D_FORTIFY_SOURCE=2", 53 "-fvisibility=hidden", 54 "-Wformat=2", 55 "-Wdate-time", 56 "-Werror", 57 "-Wextra", 58 "-Wimplicit-fallthrough", 59 "-Wsign-compare", 60 "-Wno-unused-parameter", 61 "-Wno-deprecated-declarations", 62 "-Dprivate=public", 63 "-Dprotected=public", 64 ] 65 66 cflags_cc = cflags 67 cflags_cc += [ "-std=c++17" ] 68 69 deps = [ 70 "$SHARING_ROOT_DIR/services/codec:sharing_codec", 71 "$SHARING_ROOT_DIR/services/common:sharing_common", 72 "$SHARING_ROOT_DIR/services/configuration:sharing_configure_srcs", 73 "$SHARING_ROOT_DIR/services/event:sharing_event_srcs", 74 "$SHARING_ROOT_DIR/services/mediachannel:sharing_media_channel_srcs", 75 "$SHARING_ROOT_DIR/services/mediaplayer:sharing_media_player_srcs", 76 "$SHARING_ROOT_DIR/services/utils:sharing_utils", 77 "//third_party/googletest:gtest_main", 78 ] 79 80 external_deps = [ 81 "audio_framework:audio_capturer", 82 "audio_framework:audio_client", 83 "audio_framework:audio_renderer", 84 "av_codec:av_codec_client", 85 "c_utils:utils", 86 "c_utils:utilsbase", 87 "graphic_surface:surface", 88 "hilog:libhilog", 89 "media_foundation:media_foundation", 90 "player_framework:media_client", 91 "samgr:samgr_proxy", 92 ] 93} 94