mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 10:53:50 +02:00
Add explicit disposability to Inputs (#126)
This commit is contained in:
@@ -14,7 +14,7 @@ const __dirname = new URL('.', import.meta.url).pathname;
|
||||
|
||||
test('can loop over all samples', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/sample.flac');
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -56,7 +56,7 @@ test('can loop over all samples', async () => {
|
||||
|
||||
test('can do random access', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/sample.flac');
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -89,7 +89,7 @@ test('can do random access', async () => {
|
||||
|
||||
test('can get metadata-only packets', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/sample.flac');
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -108,7 +108,7 @@ test('can get metadata-only packets', async () => {
|
||||
|
||||
test('can get metadata', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/sample.flac');
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -145,7 +145,7 @@ test('can get metadata', async () => {
|
||||
|
||||
test('can re-mux a .flac', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/sample.flac');
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
|
||||
@@ -107,7 +107,7 @@ test('Read and write metadata, MP4', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -156,7 +156,7 @@ test('Read and write metadata, QuickTime', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -187,7 +187,7 @@ test('Read and write metadata, QuickTime', async () => {
|
||||
});
|
||||
|
||||
test('Read MOV metadata tags, ilst with keys', async () => {
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(path.join(__dirname, '../public/trunc-buck-bunny.mov')),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -231,7 +231,7 @@ test('Read and write metadata, Matroska', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -294,7 +294,7 @@ test('Read and write metadata, MP3', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -346,7 +346,7 @@ test('Read and write metadata, Ogg', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -396,7 +396,7 @@ test('Read and write metadata, FLAC', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -445,7 +445,7 @@ test('Read and write metadata, WAVE', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -484,7 +484,7 @@ test('Conversion metadata tags, default case', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
@@ -534,7 +534,7 @@ test('Conversion metadata tags, modified', async () => {
|
||||
await dummyTrack.addPacket();
|
||||
await output.finalize();
|
||||
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new BufferSource(output.target.buffer!),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ const __dirname = new URL('.', import.meta.url).pathname;
|
||||
|
||||
test('Should be able to get packets from a .MP4 file', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/video.mp4');
|
||||
const input = new Input({
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user