Start work on HlsOutputFormat

This commit is contained in:
Vanilagy
2026-03-17 15:25:06 +01:00
parent e42fc85f19
commit dd8621b6d5
17 changed files with 619 additions and 72 deletions
+10 -5
View File
@@ -21,8 +21,8 @@ import { Id3V2Writer } from '../id3';
export class WaveMuxer extends Muxer {
private format: WavOutputFormat;
private isRf64: boolean;
private writer: Writer;
private riffWriter: RiffWriter;
private writer!: Writer;
private riffWriter!: RiffWriter;
private headerWritten = false;
private dataSize = 0;
private sampleRate: number | null = null;
@@ -38,13 +38,18 @@ export class WaveMuxer extends Muxer {
super(output);
this.format = format;
this.writer = output._writer;
this.riffWriter = new RiffWriter(output._writer);
this.isRf64 = !!format._options.large;
}
async start() {
// Nothing needed here - we'll write the header with the first sample
const release = await this.mutex.acquire();
this.writer = await this.output._getRootWriter();
this.riffWriter = new RiffWriter(this.writer);
// No writing needed here - we'll write the header with the first sample
release();
}
async getMimeType() {