提交 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;
......
......@@ -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;
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册