diff --git a/av_transport/av_trans_engine/filters/test/BUILD.gn b/av_transport/av_trans_engine/filters/test/BUILD.gn index 43090d382b3c6657ce521de691608a0850a56660..9788b2aeec75effd9886a0c937c8cc4c03482318 100644 --- a/av_transport/av_trans_engine/filters/test/BUILD.gn +++ b/av_transport/av_trans_engine/filters/test/BUILD.gn @@ -15,6 +15,9 @@ group("filter_test") { testonly = true deps = [ + "av_trans_coder_filter_test:av_trans_coder_filter_unittest", + "av_trans_input_filter_test:av_trans_input_filter_unittest", + "av_trans_output_filter_test:av_trans_audio_output_filter_unittest", "av_transport_input_filter_test:input_filter_unittest", "av_transport_output_filter_test:output_filter_unittest", ] diff --git a/av_transport/av_trans_engine/filters/test/av_trans_coder_filter_test/BUILD.gn b/av_transport/av_trans_engine/filters/test/av_trans_coder_filter_test/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..0beb9df1e2f3227e2d31b3211354371801f6b8aa --- /dev/null +++ b/av_transport/av_trans_engine/filters/test/av_trans_coder_filter_test/BUILD.gn @@ -0,0 +1,134 @@ +# Copyright (c) 2023-2024 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("../../../../distributed_av_transport.gni") + +module_out_path = "distributed_hardware_fwk/av_trans_coder" + +config("module_private_config") { + visibility = [ ":*" ] + + include_dirs = [ + "${filters_path}/av_trans_coder", + "${common_path}/include", + "${distributed_av_transport_path}/framework", + "${distributed_av_transport_path}/framework/filter/include", + "${distributed_av_transport_path}/framework/pipeline/include", + ] +} + +ohos_unittest("AvTransportAudioDecoderFilterTest") { + module_out_path = module_out_path + + configs = [ ":module_private_config" ] + + sources = [ "av_trans_audio_decoder_filter_test.cpp" ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-fexceptions", + "-Dprivate = public", + "-Dprotected = public", + ] + cflags_cc = cflags + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"av_trans_audio_decoder_filter_test\"", + "LOG_DOMAIN=0xD004101", + ] + + deps = [ + "${distributed_av_transport_path}/framework:distributed_av_pipeline_fwk", + ] + + if (histreamer_compile_part) { + external_deps = [ + "media_foundation:histreamer_base", + "media_foundation:histreamer_codec_filters", + "media_foundation:histreamer_ffmpeg_convert", + ] + } + + external_deps += [ + "av_codec:av_codec_client", + "av_codec:native_media_acodec", + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "c_utils:utils", + "dsoftbus:softbus_client", + "googletest:gtest", + "hilog:libhilog", + "libevdev:libevdev", + ] +} + +ohos_unittest("AvTransportAudioEncoderFilterTest") { + module_out_path = module_out_path + + configs = [ ":module_private_config" ] + + sources = [ "av_trans_audio_encoder_filter_test.cpp" ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-fexceptions", + "-Dprivate = public", + "-Dprotected = public", + ] + cflags_cc = cflags + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"av_trans_audio_decoder_filter_test\"", + "LOG_DOMAIN=0xD004101", + ] + + deps = [ + "${distributed_av_transport_path}/framework:distributed_av_pipeline_fwk", + ] + + if (histreamer_compile_part) { + external_deps = [ + "media_foundation:histreamer_base", + "media_foundation:histreamer_codec_filters", + "media_foundation:histreamer_ffmpeg_convert", + ] + } + + external_deps += [ + "av_codec:av_codec_client", + "av_codec:native_media_acodec", + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "c_utils:utils", + "dsoftbus:softbus_client", + "googletest:gtest", + "hilog:libhilog", + "libevdev:libevdev", + ] +} + +group("av_trans_coder_filter_unittest") { + testonly = true + + deps = [ + ":AvTransportAudioDecoderFilterTest", + ":AvTransportAudioEncoderFilterTest", + ] +} diff --git a/av_transport/av_trans_engine/filters/test/av_trans_input_filter_test/BUILD.gn b/av_transport/av_trans_engine/filters/test/av_trans_input_filter_test/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..faa5b7f8ea88d81e830212efe2b234ecf8c1c14c --- /dev/null +++ b/av_transport/av_trans_engine/filters/test/av_trans_input_filter_test/BUILD.gn @@ -0,0 +1,134 @@ +# Copyright (c) 2023-2024 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("../../../../distributed_av_transport.gni") + +module_out_path = "distributed_hardware_fwk/av_trans_input" + +config("module_private_config") { + visibility = [ ":*" ] + + include_dirs = [ + "${filters_path}/av_trans_input", + "${filters_path}/av_trans_coder", + "${common_path}/include", + "${distributed_av_transport_path}/framework", + "${distributed_av_transport_path}/framework/filter/include", + "${distributed_av_transport_path}/framework/pipeline/include", + ] +} + +ohos_unittest("AvTransAudioInputFilterTest") { + module_out_path = module_out_path + + configs = [ ":module_private_config" ] + + sources = [ "av_trans_audio_input_filter_test.cpp" ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-fexceptions", + "-Dprivate = public", + "-Dprotected = public", + ] + cflags_cc = cflags + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"av_trans_audio_input_filter_test\"", + "LOG_DOMAIN=0xD004101", + ] + + deps = [ + "${distributed_av_transport_path}/framework:distributed_av_pipeline_fwk", + ] + + if (histreamer_compile_part) { + external_deps = [ + "media_foundation:histreamer_base", + "media_foundation:histreamer_codec_filters", + "media_foundation:histreamer_ffmpeg_convert", + ] + } + + external_deps += [ + "av_codec:av_codec_client", + "av_codec:native_media_acodec", + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "c_utils:utils", + "dsoftbus:softbus_client", + "googletest:gtest", + "hilog:libhilog", + "libevdev:libevdev", + ] +} + +ohos_unittest("AVTransBusInputFilterTest") { + module_out_path = module_out_path + + configs = [ ":module_private_config" ] + + sources = [ "av_trans_bus_input_filter_test.cpp" ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-fexceptions", + "-Dprivate = public", + "-Dprotected = public", + ] + cflags_cc = cflags + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"av_trans_bus_input_filter_test\"", + "LOG_DOMAIN=0xD004101", + ] + + deps = [ + "${distributed_av_transport_path}/framework:distributed_av_pipeline_fwk", + ] + + if (histreamer_compile_part) { + external_deps = [ + "media_foundation:histreamer_base", + "media_foundation:histreamer_codec_filters", + "media_foundation:histreamer_ffmpeg_convert", + ] + } + + external_deps += [ + "av_codec:av_codec_client", + "av_codec:native_media_acodec", + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "c_utils:utils", + "dsoftbus:softbus_client", + "googletest:gtest", + "hilog:libhilog", + "libevdev:libevdev", + ] +} + +group("av_trans_input_filter_unittest") { + testonly = true + deps = [ + ":AVTransBusInputFilterTest", + ":AvTransAudioInputFilterTest", + ] +} diff --git a/av_transport/av_trans_engine/filters/test/av_trans_output_filter_test/BUILD.gn b/av_transport/av_trans_engine/filters/test/av_trans_output_filter_test/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..ef7b24db1b07507ca03800b10e9ec5e85afdf4d7 --- /dev/null +++ b/av_transport/av_trans_engine/filters/test/av_trans_output_filter_test/BUILD.gn @@ -0,0 +1,135 @@ +# Copyright (c) 2023-2024 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("../../../../distributed_av_transport.gni") + +module_out_path = "distributed_hardware_fwk/av_trans_output" + +config("module_private_config") { + visibility = [ ":*" ] + + include_dirs = [ + "${filters_path}/av_trans_input", + "${filters_path}/av_trans_coder", + "${filters_path}/av_trans_output", + "${common_path}/include", + "${distributed_av_transport_path}/framework", + "${distributed_av_transport_path}/framework/filter/include", + "${distributed_av_transport_path}/framework/pipeline/include", + ] +} + +ohos_unittest("AvTransAudioOutputFilterTest") { + module_out_path = module_out_path + + configs = [ ":module_private_config" ] + + sources = [ "av_trans_audio_output_filter_test.cpp" ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-fexceptions", + "-Dprivate = public", + "-Dprotected = public", + ] + cflags_cc = cflags + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"av_trans_audio_output_filter_test\"", + "LOG_DOMAIN=0xD004101", + ] + + deps = [ + "${distributed_av_transport_path}/framework:distributed_av_pipeline_fwk", + ] + + if (histreamer_compile_part) { + external_deps = [ + "media_foundation:histreamer_base", + "media_foundation:histreamer_codec_filters", + "media_foundation:histreamer_ffmpeg_convert", + ] + } + + external_deps += [ + "av_codec:av_codec_client", + "av_codec:native_media_acodec", + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "c_utils:utils", + "dsoftbus:softbus_client", + "googletest:gtest", + "hilog:libhilog", + "libevdev:libevdev", + ] +} + +ohos_unittest("AVTransAudioDSoftbusOutputFilterTest") { + module_out_path = module_out_path + + configs = [ ":module_private_config" ] + + sources = [ "av_trans_dsoftbus_output_filter_test.cpp" ] + + cflags = [ + "-O2", + "-fPIC", + "-Wall", + "-fexceptions", + "-Dprivate = public", + "-Dprotected = public", + ] + cflags_cc = cflags + + defines = [ + "HI_LOG_ENABLE", + "DH_LOG_TAG=\"av_trans_dsoftbus_output_filter_test\"", + "LOG_DOMAIN=0xD004101", + ] + + deps = [ + "${distributed_av_transport_path}/framework:distributed_av_pipeline_fwk", + ] + + if (histreamer_compile_part) { + external_deps = [ + "media_foundation:histreamer_base", + "media_foundation:histreamer_codec_filters", + "media_foundation:histreamer_ffmpeg_convert", + ] + } + + external_deps += [ + "av_codec:av_codec_client", + "av_codec:native_media_acodec", + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "c_utils:utils", + "dsoftbus:softbus_client", + "googletest:gtest", + "hilog:libhilog", + "libevdev:libevdev", + ] +} + +group("av_trans_audio_output_filter_unittest") { + testonly = true + deps = [ + ":AVTransAudioDSoftbusOutputFilterTest", + ":AvTransAudioOutputFilterTest", + ] +}