diff --git a/multimedia/BUILD.gn b/multimedia/BUILD.gn index 0ad584ca9f3dc5f4930e838d0b1595644ee07f64..f00529fb49e3f459e0347f0dd66d63f43d87b893 100644 --- a/multimedia/BUILD.gn +++ b/multimedia/BUILD.gn @@ -23,6 +23,8 @@ group("multimedia") { "media/media_js_standard/audioEncoder:audio_encoder_js_hap", "media/media_js_standard/audioPlayer:audio_player_js_hap", + #"media/media_js_standard/videoDecoder:video_decoder_js_hap", + #"media/media_js_standard/videoEncoder:video_encoder_js_hap" #"image/image_js_standard:image_js_hap", #"media/media_js_standard/videoPlayer:video_player_js_hap", #"media/media_js_standard/videoRecorder:video_recorder_js_hap", diff --git a/multimedia/media/media_js_standard/audioDecoder/Test.json b/multimedia/media/media_js_standard/audioDecoder/Test.json index 8ff15aaab5eed18c2d2e5ffcd250f892e6057e87..a668990d5b18edfb2b37c79d218ad5024041e958 100644 --- a/multimedia/media/media_js_standard/audioDecoder/Test.json +++ b/multimedia/media/media_js_standard/audioDecoder/Test.json @@ -12,20 +12,19 @@ "pre-push": [ ], "push": [ - "./resource/audio/audioDecode/AAC_48000_32_1.aac ->/data/media/", - "./resource/audio/audioDecode/AAC_16000_1.aac ->/data/media/", - "./resource/audio/audioDecode/FLAC_48000_32_1.flac ->/data/media/", - "./resource/audio/audioDecode/mp3.es ->/data/media/", - "./resource/audio/audioDecode/vorbis.es ->/data/media/" + "./resource/audio/audioDecode/AAC_48000_32_1.aac ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/", + "./resource/audio/audioDecode/AAC_16000_1.aac ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/", + "./resource/audio/audioDecode/FLAC_48000_32_1.flac ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/", + "./resource/audio/audioDecode/mp3.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/", + "./resource/audio/audioDecode/vorbis.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/" ] }, { "type": "ShellKit", "run-command": [ - "rm -R /data/media/results", - "chmod 777 -R /data/media", - "chmod 777 /data/media/*", - "mkdir /data/media/results", + "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/results/", + "chmod 777 -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder", + "chmod 777 /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/*", "setenforce 0" ], "teardown-command":[ diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js index 410df99aec3299ca58fe1e0aaace68ce4954d8f0..5519485509011206e07f6a03ba2cb00e71e86b00 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js @@ -18,11 +18,12 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioDecoderFormatCallback', function () { - const AUDIOPATH1 = '/data/media/AAC_48000_32_1.aac'; - const AUDIOPATH2 = '/data/media/FLAC_48000_32_1.flac'; - const AUDIOPATH3 = '/data/media/mp3.es'; - const AUDIOPATH4 = '/data/media/vorbis.es'; - const BASIC_PATH = '/data/media/results/decode_format_callback_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH1 = RESOURCEPATH + 'AAC_48000_32_1.aac'; + const AUDIOPATH2 = RESOURCEPATH + 'FLAC_48000_32_1.flac' + const AUDIOPATH3 = RESOURCEPATH + 'mp3.es'; + const AUDIOPATH4 = RESOURCEPATH + 'vorbis.es'; + const BASIC_PATH = RESOURCEPATH + 'results/decode_format_callback_'; let audioDecodeProcessor; let readStreamSync; let needGetMediaDes = false; diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js index 2dc5f94ead6ea5e3f7c066fd11a861447975881d..dd126061091ca5d88c31e13b6a298d451331be4b 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js @@ -18,11 +18,12 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioDecoderFormatPromise', function () { - const AUDIOPATH1 = '/data/media/AAC_48000_32_1.aac' - const AUDIOPATH2 = '/data/media/FLAC_48000_32_1.flac' - const AUDIOPATH3 = '/data/media/mp3.es'; - const AUDIOPATH4 = '/data/media/vorbis.es'; - const BASIC_PATH = '/data/media/results/decode_format_promise_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH1 = RESOURCEPATH + 'AAC_48000_32_1.aac'; + const AUDIOPATH2 = RESOURCEPATH + 'FLAC_48000_32_1.flac' + const AUDIOPATH3 = RESOURCEPATH + 'mp3.es'; + const AUDIOPATH4 = RESOURCEPATH + 'vorbis.es'; + const BASIC_PATH = RESOURCEPATH + 'results/decode_format_promise_'; let audioDecodeProcessor; let readStreamSync; let needGetMediaDes = false; diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js index a0319b1c5ead58344961d8698399b007de757a92..9a8b24c3c892041b562b75a1e055a4365852437b 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js @@ -17,11 +17,12 @@ import media from '@ohos.multimedia.media' import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -describe('AudioDecoderFunc', function () { - const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; - const AUDIOPATH2 = '/data/media/AAC_16000_1.aac'; - const AUDIOPATH3 = '/data/media/FLAC_48000_32_1.flac'; - const BASIC_PATH = '/data/media/results/decode_func_callback_'; +describe('AudioDecoderFuncCallback', function () { + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac'; + const AUDIOPATH2 = RESOURCEPATH + 'AAC_16000_1.aac'; + const AUDIOPATH3 = RESOURCEPATH + 'FLAC_48000_32_1.flac'; + const BASIC_PATH = RESOURCEPATH + 'results/decode_func_callback_'; let audioDecodeProcessor; let readStreamSync; let eosframenum = 0; diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js index b035b303a69ecf08c4588b1c0d7b33df1dde7f03..ca051b1d0445875282fa9247e121cbd3eef87fa3 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js @@ -17,11 +17,12 @@ import media from '@ohos.multimedia.media' import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -describe('AudioDecoderFunc', function () { - const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; - const AUDIOPATH2 = '/data/media/AAC_16000_1.aac'; - const AUDIOPATH3 = '/data/media/FLAC_48000_32_1.flac'; - const BASIC_PATH = '/data/media/results/decode_func_promise_'; +describe('AudioDecoderFuncPromise', function () { + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac'; + const AUDIOPATH2 = RESOURCEPATH + 'AAC_16000_1.aac'; + const AUDIOPATH3 = RESOURCEPATH + 'FLAC_48000_32_1.flac'; + const BASIC_PATH = RESOURCEPATH + 'results/decode_func_promise_'; let audioDecodeProcessor; let readStreamSync; let eosframenum = 0; diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js index c30ae802bbc45ae6c84b6ccaa3d813762eeab6cc..825545aee6b6ee613c0f7229aafc4089eeb1dc99 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js @@ -18,8 +18,8 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioDecoderMultiInstances', function () { - const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; - const BASIC_PATH = '/data/media/results/decode_multiInstances_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac'; let readStreamSync; let eosframenum = 0; let samplerate = 44.1; diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js index d6f2523d700821502f710363b17e2841c20b61ce..1ffb735d2893344b8e2ac42a355f7b7effea29af 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js @@ -18,8 +18,9 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioDecoderReliabilityCallback', function () { - const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; - const BASIC_PATH = '/data/media/results/decode_reliability_callback_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac'; + const BASIC_PATH = RESOURCEPATH + 'results/decode_reliability_callback'; const END = 0; const CONFIGURE = 1; const PREPARE = 2; @@ -583,7 +584,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0100.txt'; + let savepath = BASIC_PATH + 'configure_0100.pcm'; let mySteps = new Array(CONFIGURE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -597,7 +598,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0200.txt'; + let savepath = BASIC_PATH + 'configure_0200.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -611,7 +612,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0300.txt'; + let savepath = BASIC_PATH + 'configure_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -625,7 +626,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0400.txt'; + let savepath = BASIC_PATH + 'configure_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -639,7 +640,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0500.txt'; + let savepath = BASIC_PATH + 'configure_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -653,7 +654,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0600.txt'; + let savepath = BASIC_PATH + 'configure_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, CONFIGURE_ERROR, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -668,7 +669,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0700.txt'; + let savepath = BASIC_PATH + 'configure_0700.pcm'; let mySteps = new Array(RESET, CONFIGURE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -682,7 +683,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0800.txt'; + let savepath = BASIC_PATH + 'configure_0800.pcm'; let mySteps = new Array(CONFIGURE, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -696,7 +697,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_CALLBACK_0900', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0900.txt'; + let savepath = BASIC_PATH + 'configure_0900.pcm'; let mySteps = new Array(CONFIGURE, RESET, CONFIGURE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -710,7 +711,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0100.txt'; + let savepath = BASIC_PATH + 'prepare_0100.pcm'; let mySteps = new Array(PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -724,7 +725,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0200.txt'; + let savepath = BASIC_PATH + 'prepare_0200.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -738,7 +739,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0300.txt'; + let savepath = BASIC_PATH + 'prepare_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -752,7 +753,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0400.txt'; + let savepath = BASIC_PATH + 'prepare_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -766,7 +767,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0500.txt'; + let savepath = BASIC_PATH + 'prepare_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -780,7 +781,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0600.txt'; + let savepath = BASIC_PATH + 'prepare_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -794,7 +795,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0700.txt'; + let savepath = BASIC_PATH + 'prepare_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, PREPARE_ERROR, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -809,7 +810,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0800.txt'; + let savepath = BASIC_PATH + 'prepare_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -823,7 +824,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0100.txt'; + let savepath = BASIC_PATH + 'start_0100.pcm'; let mySteps = new Array(START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -837,7 +838,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0200.txt'; + let savepath = BASIC_PATH + 'start_0200.pcm'; let mySteps = new Array(CONFIGURE, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -851,7 +852,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0300.txt'; + let savepath = BASIC_PATH + 'start_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -866,7 +867,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0400.txt'; + let savepath = BASIC_PATH + 'start_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -880,7 +881,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0500.txt'; + let savepath = BASIC_PATH + 'start_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -894,7 +895,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0600.txt'; + let savepath = BASIC_PATH + 'start_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -909,7 +910,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0700.txt'; + let savepath = BASIC_PATH + 'start_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, START_ERROR, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -924,7 +925,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0800.txt'; + let savepath = BASIC_PATH + 'start_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -938,7 +939,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0100.txt'; + let savepath = BASIC_PATH + 'flush_0100.pcm'; let mySteps = new Array(FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -952,7 +953,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0200.txt'; + let savepath = BASIC_PATH + 'flush_0200.pcm'; let mySteps = new Array(CONFIGURE, FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -966,7 +967,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0300.txt'; + let savepath = BASIC_PATH + 'flush_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -980,7 +981,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0400.txt'; + let savepath = BASIC_PATH + 'flush_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -995,7 +996,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0500.txt'; + let savepath = BASIC_PATH + 'flush_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -1010,7 +1011,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0600.txt'; + let savepath = BASIC_PATH + 'flush_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1024,7 +1025,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0700.txt'; + let savepath = BASIC_PATH + 'flush_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, FLUSH, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1039,7 +1040,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0800.txt'; + let savepath = BASIC_PATH + 'flush_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1053,7 +1054,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0100.txt'; + let savepath = BASIC_PATH + 'stop_0100.pcm'; let mySteps = new Array(STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1067,7 +1068,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0200.txt'; + let savepath = BASIC_PATH + 'stop_0200.pcm'; let mySteps = new Array(CONFIGURE, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1081,7 +1082,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0300.txt'; + let savepath = BASIC_PATH + 'stop_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1095,7 +1096,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0400.txt'; + let savepath = BASIC_PATH + 'stop_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1109,7 +1110,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0500.txt'; + let savepath = BASIC_PATH + 'stop_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, STOP, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1123,7 +1124,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0600.txt'; + let savepath = BASIC_PATH + 'stop_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1137,7 +1138,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0700.txt'; + let savepath = BASIC_PATH + 'stop_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1152,7 +1153,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0800.txt'; + let savepath = BASIC_PATH + 'stop_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1166,7 +1167,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0100.txt'; + let savepath = BASIC_PATH + 'reset_0100.pcm'; let mySteps = new Array(RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1180,7 +1181,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0200.txt'; + let savepath = BASIC_PATH + 'reset_0200.pcm'; let mySteps = new Array(CONFIGURE, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1194,7 +1195,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0300.txt'; + let savepath = BASIC_PATH + 'reset_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1208,7 +1209,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0400.txt'; + let savepath = BASIC_PATH + 'reset_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1222,7 +1223,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0500.txt'; + let savepath = BASIC_PATH + 'reset_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1236,7 +1237,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0600.txt'; + let savepath = BASIC_PATH + 'reset_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1250,7 +1251,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0700.txt'; + let savepath = BASIC_PATH + 'reset_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1265,7 +1266,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0800.txt'; + let savepath = BASIC_PATH + 'reset_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1279,7 +1280,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0100.txt'; + let savepath = BASIC_PATH + 'eos_0100.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, STOP, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1294,7 +1295,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0200.txt'; + let savepath = BASIC_PATH + 'eos_0200.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, WAITFORALLOUTS); EOSFrameNum = 2; flushAtEOS = true; @@ -1310,7 +1311,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0300.txt'; + let savepath = BASIC_PATH + 'eos_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, CONFIGURE, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1325,7 +1326,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0400.txt'; + let savepath = BASIC_PATH + 'eos_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, WAITFORALLOUTS); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1340,7 +1341,7 @@ describe('AudioDecoderReliabilityCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0500.txt'; + let savepath = BASIC_PATH + 'eos_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, STOP, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js index 944f81e720bebb2e51e0a75a2f08c034b69b0702..77b36e60f93aa86c1f608168c4e8acdc26edd428 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js @@ -18,8 +18,9 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioDecoderReliabilityPromise', function () { - const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; - const BASIC_PATH = '/data/media/results/decode_reliability_promise_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/' + const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac'; + const BASIC_PATH = RESOURCEPATH + 'results/decode_reliability_promise'; const END = 0; const CONFIGURE = 1; const PREPARE = 2; @@ -584,7 +585,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0100.txt'; + let savepath = BASIC_PATH + 'configure_0100.pcm'; let mySteps = new Array(CONFIGURE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -598,7 +599,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0200.txt'; + let savepath = BASIC_PATH + 'configure_0200.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -612,7 +613,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0300.txt'; + let savepath = BASIC_PATH + 'configure_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -626,7 +627,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0400.txt'; + let savepath = BASIC_PATH + 'configure_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -640,7 +641,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0500.txt'; + let savepath = BASIC_PATH + 'configure_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -654,7 +655,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0600.txt'; + let savepath = BASIC_PATH + 'configure_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, CONFIGURE_ERROR, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -669,7 +670,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0700.txt'; + let savepath = BASIC_PATH + 'configure_0700.pcm'; let mySteps = new Array(RESET, CONFIGURE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -683,7 +684,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0800.txt'; + let savepath = BASIC_PATH + 'configure_0800.pcm'; let mySteps = new Array(CONFIGURE, CONFIGURE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -697,7 +698,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_CONFIGURE_PROMISE_0900', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0900.txt'; + let savepath = BASIC_PATH + 'configure_0900.pcm'; let mySteps = new Array(CONFIGURE, RESET, CONFIGURE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -711,7 +712,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0100.txt'; + let savepath = BASIC_PATH + 'prepare_0100.pcm'; let mySteps = new Array(PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -725,7 +726,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0200.txt'; + let savepath = BASIC_PATH + 'prepare_0200.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, END); createAudioDecoder(savepath, mySteps, done); }) @@ -739,7 +740,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0300.txt'; + let savepath = BASIC_PATH + 'prepare_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -753,7 +754,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0400.txt'; + let savepath = BASIC_PATH + 'prepare_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -767,7 +768,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0500.txt'; + let savepath = BASIC_PATH + 'prepare_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -781,7 +782,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0600.txt'; + let savepath = BASIC_PATH + 'prepare_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -795,7 +796,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0700.txt'; + let savepath = BASIC_PATH + 'prepare_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, PREPARE_ERROR, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -810,7 +811,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_PREPARE_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0800.txt'; + let savepath = BASIC_PATH + 'prepare_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, PREPARE_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -824,7 +825,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0100.txt'; + let savepath = BASIC_PATH + 'start_0100.pcm'; let mySteps = new Array(START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -838,7 +839,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0200.txt'; + let savepath = BASIC_PATH + 'start_0200.pcm'; let mySteps = new Array(CONFIGURE, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -852,7 +853,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0300.txt'; + let savepath = BASIC_PATH + 'start_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -867,7 +868,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0400.txt'; + let savepath = BASIC_PATH + 'start_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -881,7 +882,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0500.txt'; + let savepath = BASIC_PATH + 'start_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -895,7 +896,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0600.txt'; + let savepath = BASIC_PATH + 'start_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -910,7 +911,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0700.txt'; + let savepath = BASIC_PATH + 'start_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, START_ERROR, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -925,7 +926,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_START_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0800.txt'; + let savepath = BASIC_PATH + 'start_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, START_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -939,7 +940,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0100.txt'; + let savepath = BASIC_PATH + 'flush_0100.pcm'; let mySteps = new Array(FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -953,7 +954,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0200.txt'; + let savepath = BASIC_PATH + 'flush_0200.pcm'; let mySteps = new Array(CONFIGURE, FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -967,7 +968,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0300.txt'; + let savepath = BASIC_PATH + 'flush_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -981,7 +982,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0400.txt'; + let savepath = BASIC_PATH + 'flush_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -996,7 +997,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0500.txt'; + let savepath = BASIC_PATH + 'flush_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioDecoder(savepath, mySteps, done); @@ -1011,7 +1012,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0600.txt'; + let savepath = BASIC_PATH + 'flush_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1025,7 +1026,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0700.txt'; + let savepath = BASIC_PATH + 'flush_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, FLUSH, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1040,7 +1041,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_FLUSH_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0800.txt'; + let savepath = BASIC_PATH + 'flush_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, FLUSH_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1054,7 +1055,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0100.txt'; + let savepath = BASIC_PATH + 'stop_0100.pcm'; let mySteps = new Array(STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1068,7 +1069,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0200.txt'; + let savepath = BASIC_PATH + 'stop_0200.pcm'; let mySteps = new Array(CONFIGURE, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1082,7 +1083,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0300.txt'; + let savepath = BASIC_PATH + 'stop_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1096,7 +1097,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0400.txt'; + let savepath = BASIC_PATH + 'stop_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1110,7 +1111,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0500.txt'; + let savepath = BASIC_PATH + 'stop_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, STOP, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1124,7 +1125,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0600.txt'; + let savepath = BASIC_PATH + 'stop_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1138,7 +1139,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0700.txt'; + let savepath = BASIC_PATH + 'stop_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1153,7 +1154,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_STOP_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0800.txt'; + let savepath = BASIC_PATH + 'stop_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, STOP_ERROR, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1167,7 +1168,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0100.txt'; + let savepath = BASIC_PATH + 'reset_0100.pcm'; let mySteps = new Array(RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1181,7 +1182,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0200.txt'; + let savepath = BASIC_PATH + 'reset_0200.pcm'; let mySteps = new Array(CONFIGURE, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1195,7 +1196,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0300.txt'; + let savepath = BASIC_PATH + 'reset_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1209,7 +1210,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0400.txt'; + let savepath = BASIC_PATH + 'reset_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1223,7 +1224,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0500.txt'; + let savepath = BASIC_PATH + 'reset_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1237,7 +1238,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0600.txt'; + let savepath = BASIC_PATH + 'reset_0600.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1251,7 +1252,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0700.txt'; + let savepath = BASIC_PATH + 'reset_0700.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1266,7 +1267,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_RESET_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0800.txt'; + let savepath = BASIC_PATH + 'reset_0800.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, RESET, END); createAudioDecoder(savepath, mySteps, done); }) @@ -1280,7 +1281,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0100.txt'; + let savepath = BASIC_PATH + 'eos_0100.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, STOP, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1295,7 +1296,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0200.txt'; + let savepath = BASIC_PATH + 'eos_0200.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, WAITFORALLOUTS); EOSFrameNum = 2; flushAtEOS = true; @@ -1311,7 +1312,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0300.txt'; + let savepath = BASIC_PATH + 'eos_0300.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, CONFIGURE, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1326,7 +1327,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0400.txt'; + let savepath = BASIC_PATH + 'eos_0400.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, WAITFORALLOUTS); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); @@ -1341,7 +1342,7 @@ describe('AudioDecoderReliabilityPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_DECODER_API_EOS_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0500.txt'; + let savepath = BASIC_PATH + 'eos_0500.pcm'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, STOP, END); EOSFrameNum = 2; createAudioDecoder(savepath, mySteps, done); diff --git a/multimedia/media/media_js_standard/audioEncoder/Test.json b/multimedia/media/media_js_standard/audioEncoder/Test.json index c3adaada4299419ccad0a71f0b4aa46cf6a67b51..b62a060a506c7ba54baca3f54ebdcb813bd93248 100644 --- a/multimedia/media/media_js_standard/audioEncoder/Test.json +++ b/multimedia/media/media_js_standard/audioEncoder/Test.json @@ -12,17 +12,16 @@ "pre-push": [ ], "push": [ - "./resource/audio/audioEncode/S32LE.pcm ->/data/media/", - "./resource/audio/audioEncode/S32LE_2.pcm ->/data/media/" + "./resource/audio/audioEncode/S32LE.pcm ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/", + "./resource/audio/audioEncode/S32LE_2.pcm ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/" ] }, { "type": "ShellKit", "run-command": [ - "rm -R /data/media/results", - "chmod 777 -R /data/media", - "chmod 777 /data/media/*", - "mkdir /data/media/results", + "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/results/", + "chmod 777 -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder", + "chmod 777 /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/*", "setenforce 0" ], "teardown-command":[ diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js index be808935879c2c88cff1825976c3489b6888d5f6..7166b84a6d33279d00bced60ba1c6ec0c3c77bb1 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js @@ -18,9 +18,10 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioEncoderFuncCallback', function () { - const AUDIOPATH = '/data/media/S32LE.pcm'; - const AUDIOPATH2 = '/data/media/S32LE_2.pcm'; - const BASIC_PATH = '/data/media/results/encode_func_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/' + const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm'; + const AUDIOPATH2 = RESOURCEPATH + 'S32LE_2.pcm'; + const BASIC_PATH = RESOURCEPATH + 'results/encode_func_callback_'; let audioEncodeProcessor; let readStreamSync; let eosframenum = 0; @@ -305,7 +306,7 @@ describe('AudioEncoderFuncCallback', function () { let mediaDescription2 = { "codec_mime": 'audio/mp4a-latm', } - let savepath = BASIC_PATH + 'callback0000.txt'; + let savepath = BASIC_PATH + 'callback0000.es'; needGetMediaDes = true; workdoneAtEOS = true; eventEmitter.on('getAudioEncoderCaps', () => { @@ -385,7 +386,7 @@ describe('AudioEncoderFuncCallback', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + 'callback0100.txt'; + let savepath = BASIC_PATH + 'callback0100.es'; eosframenum = 500; workdoneAtEOS = true; eventEmitter.on('getAudioEncoderCaps', () => { @@ -443,7 +444,7 @@ describe('AudioEncoderFuncCallback', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + 'callback0200.txt'; + let savepath = BASIC_PATH + 'callback0200.es'; workdoneAtEOS = true; eventEmitter.on('getAudioEncoderCaps', () => { audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => { @@ -509,7 +510,7 @@ describe('AudioEncoderFuncCallback', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + 'callback0300.txt'; + let savepath = BASIC_PATH + 'callback0300.es'; eosframenum = 500; flushAtEOS = true; eventEmitter.on('getAudioEncoderCaps', () => { @@ -567,7 +568,7 @@ describe('AudioEncoderFuncCallback', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + 'callback0400.txt'; + let savepath = BASIC_PATH + 'callback0400.es'; eventEmitter.on('getAudioEncoderCaps', () => { audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => { expect(err).assertUndefined(); @@ -649,7 +650,7 @@ describe('AudioEncoderFuncCallback', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + 'callback0500.txt'; + let savepath = BASIC_PATH + 'callback0500.es'; eosframenum = 100; eventEmitter.on('getAudioEncoderCaps', () => { audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => { @@ -728,7 +729,7 @@ describe('AudioEncoderFuncCallback', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + 'callback0600.txt'; + let savepath = BASIC_PATH + 'callback0600.es'; eosframenum = 100; resetAtEOS = true; let mediaDescription2 = { @@ -777,7 +778,7 @@ describe('AudioEncoderFuncCallback', function () { console.info(`case configure 2`); resetParam(); readFile(AUDIOPATH2) - savepath = BASIC_PATH + 'callback0601.txt'; + savepath = BASIC_PATH + 'callback0601.es'; workdoneAtEOS = true; hasreconfigured = true; eventEmitter.emit('prepare'); diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js index d9fcc6f53674f23519573a385178182ac2d70cda..285f3956a28afec6eb54b95c2786590ff82c9eeb 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js @@ -18,9 +18,10 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioEncoderFuncPromise', function () { - const AUDIOPATH = '/data/media/S32LE.pcm'; - const AUDIOPATH2 = '/data/media/S32LE_2.pcm'; - const BASIC_PATH = '/data/media/results/encode_func_promise_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/' + const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm'; + const AUDIOPATH2 = RESOURCEPATH + 'S32LE_2.pcm'; + const BASIC_PATH = RESOURCEPATH + 'results/encode_func_promise_'; let audioEncodeProcessor; let readStreamSync; let eosframenum = 0; @@ -310,7 +311,7 @@ describe('AudioEncoderFuncPromise', function () { let mediaDescription2 = { "codec_mime": 'audio/mp4a-latm', } - let savepath = BASIC_PATH + '0000.txt'; + let savepath = BASIC_PATH + '0000.es'; needgetMediaDes = true; workdoneAtEOS = true; await media.getMediaCapability().then((mediaCaps) => { @@ -372,7 +373,7 @@ describe('AudioEncoderFuncPromise', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + '0100.txt'; + let savepath = BASIC_PATH + '0100.es'; eosframenum = 500; workdoneAtEOS = true; await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { @@ -411,7 +412,7 @@ describe('AudioEncoderFuncPromise', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + '0200.txt'; + let savepath = BASIC_PATH + '0200.es'; workdoneAtEOS = true; await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { console.info("case create createAudioEncoder success"); @@ -456,7 +457,7 @@ describe('AudioEncoderFuncPromise', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + '0300.txt'; + let savepath = BASIC_PATH + '0300.es'; eosframenum = 500; flushAtEOS = true; await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { @@ -495,7 +496,7 @@ describe('AudioEncoderFuncPromise', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + '0400.txt'; + let savepath = BASIC_PATH + '0400.es'; await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { console.info("case create createAudioEncoder success"); audioEncodeProcessor = processor; @@ -545,7 +546,7 @@ describe('AudioEncoderFuncPromise', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + '0500.txt'; + let savepath = BASIC_PATH + '0500.es'; eosframenum = 100; await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { console.info("case create createAudioEncoder success"); @@ -599,7 +600,7 @@ describe('AudioEncoderFuncPromise', function () { "sample_rate": 48000, "audio_raw_format": 16, } - let savepath = BASIC_PATH + '0600.txt'; + let savepath = BASIC_PATH + '0600.es'; eosframenum = 100; resetAtEOS = true; await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { @@ -634,7 +635,7 @@ describe('AudioEncoderFuncPromise', function () { resetParam(); readFile(AUDIOPATH2); }, failCallback).catch(failCatch); - let savepath2 = BASIC_PATH + '0601.txt'; + let savepath2 = BASIC_PATH + '0601.es'; workdoneAtEOS = true; setCallback(savepath2, done); await audioEncodeProcessor.prepare().then(() => { diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js index 970682db493cf87f398d346e21d45e01f724896d..fee7ce904f34faca6e52c697fe41bd092d085917 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js @@ -18,9 +18,8 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioEncoderFuncPromise', function () { - const AUDIOPATH = '/data/media/S32LE.pcm'; - const AUDIOPATH2 = '/data/media/S32LE_2.pcm'; - const BASIC_PATH = '/data/media/results/encode_func_promise_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/' + const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm'; let readStreamSync; let eosframenum = 0; let stopAtEOS = false; diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js index 4a250c7fbf058683584e9166be91a62ab1ff552b..c021442f87832cb9f4a469821a4ea4337f49f5d6 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js @@ -18,8 +18,9 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioEncoderSTTCallback', function () { - const AUDIOPATH = '/data/media/S32LE.pcm'; - const BASIC_PATH = '/data/media/results/encode_reliability_callback_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/' + const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm'; + const BASIC_PATH = RESOURCEPATH + 'results/encode_reliability_callback_'; const END = 0; const CONFIGURE = 1; const PREPARE = 2; @@ -432,7 +433,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0100.txt'; + let savepath = BASIC_PATH + 'configure_0100.es'; let mySteps = new Array(CONFIGURE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -446,7 +447,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0200.txt'; + let savepath = BASIC_PATH + 'configure_0200.es'; let mySteps = new Array(CONFIGURE, PREPARE, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -460,7 +461,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0300.txt'; + let savepath = BASIC_PATH + 'configure_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -474,7 +475,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0400.txt'; + let savepath = BASIC_PATH + 'configure_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -488,7 +489,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0500.txt'; + let savepath = BASIC_PATH + 'configure_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -502,7 +503,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0600.txt'; + let savepath = BASIC_PATH + 'configure_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, CONFIGURE_ERROR, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -517,7 +518,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0700.txt'; + let savepath = BASIC_PATH + 'configure_0700.es'; let mySteps = new Array(RESET, CONFIGURE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -531,7 +532,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0800.txt'; + let savepath = BASIC_PATH + 'configure_0800.es'; let mySteps = new Array(CONFIGURE, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -545,7 +546,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_CALLBACK_0900', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0900.txt'; + let savepath = BASIC_PATH + 'configure_0900.es'; let mySteps = new Array(CONFIGURE, RESET, CONFIGURE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -559,7 +560,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0100.txt'; + let savepath = BASIC_PATH + 'prepare_0100.es'; let mySteps = new Array(PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -573,7 +574,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0200.txt'; + let savepath = BASIC_PATH + 'prepare_0200.es'; let mySteps = new Array(CONFIGURE, PREPARE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -587,7 +588,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0300.txt'; + let savepath = BASIC_PATH + 'prepare_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -601,7 +602,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0400.txt'; + let savepath = BASIC_PATH + 'prepare_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -615,7 +616,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0500.txt'; + let savepath = BASIC_PATH + 'prepare_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -629,7 +630,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0600.txt'; + let savepath = BASIC_PATH + 'prepare_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -643,7 +644,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0700.txt'; + let savepath = BASIC_PATH + 'prepare_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, PREPARE_ERROR, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -658,7 +659,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0800.txt'; + let savepath = BASIC_PATH + 'prepare_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -672,7 +673,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0100.txt'; + let savepath = BASIC_PATH + 'start_0100.es'; let mySteps = new Array(START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -686,7 +687,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0200.txt'; + let savepath = BASIC_PATH + 'start_0200.es'; let mySteps = new Array(CONFIGURE, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -700,7 +701,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0300.txt'; + let savepath = BASIC_PATH + 'start_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -715,7 +716,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0400.txt'; + let savepath = BASIC_PATH + 'start_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -729,7 +730,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0500.txt'; + let savepath = BASIC_PATH + 'start_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -743,7 +744,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0600.txt'; + let savepath = BASIC_PATH + 'start_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -758,7 +759,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0700.txt'; + let savepath = BASIC_PATH + 'start_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, START_ERROR, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -773,7 +774,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0800.txt'; + let savepath = BASIC_PATH + 'start_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -787,7 +788,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0100.txt'; + let savepath = BASIC_PATH + 'flush_0100.es'; let mySteps = new Array(FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -801,7 +802,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0200.txt'; + let savepath = BASIC_PATH + 'flush_0200.es'; let mySteps = new Array(CONFIGURE, FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -815,7 +816,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0300.txt'; + let savepath = BASIC_PATH + 'flush_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -829,7 +830,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0400.txt'; + let savepath = BASIC_PATH + 'flush_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -844,7 +845,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0500.txt'; + let savepath = BASIC_PATH + 'flush_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -859,7 +860,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0600.txt'; + let savepath = BASIC_PATH + 'flush_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -873,7 +874,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0700.txt'; + let savepath = BASIC_PATH + 'flush_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, FLUSH, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -888,7 +889,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0800.txt'; + let savepath = BASIC_PATH + 'flush_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -902,7 +903,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0100.txt'; + let savepath = BASIC_PATH + 'stop_0100.es'; let mySteps = new Array(STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -916,7 +917,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0200.txt'; + let savepath = BASIC_PATH + 'stop_0200.es'; let mySteps = new Array(CONFIGURE, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -930,7 +931,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0300.txt'; + let savepath = BASIC_PATH + 'stop_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -944,7 +945,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0400.txt'; + let savepath = BASIC_PATH + 'stop_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, END); createAudioEncoder(savepath, mySteps, done); }) @@ -958,7 +959,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0500.txt'; + let savepath = BASIC_PATH + 'stop_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, STOP, END); createAudioEncoder(savepath, mySteps, done); }) @@ -972,7 +973,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0600.txt'; + let savepath = BASIC_PATH + 'stop_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -986,7 +987,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0700.txt'; + let savepath = BASIC_PATH + 'stop_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1001,7 +1002,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0800.txt'; + let savepath = BASIC_PATH + 'stop_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1015,7 +1016,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0100.txt'; + let savepath = BASIC_PATH + 'reset_0100.es'; let mySteps = new Array(RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1029,7 +1030,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0200.txt'; + let savepath = BASIC_PATH + 'reset_0200.es'; let mySteps = new Array(CONFIGURE, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1043,7 +1044,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0300.txt'; + let savepath = BASIC_PATH + 'reset_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1057,7 +1058,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0400.txt'; + let savepath = BASIC_PATH + 'reset_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1071,7 +1072,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0500.txt'; + let savepath = BASIC_PATH + 'reset_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1085,7 +1086,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0600.txt'; + let savepath = BASIC_PATH + 'reset_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1099,7 +1100,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0700.txt'; + let savepath = BASIC_PATH + 'reset_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1114,7 +1115,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_CALLBACK_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0800.txt'; + let savepath = BASIC_PATH + 'reset_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1128,7 +1129,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_CALLBACK_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0100.txt'; + let savepath = BASIC_PATH + 'eos_0100.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, STOP, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1143,7 +1144,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_CALLBACK_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0200.txt'; + let savepath = BASIC_PATH + 'eos_0200.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, WAITFORALLOUTS); EOSFrameNum = 2; flushAtEOS = true; @@ -1159,7 +1160,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_CALLBACK_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0300.txt'; + let savepath = BASIC_PATH + 'eos_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, CONFIGURE, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1174,7 +1175,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_CALLBACK_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0400.txt'; + let savepath = BASIC_PATH + 'eos_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, WAITFORALLOUTS); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1189,7 +1190,7 @@ describe('AudioEncoderSTTCallback', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_CALLBACK_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0500.txt'; + let savepath = BASIC_PATH + 'eos_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, STOP, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js index c66e6b9fef2f1112e8e02cf250f39afcb06cfe9e..3e674f1b661132f22b0d74fe9964dff901c7bd00 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js @@ -18,8 +18,9 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('AudioEncoderSTTPromise', function () { - const AUDIOPATH = '/data/media/S32LE.pcm'; - const BASIC_PATH = '/data/media/results/encode_reliability_promise_'; + const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/' + const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm'; + const BASIC_PATH = RESOURCEPATH + 'results/encode_reliability_promise_'; const END = 0; const CONFIGURE = 1; const PREPARE = 2; @@ -436,7 +437,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0100.txt'; + let savepath = BASIC_PATH + 'configure_0100.es'; let mySteps = new Array(CONFIGURE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -450,7 +451,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0200.txt'; + let savepath = BASIC_PATH + 'configure_0200.es'; let mySteps = new Array(CONFIGURE, PREPARE, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -464,7 +465,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0300.txt'; + let savepath = BASIC_PATH + 'configure_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -478,7 +479,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0400.txt'; + let savepath = BASIC_PATH + 'configure_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -492,7 +493,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0500.txt'; + let savepath = BASIC_PATH + 'configure_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -506,7 +507,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0600.txt'; + let savepath = BASIC_PATH + 'configure_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, CONFIGURE_ERROR, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -521,7 +522,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0700.txt'; + let savepath = BASIC_PATH + 'configure_0700.es'; let mySteps = new Array(RESET, CONFIGURE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -535,7 +536,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0800.txt'; + let savepath = BASIC_PATH + 'configure_0800.es'; let mySteps = new Array(CONFIGURE, CONFIGURE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -549,7 +550,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_CONFIGURE_PROMISE_0900', 0, async function (done) { - let savepath = BASIC_PATH + 'configure_0900.txt'; + let savepath = BASIC_PATH + 'configure_0900.es'; let mySteps = new Array(CONFIGURE, RESET, CONFIGURE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -563,7 +564,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0100.txt'; + let savepath = BASIC_PATH + 'prepare_0100.es'; let mySteps = new Array(PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -577,7 +578,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0200.txt'; + let savepath = BASIC_PATH + 'prepare_0200.es'; let mySteps = new Array(CONFIGURE, PREPARE, END); createAudioEncoder(savepath, mySteps, done); }) @@ -591,7 +592,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0300.txt'; + let savepath = BASIC_PATH + 'prepare_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -605,7 +606,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0400.txt'; + let savepath = BASIC_PATH + 'prepare_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -619,7 +620,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0500.txt'; + let savepath = BASIC_PATH + 'prepare_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -633,7 +634,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0600.txt'; + let savepath = BASIC_PATH + 'prepare_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -647,7 +648,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0700.txt'; + let savepath = BASIC_PATH + 'prepare_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, PREPARE_ERROR, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -662,7 +663,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_PREPARE_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'prepare_0800.txt'; + let savepath = BASIC_PATH + 'prepare_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, PREPARE_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -676,7 +677,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0100.txt'; + let savepath = BASIC_PATH + 'start_0100.es'; let mySteps = new Array(START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -690,7 +691,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0200.txt'; + let savepath = BASIC_PATH + 'start_0200.es'; let mySteps = new Array(CONFIGURE, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -704,7 +705,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0300.txt'; + let savepath = BASIC_PATH + 'start_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -719,7 +720,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0400.txt'; + let savepath = BASIC_PATH + 'start_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -733,7 +734,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0500.txt'; + let savepath = BASIC_PATH + 'start_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -747,7 +748,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0600.txt'; + let savepath = BASIC_PATH + 'start_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, START, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -762,7 +763,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0700.txt'; + let savepath = BASIC_PATH + 'start_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, START_ERROR, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -777,7 +778,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_START_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'start_0800.txt'; + let savepath = BASIC_PATH + 'start_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, START_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -791,7 +792,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0100.txt'; + let savepath = BASIC_PATH + 'flush_0100.es'; let mySteps = new Array(FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -805,7 +806,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0200.txt'; + let savepath = BASIC_PATH + 'flush_0200.es'; let mySteps = new Array(CONFIGURE, FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -819,7 +820,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0300.txt'; + let savepath = BASIC_PATH + 'flush_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -833,7 +834,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0400.txt'; + let savepath = BASIC_PATH + 'flush_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -848,7 +849,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0500.txt'; + let savepath = BASIC_PATH + 'flush_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, FLUSH, WAITFORALLOUTS); workdoneAtEOS = true; createAudioEncoder(savepath, mySteps, done); @@ -863,7 +864,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0600.txt'; + let savepath = BASIC_PATH + 'flush_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP ,FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -877,7 +878,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0700.txt'; + let savepath = BASIC_PATH + 'flush_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, FLUSH, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -892,7 +893,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_FLUSH_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'flush_0800.txt'; + let savepath = BASIC_PATH + 'flush_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, FLUSH_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -906,7 +907,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0100.txt'; + let savepath = BASIC_PATH + 'stop_0100.es'; let mySteps = new Array(STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -920,7 +921,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0200.txt'; + let savepath = BASIC_PATH + 'stop_0200.es'; let mySteps = new Array(CONFIGURE, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -934,7 +935,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0300.txt'; + let savepath = BASIC_PATH + 'stop_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -948,7 +949,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0400.txt'; + let savepath = BASIC_PATH + 'stop_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, END); createAudioEncoder(savepath, mySteps, done); }) @@ -962,7 +963,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0500.txt'; + let savepath = BASIC_PATH + 'stop_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, STOP, END); createAudioEncoder(savepath, mySteps, done); }) @@ -976,7 +977,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0600.txt'; + let savepath = BASIC_PATH + 'stop_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -990,7 +991,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0700.txt'; + let savepath = BASIC_PATH + 'stop_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1005,7 +1006,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_STOP_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'stop_0800.txt'; + let savepath = BASIC_PATH + 'stop_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, STOP_ERROR, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1019,7 +1020,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0100.txt'; + let savepath = BASIC_PATH + 'reset_0100.es'; let mySteps = new Array(RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1033,7 +1034,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0200.txt'; + let savepath = BASIC_PATH + 'reset_0200.es'; let mySteps = new Array(CONFIGURE, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1047,7 +1048,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0300.txt'; + let savepath = BASIC_PATH + 'reset_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1061,7 +1062,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0400.txt'; + let savepath = BASIC_PATH + 'reset_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1075,7 +1076,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0500.txt'; + let savepath = BASIC_PATH + 'reset_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, FLUSH, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1089,7 +1090,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0600', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0600.txt'; + let savepath = BASIC_PATH + 'reset_0600.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, STOP, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1103,7 +1104,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0700', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0700.txt'; + let savepath = BASIC_PATH + 'reset_0700.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1118,7 +1119,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_RESET_PROMISE_0800', 0, async function (done) { - let savepath = BASIC_PATH + 'reset_0800.txt'; + let savepath = BASIC_PATH + 'reset_0800.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, RESET, RESET, END); createAudioEncoder(savepath, mySteps, done); }) @@ -1132,7 +1133,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_PROMISE_0100', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0100.txt'; + let savepath = BASIC_PATH + 'eos_0100.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, STOP, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1147,7 +1148,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_PROMISE_0200', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0200.txt'; + let savepath = BASIC_PATH + 'eos_0200.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, FLUSH, WAITFORALLOUTS); EOSFrameNum = 2; flushAtEOS = true; @@ -1163,7 +1164,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_PROMISE_0300', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0300.txt'; + let savepath = BASIC_PATH + 'eos_0300.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, RESET, CONFIGURE, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1178,7 +1179,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_PROMISE_0400', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0400.txt'; + let savepath = BASIC_PATH + 'eos_0400.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, WAITFORALLOUTS); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); @@ -1193,7 +1194,7 @@ describe('AudioEncoderSTTPromise', function () { * @tc.level : Level2 */ it('SUB_MEDIA_AUDIO_ENCODER_API_EOS_PROMISE_0500', 0, async function (done) { - let savepath = BASIC_PATH + 'eos_0500.txt'; + let savepath = BASIC_PATH + 'eos_0500.es'; let mySteps = new Array(CONFIGURE, PREPARE, START, HOLDON, JUDGE_EOS, STOP, START, STOP, END); EOSFrameNum = 2; createAudioEncoder(savepath, mySteps, done); diff --git a/multimedia/media/media_js_standard/videoEncoder/Test.json b/multimedia/media/media_js_standard/videoEncoder/Test.json index a79347e73127e4912f81997763bd2e3e30698b46..9f308640a56c09373d31ae943373e23f0c29b475 100644 --- a/multimedia/media/media_js_standard/videoEncoder/Test.json +++ b/multimedia/media/media_js_standard/videoEncoder/Test.json @@ -17,10 +17,9 @@ { "type": "ShellKit", "run-command": [ - "rm -R /data/media/results", - "chmod 777 -R /data/media", - "chmod 777 /data/media/*", - "mkdir /data/media/results", + "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/", + "chmod 777 -R /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder", + "chmod 777 /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/*", "setenforce 0" ], "teardown-command":[ diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/List.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/List.test.js index ec4e1abb331a79daa4c923a1855ee1b77408978e..1e4fb7b13baa694927c3a9ef23ee52512ab5a3be 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/List.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/List.test.js @@ -13,6 +13,8 @@ * limitations under the License. */ -require('./VideoEncoderFuncPromiseTest.test.js') -require('./VideoEncoderReliabilityPromiseTest.test.js') -require('./VideoEncoderMultiInstancesTest.test.js') +require('./VideoEncoderSoftwareFuncCallbackTest.test.js') +require('./VideoEncoderSoftwareFuncPromiseTest.test.js') +require('./VideoEncoderSoftwareReliabilityCallbackTest.test.js') +require('./VideoEncoderSoftwareReliabilityPromiseTest.test.js') +require('./VideoEncoderMultiInstancesTest.test.js') \ No newline at end of file diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js index 4cb84a03bc36a174bd4c48ace583cac1ffe86f38..94b5a7ed42e40333a06a526e7fad15049c25949c 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js @@ -21,7 +21,8 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from ' describe('videoEncoderSoftwareMultiInstances', function () { const events = require('events'); const eventEmitter = new events.EventEmitter(); - const BASIC_PATH = '/data/media/results/videoencode_multiinstances_'; + const ROOT = '/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/'; + const BASIC_PATH = ROOT + 'video_multiinstances_'; let videoEncodeProcessor; let mediaTest; let surfaceID = ''; @@ -269,7 +270,7 @@ describe('videoEncoderSoftwareMultiInstances', function () { */ it('SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_MULTIINSTANCE_0100', 0, async function (done) { console.info("case test multiple encoder instances"); - let savepath = BASIC_PATH + '0100.txt'; + let savepath = BASIC_PATH + '0100.es'; let mime = 'video/mp4v-es'; let width = 720; let height = 480; diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js index 7d0e29af639772e1c69875ff09696a8508fda40e..5bc7c5d7840c38ce58c6a5827ff45ca8ccea7185 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js @@ -31,8 +31,9 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () { let stopBuffer = false; const events = require('events'); const eventEmitter = new events.EventEmitter(); - const BASIC_PATH = '/data/media/results/'; - + const ROOT = '/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/'; + const BASIC_PATH = ROOT + 'video_func_callback_'; + beforeAll(function() { console.info('beforeAll case'); }) diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js index 7fdcc5fe916b7d42c0b2f34ffdb821f4d7b95773..9bb82cf7da996056119ffa781ef22529b268c08b 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js @@ -19,7 +19,8 @@ import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' describe('videoSoftwareEncoderFuncPromise', function () { - const BASIC_PATH = '/data/media/results/videoencode_func_promise_'; + const ROOT = '/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/'; + const BASIC_PATH = ROOT + 'video_func_promise_'; let videoEncodeProcessor; let mediaTest; let surfaceID = ''; diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js index 22a1a04d6b3f31b31c766c1923bd0267f952c1f9..157a309ab384953e0258b158c7552564bfaf09d5 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js @@ -50,7 +50,8 @@ describe('VideoEncoderSoftwareReliCallbackTest', function () { let isStreamRunning = false; let workdoneAtEOS = false; let stopBuffer = false; - const BASIC_PATH = '/data/media/results/'; + const ROOT = '/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/'; + const BASIC_PATH = ROOT + 'video_reliability_callback_'; let mediaDescription = { 'width': 720, 'height': 480, diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js index e92722ff7ec1997856e669b2beccd36cc0ec504b..c78cbab60cdac99ec76b328f43fca7f546ac50ab 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js @@ -18,8 +18,9 @@ import mediademo from '@ohos.multimedia.mediademo' import Fileio from '@ohos.fileio' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' -describe('videoEncoderReliability', function () { - const BASIC_PATH = '/data/media/results/videoencode_reli_promise_'; +describe('videoEncoderReliabilityPromise', function () { + const ROOT = '/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/'; + const BASIC_PATH = ROOT + 'video_reliability_promise_'; let videoEncodeProcessor; let mediaTest = mediademo.createMediaTest(); let surfaceID = '';