提交 d9abc6fd 编写于 作者: L ling990

modify testcases Signed-off-by: ling990 <liling96@huawei.com>

Signed-off-by: Nling990 <ling990@qq.com>
上级 2d979c7c
...@@ -39,6 +39,7 @@ group("multimedia") { ...@@ -39,6 +39,7 @@ group("multimedia") {
"image/image_js_standard/imageWebp:image_webp_js_hap", "image/image_js_standard/imageWebp:image_webp_js_hap",
"image/image_js_standard/imageYUV:image_yuv_js_hap", "image/image_js_standard/imageYUV:image_yuv_js_hap",
"image/image_js_standard/image_ndk_test:image_pixelmap_ndk_hap", "image/image_js_standard/image_ndk_test:image_pixelmap_ndk_hap",
"media/media_cpp_standard:ActsAvcodecNdkTest",
"media/media_js_standard/audioPlayer:audio_player_js_hap", "media/media_js_standard/audioPlayer:audio_player_js_hap",
"media/media_js_standard/audioRecorder:audio_recorder_js_hap", "media/media_js_standard/audioRecorder:audio_recorder_js_hap",
"media/media_js_standard/recorderFormat:recorder_format_js_hap", "media/media_js_standard/recorderFormat:recorder_format_js_hap",
......
...@@ -28,9 +28,13 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") { ...@@ -28,9 +28,13 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") {
"audioDecEncNdk/include", "audioDecEncNdk/include",
"videoDecEncNdk/include", "videoDecEncNdk/include",
"//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include", "//foundation/multimedia/audio_framework/interfaces/inner_api/native/audiocommon/include",
"//foundation/multimedia/player_framework/interfaces/inner_api/native",
"//foundation/multimedia/player_framework/interfaces/kits/c", "//foundation/multimedia/player_framework/interfaces/kits/c",
"//foundation/multimedia/player_framework/frameworks/native/capi/common",
"//utils/native/base/include", "//utils/native/base/include",
"//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include", "//graphic/graphic_2d/interfaces/kits/surface",
"//graphic/graphic_2d/interfaces/inner_api/surface",
"//foundation/graphic/graphic_2d/frameworks/surface/include",
] ]
cflags = [ cflags = [
...@@ -52,6 +56,7 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") { ...@@ -52,6 +56,7 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") {
] ]
deps = [ deps = [
"//foundation/graphic/graphic_2d:libsurface",
"//foundation/graphic/graphic_2d/frameworks/surface:surface", "//foundation/graphic/graphic_2d/frameworks/surface:surface",
"//foundation/multimedia/player_framework/interfaces/kits/c:native_media_adec", "//foundation/multimedia/player_framework/interfaces/kits/c:native_media_adec",
"//foundation/multimedia/player_framework/interfaces/kits/c:native_media_aenc", "//foundation/multimedia/player_framework/interfaces/kits/c:native_media_aenc",
...@@ -61,7 +66,8 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") { ...@@ -61,7 +66,8 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") {
"//foundation/multimedia/player_framework/interfaces/kits/c:native_media_venc", "//foundation/multimedia/player_framework/interfaces/kits/c:native_media_venc",
"//utils/native/base:utils", "//utils/native/base:utils",
] ]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
subsystem_name = "multimedia"
part_name = "multimedia_player_framework" part_name = "multimedia_player_framework"
subsystem_name = "multimedia"
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"description": "Config for avcodec ndk test cases", "description": "Config for avcodec ndk test cases",
"driver": { "driver": {
"module-name": "ActsAvcodecNdkTest", "module-name": "ActsAvcodecNdkTest",
"native-test-timeout": "30000", "native-test-timeout": "300000",
"native-test-device-path": "/data/local/tmp", "native-test-device-path": "/data/local/tmp",
"runtime-hint": "1s", "runtime-hint": "1s",
"type": "CppTest" "type": "CppTest"
......
...@@ -244,11 +244,19 @@ HWTEST_F(ActsAudioDecEncNdkTest, SUB_MULTIMEDIA_MEDIA_AUDIO_DEC_ENC_FUNCTION_040 ...@@ -244,11 +244,19 @@ HWTEST_F(ActsAudioDecEncNdkTest, SUB_MULTIMEDIA_MEDIA_AUDIO_DEC_ENC_FUNCTION_040
ASSERT_EQ(AV_ERR_OK, aDecEncSample->PrepareEnc()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->PrepareEnc());
aDecEncSample->SetReadPath(READPATH, ES_AAC_48000_32_1, ES_AAC_48000_32_1_Length); aDecEncSample->SetReadPath(READPATH, ES_AAC_48000_32_1, ES_AAC_48000_32_1_Length);
aDecEncSample->SetSavePath("/data/media/AAC_48000_32_1_out4.aac"); aDecEncSample->SetSavePath("/data/media/AAC_48000_32_1_out4.aac");
aDecEncSample->SetEosState(false);
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec());
while (aDecEncSample->GetFrameCount() < 100) {}; while (aDecEncSample->GetFrameCount() < 50) {};
ASSERT_EQ(AV_ERR_OK, aDecEncSample->FlushDec()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->FlushDec());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->FlushEnc());
aDecEncSample->ReRead();
aDecEncSample->ResetDecParam();
aDecEncSample->ResetEncParam();
aDecEncSample->SetSavePath("/data/media/AAC_48000_32_1_out4_2.aac");
aDecEncSample->SetEosState(true);
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec());
while (!aDecEncSample->GetEncEosState()) {}; while (!aDecEncSample->GetEncEosState()) {};
...@@ -341,11 +349,19 @@ HWTEST_F(ActsAudioDecEncNdkTest, SUB_MULTIMEDIA_MEDIA_AUDIO_DEC_ENC_FUNCTION_060 ...@@ -341,11 +349,19 @@ HWTEST_F(ActsAudioDecEncNdkTest, SUB_MULTIMEDIA_MEDIA_AUDIO_DEC_ENC_FUNCTION_060
ASSERT_EQ(AV_ERR_OK, aDecEncSample->PrepareEnc()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->PrepareEnc());
aDecEncSample->SetReadPath(READPATH, ES_AAC_48000_32_1, ES_AAC_48000_32_1_Length); aDecEncSample->SetReadPath(READPATH, ES_AAC_48000_32_1, ES_AAC_48000_32_1_Length);
aDecEncSample->SetSavePath("/data/media/AAC_48000_32_1_out6.aac"); aDecEncSample->SetSavePath("/data/media/AAC_48000_32_1_out6.aac");
aDecEncSample->SetEosState(false);
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec());
while (aDecEncSample->GetFrameCount() < 100) {}; while (aDecEncSample->GetFrameCount() < 50) {};
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StopDec()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StopDec());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StopEnc());
aDecEncSample->ReRead();
aDecEncSample->ResetDecParam();
aDecEncSample->ResetEncParam();
aDecEncSample->SetSavePath("/data/media/AAC_48000_32_1_out6_2.aac");
aDecEncSample->SetEosState(true);
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartDec());
ASSERT_EQ(AV_ERR_OK, aDecEncSample->CalcuError()); ASSERT_EQ(AV_ERR_OK, aDecEncSample->CalcuError());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册