提交 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") { ...@@ -23,6 +23,8 @@ group("multimedia") {
"media/media_js_standard/audioEncoder:audio_encoder_js_hap", "media/media_js_standard/audioEncoder:audio_encoder_js_hap",
"media/media_js_standard/audioPlayer:audio_player_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", #"image/image_js_standard:image_js_hap",
#"media/media_js_standard/videoPlayer:video_player_js_hap", #"media/media_js_standard/videoPlayer:video_player_js_hap",
#"media/media_js_standard/videoRecorder:video_recorder_js_hap", #"media/media_js_standard/videoRecorder:video_recorder_js_hap",
......
...@@ -12,20 +12,19 @@ ...@@ -12,20 +12,19 @@
"pre-push": [ "pre-push": [
], ],
"push": [ "push": [
"./resource/audio/audioDecode/AAC_48000_32_1.aac ->/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/media/", "./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/media/", "./resource/audio/audioDecode/FLAC_48000_32_1.flac ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/",
"./resource/audio/audioDecode/mp3.es ->/data/media/", "./resource/audio/audioDecode/mp3.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/",
"./resource/audio/audioDecode/vorbis.es ->/data/media/" "./resource/audio/audioDecode/vorbis.es ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"rm -R /data/media/results", "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/results/",
"chmod 777 -R /data/media", "chmod 777 -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder",
"chmod 777 /data/media/*", "chmod 777 /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/*",
"mkdir /data/media/results",
"setenforce 0" "setenforce 0"
], ],
"teardown-command":[ "teardown-command":[
......
...@@ -18,11 +18,12 @@ import Fileio from '@ohos.fileio' ...@@ -18,11 +18,12 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioDecoderFormatCallback', function () { describe('AudioDecoderFormatCallback', function () {
const AUDIOPATH1 = '/data/media/AAC_48000_32_1.aac'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/'
const AUDIOPATH2 = '/data/media/FLAC_48000_32_1.flac'; const AUDIOPATH1 = RESOURCEPATH + 'AAC_48000_32_1.aac';
const AUDIOPATH3 = '/data/media/mp3.es'; const AUDIOPATH2 = RESOURCEPATH + 'FLAC_48000_32_1.flac'
const AUDIOPATH4 = '/data/media/vorbis.es'; const AUDIOPATH3 = RESOURCEPATH + 'mp3.es';
const BASIC_PATH = '/data/media/results/decode_format_callback_'; const AUDIOPATH4 = RESOURCEPATH + 'vorbis.es';
const BASIC_PATH = RESOURCEPATH + 'results/decode_format_callback_';
let audioDecodeProcessor; let audioDecodeProcessor;
let readStreamSync; let readStreamSync;
let needGetMediaDes = false; let needGetMediaDes = false;
......
...@@ -18,11 +18,12 @@ import Fileio from '@ohos.fileio' ...@@ -18,11 +18,12 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioDecoderFormatPromise', function () { describe('AudioDecoderFormatPromise', function () {
const AUDIOPATH1 = '/data/media/AAC_48000_32_1.aac' const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/'
const AUDIOPATH2 = '/data/media/FLAC_48000_32_1.flac' const AUDIOPATH1 = RESOURCEPATH + 'AAC_48000_32_1.aac';
const AUDIOPATH3 = '/data/media/mp3.es'; const AUDIOPATH2 = RESOURCEPATH + 'FLAC_48000_32_1.flac'
const AUDIOPATH4 = '/data/media/vorbis.es'; const AUDIOPATH3 = RESOURCEPATH + 'mp3.es';
const BASIC_PATH = '/data/media/results/decode_format_promise_'; const AUDIOPATH4 = RESOURCEPATH + 'vorbis.es';
const BASIC_PATH = RESOURCEPATH + 'results/decode_format_promise_';
let audioDecodeProcessor; let audioDecodeProcessor;
let readStreamSync; let readStreamSync;
let needGetMediaDes = false; let needGetMediaDes = false;
......
...@@ -17,11 +17,12 @@ import media from '@ohos.multimedia.media' ...@@ -17,11 +17,12 @@ import media from '@ohos.multimedia.media'
import Fileio from '@ohos.fileio' import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioDecoderFunc', function () { describe('AudioDecoderFuncCallback', function () {
const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/'
const AUDIOPATH2 = '/data/media/AAC_16000_1.aac'; const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac';
const AUDIOPATH3 = '/data/media/FLAC_48000_32_1.flac'; const AUDIOPATH2 = RESOURCEPATH + 'AAC_16000_1.aac';
const BASIC_PATH = '/data/media/results/decode_func_callback_'; const AUDIOPATH3 = RESOURCEPATH + 'FLAC_48000_32_1.flac';
const BASIC_PATH = RESOURCEPATH + 'results/decode_func_callback_';
let audioDecodeProcessor; let audioDecodeProcessor;
let readStreamSync; let readStreamSync;
let eosframenum = 0; let eosframenum = 0;
......
...@@ -17,11 +17,12 @@ import media from '@ohos.multimedia.media' ...@@ -17,11 +17,12 @@ import media from '@ohos.multimedia.media'
import Fileio from '@ohos.fileio' import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioDecoderFunc', function () { describe('AudioDecoderFuncPromise', function () {
const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/'
const AUDIOPATH2 = '/data/media/AAC_16000_1.aac'; const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac';
const AUDIOPATH3 = '/data/media/FLAC_48000_32_1.flac'; const AUDIOPATH2 = RESOURCEPATH + 'AAC_16000_1.aac';
const BASIC_PATH = '/data/media/results/decode_func_promise_'; const AUDIOPATH3 = RESOURCEPATH + 'FLAC_48000_32_1.flac';
const BASIC_PATH = RESOURCEPATH + 'results/decode_func_promise_';
let audioDecodeProcessor; let audioDecodeProcessor;
let readStreamSync; let readStreamSync;
let eosframenum = 0; let eosframenum = 0;
......
...@@ -18,8 +18,8 @@ import Fileio from '@ohos.fileio' ...@@ -18,8 +18,8 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioDecoderMultiInstances', function () { describe('AudioDecoderMultiInstances', function () {
const AUDIOPATH = '/data/media/AAC_48000_32_1.aac'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audiodecoder/'
const BASIC_PATH = '/data/media/results/decode_multiInstances_'; const AUDIOPATH = RESOURCEPATH + 'AAC_48000_32_1.aac';
let readStreamSync; let readStreamSync;
let eosframenum = 0; let eosframenum = 0;
let samplerate = 44.1; let samplerate = 44.1;
......
...@@ -12,17 +12,16 @@ ...@@ -12,17 +12,16 @@
"pre-push": [ "pre-push": [
], ],
"push": [ "push": [
"./resource/audio/audioEncode/S32LE.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/media/" "./resource/audio/audioEncode/S32LE_2.pcm ->/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"rm -R /data/media/results", "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/results/",
"chmod 777 -R /data/media", "chmod 777 -R /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder",
"chmod 777 /data/media/*", "chmod 777 /data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/*",
"mkdir /data/media/results",
"setenforce 0" "setenforce 0"
], ],
"teardown-command":[ "teardown-command":[
......
...@@ -18,9 +18,10 @@ import Fileio from '@ohos.fileio' ...@@ -18,9 +18,10 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioEncoderFuncCallback', function () { describe('AudioEncoderFuncCallback', function () {
const AUDIOPATH = '/data/media/S32LE.pcm'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/'
const AUDIOPATH2 = '/data/media/S32LE_2.pcm'; const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm';
const BASIC_PATH = '/data/media/results/encode_func_'; const AUDIOPATH2 = RESOURCEPATH + 'S32LE_2.pcm';
const BASIC_PATH = RESOURCEPATH + 'results/encode_func_callback_';
let audioEncodeProcessor; let audioEncodeProcessor;
let readStreamSync; let readStreamSync;
let eosframenum = 0; let eosframenum = 0;
...@@ -305,7 +306,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -305,7 +306,7 @@ describe('AudioEncoderFuncCallback', function () {
let mediaDescription2 = { let mediaDescription2 = {
"codec_mime": 'audio/mp4a-latm', "codec_mime": 'audio/mp4a-latm',
} }
let savepath = BASIC_PATH + 'callback0000.txt'; let savepath = BASIC_PATH + 'callback0000.es';
needGetMediaDes = true; needGetMediaDes = true;
workdoneAtEOS = true; workdoneAtEOS = true;
eventEmitter.on('getAudioEncoderCaps', () => { eventEmitter.on('getAudioEncoderCaps', () => {
...@@ -385,7 +386,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -385,7 +386,7 @@ describe('AudioEncoderFuncCallback', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + 'callback0100.txt'; let savepath = BASIC_PATH + 'callback0100.es';
eosframenum = 500; eosframenum = 500;
workdoneAtEOS = true; workdoneAtEOS = true;
eventEmitter.on('getAudioEncoderCaps', () => { eventEmitter.on('getAudioEncoderCaps', () => {
...@@ -443,7 +444,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -443,7 +444,7 @@ describe('AudioEncoderFuncCallback', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + 'callback0200.txt'; let savepath = BASIC_PATH + 'callback0200.es';
workdoneAtEOS = true; workdoneAtEOS = true;
eventEmitter.on('getAudioEncoderCaps', () => { eventEmitter.on('getAudioEncoderCaps', () => {
audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => { audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => {
...@@ -509,7 +510,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -509,7 +510,7 @@ describe('AudioEncoderFuncCallback', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + 'callback0300.txt'; let savepath = BASIC_PATH + 'callback0300.es';
eosframenum = 500; eosframenum = 500;
flushAtEOS = true; flushAtEOS = true;
eventEmitter.on('getAudioEncoderCaps', () => { eventEmitter.on('getAudioEncoderCaps', () => {
...@@ -567,7 +568,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -567,7 +568,7 @@ describe('AudioEncoderFuncCallback', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + 'callback0400.txt'; let savepath = BASIC_PATH + 'callback0400.es';
eventEmitter.on('getAudioEncoderCaps', () => { eventEmitter.on('getAudioEncoderCaps', () => {
audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => { audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => {
expect(err).assertUndefined(); expect(err).assertUndefined();
...@@ -649,7 +650,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -649,7 +650,7 @@ describe('AudioEncoderFuncCallback', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + 'callback0500.txt'; let savepath = BASIC_PATH + 'callback0500.es';
eosframenum = 100; eosframenum = 100;
eventEmitter.on('getAudioEncoderCaps', () => { eventEmitter.on('getAudioEncoderCaps', () => {
audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => { audioEncodeProcessor.getAudioEncoderCaps((err, Audiocaps) => {
...@@ -728,7 +729,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -728,7 +729,7 @@ describe('AudioEncoderFuncCallback', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + 'callback0600.txt'; let savepath = BASIC_PATH + 'callback0600.es';
eosframenum = 100; eosframenum = 100;
resetAtEOS = true; resetAtEOS = true;
let mediaDescription2 = { let mediaDescription2 = {
...@@ -777,7 +778,7 @@ describe('AudioEncoderFuncCallback', function () { ...@@ -777,7 +778,7 @@ describe('AudioEncoderFuncCallback', function () {
console.info(`case configure 2`); console.info(`case configure 2`);
resetParam(); resetParam();
readFile(AUDIOPATH2) readFile(AUDIOPATH2)
savepath = BASIC_PATH + 'callback0601.txt'; savepath = BASIC_PATH + 'callback0601.es';
workdoneAtEOS = true; workdoneAtEOS = true;
hasreconfigured = true; hasreconfigured = true;
eventEmitter.emit('prepare'); eventEmitter.emit('prepare');
......
...@@ -18,9 +18,10 @@ import Fileio from '@ohos.fileio' ...@@ -18,9 +18,10 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioEncoderFuncPromise', function () { describe('AudioEncoderFuncPromise', function () {
const AUDIOPATH = '/data/media/S32LE.pcm'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/'
const AUDIOPATH2 = '/data/media/S32LE_2.pcm'; const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm';
const BASIC_PATH = '/data/media/results/encode_func_promise_'; const AUDIOPATH2 = RESOURCEPATH + 'S32LE_2.pcm';
const BASIC_PATH = RESOURCEPATH + 'results/encode_func_promise_';
let audioEncodeProcessor; let audioEncodeProcessor;
let readStreamSync; let readStreamSync;
let eosframenum = 0; let eosframenum = 0;
...@@ -310,7 +311,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -310,7 +311,7 @@ describe('AudioEncoderFuncPromise', function () {
let mediaDescription2 = { let mediaDescription2 = {
"codec_mime": 'audio/mp4a-latm', "codec_mime": 'audio/mp4a-latm',
} }
let savepath = BASIC_PATH + '0000.txt'; let savepath = BASIC_PATH + '0000.es';
needgetMediaDes = true; needgetMediaDes = true;
workdoneAtEOS = true; workdoneAtEOS = true;
await media.getMediaCapability().then((mediaCaps) => { await media.getMediaCapability().then((mediaCaps) => {
...@@ -372,7 +373,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -372,7 +373,7 @@ describe('AudioEncoderFuncPromise', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + '0100.txt'; let savepath = BASIC_PATH + '0100.es';
eosframenum = 500; eosframenum = 500;
workdoneAtEOS = true; workdoneAtEOS = true;
await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => {
...@@ -411,7 +412,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -411,7 +412,7 @@ describe('AudioEncoderFuncPromise', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + '0200.txt'; let savepath = BASIC_PATH + '0200.es';
workdoneAtEOS = true; workdoneAtEOS = true;
await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => {
console.info("case create createAudioEncoder success"); console.info("case create createAudioEncoder success");
...@@ -456,7 +457,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -456,7 +457,7 @@ describe('AudioEncoderFuncPromise', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + '0300.txt'; let savepath = BASIC_PATH + '0300.es';
eosframenum = 500; eosframenum = 500;
flushAtEOS = true; flushAtEOS = true;
await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => {
...@@ -495,7 +496,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -495,7 +496,7 @@ describe('AudioEncoderFuncPromise', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + '0400.txt'; let savepath = BASIC_PATH + '0400.es';
await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => {
console.info("case create createAudioEncoder success"); console.info("case create createAudioEncoder success");
audioEncodeProcessor = processor; audioEncodeProcessor = processor;
...@@ -545,7 +546,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -545,7 +546,7 @@ describe('AudioEncoderFuncPromise', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + '0500.txt'; let savepath = BASIC_PATH + '0500.es';
eosframenum = 100; eosframenum = 100;
await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => {
console.info("case create createAudioEncoder success"); console.info("case create createAudioEncoder success");
...@@ -599,7 +600,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -599,7 +600,7 @@ describe('AudioEncoderFuncPromise', function () {
"sample_rate": 48000, "sample_rate": 48000,
"audio_raw_format": 16, "audio_raw_format": 16,
} }
let savepath = BASIC_PATH + '0600.txt'; let savepath = BASIC_PATH + '0600.es';
eosframenum = 100; eosframenum = 100;
resetAtEOS = true; resetAtEOS = true;
await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => { await media.createAudioEncoderByMime('audio/mp4a-latm').then((processor) => {
...@@ -634,7 +635,7 @@ describe('AudioEncoderFuncPromise', function () { ...@@ -634,7 +635,7 @@ describe('AudioEncoderFuncPromise', function () {
resetParam(); resetParam();
readFile(AUDIOPATH2); readFile(AUDIOPATH2);
}, failCallback).catch(failCatch); }, failCallback).catch(failCatch);
let savepath2 = BASIC_PATH + '0601.txt'; let savepath2 = BASIC_PATH + '0601.es';
workdoneAtEOS = true; workdoneAtEOS = true;
setCallback(savepath2, done); setCallback(savepath2, done);
await audioEncodeProcessor.prepare().then(() => { await audioEncodeProcessor.prepare().then(() => {
......
...@@ -18,9 +18,8 @@ import Fileio from '@ohos.fileio' ...@@ -18,9 +18,8 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('AudioEncoderFuncPromise', function () { describe('AudioEncoderFuncPromise', function () {
const AUDIOPATH = '/data/media/S32LE.pcm'; const RESOURCEPATH = '/data/accounts/account_0/appdata/ohos.acts.multimedia.audio.audioencoder/'
const AUDIOPATH2 = '/data/media/S32LE_2.pcm'; const AUDIOPATH = RESOURCEPATH + 'S32LE.pcm';
const BASIC_PATH = '/data/media/results/encode_func_promise_';
let readStreamSync; let readStreamSync;
let eosframenum = 0; let eosframenum = 0;
let stopAtEOS = false; let stopAtEOS = false;
......
...@@ -17,10 +17,9 @@ ...@@ -17,10 +17,9 @@
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"rm -R /data/media/results", "mkdir -p /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/",
"chmod 777 -R /data/media", "chmod 777 -R /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder",
"chmod 777 /data/media/*", "chmod 777 /data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/*",
"mkdir /data/media/results",
"setenforce 0" "setenforce 0"
], ],
"teardown-command":[ "teardown-command":[
......
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
require('./VideoEncoderFuncPromiseTest.test.js') require('./VideoEncoderSoftwareFuncCallbackTest.test.js')
require('./VideoEncoderReliabilityPromiseTest.test.js') require('./VideoEncoderSoftwareFuncPromiseTest.test.js')
require('./VideoEncoderSoftwareReliabilityCallbackTest.test.js')
require('./VideoEncoderSoftwareReliabilityPromiseTest.test.js')
require('./VideoEncoderMultiInstancesTest.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 ' ...@@ -21,7 +21,8 @@ import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from '
describe('videoEncoderSoftwareMultiInstances', function () { describe('videoEncoderSoftwareMultiInstances', function () {
const events = require('events'); const events = require('events');
const eventEmitter = new events.EventEmitter(); 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 videoEncodeProcessor;
let mediaTest; let mediaTest;
let surfaceID = ''; let surfaceID = '';
...@@ -269,7 +270,7 @@ describe('videoEncoderSoftwareMultiInstances', function () { ...@@ -269,7 +270,7 @@ describe('videoEncoderSoftwareMultiInstances', function () {
*/ */
it('SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_MULTIINSTANCE_0100', 0, async function (done) { it('SUB_MEDIA_VIDEO_SOFTWARE_ENCODER_MULTIINSTANCE_0100', 0, async function (done) {
console.info("case test multiple encoder instances"); 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 mime = 'video/mp4v-es';
let width = 720; let width = 720;
let height = 480; let height = 480;
......
...@@ -31,7 +31,8 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () { ...@@ -31,7 +31,8 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () {
let stopBuffer = false; let stopBuffer = false;
const events = require('events'); const events = require('events');
const eventEmitter = new events.EventEmitter(); 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() { beforeAll(function() {
console.info('beforeAll case'); console.info('beforeAll case');
......
...@@ -19,7 +19,8 @@ import Fileio from '@ohos.fileio' ...@@ -19,7 +19,8 @@ import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('videoSoftwareEncoderFuncPromise', function () { 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 videoEncodeProcessor;
let mediaTest; let mediaTest;
let surfaceID = ''; let surfaceID = '';
......
...@@ -50,7 +50,8 @@ describe('VideoEncoderSoftwareReliCallbackTest', function () { ...@@ -50,7 +50,8 @@ describe('VideoEncoderSoftwareReliCallbackTest', function () {
let isStreamRunning = false; let isStreamRunning = false;
let workdoneAtEOS = false; let workdoneAtEOS = false;
let stopBuffer = 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 = { let mediaDescription = {
'width': 720, 'width': 720,
'height': 480, 'height': 480,
......
...@@ -18,8 +18,9 @@ import mediademo from '@ohos.multimedia.mediademo' ...@@ -18,8 +18,9 @@ import mediademo from '@ohos.multimedia.mediademo'
import Fileio from '@ohos.fileio' import Fileio from '@ohos.fileio'
import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
describe('videoEncoderReliability', function () { describe('videoEncoderReliabilityPromise', function () {
const BASIC_PATH = '/data/media/results/videoencode_reli_promise_'; const ROOT = '/data/accounts/account_0/appdata/ohos.acts.multimedia.video.videoencoder/results/';
const BASIC_PATH = ROOT + 'video_reliability_promise_';
let videoEncodeProcessor; let videoEncodeProcessor;
let mediaTest = mediademo.createMediaTest(); let mediaTest = mediademo.createMediaTest();
let surfaceID = ''; let surfaceID = '';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册