# Copyright (c) 2023 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/test.gni") import("//foundation/multimedia/media_foundation/config.gni") module_output_path = "media_foundation/unittest" histreamer_unittest_cflags = [ "-std=c++17", "-Wall", "-Werror", ] ################################################################################################################# ohos_unittest("histreamer_unit_test") { module_out_path = module_output_path include_dirs = [ "$histreamer_root_dir/test/unittest/plugins/", "$histreamer_root_dir/test/unittest/", "$histreamer_root_dir/engine/include/plugin/", "$histreamer_root_dir/engine/pipeline/core/", "$histreamer_root_dir/engine/pipeline/filters/common/", "$histreamer_root_dir/engine/plugin/core/", "./plugins/", "//drivers/peripheral/base/", "//third_party/openmax/api/1.1.2", "$histreamer_root_dir/engine/include/", "//graphic/graphic_surface/interfaces/innerkits/surface", "//foundation/window/window_manager/interfaces/innerkits/wm", ] cflags = histreamer_unittest_cflags deps = [ "$histreamer_root_dir/engine/pipeline:histreamer_pipeline_base", "$histreamer_root_dir/engine/pipeline/filters/codec:codec_filters", "$histreamer_root_dir/engine/pipeline/filters/demux:demuxer_filter", "$histreamer_root_dir/engine/plugin:ffmpeg_convert", "$histreamer_root_dir/engine/plugin:histreamer_plugin_base", "$histreamer_root_dir/engine/plugin:histreamer_plugin_core", "$histreamer_root_dir/engine/plugin/plugins/codec_adapter:histreamer_plugin_CodecAdapter", "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_adapter_common", "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_audio_decoders", "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_audio_encoders", "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_demuxers", "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_video_decoders", "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_video_encoders", "$histreamer_root_dir/engine/plugin/plugins/sink/audio_server_sink:histreamer_plugin_AudioServerSink", "$histreamer_root_dir/engine/plugin/plugins/sink/video_surface_sink:histreamer_plugin_StdVideoSurfaceSink", "$histreamer_root_dir/engine/plugin/plugins/source/audio_capture:histreamer_plugin_StdAudioCapture", "$histreamer_root_dir/engine/plugin/plugins/source/file_source:filesource", "$histreamer_root_dir/engine/plugin/plugins/source/http_source:httpsource", "//third_party/googletest:gtest_rtti", ] if (!hst_is_standard_sys) { deps += [ "$histreamer_root_dir/engine/scene:std_engine_factory", "$histreamer_root_dir/engine/scene/player:histreamer_player", ] } external_deps = [ "drivers_peripheral_codec:libcodec_hdi_omx_client", "drivers_peripheral_display:hdi_gralloc_client", "graphic_2d:librender_service_client", "graphic_surface:surface", "hdf_core:libpub_utils", "hilog:libhilog", "window_manager:libwm", ] public_configs = [ "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_config" ] sources = [ "$histreamer_root_dir/engine/include/plugin/common/plugin_types.h", "$histreamer_root_dir/engine/include/plugin/core/plugin_manager.h", "./TestAlgoExt.cpp", "./TestAny.cpp", "./TestBitReader.cpp", "./TestBufferPool.cpp", "./TestCommon.cpp", "./TestCompatibleCheck.cpp", "./TestDataPacker.cpp", "./TestFFmpegAudioDecoder.cpp", "./TestFFmpegAudioEncoder.cpp", "./TestFFmpegAvcConfigDataParser.cpp", "./TestFFmpegDemuxer.cpp", "./TestFFmpegUtils.cpp", "./TestFFmpegVidEncConfig.cpp", "./TestFFmpegVideoDecoder.cpp", "./TestFileSourcePlugin.cpp", "./TestFilter.cpp", "./TestHttpSourcePlugin.cpp", "./TestMeta.cpp", "./TestMimeDefs.cpp", "./TestPipline.cpp", "./TestPluginCommon.cpp", "./TestPluginManager.cpp", "./TestSynchronizer.cpp", "./TestVideoFFmpegEncoder.cpp", "./plugins/UtSourceTest1.cpp", "./plugins/UtSourceTest2.cpp", ] if (!hst_is_standard_sys) { sources += [ "./TestHiPlayer.cpp" ] } }