Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions entries/all-boxes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export * from '#/boxes/dfLa';
export * from '#/boxes/dimm';
export * from '#/boxes/dmax';
export * from '#/boxes/dmed';
export * from '#/boxes/dmlp';
export * from '#/boxes/dOps';
export * from '#/boxes/dref';
export * from '#/boxes/drep';
Expand Down
26 changes: 26 additions & 0 deletions src/boxes/dmlp.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Box } from '#/box';
import { Log } from '#/log';
import type { MultiBufferStream } from '#/buffer';

export class dmlpBox extends Box {
static override readonly fourcc = 'dmlp' as const;
box_name = 'MLPSpecificBox' as const;

format_info: number;
peak_data_rate: number;

parse(stream: MultiBufferStream) {
this.format_info = stream.readUint16();
const tmp_16 = stream.readUint16();
this.peak_data_rate = tmp_16 >> 1;
let reserved = tmp_16 & 0x1;
if (reserved !== 0) {
Log.error('BoxParser', 'dmlp reserved parsing problem', stream.isofile);
return;
}
reserved = stream.readUint32();
if (reserved !== 0) {
Log.error('BoxParser', 'dmlp reserved parsing problem', stream.isofile);
}
}
}
5 changes: 5 additions & 0 deletions src/boxes/sampleentries/sampleentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,11 @@ export class ec_3SampleEntry extends AudioSampleEntry {
static override readonly fourcc = 'ec-3' as const;
}

export class mlpaSampleEntry extends AudioSampleEntry {
static override readonly fourcc = 'mlpa' as const;
box_name = 'MLPSampleEntry' as const;
}

export class OpusSampleEntry extends AudioSampleEntry {
static override readonly fourcc = 'Opus' as const;
}
Expand Down