Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9897505e
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看板
未验证
提交
9897505e
编写于
6月 25, 2022
作者:
O
openharmony_ci
提交者:
Gitee
6月 25, 2022
浏览文件
操作
浏览文件
下载
差异文件
!3780 补充关闭打开文件的fd操作
Merge pull request !3780 from ling990/ling990
上级
a23c2cf6
22aa10db
变更
22
隐藏空白更改
内联
并排
Showing
22 changed file
with
75 addition
and
116 deletion
+75
-116
multimedia/media/media_js_standard/audioCodecFormat/src/main/js/test/AudioDecoderFormatCompatibilityPromiseTest.test.js
...s/test/AudioDecoderFormatCompatibilityPromiseTest.test.js
+8
-3
multimedia/media/media_js_standard/audioCodecFormat/src/main/js/test/AudioEncoderFormatCompatibilityPromiseTest.test.js
...s/test/AudioEncoderFormatCompatibilityPromiseTest.test.js
+8
-3
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
...r/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
+2
-9
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
...er/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
+2
-9
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
+5
-15
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
+5
-14
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
.../main/js/test/AudioDecoderReliabilityCallbackTest.test.js
+2
-4
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
+8
-4
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
...der/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
+4
-12
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
...oder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
+4
-11
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
.../main/js/test/AudioEncoderReliabilityCallbackTest.test.js
+2
-4
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
...c/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
+2
-4
multimedia/media/media_js_standard/videoCodecFormat/src/main/js/test/VideoDecoderFormatPromiseTest.test.js
...at/src/main/js/test/VideoDecoderFormatPromiseTest.test.js
+2
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js
...ideoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js
+1
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncCallbackTest.test.js
...der/src/main/js/test/VideoDecoderFuncCallbackTest.test.js
+2
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js
...oder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js
+2
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js
...der/src/main/js/test/VideoDecoderReliCallbackTest.test.js
+3
-3
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js
...oder/src/main/js/test/VideoDecoderReliPromiseTest.test.js
+3
-3
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js
...main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js
+2
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js
.../main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js
+2
-2
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js
...main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js
+3
-3
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js
.../main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js
+3
-3
未找到文件。
multimedia/media/media_js_standard/audioCodecFormat/src/main/js/test/AudioDecoderFormatCompatibilityPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -2145,7 +2145,6 @@ describe('AudioDecoderFormatCompatibilityPromise', function () {
audioDecodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
}
await
closeFdWrite
();
})
afterAll
(
function
()
{
...
...
@@ -2189,6 +2188,7 @@ describe('AudioDecoderFormatCompatibilityPromise', function () {
audioDecodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
}
await
closeFdRead
();
await
closeFdWrite
();
}
...
...
@@ -2233,6 +2233,12 @@ describe('AudioDecoderFormatCompatibilityPromise', function () {
}
}
async
function
closeFdRead
()
{
await
fileio
.
close
(
fdRead
).
then
(()
=>
{
console
.
info
(
'
[fileio] case close fdRead success, fd is
'
+
fdRead
);
},
failCallback
).
catch
(
failCatch
);
}
function
writeFile
(
buf
,
len
)
{
try
{
let
res
=
fileio
.
writeSync
(
fdWrite
,
buf
,
{
length
:
len
});
...
...
@@ -2255,7 +2261,7 @@ describe('AudioDecoderFormatCompatibilityPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -2456,7 +2462,6 @@ describe('AudioDecoderFormatCompatibilityPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
readPath
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
function
(){
eventEmitter
.
emit
(
'
nextStep
'
,
done
);},
done
...
...
multimedia/media/media_js_standard/audioCodecFormat/src/main/js/test/AudioEncoderFormatCompatibilityPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -75,7 +75,6 @@ describe('AudioEncoderFormatCompatibilityPromise', function () {
audioEncodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
}
await
closeFdWrite
();
})
afterAll
(
function
()
{
...
...
@@ -139,6 +138,7 @@ describe('AudioEncoderFormatCompatibilityPromise', function () {
audioEncodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
}
await
closeFdRead
();
await
closeFdWrite
();
}
...
...
@@ -171,6 +171,12 @@ describe('AudioEncoderFormatCompatibilityPromise', function () {
})
}
async
function
closeFdRead
()
{
await
fileio
.
close
(
fdRead
).
then
(()
=>
{
console
.
info
(
'
[fileio] case close fdRead success, fd is
'
+
fdRead
);
},
failCallback
).
catch
(
failCatch
);
}
async
function
closeFdWrite
()
{
if
(
fileAssetWrite
!=
null
)
{
await
fileAssetWrite
[
0
].
close
(
fdWrite
).
then
(()
=>
{
...
...
@@ -216,7 +222,7 @@ describe('AudioEncoderFormatCompatibilityPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -419,7 +425,6 @@ describe('AudioEncoderFormatCompatibilityPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
readPath
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
function
(){
eventEmitter
.
emit
(
'
nextStep
'
,
done
);},
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -155,7 +155,7 @@ describe('AudioDecoderFormatCallback', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -213,6 +213,7 @@ describe('AudioDecoderFormatCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
log
(
"
case release success
"
);
audioDecodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -349,7 +350,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH1
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -469,7 +469,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH1
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -546,7 +545,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH2
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -623,7 +621,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH2
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -687,7 +684,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH3
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -751,7 +747,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH3
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -858,7 +853,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH4
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -965,7 +959,6 @@ describe('AudioDecoderFormatCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH4
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -165,7 +165,7 @@ describe('AudioDecoderFormatPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -223,6 +223,7 @@ describe('AudioDecoderFormatPromise', function () {
console
.
info
(
'
release success
'
);
audioDecodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
}
...
...
@@ -352,7 +353,6 @@ describe('AudioDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH1
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -453,7 +453,6 @@ describe('AudioDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH1
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -512,7 +511,6 @@ describe('AudioDecoderFormatPromise', function () {
console
.
log
(
"
start configure
"
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH2
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -571,7 +569,6 @@ describe('AudioDecoderFormatPromise', function () {
console
.
log
(
"
start configure
"
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH2
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -615,7 +612,6 @@ describe('AudioDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH3
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -659,7 +655,6 @@ describe('AudioDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH3
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -747,7 +742,6 @@ describe('AudioDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH4
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -835,7 +829,6 @@ describe('AudioDecoderFormatPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
log
(
"
configure success
"
);
readFile
(
AUDIOPATH4
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -334,7 +334,6 @@ describe('AudioDecoderFuncCallback', function () {
}
}
function
writeFile
(
path
,
buf
,
len
)
{
try
{
let
res
=
fileio
.
writeSync
(
fdWrite
,
buf
,
{
length
:
len
});
...
...
@@ -357,7 +356,7 @@ describe('AudioDecoderFuncCallback', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -391,7 +390,6 @@ describe('AudioDecoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
})
}
...
...
@@ -408,6 +406,7 @@ describe('AudioDecoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
log
(
"
case release success
"
);
audioDecodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -539,7 +538,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -623,7 +621,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -696,7 +693,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -768,7 +764,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -827,7 +822,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -868,6 +862,7 @@ describe('AudioDecoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
info
(
`case release 1`
);
audioDecodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -914,7 +909,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -939,7 +933,6 @@ describe('AudioDecoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
info
(
`stop after 5s`
);
resetParam
();
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
restart
'
);
})
})
...
...
@@ -948,7 +941,6 @@ describe('AudioDecoderFuncCallback', function () {
sleep
(
2000
).
then
(
async
()
=>
{
resetParam
();
await
getFdRead
(
readpath
,
done
);
readFile
(
readpath
);
audioDecodeProcessor
.
start
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`restart after 2s`
);
...
...
@@ -1006,7 +998,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -1030,6 +1021,7 @@ describe('AudioDecoderFuncCallback', function () {
eventEmitter
.
on
(
'
reconfigure
'
,
(
mediaDescription2
)
=>
{
sleep
(
10000
).
then
(
async
()
=>
{
resetParam
();
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
audioDecodeProcessor
.
configure
(
mediaDescription2
,
async
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
...
...
@@ -1040,7 +1032,6 @@ describe('AudioDecoderFuncCallback', function () {
savepath
=
'
audioDecode_function_callback_06_2.pcm
'
;
await
getFdWrite
(
savepath
);
await
getFdRead
(
readpath
,
done
);
readFile
(
AUDIOPATH2
);
workdoneAtEOS
=
true
;
ES
=
[
0
,
239
,
302
,
309
,
330
,
474
,
684
,
699
,
683
,
674
,
647
,
649
,
638
,
644
,
640
,
639
,
650
,
702
,
713
,
718
,
707
,
707
,
683
,
670
,
674
,
699
,
654
,
650
,
715
,
770
,
...
...
@@ -1113,7 +1104,6 @@ describe('AudioDecoderFuncCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -1136,6 +1126,7 @@ describe('AudioDecoderFuncCallback', function () {
});
eventEmitter
.
on
(
'
recreate
'
,
()
=>
{
sleep
(
10000
).
then
(
async
()
=>
{
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
media
.
createAudioDecoderByMime
(
'
audio/flac
'
,
(
err
,
processor
)
=>
{
expect
(
err
).
assertUndefined
();
...
...
@@ -1155,7 +1146,6 @@ describe('AudioDecoderFuncCallback', function () {
savepath
=
'
audioDecode_function_callback_07_2.pcm
'
;
await
getFdWrite
(
savepath
);
await
getFdRead
(
readpath
,
done
);
readFile
(
AUDIOPATH3
);
workdoneAtEOS
=
true
;
ES
=
[
0
,
2116
,
2093
,
2886
,
2859
,
2798
,
2778
,
2752
,
2752
,
2754
,
2720
,
2898
,
2829
,
2806
,
2796
,
2786
,
2774
,
2758
,
2741
,
3489
,
3342
,
3272
,
3167
,
3048
,
3060
,
2919
,
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -343,7 +343,6 @@ describe('AudioDecoderFuncPromise', function () {
}
}
function
writeFile
(
path
,
buf
,
len
)
{
try
{
let
res
=
fileio
.
writeSync
(
fdWrite
,
buf
,
{
length
:
len
});
...
...
@@ -366,7 +365,7 @@ describe('AudioDecoderFuncPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -393,7 +392,6 @@ describe('AudioDecoderFuncPromise', function () {
await
audioDecodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
readFile
(
readpath
);
workdoneAtEOS
=
true
;
},
failCallback
).
catch
(
failCatch
);
}
...
...
@@ -458,6 +456,7 @@ describe('AudioDecoderFuncPromise', function () {
await
flushWork
(
done
);
}
else
if
(
workdoneAtEOS
)
{
await
doneWork
();
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
}
else
{
...
...
@@ -551,7 +550,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -594,7 +592,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -635,7 +632,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -684,7 +680,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -724,7 +719,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -745,6 +739,7 @@ describe('AudioDecoderFuncPromise', function () {
console
.
info
(
"
case release success
"
);
},
failCallback
).
catch
(
failCatch
);
audioDecodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -779,7 +774,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -799,7 +793,6 @@ describe('AudioDecoderFuncPromise', function () {
});
resetParam
();
await
getFdRead
(
readpath
,
done
);
readFile
(
readpath
);
await
audioDecodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case restart after 3s success
"
);
workdoneAtEOS
=
true
;
...
...
@@ -843,7 +836,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -856,6 +848,7 @@ describe('AudioDecoderFuncPromise', function () {
console
.
info
(
"
case start configure 2
"
);
});
resetParam
();
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
await
audioDecodeProcessor
.
configure
(
mediaDescription2
).
then
(()
=>
{
console
.
info
(
"
case configure 2 success
"
);
...
...
@@ -865,7 +858,6 @@ describe('AudioDecoderFuncPromise', function () {
savepath
=
'
audioDecode_function_promise_06_2.pcm
'
;
await
getFdWrite
(
savepath
);
await
getFdRead
(
readpath
,
done
);
readFile
(
AUDIOPATH2
);
workdoneAtEOS
=
true
;
ES
=
[
0
,
239
,
302
,
309
,
330
,
474
,
684
,
699
,
683
,
674
,
647
,
649
,
638
,
644
,
640
,
639
,
650
,
702
,
713
,
718
,
707
,
707
,
683
,
670
,
674
,
699
,
654
,
650
,
715
,
770
,
...
...
@@ -929,7 +921,6 @@ describe('AudioDecoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioDecodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -941,6 +932,7 @@ describe('AudioDecoderFuncPromise', function () {
await
sleep
(
10000
).
then
(()
=>
{
console
.
info
(
"
start createaudiodecoder 2
"
);
});
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
await
media
.
createAudioDecoderByMime
(
'
audio/flac
'
).
then
((
processor
)
=>
{
console
.
info
(
"
case create createAudioDecoder flac success
"
);
...
...
@@ -954,7 +946,6 @@ describe('AudioDecoderFuncPromise', function () {
savepath
=
'
audioDecode_function_promise_07_2.pcm
'
;
await
getFdWrite
(
savepath
);
await
getFdRead
(
readpath
,
done
);
readFile
(
AUDIOPATH3
);
workdoneAtEOS
=
true
;
ES
=
[
0
,
2116
,
2093
,
2886
,
2859
,
2798
,
2778
,
2752
,
2752
,
2754
,
2720
,
2898
,
2829
,
2806
,
2796
,
2786
,
2774
,
2758
,
2741
,
3489
,
3342
,
3272
,
3167
,
3048
,
3060
,
2919
,
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -267,6 +267,7 @@ describe('AudioDecoderReliabilityCallback', function () {
audioDecodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
}
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -319,7 +320,7 @@ describe('AudioDecoderReliabilityCallback', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -368,7 +369,6 @@ describe('AudioDecoderReliabilityCallback', function () {
audioDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
nextStep
(
mySteps
,
mediaDescription
,
done
);
});
break
;
...
...
@@ -387,7 +387,6 @@ describe('AudioDecoderReliabilityCallback', function () {
if
(
sawOutputEOS
)
{
resetParam
();
await
getFdRead
(
AUDIOPATH
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
enqueueAllInputs
(
inputQueue
);
}
...
...
@@ -408,7 +407,6 @@ describe('AudioDecoderReliabilityCallback', function () {
if
(
flushAtEOS
)
{
resetParam
();
await
getFdRead
(
AUDIOPATH
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
...
...
multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -271,6 +271,7 @@ describe('AudioDecoderReliabilityPromise', function () {
audioDecodeProcessor
=
null
;
},
failCallback
).
catch
(
failCatch
);
}
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -327,6 +328,12 @@ describe('AudioDecoderReliabilityPromise', function () {
})
}
async
function
closeFdRead
()
{
await
fileio
.
close
(
fdRead
).
then
(()
=>
{
console
.
info
(
'
[fileio] case close fdRead success, fd is
'
+
fdRead
);
},
failCallback
).
catch
(
failCatch
);
}
function
readFile
(
path
)
{
console
.
info
(
'
case read file start execution
'
);
try
{
...
...
@@ -340,7 +347,7 @@ describe('AudioDecoderReliabilityPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -381,7 +388,6 @@ describe('AudioDecoderReliabilityPromise', function () {
console
.
info
(
`case to configure`
);
audioDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
break
;
...
...
@@ -399,7 +405,6 @@ describe('AudioDecoderReliabilityPromise', function () {
if
(
sawOutputEOS
)
{
resetParam
();
await
getFdRead
(
AUDIOPATH
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
enqueueAllInputs
(
inputQueue
);
}
...
...
@@ -418,7 +423,6 @@ describe('AudioDecoderReliabilityPromise', function () {
if
(
flushAtEOS
)
{
await
getFdRead
(
AUDIOPATH
,
done
);
resetParam
();
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -164,7 +164,7 @@ describe('AudioEncoderFuncCallback', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -235,7 +235,6 @@ describe('AudioEncoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
})
}
...
...
@@ -251,6 +250,7 @@ describe('AudioEncoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
log
(
"
case release success
"
);
audioEncodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -384,7 +384,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -467,7 +466,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -527,7 +525,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -598,7 +595,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -657,7 +653,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -698,6 +693,7 @@ describe('AudioEncoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
info
(
`case release 1`
);
audioEncodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -744,7 +740,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -769,7 +764,6 @@ describe('AudioEncoderFuncCallback', function () {
expect
(
err
).
assertUndefined
();
console
.
info
(
`stop after 5s`
);
resetParam
();
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
restart
'
);
})
})
...
...
@@ -778,7 +772,6 @@ describe('AudioEncoderFuncCallback', function () {
sleep
(
2000
).
then
(
async
()
=>
{
resetParam
();
await
getFdRead
(
readpath
,
done
);
readFile
(
readpath
);
audioEncodeProcessor
.
start
((
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`restart after 2s`
);
...
...
@@ -836,7 +829,6 @@ describe('AudioEncoderFuncCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
eventEmitter
.
emit
(
'
prepare
'
);
})
});
...
...
@@ -860,6 +852,7 @@ describe('AudioEncoderFuncCallback', function () {
eventEmitter
.
on
(
'
reconfigure
'
,
(
mediaDescription2
)
=>
{
sleep
(
10000
).
then
(
async
()
=>
{
resetParam
();
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
audioEncodeProcessor
.
configure
(
mediaDescription2
,
async
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
...
...
@@ -869,7 +862,6 @@ describe('AudioEncoderFuncCallback', function () {
savepath
=
'
audioEncode_function_callback_06_2.aac
'
;
await
getFdWrite
(
savepath
);
await
getFdRead
(
readpath
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
hasreconfigured
=
true
;
eventEmitter
.
emit
(
'
prepare
'
);
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -174,7 +174,7 @@ describe('AudioEncoderFuncPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -240,7 +240,6 @@ describe('AudioEncoderFuncPromise', function () {
await
audioEncodeProcessor
.
flush
().
then
(()
=>
{
console
.
info
(
"
case flush at inputeos success
"
);
resetParam
();
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
},
failCallback
).
catch
(
failCatch
);
}
...
...
@@ -306,6 +305,7 @@ describe('AudioEncoderFuncPromise', function () {
await
flushWork
(
done
);
}
else
if
(
workdoneAtEOS
)
{
await
doneWork
();
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
}
else
{
...
...
@@ -406,7 +406,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -448,7 +447,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -489,7 +487,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
)
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -538,7 +535,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -578,7 +574,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -599,6 +594,7 @@ describe('AudioEncoderFuncPromise', function () {
console
.
info
(
"
case release success
"
);
},
failCallback
).
catch
(
failCatch
);
audioEncodeProcessor
=
null
;
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
done
();
})
...
...
@@ -633,7 +629,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -653,7 +648,6 @@ describe('AudioEncoderFuncPromise', function () {
});
resetParam
();
await
getFdRead
(
readpath
,
done
);
readFile
(
readpath
);
await
audioEncodeProcessor
.
start
().
then
(()
=>
{
console
.
info
(
"
case restart after 3s success
"
);
workdoneAtEOS
=
true
;
...
...
@@ -692,7 +686,6 @@ describe('AudioEncoderFuncPromise', function () {
},
failCallback
).
catch
(
failCatch
);
await
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
"
case configure success
"
);
readFile
(
AUDIOPATH
);
},
failCallback
).
catch
(
failCatch
);
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
@@ -710,6 +703,7 @@ describe('AudioEncoderFuncPromise', function () {
console
.
info
(
"
start configure 2
"
);
});
resetParam
();
await
fileio
.
close
(
fdRead
);
await
closeFdWrite
();
await
audioEncodeProcessor
.
configure
(
mediaDescription2
).
then
(()
=>
{
console
.
info
(
"
configure 2 success
"
);
...
...
@@ -719,7 +713,6 @@ describe('AudioEncoderFuncPromise', function () {
savepath
=
'
audioEncode_function_promise_06_2.aac
'
;
await
getFdWrite
(
savepath
);
await
getFdRead
(
readpath
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
setCallback
(
savepath
,
done
);
await
audioEncodeProcessor
.
prepare
().
then
(()
=>
{
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -90,6 +90,7 @@ describe('AudioEncoderReliabilityCallback', function () {
},
failCallback
).
catch
(
failCatch
);
audioEncodeProcessor
=
null
;
}
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -142,7 +143,7 @@ describe('AudioEncoderReliabilityCallback', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -189,7 +190,6 @@ describe('AudioEncoderReliabilityCallback', function () {
audioEncodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
nextStep
(
mySteps
,
mediaDescription
,
done
);
});
break
;
...
...
@@ -208,7 +208,6 @@ describe('AudioEncoderReliabilityCallback', function () {
if
(
sawOutputEOS
)
{
resetParam
();
await
getFdRead
(
AUDIOPATH
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
enqueueAllInputs
(
inputQueue
);
}
...
...
@@ -229,7 +228,6 @@ describe('AudioEncoderReliabilityCallback', function () {
if
(
flushAtEOS
)
{
await
getFdRead
(
AUDIOPATH
,
done
);
resetParam
();
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
...
...
multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -92,6 +92,7 @@ describe('AudioEncoderReliabilityPromise', function () {
},
failCallback
).
catch
(
failCatch
);
audioEncodeProcessor
=
null
;
}
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -159,7 +160,7 @@ describe('AudioEncoderReliabilityPromise', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -200,7 +201,6 @@ describe('AudioEncoderReliabilityPromise', function () {
console
.
info
(
`case to configure`
);
audioEncodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
`case configure 1`
);
readFile
(
AUDIOPATH
);
nextStep
(
mySteps
,
done
);
},
failCallback
).
catch
(
failCatch
);
break
;
...
...
@@ -218,7 +218,6 @@ describe('AudioEncoderReliabilityPromise', function () {
if
(
sawOutputEOS
)
{
resetParam
();
await
getFdRead
(
AUDIOPATH
,
done
);
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
enqueueInputs
(
inputQueue
);
}
...
...
@@ -237,7 +236,6 @@ describe('AudioEncoderReliabilityPromise', function () {
if
(
flushAtEOS
)
{
await
getFdRead
(
AUDIOPATH
,
done
);
resetParam
();
readFile
(
AUDIOPATH
);
workdoneAtEOS
=
true
;
flushAtEOS
=
false
;
}
...
...
multimedia/media/media_js_standard/videoCodecFormat/src/main/js/test/VideoDecoderFormatPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -262,6 +262,7 @@ describe('VideoDecoderFormatPromise', function () {
videoDecodeProcessor
=
null
;
}
await
router
.
clear
();
await
fileio
.
close
(
fdRead
);
})
afterAll
(
function
()
{
...
...
@@ -313,7 +314,7 @@ describe('VideoDecoderFormatPromise', function () {
console
.
info
(
"
case start get content
"
);
console
.
info
(
"
case start get content length is:
"
+
len
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -456,7 +457,6 @@ describe('VideoDecoderFormatPromise', function () {
await
videoDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
'
in case : configure success
'
);
readFile
(
srcPath
);
},
failCallback
).
catch
(
failCatch
);
await
videoDecodeProcessor
.
setOutputSurface
(
surfaceID
,
true
).
then
(()
=>
{
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js
浏览文件 @
9897505e
...
...
@@ -99,7 +99,7 @@ describe('VideoDecoderEnum', function () {
function
getContent
(
buf
,
len
)
{
console
.
info
(
"
case start get content
"
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -250,7 +250,6 @@ describe('VideoDecoderEnum', function () {
async
function
toConfigure
(
mediaDescription
,
srcPath
)
{
await
videoDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
'
in case : configure success
'
);
readFile
(
srcPath
);
},
failCallback
).
catch
(
failCatch
);
}
async
function
setSurfaceID
(
done
)
{
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -125,6 +125,7 @@ describe('VideoDecoderFuncCallbackTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
function
()
{
...
...
@@ -177,7 +178,7 @@ describe('VideoDecoderFuncCallbackTest', function () {
console
.
info
(
"
case start get content
"
);
console
.
info
(
"
case getcontent length is:
"
+
len
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -266,7 +267,6 @@ describe('VideoDecoderFuncCallbackTest', function () {
videoDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
in case : configure success
'
);
readFile
(
srcPath
);
setCallback
(
nextStep
);
eventEmitter
.
emit
(
'
getVideoDecoderCaps
'
,
done
);
// eventEmitter.emit('setOutputSurface', done);
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -125,6 +125,7 @@ describe('VideoDecoderFuncPromiseTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
function
()
{
...
...
@@ -174,7 +175,7 @@ describe('VideoDecoderFuncPromiseTest', function () {
console
.
info
(
"
case start get content
"
);
console
.
info
(
"
case start get content length is:
"
+
len
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -288,7 +289,6 @@ describe('VideoDecoderFuncPromiseTest', function () {
async
function
toConfigure
(
mediaDescription
,
srcPath
)
{
await
videoDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
'
in case : configure success
'
);
readFile
(
srcPath
);
},
failCallback
).
catch
(
failCatch
);
}
async
function
toSetOutputSurface
(
isDisplay
)
{
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -109,6 +109,7 @@ describe('VideoDecoderReliCallbackTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -159,11 +160,11 @@ describe('VideoDecoderReliCallbackTest', function () {
let
lengthReal
=
-
1
;
try
{
if
(
pos
==
-
1
)
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
});
}
else
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
position
:
pos
,
});
...
...
@@ -331,7 +332,6 @@ describe('VideoDecoderReliCallbackTest', function () {
toStart
(
mySteps
,
done
,
true
);
}
else
{
readStreamSync
=
undefined
;
readFile
(
SRCPATH
);
frameCountIn
=
0
;
frameCountOut
=
0
;
inputQueue
=
[];
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -109,6 +109,7 @@ describe('VideoDecoderReliPromiseTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -165,11 +166,11 @@ describe('VideoDecoderReliPromiseTest', function () {
let
lengthReal
=
-
1
;
try
{
if
(
pos
==
-
1
)
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
});
}
else
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
position
:
pos
,
});
...
...
@@ -328,7 +329,6 @@ describe('VideoDecoderReliPromiseTest', function () {
toStart
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
readStreamSync
=
undefined
;
readFile
(
SRCPATH
);
frameCountIn
=
0
;
frameCountOut
=
0
;
inputQueue
=
[];
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -140,6 +140,7 @@ describe('VideoDecoderFuncCallbackTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
function
()
{
...
...
@@ -189,7 +190,7 @@ describe('VideoDecoderFuncCallbackTest', function () {
console
.
info
(
"
case start get content
"
);
console
.
info
(
"
case start get content length is:
"
+
len
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -267,7 +268,6 @@ describe('VideoDecoderFuncCallbackTest', function () {
videoDecodeProcessor
.
configure
(
mediaDescription
,
(
err
)
=>
{
expect
(
err
).
assertUndefined
();
console
.
info
(
'
in case : configure success
'
);
readFile
(
srcPath
);
setCallback
(
nextStep
);
eventEmitter
.
emit
(
'
setOutputSurface
'
,
done
);
});
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -141,6 +141,7 @@ describe('VideoDecoderFuncPromiseTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
function
()
{
...
...
@@ -190,7 +191,7 @@ describe('VideoDecoderFuncPromiseTest', function () {
console
.
info
(
"
case start get content
"
);
console
.
info
(
"
case start get content length is:
"
+
len
);
let
lengthreal
=
-
1
;
lengthreal
=
readStreamSync
.
readSync
(
buf
,
{
length
:
len
});
lengthreal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
});
console
.
info
(
'
case lengthreal is :
'
+
lengthreal
);
}
...
...
@@ -282,7 +283,6 @@ describe('VideoDecoderFuncPromiseTest', function () {
async
function
toConfigure
(
mediaDescription
,
srcPath
)
{
await
videoDecodeProcessor
.
configure
(
mediaDescription
).
then
(()
=>
{
console
.
info
(
'
in case : configure success
'
);
readFile
(
srcPath
);
},
failCallback
).
catch
(
failCatch
);
}
async
function
toSetOutputSurface
(
isDisplay
)
{
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js
浏览文件 @
9897505e
...
...
@@ -109,6 +109,7 @@ describe('VideoDecoderSoftwareReliCallbackTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -159,11 +160,11 @@ describe('VideoDecoderSoftwareReliCallbackTest', function () {
let
lengthReal
=
-
1
;
try
{
if
(
pos
==
-
1
)
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
});
}
else
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
position
:
pos
,
});
...
...
@@ -332,7 +333,6 @@ describe('VideoDecoderSoftwareReliCallbackTest', function () {
toStart
(
mySteps
,
done
,
true
);
}
else
{
readStreamSync
=
undefined
;
readFile
(
SRCPATH
);
frameCountIn
=
0
;
frameCountOut
=
0
;
inputQueue
=
[];
...
...
multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js
浏览文件 @
9897505e
...
...
@@ -109,6 +109,7 @@ describe('VideoDecoderSoftwareReliPromiseTest', function () {
}
await
router
.
clear
().
then
(()
=>
{
},
failCallback
).
catch
(
failCatch
);
await
fileio
.
close
(
fdRead
);
})
afterAll
(
async
function
()
{
...
...
@@ -165,11 +166,11 @@ describe('VideoDecoderSoftwareReliPromiseTest', function () {
let
lengthReal
=
-
1
;
try
{
if
(
pos
==
-
1
)
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
});
}
else
{
lengthReal
=
readStreamSync
.
readSync
(
buf
,
{
lengthReal
=
fileio
.
readSync
(
fdRead
,
buf
,
{
length
:
len
,
position
:
pos
,
});
...
...
@@ -330,7 +331,6 @@ describe('VideoDecoderSoftwareReliPromiseTest', function () {
toStart
(
mySteps
,
done
,
callbackExpectFail
,
failCatch
);
}
else
{
readStreamSync
=
undefined
;
readFile
(
SRCPATH
);
frameCountIn
=
0
;
frameCountOut
=
0
;
inputQueue
=
[];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录