提交 75cd4092 编写于 作者: L ling990

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

Signed-off-by: Nling990 <liling96@huawei.com>
上级 09966c5e
......@@ -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",
......
......@@ -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":[
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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":[
......
......@@ -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');
......
......@@ -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(() => {
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
......@@ -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":[
......
......@@ -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
......@@ -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;
......
......@@ -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');
})
......
......@@ -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 = '';
......
......@@ -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,
......
......@@ -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 = '';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册