• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
13import("//build/test.gni")
14import("//foundation/multimedia/histreamer/config.gni")
15import("//foundation/multimedia/player_framework/config.gni")
16
17module_output_path = "histreamer/ut"
18
19histreamer_unittest_cflags = [
20  "-std=c++17",
21  "-Wall",
22  "-Werror",
23]
24
25#################################################################################################################
26ohos_unittest("histreamer_unit_test") {
27  module_out_path = module_output_path
28  include_dirs = [
29    "$histreamer_root_dir/tests/ut/plugins/",
30    "$histreamer_root_dir/tests/ut/",
31    "$histreamer_root_dir/engine/include/plugin/",
32    "$histreamer_root_dir/engine/pipeline/core/",
33    "$histreamer_root_dir/engine/pipeline/filters/common/",
34    "./plugins/",
35  ]
36  cflags = histreamer_unittest_cflags
37  defines = []
38  defines += player_framework_defines
39
40  deps = [
41    "$histreamer_root_dir/engine/pipeline:histreamer_pipeline_base",
42    "$histreamer_root_dir/engine/pipeline/filters/codec:codec_filters",
43    "$histreamer_root_dir/engine/pipeline/filters/demux:demuxer_filter",
44    "$histreamer_root_dir/engine/plugin:ffmpeg_convert",
45    "$histreamer_root_dir/engine/plugin:histreamer_plugin_base",
46    "$histreamer_root_dir/engine/plugin:histreamer_plugin_core",
47    "$histreamer_root_dir/engine/plugin/plugins/codec_adapter:histreamer_plugin_CodecAdapter",
48    "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_adapter_common",
49    "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_audio_decoders",
50    "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_audio_encoders",
51    "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_demuxers",
52    "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_video_decoders",
53    "$histreamer_root_dir/engine/plugin/plugins/ffmpeg_adapter:ffmpeg_video_encoders",
54    "$histreamer_root_dir/engine/plugin/plugins/source/audio_capture:histreamer_plugin_StdAudioCapture",
55    "$histreamer_root_dir/engine/plugin/plugins/source/file_source:filesource",
56    "$histreamer_root_dir/engine/scene:std_engine_factory",
57    "$histreamer_root_dir/engine/scene/player:histreamer_player",
58    "//third_party/googletest:gtest_rtti",
59  ]
60
61  external_deps = [
62    "graphic_2d:surface",
63    "hdf_core:libpub_utils",
64  ]
65
66  public_configs = [
67    "$histreamer_root_dir/engine/plugin/plugins/codec_adapter:plugin_codec_adapter_config",
68    "//foundation/multimedia/audio_framework/frameworks/native/audiocapturer:audio_capturer_config",
69  ]
70
71  sources = [
72    "$histreamer_root_dir/engine/include/plugin/common/plugin_types.h",
73    "$histreamer_root_dir/engine/include/plugin/core/plugin_manager.h",
74    "../st/helper/media_data_source_imp.cpp",
75    "../st/helper/std_player.cpp",
76    "./TestAlgoExt.cpp",
77    "./TestAny.cpp",
78    "./TestBitReader.cpp",
79    "./TestBufferPool.cpp",
80    "./TestCommon.cpp",
81    "./TestCompatibleCheck.cpp",
82    "./TestDataPacker.cpp",
83    "./TestFFmpegAudioDecoder.cpp",
84    "./TestFFmpegAudioEncoder.cpp",
85    "./TestFFmpegAvcConfigDataParser.cpp",
86    "./TestFFmpegUtils.cpp",
87    "./TestFFmpegVidEncConfig.cpp",
88    "./TestFFmpegVideoDecoder.cpp",
89    "./TestFileSourcePlugin.cpp",
90    "./TestFilter.cpp",
91    "./TestHiPlayer.cpp",
92    "./TestMeta.cpp",
93    "./TestMimeDefs.cpp",
94    "./TestPipline.cpp",
95    "./TestPluginCommon.cpp",
96    "./TestPluginManager.cpp",
97    "./TestSynchronizer.cpp",
98    "./TestVideoFFmpegEncoder.cpp",
99    "./plugins/UtSourceTest1.cpp",
100    "./plugins/UtSourceTest2.cpp",
101  ]
102}
103