diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js index 12a6fcb9a58aa43fda388534ac43fbd9bc47c3b1..c25110155c95a89dbaa1a142b1901df8448935ca 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatCallbackTest.test.js @@ -45,9 +45,9 @@ describe('AudioDecoderFormatCallback', function () { let isVorbis = false; let readpath; let savepath; - let fd_Read; - let fd_Write; - let fileAsset_Write; + let fdRead; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -99,8 +99,8 @@ describe('AudioDecoderFormatCallback', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -150,29 +150,29 @@ describe('AudioDecoderFormatCallback', function () { } let fetchWriteFileResult = await mediaTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(path, buf, len) { try{ - let res = fileio.writeSync(fd_Write, buf, {length: len}); + let res = fileio.writeSync(fdWrite, buf, {length: len}); console.info('case fileio.writeSync buffer success'); } catch(e) { console.info('case fileio.writeSync buffer error is ' + e); @@ -183,7 +183,7 @@ describe('AudioDecoderFormatCallback', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js index 4b9c2a164ccdae95219a8f660b6c99219f7946b0..43cb445f74fda10d0f992d738da6d0170d8d08d2 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFormatPromiseTest.test.js @@ -44,9 +44,9 @@ describe('AudioDecoderFormatPromise', function () { let isVorbis = false; let readpath; let savepath; - let fd_Read; - let fd_Write; - let fileAsset_Write; + let fdRead; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -108,8 +108,8 @@ describe('AudioDecoderFormatPromise', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -159,29 +159,29 @@ describe('AudioDecoderFormatPromise', function () { } let fetchWriteFileResult = await mediaTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(path, buf, len) { try{ - let res = fileio.writeSync(fd_Write, buf, {length: len}); + let res = fileio.writeSync(fdWrite, buf, {length: len}); console.info('case fileio.writeSync buffer success'); } catch(e) { console.info('case fileio.writeSync buffer error is ' + e); @@ -192,7 +192,7 @@ describe('AudioDecoderFormatPromise', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js index 7976ee66297cb14739ee2f6717bb61cc47a5adc9..284bd9c301b2634caabceb5852ce2eee996960a4 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncCallbackTest.test.js @@ -136,9 +136,9 @@ describe('AudioDecoderFuncCallback', function () { let ES_LENGTH = 1500; let readpath; let savepath; - let fd_Read; - let fd_Write; - let fileAsset_Write; + let fdRead; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -300,8 +300,8 @@ describe('AudioDecoderFuncCallback', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -351,29 +351,29 @@ describe('AudioDecoderFuncCallback', function () { } let fetchWriteFileResult = await mediaTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(path, buf, len) { try{ - let res = fileio.writeSync(fd_Write, buf, {length: len}); + let res = fileio.writeSync(fdWrite, buf, {length: len}); console.info('case fileio.writeSync buffer success'); } catch(e) { console.info('case fileio.writeSync buffer error is ' + e); @@ -384,7 +384,7 @@ describe('AudioDecoderFuncCallback', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js index 71af5e03a30a08f4d4abeb50a0a835a84a92a133..822b94fe9e0b20c66e293f91956edff64a0dbbf1 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderFuncPromiseTest.test.js @@ -136,9 +136,9 @@ describe('AudioDecoderFuncPromise', function () { let ES_LENGTH = 1500; let readpath; let savepath; - let fd_Read; - let fd_Write; - let fileAsset_Write; + let fdRead; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -310,8 +310,8 @@ describe('AudioDecoderFuncPromise', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -361,29 +361,29 @@ describe('AudioDecoderFuncPromise', function () { } let fetchWriteFileResult = await mediaTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(path, buf, len) { try{ - let res = fileio.writeSync(fd_Write, buf, {length: len}); + let res = fileio.writeSync(fdWrite, buf, {length: len}); console.info('case fileio.writeSync buffer success'); } catch(e) { console.info('case fileio.writeSync buffer error is ' + e); @@ -394,7 +394,7 @@ describe('AudioDecoderFuncPromise', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js index cc58f3fdce96ee28b8a2f492c127747613f68d0a..d3f625f7d999690b67df85e2005600cd0ea7e27e 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityCallbackTest.test.js @@ -147,7 +147,7 @@ describe('AudioDecoderReliabilityCallback', function () { "sample_rate": 44100, "audio_sample_format": 1, }; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -310,8 +310,8 @@ describe('AudioDecoderReliabilityCallback', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -320,7 +320,7 @@ describe('AudioDecoderReliabilityCallback', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js index 7861209e8d0e66c3737bcdf02579638737390cd5..ea218b19a1cfefabf35b99d1e42e72dbafc771f5 100644 --- a/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioDecoder/src/main/js/test/AudioDecoderReliabilityPromiseTest.test.js @@ -149,7 +149,7 @@ describe('AudioDecoderReliabilityPromise', function () { "audio_sample_format": 1, }; let expectError = false; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -331,8 +331,8 @@ describe('AudioDecoderReliabilityPromise', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -341,7 +341,7 @@ describe('AudioDecoderReliabilityPromise', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js index 512ab87f2da1dec118dfea3ed4b5ce4361180c69..0e7086cd9e2729ab51655ae21624ddc627ec5aee 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncCallbackTest.test.js @@ -45,9 +45,9 @@ describe('AudioEncoderFuncCallback', function () { let ES_LENGTH = 1500; let readpath; let savepath; - let fd_Read; - let fd_Write; - let fileAsset_Write; + let fdRead; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -119,8 +119,8 @@ describe('AudioEncoderFuncCallback', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -170,22 +170,22 @@ describe('AudioEncoderFuncCallback', function () { } let fetchWriteFileResult = await mediaTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } @@ -193,7 +193,7 @@ describe('AudioEncoderFuncCallback', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } @@ -211,7 +211,7 @@ describe('AudioEncoderFuncCallback', function () { try{ let head = new ArrayBuffer(7); addADTStoPacket(head, len); - let res = fileio.write(fd_Write, head, {length: 7}); + let res = fileio.write(fdWrite, head, {length: 7}); console.info('case fileio.write head success'); } catch(e) { console.info('case fileio.write head error is ' + e); @@ -220,7 +220,7 @@ describe('AudioEncoderFuncCallback', function () { function writeFile(path, buf, len) { try{ - let res = fileio.write(fd_Write, buf, {length: len}); + let res = fileio.write(fdWrite, buf, {length: len}); console.info('case fileio.write buffer success'); } catch(e) { console.info('case fileio.write buffer error is ' + e); diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js index 06b46628fd5779b11e59924e805671739f710f65..4831a1ebc9ef61e2b681966961de1e980a299c6e 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderFuncPromiseTest.test.js @@ -45,9 +45,9 @@ describe('AudioEncoderFuncPromise', function () { let ES_LENGTH = 1500; let readpath; let savepath; - let fd_Read; - let fd_Write; - let fileAsset_Write; + let fdRead; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -129,8 +129,8 @@ describe('AudioEncoderFuncPromise', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -180,22 +180,22 @@ describe('AudioEncoderFuncPromise', function () { } let fetchWriteFileResult = await mediaTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } @@ -203,7 +203,7 @@ describe('AudioEncoderFuncPromise', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } @@ -220,7 +220,7 @@ describe('AudioEncoderFuncPromise', function () { try{ let head = new ArrayBuffer(7); addADTStoPacket(head, len); - let res = fileio.write(fd_Write, head, {length: 7}); + let res = fileio.write(fdWrite, head, {length: 7}); console.info('case fileio.write head success'); } catch(e) { console.info('case fileio.write head error is ' + e); @@ -229,7 +229,7 @@ describe('AudioEncoderFuncPromise', function () { function writeFile(path, buf, len) { try{ - let res = fileio.write(fd_Write, buf, {length: len}); + let res = fileio.write(fdWrite, buf, {length: len}); console.info('case fileio.write buffer success'); } catch(e) { console.info('case fileio.write buffer error is ' + e); diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js index 3c87421ecde8a14c174f13ecfad70612285c0175..1029f0e44dbda1eaedb135ff121941a61e52d128 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityCallbackTest.test.js @@ -59,7 +59,7 @@ describe('AudioEncoderReliabilityCallback', function () { "sample_rate": 44100, "audio_sample_format": 1, }; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -133,8 +133,8 @@ describe('AudioEncoderReliabilityCallback', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -143,7 +143,7 @@ describe('AudioEncoderReliabilityCallback', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js index 3f3c4da770ae42acb5657ba6e5c009329826803e..57a31709bc8f4f9bf0cc491b4c1a8a82539b5f13 100644 --- a/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js +++ b/multimedia/media/media_js_standard/audioEncoder/src/main/js/test/AudioEncoderReliabilityPromiseTest.test.js @@ -60,7 +60,7 @@ describe('AudioEncoderReliabilityPromise', function () { "audio_sample_format": 1, }; let expectError = false; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -150,8 +150,8 @@ describe('AudioEncoderReliabilityPromise', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -160,7 +160,7 @@ describe('AudioEncoderReliabilityPromise', function () { console.info('read file start execution'); try{ console.info('filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js index f7b51602507e249a578341994336b8a16ecf41c3..f1dbc787d873835ffaff78d42eb5c8a7849b7bf3 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderEnumTest.test.js @@ -39,7 +39,7 @@ describe('VideoDecoderEnum', function () { const H264_FRAME_SIZE_60FPS_320 = [ 2106, 11465]; let readpath; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -92,7 +92,7 @@ describe('VideoDecoderEnum', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.error('in case readFile' + e); } @@ -322,8 +322,8 @@ describe('VideoDecoderEnum', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) let mediaDescription = { diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncCallbackTest.test.js index 15b29f13edc328286391c74113ae72314a12673a..2977be9f8fc8aa0fe3ee6b79eda9debd4adef44b 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncCallbackTest.test.js @@ -92,7 +92,7 @@ describe('VideoDecoderFuncCallbackTest', function () { 295, 206, 264, 349, 4071, 242, 296, 271, 231, 307, 265, 254, 267, 317, 232, 348, 4077, 259, 222, 268, 235, 324, 266, 256, 312, 246, 248, 325, 4000, 266, 201, 230, 293, 264, 265, 273, 301, 304, 253, 266, 3978, 228, 232, 250, 248, 281, 219, 243, 293, 287, 253, 328, 3719]; - let fd_Read; + let fdRead; let readpath; beforeAll(function() { @@ -164,8 +164,8 @@ describe('VideoDecoderFuncCallbackTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -174,7 +174,7 @@ describe('VideoDecoderFuncCallbackTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js index 02b501e0f57ddc76a8cdd6ad4ecf624f93c26b60..f704d190bfbe35dc2379875df4c9beff8c2e712e 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderFuncPromiseTest.test.js @@ -93,7 +93,7 @@ describe('VideoDecoderFuncPromiseTest', function () { 295, 206, 264, 349, 4071, 242, 296, 271, 231, 307, 265, 254, 267, 317, 232, 348, 4077, 259, 222, 268, 235, 324, 266, 256, 312, 246, 248, 325, 4000, 266, 201, 230, 293, 264, 265, 273, 301, 304, 253, 266, 3978, 228, 232, 250, 248, 281, 219, 243, 293, 287, 253, 328, 3719]; - let fd_Read; + let fdRead; let readpath; beforeAll(function() { @@ -163,8 +163,8 @@ describe('VideoDecoderFuncPromiseTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -173,7 +173,7 @@ describe('VideoDecoderFuncPromiseTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js index 0ed79caf369da93f79f8ca38fed3e3c0fe86b2d8..954682cb00d5f91822701d2ea6d6222341d100fb 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliCallbackTest.test.js @@ -75,7 +75,7 @@ describe('VideoDecoderReliCallbackTest', function () { 574, 126, 1242, 188, 130, 119, 1450, 187, 137, 141, 1116, 124, 1848, 138, 122, 1605, 186, 127, 140, 1798, 170, 124, 121, 1666, 157, 128, 130, 1678, 135, 118, 1804, 169, 135, 125, 1837, 168, 124, 124]; let ES_FRAME_SIZE = H264_FRAME_SIZE_60FPS_320; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -151,7 +151,7 @@ describe('VideoDecoderReliCallbackTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } @@ -422,8 +422,8 @@ describe('VideoDecoderReliCallbackTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) media.createVideoDecoderByMime(mime, (err, processor) => { diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js index 1e676ca15a5c59ec381da794ddf56694818a8628..f0caca42fe7f22bd6c2c59107d12b9f6613e36ad 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderReliPromiseTest.test.js @@ -75,7 +75,7 @@ describe('VideoDecoderReliPromiseTest', function () { 574, 126, 1242, 188, 130, 119, 1450, 187, 137, 141, 1116, 124, 1848, 138, 122, 1605, 186, 127, 140, 1798, 170, 124, 121, 1666, 157, 128, 130, 1678, 135, 118, 1804, 169, 135, 125, 1837, 168, 124, 124]; let ES_FRAME_SIZE = H264_FRAME_SIZE_60FPS_320; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -157,7 +157,7 @@ describe('VideoDecoderReliPromiseTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } @@ -419,8 +419,8 @@ describe('VideoDecoderReliPromiseTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) media.createVideoDecoderByMime(mime).then((processor) => { diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js index 5196d7a3458535625fa5d3e28d0c1fe4d56d0015..8f52cd3dca556d260699dc08142a725ddf076ae6 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncCallbackTest.test.js @@ -108,7 +108,7 @@ describe('VideoDecoderFuncCallbackTest', function () { 295, 206, 264, 349, 4071, 242, 296, 271, 231, 307, 265, 254, 267, 317, 232, 348, 4077, 259, 222, 268, 235, 324, 266, 256, 312, 246, 248, 325, 4000, 266, 201, 230, 293, 264, 265, 273, 301, 304, 253, 266, 3978, 228, 232, 250, 248, 281, 219, 243, 293, 287, 253, 328, 3719]; - let fd_Read; + let fdRead; let readpath; beforeAll(function() { @@ -178,8 +178,8 @@ describe('VideoDecoderFuncCallbackTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -188,7 +188,7 @@ describe('VideoDecoderFuncCallbackTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js index ebb0bdf1803800ace72d09c53dd7b085a6018bca..3d0ccdba24d9e2c6b65fc343cfc73f8cb24bfdb4 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareFuncPromiseTest.test.js @@ -109,7 +109,7 @@ describe('VideoDecoderFuncPromiseTest', function () { 295, 206, 264, 349, 4071, 242, 296, 271, 231, 307, 265, 254, 267, 317, 232, 348, 4077, 259, 222, 268, 235, 324, 266, 256, 312, 246, 248, 325, 4000, 266, 201, 230, 293, 264, 265, 273, 301, 304, 253, 266, 3978, 228, 232, 250, 248, 281, 219, 243, 293, 287, 253, 328, 3719]; - let fd_Read; + let fdRead; let readpath; beforeAll(function() { @@ -179,8 +179,8 @@ describe('VideoDecoderFuncPromiseTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) } @@ -189,7 +189,7 @@ describe('VideoDecoderFuncPromiseTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js index 6effbd0b242a6a13a6ec9ab05f151fcf26a5d1d2..374bdd1fb0a9e355a75bb25092b85a36af714547 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliCallbackTest.test.js @@ -75,7 +75,7 @@ describe('VideoDecoderSoftwareReliCallbackTest', function () { 574, 126, 1242, 188, 130, 119, 1450, 187, 137, 141, 1116, 124, 1848, 138, 122, 1605, 186, 127, 140, 1798, 170, 124, 121, 1666, 157, 128, 130, 1678, 135, 118, 1804, 169, 135, 125, 1837, 168, 124, 124]; let ES_FRAME_SIZE = H264_FRAME_SIZE_60FPS_320; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -151,7 +151,7 @@ describe('VideoDecoderSoftwareReliCallbackTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } @@ -431,8 +431,8 @@ describe('VideoDecoderSoftwareReliCallbackTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) media.createVideoDecoderByName(name, (err, processor) => { diff --git a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js index 8056f99078c681f9e72e6d544b97d28d292c7a68..a529b627b6806410a55a27b42fcec04e50325726 100644 --- a/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoDecoder/src/main/js/test/VideoDecoderSoftwareReliPromiseTest.test.js @@ -75,7 +75,7 @@ describe('VideoDecoderSoftwareReliPromiseTest', function () { 574, 126, 1242, 188, 130, 119, 1450, 187, 137, 141, 1116, 124, 1848, 138, 122, 1605, 186, 127, 140, 1798, 170, 124, 121, 1666, 157, 128, 130, 1678, 135, 118, 1804, 169, 135, 125, 1837, 168, 124, 124]; let ES_FRAME_SIZE = H264_FRAME_SIZE_60FPS_320; - let fd_Read; + let fdRead; beforeAll(function() { console.info('beforeAll case'); @@ -157,7 +157,7 @@ describe('VideoDecoderSoftwareReliPromiseTest', function () { console.info('case read file start execution'); try{ console.info('case filepath: ' + path); - readStreamSync = fileio.fdopenStreamSync(fd_Read, 'rb'); + readStreamSync = fileio.fdopenStreamSync(fdRead, 'rb'); }catch(e) { console.info(e); } @@ -428,8 +428,8 @@ describe('VideoDecoderSoftwareReliPromiseTest', function () { console.info('case error fileDescriptor undefined, open file fail'); done(); } else { - fd_Read = res.fd; - console.info("case fd_Read is: " + fd_Read); + fdRead = res.fd; + console.info("case fdRead is: " + fdRead); } }) media.createVideoDecoderByName(name).then((processor) => { diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js index 204ca2e6cabeb2acf9d657e7e16210eb6e38e51e..71e990ddce1bd0e9c627f91da1b4897b74208569 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderMultiInstancesTest.test.js @@ -38,8 +38,8 @@ describe('videoEncoderSoftwareMultiInstances', function () { let flushAtEOS = false; let sawOutputEOS = false; let needGetMediaDes = false; - let fd_Write; - let fileAsset_Write; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaLibraryTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -148,28 +148,28 @@ describe('videoEncoderSoftwareMultiInstances', function () { } let fetchWriteFileResult = await mediaLibraryTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(buf, len) { try{ - let res = fileio.write(fd_Write, buf, {length: len}); + let res = fileio.write(fdWrite, buf, {length: len}); console.info('case fileio.write buffer success'); } catch(e) { console.info('case fileio.write buffer error is ' + e); diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js index 306b9d0e60b96ff7ce519c1cf27be668f41d52ea..a7a3516929d00cb18f968066cf116d113fd1c3e0 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncCallbackTest.test.js @@ -37,8 +37,8 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () { const eventEmitter = new events.EventEmitter(); const ROOT = '/data/app/el1/bundle/results/'; const BASIC_PATH = ROOT + 'video_func_callback_'; - let fd_Write; - let fileAsset_Write; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaLibraryTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -137,28 +137,28 @@ describe('VideoEncoderSoftwareFuncCallbackTest', function () { } let fetchWriteFileResult = await mediaLibraryTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(buf, len) { try{ - let res = fileio.write(fd_Write, buf, {length: len}); + let res = fileio.write(fdWrite, buf, {length: len}); console.info('case fileio.write buffer success'); } catch(e) { console.info('case fileio.write buffer error is ' + e); diff --git a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js index 64781c2f92d114c14eb5d9af611acc3defd5eefe..fbd871d50882271abd04e2e2227a25d039ca77f1 100644 --- a/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js +++ b/multimedia/media/media_js_standard/videoEncoder/src/main/js/test/VideoEncoderSoftwareFuncPromiseTest.test.js @@ -35,8 +35,8 @@ describe('videoSoftwareEncoderFuncPromise', function () { let flushAtEOS = false; let sawOutputEOS = false; let needGetMediaDes = false; - let fd_Write; - let fileAsset_Write; + let fdWrite; + let fileAsset; const context = featureAbility.getContext(); const mediaLibraryTest = mediaLibrary.getMediaLibrary(context); let fileKeyObj = mediaLibrary.FileKey; @@ -157,28 +157,28 @@ describe('videoSoftwareEncoderFuncPromise', function () { } let fetchWriteFileResult = await mediaLibraryTest.getFileAssets(fetchOp); console.info('[mediaLibrary] case getFdWrite getFileAssets() success'); - fileAsset_Write = await fetchWriteFileResult.getAllObject(); + fileAsset = await fetchWriteFileResult.getAllObject(); console.info('[mediaLibrary] case getFdWrite getAllObject() success'); - fd_Write = await fileAsset_Write[0].open('Rw'); - console.info('[mediaLibrary] case getFdWrite fd_Write is ' + fd_Write); + fdWrite = await fileAsset[0].open('Rw'); + console.info('[mediaLibrary] case getFdWrite fdWrite is ' + fdWrite); } } async function closeFdWrite() { - if (fileAsset_Write != null) { - await fileAsset_Write[0].close(fd_Write).then(() => { - console.info('[mediaLibrary] case close fd_Write success, fd is ' + fd_Write); + if (fileAsset != null) { + await fileAsset[0].close(fdWrite).then(() => { + console.info('[mediaLibrary] case close fdWrite success, fd is ' + fdWrite); }).catch((err) => { - console.info('[mediaLibrary] case close fd_Write failed'); + console.info('[mediaLibrary] case close fdWrite failed'); }); } else { - console.info('[mediaLibrary] case fileAsset_Write is null'); + console.info('[mediaLibrary] case fileAsset is null'); } } function writeFile(buf, len) { try{ - let res = fileio.write(fd_Write, buf, {length: len}); + let res = fileio.write(fdWrite, buf, {length: len}); console.info('case fileio.write buffer success'); } catch(e) { console.info('case fileio.write buffer error is ' + e);