Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
75cd4092
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
75cd4092
编写于
3月 02, 2022
作者:
L
ling990
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
modify path Signed-off-by: ling990 <liling96@huawei.com>
Signed-off-by:
N
ling990
<
liling96@huawei.com
>
上级
09966c5e
变更
22
展开全部
显示空白变更内容
内联
并排
Showing
22 changed file
with
316 addition
and
301 deletion
+316
-301
multimedia/BUILD.gn
multimedia/BUILD.gn
+2
-0
multimedia/media/media_js_standard/audioDecoder/Test.json
multimedia/media/media_js_standard/audioDecoder/Test.json
+8
-9
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
...r/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
+6
-5
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
...er/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
+6
-5
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
+6
-5
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
+6
-5
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js
...r/src/main/js/test/AudioDecoderMultiInstancesTest.test.js
+2
-2
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
.../main/js/test/AudioDecoderReliabilityCallbackTest.test.js
+57
-56
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
+57
-56
multimedia/media/media_js_standard/audioEncoder/Test.json
multimedia/media/media_js_standard/audioEncoder/Test.json
+5
-6
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
+12
-11
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
+12
-11
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js
...r/src/main/js/test/AudioEncoderMultiInstancesTest.test.js
+2
-3
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
.../main/js/test/AudioEncoderReliabilityCallbackTest.test.js
+57
-56
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
+57
-56
multimedia/media/media_js_standard/videoEncoder/Test.json
multimedia/media/media_js_standard/videoEncoder/Test.json
+3
-4
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/List.test.js
...ia_js_standard/videoEncoder/src/main/js/test/List.test.js
+5
-3
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js
...r/src/main/js/test/VideoEncoderMultiInstancesTest.test.js
+3
-2
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js
...main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js
+3
-2
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js
.../main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js
+2
-1
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js
.../test/VideoEncoderSoftwareReliabilityCallbackTest.test.js
+2
-1
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js
...s/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js
+3
-2
未找到文件。
multimedia/BUILD.gn
浏览文件 @
75cd4092
...
...
@@ -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",
...
...
multimedia/media/media_js_standard/audioDecoder/Test.json
浏览文件 @
75cd4092
...
...
@@ -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"
:[
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderMultiInstancesTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
浏览文件 @
75cd4092
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
浏览文件 @
75cd4092
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/audioEncoder/Test.json
浏览文件 @
75cd4092
...
...
@@ -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"
:[
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
'
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
(()
=>
{
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderMultiInstancesTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
浏览文件 @
75cd4092
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
浏览文件 @
75cd4092
此差异已折叠。
点击以展开。
multimedia/media/media_js_standard/videoEncoder/Test.json
浏览文件 @
75cd4092
...
...
@@ -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"
:[
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/List.test.js
浏览文件 @
75cd4092
...
...
@@ -13,6 +13,8 @@
* limitations under the License.
*/
require
(
'
./VideoEncoderFuncPromiseTest.test.js
'
)
require
(
'
./VideoEncoderReliabilityPromiseTest.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
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
;
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js
浏览文件 @
75cd4092
...
...
@@ -31,7 +31,8 @@ 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
'
);
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
=
''
;
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityCallbackTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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
,
...
...
multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareReliabilityPromiseTest.test.js
浏览文件 @
75cd4092
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录