提交 18a41225 编写于 作者: L ling990

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

Signed-off-by: Nling990 <ling990@qq.com>
上级 ca92b0b5
......@@ -40,6 +40,7 @@ group("multimedia") {
"image/image_js_standard/imageYUV:image_yuv_js_hap",
"image/image_js_standard/image_ndk_test:image_pixelmap_ndk_hap",
"media/media_cpp_standard:ActsAvcodecNdkTest",
"media/media_cpp_standard:ActsAvcodecNdkTest",
"media/media_js_standard/audioPlayer:audio_player_js_hap",
"media/media_js_standard/audioRecorder:audio_recorder_js_hap",
"media/media_js_standard/recorderFormat:recorder_format_js_hap",
......
......@@ -28,9 +28,13 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") {
"audioDecEncNdk/include",
"videoDecEncNdk/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",
"//commonlibrary/c_utils/base/include",
"//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include",
"//foundation/multimedia/player_framework/frameworks/native/capi/common",
"//utils/native/base/include",
"//graphic/graphic_2d/interfaces/kits/surface",
"//graphic/graphic_2d/interfaces/inner_api/surface",
"//foundation/graphic/graphic_2d/frameworks/surface/include",
]
cflags = [
......@@ -51,8 +55,8 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") {
"",
]
external_deps = [ "c_utils:utils" ]
deps = [
"//foundation/graphic/graphic_2d:libsurface",
"//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_aenc",
......@@ -60,8 +64,10 @@ ohos_moduletest_suite("ActsAvcodecNdkTest") {
"//foundation/multimedia/player_framework/interfaces/kits/c:native_media_core",
"//foundation/multimedia/player_framework/interfaces/kits/c:native_media_vdec",
"//foundation/multimedia/player_framework/interfaces/kits/c:native_media_venc",
"//utils/native/base:utils",
]
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
subsystem_name = "multimedia"
part_name = "multimedia_player_framework"
subsystem_name = "multimedia"
}
......@@ -2,7 +2,7 @@
"description": "Config for avcodec ndk test cases",
"driver": {
"module-name": "ActsAvcodecNdkTest",
"native-test-timeout": "30000",
"native-test-timeout": "300000",
"native-test-device-path": "/data/local/tmp",
"runtime-hint": "1s",
"type": "CppTest"
......@@ -11,6 +11,10 @@
{
"type": "PushKit",
"pre-push" : [
"mount -o rw,remount /",
"rm /data/media/*",
"mkdir -p /data/media/",
"mkdir -p /data/local/tmp/"
],
"push": [
"ActsAvcodecNdkTest->/data/local/tmp/ActsAvcodecNdkTest",
......
......@@ -244,11 +244,19 @@ HWTEST_F(ActsAudioDecEncNdkTest, SUB_MULTIMEDIA_MEDIA_AUDIO_DEC_ENC_FUNCTION_040
ASSERT_EQ(AV_ERR_OK, aDecEncSample->PrepareEnc());
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->SetEosState(false);
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc());
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->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());
while (!aDecEncSample->GetEncEosState()) {};
......@@ -341,11 +349,19 @@ HWTEST_F(ActsAudioDecEncNdkTest, SUB_MULTIMEDIA_MEDIA_AUDIO_DEC_ENC_FUNCTION_060
ASSERT_EQ(AV_ERR_OK, aDecEncSample->PrepareEnc());
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->SetEosState(false);
ASSERT_EQ(AV_ERR_OK, aDecEncSample->StartEnc());
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->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->CalcuError());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册