1fa7767c5Sopenharmony_ci# Copyright (c) 2023 Huawei Device Co., Ltd. 2fa7767c5Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3fa7767c5Sopenharmony_ci# you may not use this file except in compliance with the License. 4fa7767c5Sopenharmony_ci# You may obtain a copy of the License at 5fa7767c5Sopenharmony_ci# 6fa7767c5Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7fa7767c5Sopenharmony_ci# 8fa7767c5Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9fa7767c5Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10fa7767c5Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11fa7767c5Sopenharmony_ci# See the License for the specific language governing permissions and 12fa7767c5Sopenharmony_ci# limitations under the License. 13fa7767c5Sopenharmony_ciimport("//build/test.gni") 14fa7767c5Sopenharmony_ciimport("//foundation/multimedia/media_foundation/config.gni") 15fa7767c5Sopenharmony_ci 16fa7767c5Sopenharmony_cimodule_output_path = "media_foundation/unittest" 17fa7767c5Sopenharmony_ci 18fa7767c5Sopenharmony_cihistreamer_unittest_cflags = [ 19fa7767c5Sopenharmony_ci "-std=c++17", 20fa7767c5Sopenharmony_ci "-Wall", 21fa7767c5Sopenharmony_ci "-Werror", 22fa7767c5Sopenharmony_ci] 23fa7767c5Sopenharmony_ci 24fa7767c5Sopenharmony_ci################################################################################################################# 25fa7767c5Sopenharmony_ciohos_unittest("histreamer_unit_test") { 26fa7767c5Sopenharmony_ci module_out_path = module_output_path 27fa7767c5Sopenharmony_ci include_dirs = [ 28fa7767c5Sopenharmony_ci "$histreamer_root_dir/test/unittest/plugins/", 29fa7767c5Sopenharmony_ci "$histreamer_root_dir/test/unittest/", 30fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/include/plugin/", 31fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/pipeline/core/", 32fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/pipeline/filters/common/", 33fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/core/", 34fa7767c5Sopenharmony_ci "./plugins/", 35fa7767c5Sopenharmony_ci "//drivers/peripheral/base/", 36fa7767c5Sopenharmony_ci "//third_party/openmax/api/1.1.2", 37fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/include/", 38fa7767c5Sopenharmony_ci "//graphic/graphic_surface/interfaces/innerkits/surface", 39fa7767c5Sopenharmony_ci "//foundation/window/window_manager/interfaces/innerkits/wm", 40fa7767c5Sopenharmony_ci ] 41fa7767c5Sopenharmony_ci cflags = histreamer_unittest_cflags 42fa7767c5Sopenharmony_ci 43fa7767c5Sopenharmony_ci deps = [ 44fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/pipeline:histreamer_pipeline_base", 45fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/pipeline/filters/codec:codec_filters", 46fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/pipeline/filters/demux:demuxer_filter", 47fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin:ffmpeg_convert", 48fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin:histreamer_plugin_base", 49fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin:histreamer_plugin_core", 50fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/codec_adapter:histreamer_plugin_CodecAdapter", 51fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_adapter_common", 52fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_audio_decoders", 53fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_audio_encoders", 54fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_demuxers", 55fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_video_decoders", 56fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_video_encoders", 57fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/sink/audio_server_sink:histreamer_plugin_AudioServerSink", 58fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/sink/video_surface_sink:std_video_surface_sink", 59fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/source/audio_capture:histreamer_plugin_StdAudioCapture", 60fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/source/file_source:filesource", 61fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/plugin/plugins/source/http_source:httpsource", 62fa7767c5Sopenharmony_ci "//third_party/googletest:gtest_rtti", 63fa7767c5Sopenharmony_ci ] 64fa7767c5Sopenharmony_ci if (!hst_is_standard_sys) { 65fa7767c5Sopenharmony_ci deps += [ 66fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/scene:std_engine_factory", 67fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/scene/player:histreamer_player", 68fa7767c5Sopenharmony_ci ] 69fa7767c5Sopenharmony_ci } 70fa7767c5Sopenharmony_ci 71fa7767c5Sopenharmony_ci external_deps = [ 72fa7767c5Sopenharmony_ci "drivers_peripheral_codec:libcodec_hdi_omx_client", 73fa7767c5Sopenharmony_ci "drivers_peripheral_display:hdi_gralloc_client", 74fa7767c5Sopenharmony_ci "graphic_2d:librender_service_client", 75fa7767c5Sopenharmony_ci "graphic_surface:surface", 76fa7767c5Sopenharmony_ci "hdf_core:libpub_utils", 77fa7767c5Sopenharmony_ci "hilog:libhilog", 78fa7767c5Sopenharmony_ci "window_manager:libwm", 79fa7767c5Sopenharmony_ci ] 80fa7767c5Sopenharmony_ci 81fa7767c5Sopenharmony_ci public_configs = [ "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_config" ] 82fa7767c5Sopenharmony_ci 83fa7767c5Sopenharmony_ci sources = [ 84fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/include/plugin/common/plugin_types.h", 85fa7767c5Sopenharmony_ci "$histreamer_root_dir/engine/include/plugin/core/plugin_manager.h", 86fa7767c5Sopenharmony_ci "./TestAlgoExt.cpp", 87fa7767c5Sopenharmony_ci "./TestAny.cpp", 88fa7767c5Sopenharmony_ci "./TestBitReader.cpp", 89fa7767c5Sopenharmony_ci "./TestBufferPool.cpp", 90fa7767c5Sopenharmony_ci "./TestCommon.cpp", 91fa7767c5Sopenharmony_ci "./TestCompatibleCheck.cpp", 92fa7767c5Sopenharmony_ci "./TestDataPacker.cpp", 93fa7767c5Sopenharmony_ci "./TestFFmpegAudioDecoder.cpp", 94fa7767c5Sopenharmony_ci "./TestFFmpegAudioEncoder.cpp", 95fa7767c5Sopenharmony_ci "./TestFFmpegAvcConfigDataParser.cpp", 96fa7767c5Sopenharmony_ci "./TestFFmpegDemuxer.cpp", 97fa7767c5Sopenharmony_ci "./TestFFmpegUtils.cpp", 98fa7767c5Sopenharmony_ci "./TestFFmpegVidEncConfig.cpp", 99fa7767c5Sopenharmony_ci "./TestFFmpegVideoDecoder.cpp", 100fa7767c5Sopenharmony_ci "./TestFileSourcePlugin.cpp", 101fa7767c5Sopenharmony_ci "./TestFilter.cpp", 102fa7767c5Sopenharmony_ci "./TestHttpSourcePlugin.cpp", 103fa7767c5Sopenharmony_ci "./TestMeta.cpp", 104fa7767c5Sopenharmony_ci "./TestMimeDefs.cpp", 105fa7767c5Sopenharmony_ci "./TestPipline.cpp", 106fa7767c5Sopenharmony_ci "./TestPluginCommon.cpp", 107fa7767c5Sopenharmony_ci "./TestPluginManager.cpp", 108fa7767c5Sopenharmony_ci "./TestSurfaceSinkPlugin.cpp", 109fa7767c5Sopenharmony_ci "./TestSynchronizer.cpp", 110fa7767c5Sopenharmony_ci "./TestVideoFFmpegEncoder.cpp", 111fa7767c5Sopenharmony_ci "./plugins/UtSourceTest1.cpp", 112fa7767c5Sopenharmony_ci "./plugins/UtSourceTest2.cpp", 113fa7767c5Sopenharmony_ci ] 114fa7767c5Sopenharmony_ci 115fa7767c5Sopenharmony_ci if (!hst_is_standard_sys) { 116fa7767c5Sopenharmony_ci sources += [ "./TestHiPlayer.cpp" ] 117fa7767c5Sopenharmony_ci } 118fa7767c5Sopenharmony_ci} 119