mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 03:13:51 +02:00
Merge branch 'main' into hls
This commit is contained in:
@@ -254,3 +254,33 @@ test('can re-mux a .flac', async () => {
|
||||
|
||||
expect(otherInputDecoderConfig).toEqual(otherOutputDecoderConfig);
|
||||
});
|
||||
|
||||
test('appendOnly writes correct STREAMINFO header', async () => {
|
||||
const filePath = path.join(__dirname, '..', 'public/sample.flac');
|
||||
using input = new Input({
|
||||
source: new FilePathSource(filePath),
|
||||
formats: ALL_FORMATS,
|
||||
});
|
||||
|
||||
const target = new BufferTarget();
|
||||
const output = new Output({
|
||||
format: new FlacOutputFormat({ appendOnly: true }),
|
||||
target,
|
||||
});
|
||||
|
||||
const conversion = await Conversion.init({ input, output });
|
||||
await conversion.execute();
|
||||
|
||||
assert(target.buffer);
|
||||
const bytes = new Uint8Array(target.buffer);
|
||||
|
||||
// STREAMINFO: min_block=16, max_block=65535, min_frame=0, max_frame=0
|
||||
expect(bytes.slice(8, 18)).toEqual(new Uint8Array([
|
||||
// minimum_block_size=16
|
||||
0x00, 0x10,
|
||||
// maximum_block_size=65535
|
||||
0xFF, 0xFF,
|
||||
// minimum_frame_size=0
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
]));
|
||||
});
|
||||
|
||||
@@ -46,8 +46,6 @@ test('MPEG-TS metadata reading', async () => {
|
||||
codec: 'avc1.640020',
|
||||
codedWidth: 720,
|
||||
codedHeight: 720,
|
||||
displayAspectWidth: 720,
|
||||
displayAspectHeight: 720,
|
||||
colorSpace: {
|
||||
primaries: 'bt2020',
|
||||
transfer: 'hlg',
|
||||
@@ -561,8 +559,6 @@ test('MPEG-TS with HEVC video', async () => {
|
||||
codec: 'hev1.1.6.L120.90',
|
||||
codedWidth: 1920,
|
||||
codedHeight: 1080,
|
||||
displayAspectWidth: 1920,
|
||||
displayAspectHeight: 1080,
|
||||
colorSpace: {
|
||||
primaries: 'bt709',
|
||||
transfer: 'bt709',
|
||||
|
||||
Reference in New Issue
Block a user