提交 5a5b6a24 编写于 作者: 1 15754133731

<媒体用例适配2>

Signed-off-by: N15754133731 <chenjiahuan@huawei.com>
上级 86d94129
......@@ -20,7 +20,7 @@ import mediaLibrary from '@ohos.multimedia.mediaLibrary'
import fileio from '@ohos.fileio'
import featureAbility from '@ohos.ability.featureAbility'
import { UiDriver, BY, PointerMatrix } from '@ohos.UiTest'
const CODECMIMEVALUE = ['video/avc', 'audio/mp4a-latm', 'audio/mpeg']
const CODECMIMEVALUE = ['video/x-h264', 'audio/mpeg', 'video/avc', 'audio/mp4a-latm']
const context = featureAbility.getContext();
export async function getPermission(permissionNames) {
......
......@@ -474,7 +474,7 @@ export default function AVPlayerLocalTest() {
it('SUB_MULTIMEDIA_MEDIA_VIDEO_PLAYER_GETTRECKDESCRIPTION_0200', 0, async function (done) {
let audioTrackKey = new Array('channel_count', 'codec_mime', 'sample_rate', 'track_index',
'track_type');
let audioTrackValue = new Array(1, 2, 48000, 0, 0);
let audioTrackValue = new Array(1, 1, 48000, 0, 0);
let descriptionKey = new Array(audioTrackKey);
let descriptionValue = new Array(audioTrackValue);
testCheckTrackDescription(fileDescriptor2, avPlayer, descriptionKey, descriptionValue, done)
......
......@@ -81,7 +81,7 @@ export default function AVPlayerStabilityTest() {
beforeAll(async function () {
console.info('beforeAll case');
for(var i = 0;i < VIDEO_SOURCES.length; i++){
for (var i = 0; i < VIDEO_SOURCES.length; i++) {
await getStageFdRead(VIDEO_SOURCES[i]).then((testNumber) => {
fdNumber = testNumber;
console.info(TAG + 'this fdNumber is :' + fdNumber)
......@@ -107,12 +107,12 @@ export default function AVPlayerStabilityTest() {
}
beforeEach(async function() {
beforeEach(async function () {
console.info('beforeEach case');
await AVPlayerTestBase.sleep(1000);
})
afterEach(async function() {
afterEach(async function () {
if (avPlayer != null) {
avPlayer.release().then(() => {
console.info(TAG + 'this testCase execution completed')
......@@ -122,9 +122,9 @@ export default function AVPlayerStabilityTest() {
await AVPlayerTestBase.sleep(1000);
})
afterAll(async function() {
afterAll(async function () {
console.info('afterAll case');
for(var i = 0;i < fdNumbers.length; i++){
for (var i = 0; i < fdNumbers.length; i++) {
await mediaTestBase.closeFdNumber(fdNumbers[i]);
}
})
......@@ -223,7 +223,7 @@ export default function AVPlayerStabilityTest() {
*/
it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500', 0, async function (done) {
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500 start')
AVPlayerTestBase.avPlayerPlay(videos[4], avPlayer,done);
AVPlayerTestBase.avPlayerPlay(videos[4], avPlayer, done);
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_MP4_0500 end')
})
......@@ -761,19 +761,7 @@ export default function AVPlayerStabilityTest() {
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300
* @tc.name : 001.test play source 4k
* @tc.desc : Local Video play source
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level2
*/
it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300', 0, async function (done) {
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 start')
AVPlayerTestBase.avPlayerPlay(videos[43], avPlayer, done);
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 end')
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_STABILITY_01_0100
......@@ -895,11 +883,11 @@ export default function AVPlayerStabilityTest() {
* @tc.type : Function test
* @tc.level : Level3
*/
// it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100', 0, async function (done) {
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 start')
// AVPlayerTestBase.createTimeWithCallback(videos[0], avPlayer, done);
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 end')
// })
// it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100', 0, async function (done) {
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 start')
// AVPlayerTestBase.createTimeWithCallback(videos[0], avPlayer, done);
// console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0100 end')
// })
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_01_0110
......@@ -1237,5 +1225,19 @@ export default function AVPlayerStabilityTest() {
AVPlayerTestBase.firstFrameTime(videos[0], avPlayer, done);
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_PERFORMANCE_02_0100 end')
})
/* *
* @tc.number : SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300
* @tc.name : 001.test play source 4k
* @tc.desc : Local Video play source
* @tc.size : MediumTest
* @tc.type : Function test
* @tc.level : Level2
*/
it('SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300', 0, async function (done) {
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 start')
AVPlayerTestBase.avPlayerPlay(videos[43], avPlayer, done);
console.info(TAG + 'SUB_MULTIMEDIA_MEDIA_AVPLAYER_FORMAT_SOURCE_0300 end')
})
})
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册