MCPcopy
hub / github.com/midrender/revideo / write

Method write

packages/2d/src/lib/utils/video/parser/sink.ts:13–23  ·  view source on GitHub ↗
(chunk: any)

Source from the content-addressed store, hash-verified

11 }
12
13 public write(chunk: any) {
14 const buffer = new ArrayBuffer(chunk.byteLength);
15 new Uint8Array(buffer).set(chunk);
16
17 // Inform MP4Box where in the file this chunk is from.
18 (buffer as any).fileStart = this.offset;
19 this.offset += buffer.byteLength;
20
21 this.setStatus('fetch', (this.offset / 1024 ** 2).toFixed(1) + ' MiB');
22 this.file.appendBuffer(buffer);
23 }
24
25 public close() {
26 this.setStatus('fetch', 'Done');

Callers 5

getFileInfoFunction · 0.95
descriptionFunction · 0.80
sendProgressFunction · 0.80
renderWithoutCallbackFunction · 0.80

Calls 1

setMethod · 0.65

Tested by

no test coverage detected