@remotion/media-parser 4.0.200 → 4.0.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/av1-codec-string.d.ts +5 -0
- package/dist/av1-codec-string.js +18 -1
- package/dist/bitstream/av1.d.ts +2 -0
- package/dist/bitstream/av1.js +12 -0
- package/dist/boxes/iso-base-media/avcc-hvcc.d.ts +20 -0
- package/dist/boxes/iso-base-media/avcc-hvcc.js +73 -0
- package/dist/boxes/iso-base-media/avcc.d.ts +18 -0
- package/dist/boxes/iso-base-media/avcc.js +27 -0
- package/dist/boxes/iso-base-media/esds-descriptors.d.ts +21 -0
- package/dist/boxes/iso-base-media/esds-descriptors.js +62 -0
- package/dist/boxes/iso-base-media/esds.d.ts +15 -0
- package/dist/boxes/iso-base-media/esds.js +27 -0
- package/dist/boxes/iso-base-media/mdat/mdat.js +2 -1
- package/dist/boxes/iso-base-media/moov/moov.js +1 -0
- package/dist/boxes/iso-base-media/mvhd.js +2 -2
- package/dist/boxes/iso-base-media/process-box.d.ts +4 -2
- package/dist/boxes/iso-base-media/process-box.js +56 -40
- package/dist/boxes/iso-base-media/stsd/keys.js +1 -1
- package/dist/boxes/iso-base-media/stsd/mebx.d.ts +2 -1
- package/dist/boxes/iso-base-media/stsd/mebx.js +2 -1
- package/dist/boxes/iso-base-media/stsd/samples.js +3 -0
- package/dist/boxes/iso-base-media/stsd/stco.d.ts +3 -2
- package/dist/boxes/iso-base-media/stsd/stco.js +2 -2
- package/dist/boxes/iso-base-media/trak/trak.js +1 -0
- package/dist/boxes/webm/av1-codec-private.js +1 -1
- package/dist/boxes/webm/bitstream/av1.js +10 -1
- package/dist/boxes/webm/description.d.ts +2 -2
- package/dist/boxes/webm/description.js +2 -2
- package/dist/boxes/webm/ebml.d.ts +2 -2
- package/dist/boxes/webm/ebml.js +23 -1
- package/dist/boxes/webm/get-ready-tracks.d.ts +1 -1
- package/dist/boxes/webm/get-ready-tracks.js +3 -3
- package/dist/boxes/webm/get-sample-from-block.d.ts +17 -0
- package/dist/boxes/webm/get-sample-from-block.js +78 -0
- package/dist/boxes/webm/get-track.d.ts +2 -2
- package/dist/boxes/webm/get-track.js +26 -25
- package/dist/boxes/webm/make-header.d.ts +3 -1
- package/dist/boxes/webm/make-header.js +90 -32
- package/dist/boxes/webm/parse-ebml.d.ts +12 -0
- package/dist/boxes/webm/parse-ebml.js +175 -0
- package/dist/boxes/webm/parse-webm-header.js +8 -9
- package/dist/boxes/webm/segments/all-segments.d.ts +572 -1
- package/dist/boxes/webm/segments/all-segments.js +353 -2
- package/dist/boxes/webm/segments/track-entry.d.ts +5 -189
- package/dist/boxes/webm/segments/track-entry.js +2 -457
- package/dist/boxes/webm/segments.d.ts +3 -16
- package/dist/boxes/webm/segments.js +40 -219
- package/dist/boxes/webm/traversal.d.ts +5 -5
- package/dist/boxes/webm/traversal.js +17 -6
- package/dist/buffer-iterator.d.ts +10 -7
- package/dist/buffer-iterator.js +83 -7
- package/dist/create/create-media.d.ts +2 -0
- package/dist/create/create-media.js +36 -0
- package/dist/create/matroska-header.d.ts +1 -0
- package/dist/create/matroska-header.js +66 -0
- package/dist/create/matroska-info.d.ts +4 -0
- package/dist/create/matroska-info.js +39 -0
- package/dist/create/matroska-segment.d.ts +1 -0
- package/dist/create/matroska-segment.js +12 -0
- package/dist/create/matroska-trackentry.d.ts +21 -0
- package/dist/create/matroska-trackentry.js +191 -0
- package/dist/create-media.d.ts +1 -0
- package/dist/create-media.js +78 -0
- package/dist/from-fetch.js +13 -3
- package/dist/from-input-type-file.d.ts +2 -0
- package/dist/from-input-type-file.js +37 -0
- package/dist/from-node.js +9 -2
- package/dist/from-web-file.js +6 -1
- package/dist/from-web.js +15 -6
- package/dist/get-audio-codec.d.ts +2 -2
- package/dist/get-audio-codec.js +13 -13
- package/dist/get-codec.d.ts +4 -0
- package/dist/get-codec.js +22 -0
- package/dist/get-duration.js +12 -14
- package/dist/get-sample-positions.js +1 -1
- package/dist/get-tracks.js +2 -2
- package/dist/get-video-codec.js +13 -13
- package/dist/has-all-info.js +1 -1
- package/dist/options.d.ts +3 -2
- package/dist/parse-media.js +17 -10
- package/dist/parse-video.js +16 -0
- package/dist/parser-context.d.ts +1 -0
- package/dist/parser-state.d.ts +4 -3
- package/dist/parser-state.js +16 -3
- package/dist/reader.d.ts +1 -1
- package/dist/readers/from-fetch.d.ts +2 -0
- package/dist/readers/from-fetch.js +64 -0
- package/dist/readers/from-node.d.ts +2 -0
- package/dist/readers/from-node.js +40 -0
- package/dist/readers/from-web-file.d.ts +2 -0
- package/dist/readers/from-web-file.js +39 -0
- package/dist/readers/reader.d.ts +11 -0
- package/dist/readers/reader.js +2 -0
- package/dist/traversal.d.ts +19 -17
- package/dist/traversal.js +38 -39
- package/dist/web-file.d.ts +2 -0
- package/dist/web-file.js +37 -0
- package/dist/writers/web-fs.d.ts +2 -0
- package/dist/writers/web-fs.js +28 -0
- package/dist/writers/writer.d.ts +9 -0
- package/dist/writers/writer.js +2 -0
- package/input.webm +0 -0
- package/package.json +2 -2
- package/src/boxes/iso-base-media/mdat/mdat.ts +2 -1
- package/src/boxes/iso-base-media/moov/moov.ts +1 -0
- package/src/boxes/iso-base-media/mvhd.ts +2 -2
- package/src/boxes/iso-base-media/process-box.ts +70 -40
- package/src/boxes/iso-base-media/stsd/keys.ts +1 -1
- package/src/boxes/iso-base-media/stsd/mebx.ts +3 -0
- package/src/boxes/iso-base-media/stsd/samples.ts +3 -0
- package/src/boxes/iso-base-media/stsd/stco.ts +5 -3
- package/src/boxes/iso-base-media/trak/trak.ts +1 -0
- package/src/boxes/webm/av1-codec-private.ts +1 -1
- package/src/boxes/webm/description.ts +7 -4
- package/src/boxes/webm/ebml.ts +24 -4
- package/src/boxes/webm/get-ready-tracks.ts +4 -4
- package/src/boxes/webm/get-sample-from-block.ts +125 -0
- package/src/boxes/webm/get-track.ts +38 -31
- package/src/boxes/webm/make-header.ts +129 -32
- package/src/boxes/webm/parse-ebml.ts +247 -0
- package/src/boxes/webm/parse-webm-header.ts +8 -12
- package/src/boxes/webm/segments/all-segments.ts +539 -1
- package/src/boxes/webm/segments/track-entry.ts +5 -843
- package/src/boxes/webm/segments.ts +48 -435
- package/src/boxes/webm/traversal.ts +28 -15
- package/src/buffer-iterator.ts +104 -10
- package/src/from-fetch.ts +22 -3
- package/src/from-node.ts +18 -4
- package/src/from-web-file.ts +11 -1
- package/src/get-audio-codec.ts +14 -16
- package/src/get-duration.ts +15 -16
- package/src/get-sample-positions.ts +1 -1
- package/src/get-tracks.ts +2 -2
- package/src/get-video-codec.ts +13 -15
- package/src/has-all-info.ts +1 -1
- package/src/options.ts +3 -2
- package/src/parse-media.ts +20 -9
- package/src/parse-video.ts +17 -0
- package/src/parser-context.ts +1 -0
- package/src/parser-state.ts +22 -5
- package/src/reader.ts +1 -0
- package/src/test/create-matroska.test.ts +255 -7
- package/src/test/matroska.test.ts +311 -334
- package/src/test/mvhd.test.ts +1 -1
- package/src/test/parse-esds.test.ts +2 -2
- package/src/test/parse-stco.test.ts +4 -2
- package/src/test/parse-stsc.test.ts +2 -2
- package/src/test/parse-stsz.test.ts +2 -2
- package/src/test/parse-stts.test.ts +1 -1
- package/src/test/stream-local.test.ts +23 -9
- package/src/test/stream-remote.test.ts +23 -19
- package/src/test/stsd.test.ts +6 -2
- package/src/test/tkhd.test.ts +1 -1
- package/src/traversal.ts +62 -85
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/boxes/iso-base-media/ftype.d.ts +0 -9
- package/dist/boxes/iso-base-media/ftype.js +0 -31
- package/dist/get-video-metadata.d.ts +0 -2
- package/dist/get-video-metadata.js +0 -44
- package/dist/read-and-increment-offset.d.ts +0 -28
- package/dist/read-and-increment-offset.js +0 -177
- package/dist/understand-vorbis.d.ts +0 -1
- package/dist/understand-vorbis.js +0 -12
- package/src/boxes/webm/segments/duration.ts +0 -29
- package/src/boxes/webm/segments/info.ts +0 -34
- package/src/boxes/webm/segments/main.ts +0 -6
- package/src/boxes/webm/segments/muxing.ts +0 -18
- package/src/boxes/webm/segments/seek-head.ts +0 -34
- package/src/boxes/webm/segments/seek-position.ts +0 -18
- package/src/boxes/webm/segments/seek.ts +0 -45
- package/src/boxes/webm/segments/timestamp-scale.ts +0 -17
- package/src/boxes/webm/segments/tracks.ts +0 -32
- package/src/boxes/webm/segments/unknown.ts +0 -19
- package/src/boxes/webm/segments/void.ts +0 -18
- package/src/boxes/webm/segments/writing.ts +0 -18
- package/src/combine-uint8array.ts +0 -13
- /package/dist/{boxes/webm/bitstream/av1/frame.d.ts → get-samples.d.ts} +0 -0
- /package/dist/{boxes/webm/bitstream/av1/frame.js → get-samples.js} +0 -0
- /package/dist/{boxes/webm/bitstream/h264/get-h264-descriptor.d.ts → sample-aspect-ratio.d.ts} +0 -0
- /package/dist/{boxes/webm/bitstream/h264/get-h264-descriptor.js → sample-aspect-ratio.js} +0 -0
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { Prettify } from '../parse-ebml';
|
|
1
2
|
export declare const matroskaElements: {
|
|
3
|
+
readonly Header: "0x1a45dfa3";
|
|
2
4
|
readonly EBMLMaxIDLength: "0x42f2";
|
|
3
5
|
readonly EBMLVersion: "0x4286";
|
|
4
|
-
readonly EBMLReadVersion: "
|
|
6
|
+
readonly EBMLReadVersion: "0x42f7";
|
|
5
7
|
readonly EBMLMaxSizeLength: "0x42f3";
|
|
6
8
|
readonly DocType: "0x4282";
|
|
7
9
|
readonly DocTypeVersion: "0x4287";
|
|
@@ -272,3 +274,572 @@ export declare const knownIdsWithOneLength: string[];
|
|
|
272
274
|
export declare const knownIdsWithTwoLength: string[];
|
|
273
275
|
export declare const knownIdsWithThreeLength: string[];
|
|
274
276
|
export declare const getSegmentName: (id: string) => string | undefined;
|
|
277
|
+
export declare const getIdForName: (name: string) => EbmlMapKey;
|
|
278
|
+
export type MatroskaKey = keyof typeof matroskaElements;
|
|
279
|
+
export type MatroskaElement = (typeof matroskaElements)[MatroskaKey];
|
|
280
|
+
type EbmlType = 'string';
|
|
281
|
+
export type EbmlWithChildren = {
|
|
282
|
+
name: MatroskaKey;
|
|
283
|
+
type: 'children';
|
|
284
|
+
};
|
|
285
|
+
export type EbmlWithUint = {
|
|
286
|
+
name: MatroskaKey;
|
|
287
|
+
type: 'uint';
|
|
288
|
+
};
|
|
289
|
+
export type EbmlWithHexString = {
|
|
290
|
+
name: MatroskaKey;
|
|
291
|
+
type: 'hex-string';
|
|
292
|
+
};
|
|
293
|
+
export type EbmlWithString = {
|
|
294
|
+
name: MatroskaKey;
|
|
295
|
+
type: EbmlType;
|
|
296
|
+
};
|
|
297
|
+
export type EbmlWithFloat = {
|
|
298
|
+
name: MatroskaKey;
|
|
299
|
+
type: 'float';
|
|
300
|
+
};
|
|
301
|
+
export type EbmlWithUint8Array = {
|
|
302
|
+
name: MatroskaKey;
|
|
303
|
+
type: 'uint8array';
|
|
304
|
+
};
|
|
305
|
+
export type Ebml = EbmlWithString | EbmlWithUint | EbmlWithChildren | EbmlWithFloat | EbmlWithHexString | EbmlWithUint8Array;
|
|
306
|
+
export declare const ebmlVersion: {
|
|
307
|
+
name: "EBMLVersion";
|
|
308
|
+
type: "uint";
|
|
309
|
+
};
|
|
310
|
+
export declare const ebmlReadVersion: {
|
|
311
|
+
name: "EBMLReadVersion";
|
|
312
|
+
type: "uint";
|
|
313
|
+
};
|
|
314
|
+
export declare const ebmlMaxIdLength: {
|
|
315
|
+
name: "EBMLMaxIDLength";
|
|
316
|
+
type: "uint";
|
|
317
|
+
};
|
|
318
|
+
export declare const ebmlMaxSizeLength: {
|
|
319
|
+
name: "EBMLMaxSizeLength";
|
|
320
|
+
type: "uint";
|
|
321
|
+
};
|
|
322
|
+
export declare const docType: {
|
|
323
|
+
name: "DocType";
|
|
324
|
+
type: "string";
|
|
325
|
+
};
|
|
326
|
+
export declare const docTypeVersion: {
|
|
327
|
+
name: "DocTypeVersion";
|
|
328
|
+
type: "uint";
|
|
329
|
+
};
|
|
330
|
+
export declare const docTypeReadVersion: {
|
|
331
|
+
name: "DocTypeReadVersion";
|
|
332
|
+
type: "uint";
|
|
333
|
+
};
|
|
334
|
+
export type EmblTypes = {
|
|
335
|
+
uint: number;
|
|
336
|
+
float: number;
|
|
337
|
+
string: string;
|
|
338
|
+
children: Ebml[];
|
|
339
|
+
void: undefined;
|
|
340
|
+
'hex-string': string;
|
|
341
|
+
uint8array: Uint8Array;
|
|
342
|
+
};
|
|
343
|
+
export declare const matroskaHeader: {
|
|
344
|
+
readonly name: "Header";
|
|
345
|
+
readonly type: "children";
|
|
346
|
+
};
|
|
347
|
+
export declare const seekId: {
|
|
348
|
+
readonly name: "SeekID";
|
|
349
|
+
readonly type: "hex-string";
|
|
350
|
+
};
|
|
351
|
+
export declare const seekPosition: {
|
|
352
|
+
readonly name: "SeekPosition";
|
|
353
|
+
readonly type: "uint";
|
|
354
|
+
};
|
|
355
|
+
export declare const seek: {
|
|
356
|
+
readonly name: "Seek";
|
|
357
|
+
readonly type: "children";
|
|
358
|
+
};
|
|
359
|
+
export declare const seekHead: {
|
|
360
|
+
readonly name: "SeekHead";
|
|
361
|
+
readonly type: "children";
|
|
362
|
+
};
|
|
363
|
+
export declare const voidHeader: {
|
|
364
|
+
readonly name: "Void";
|
|
365
|
+
readonly type: "uint8array";
|
|
366
|
+
};
|
|
367
|
+
export declare const codecID: {
|
|
368
|
+
readonly name: "CodecID";
|
|
369
|
+
readonly type: "string";
|
|
370
|
+
};
|
|
371
|
+
export declare const trackType: {
|
|
372
|
+
readonly name: "TrackType";
|
|
373
|
+
readonly type: "uint";
|
|
374
|
+
};
|
|
375
|
+
export declare const widthType: {
|
|
376
|
+
readonly name: "PixelWidth";
|
|
377
|
+
readonly type: "uint";
|
|
378
|
+
};
|
|
379
|
+
export declare const heightType: {
|
|
380
|
+
readonly name: "PixelHeight";
|
|
381
|
+
readonly type: "uint";
|
|
382
|
+
};
|
|
383
|
+
export declare const muxingApp: {
|
|
384
|
+
readonly name: "MuxingApp";
|
|
385
|
+
readonly type: "string";
|
|
386
|
+
};
|
|
387
|
+
export declare const duration: {
|
|
388
|
+
readonly name: "Duration";
|
|
389
|
+
readonly type: "float";
|
|
390
|
+
};
|
|
391
|
+
export declare const timestampScale: {
|
|
392
|
+
readonly name: "TimestampScale";
|
|
393
|
+
readonly type: "uint";
|
|
394
|
+
};
|
|
395
|
+
export declare const writingApp: {
|
|
396
|
+
readonly name: "WritingApp";
|
|
397
|
+
readonly type: "string";
|
|
398
|
+
};
|
|
399
|
+
export declare const infoType: {
|
|
400
|
+
readonly name: "Info";
|
|
401
|
+
readonly type: "children";
|
|
402
|
+
};
|
|
403
|
+
export declare const titleType: {
|
|
404
|
+
readonly name: "Title";
|
|
405
|
+
readonly type: "string";
|
|
406
|
+
};
|
|
407
|
+
export declare const samplingFrequency: {
|
|
408
|
+
readonly name: "SamplingFrequency";
|
|
409
|
+
readonly type: "float";
|
|
410
|
+
};
|
|
411
|
+
export declare const channels: {
|
|
412
|
+
readonly name: "Channels";
|
|
413
|
+
readonly type: "uint";
|
|
414
|
+
};
|
|
415
|
+
export declare const alphaMode: {
|
|
416
|
+
readonly name: "AlphaMode";
|
|
417
|
+
readonly type: "uint";
|
|
418
|
+
};
|
|
419
|
+
export declare const interlaced: {
|
|
420
|
+
readonly name: "FlagInterlaced";
|
|
421
|
+
readonly type: "uint";
|
|
422
|
+
};
|
|
423
|
+
export declare const bitDepth: {
|
|
424
|
+
readonly name: "BitDepth";
|
|
425
|
+
readonly type: "uint";
|
|
426
|
+
};
|
|
427
|
+
export declare const displayWidth: {
|
|
428
|
+
readonly name: "DisplayWidth";
|
|
429
|
+
readonly type: "uint";
|
|
430
|
+
};
|
|
431
|
+
export declare const displayHeight: {
|
|
432
|
+
readonly name: "DisplayHeight";
|
|
433
|
+
readonly type: "uint";
|
|
434
|
+
};
|
|
435
|
+
export declare const flagLacing: {
|
|
436
|
+
readonly name: "FlagLacing";
|
|
437
|
+
readonly type: "uint";
|
|
438
|
+
};
|
|
439
|
+
export declare const tagSegment: {
|
|
440
|
+
readonly name: "Tag";
|
|
441
|
+
readonly type: "uint8array";
|
|
442
|
+
};
|
|
443
|
+
export declare const tags: {
|
|
444
|
+
readonly name: "Tags";
|
|
445
|
+
readonly type: "children";
|
|
446
|
+
};
|
|
447
|
+
export declare const trackNumber: {
|
|
448
|
+
readonly name: "TrackNumber";
|
|
449
|
+
readonly type: "uint";
|
|
450
|
+
};
|
|
451
|
+
export declare const trackUID: {
|
|
452
|
+
readonly name: "TrackUID";
|
|
453
|
+
readonly type: "hex-string";
|
|
454
|
+
};
|
|
455
|
+
export declare const color: {
|
|
456
|
+
readonly name: "Colour";
|
|
457
|
+
readonly type: "uint8array";
|
|
458
|
+
};
|
|
459
|
+
export declare const language: {
|
|
460
|
+
readonly name: "Language";
|
|
461
|
+
readonly type: "string";
|
|
462
|
+
};
|
|
463
|
+
export declare const defaultDuration: {
|
|
464
|
+
readonly name: "DefaultDuration";
|
|
465
|
+
readonly type: "uint";
|
|
466
|
+
};
|
|
467
|
+
export declare const codecPrivate: {
|
|
468
|
+
readonly name: "CodecPrivate";
|
|
469
|
+
readonly type: "uint8array";
|
|
470
|
+
};
|
|
471
|
+
export declare const blockAdditionsSegment: {
|
|
472
|
+
readonly name: "BlockAdditions";
|
|
473
|
+
readonly type: "uint8array";
|
|
474
|
+
};
|
|
475
|
+
export declare const maxBlockAdditionIdSegment: {
|
|
476
|
+
readonly name: "MaxBlockAdditionID";
|
|
477
|
+
readonly type: "uint";
|
|
478
|
+
};
|
|
479
|
+
export declare const audioSegment: {
|
|
480
|
+
readonly name: "Audio";
|
|
481
|
+
readonly type: "children";
|
|
482
|
+
};
|
|
483
|
+
export declare const videoSegment: {
|
|
484
|
+
readonly name: "Video";
|
|
485
|
+
readonly type: "children";
|
|
486
|
+
};
|
|
487
|
+
export declare const flagDefault: {
|
|
488
|
+
readonly name: "FlagDefault";
|
|
489
|
+
readonly type: "uint8array";
|
|
490
|
+
};
|
|
491
|
+
export declare const referenceBlock: {
|
|
492
|
+
readonly name: "ReferenceBlock";
|
|
493
|
+
readonly type: "uint";
|
|
494
|
+
};
|
|
495
|
+
export declare const blockElement: {
|
|
496
|
+
readonly name: "Block";
|
|
497
|
+
readonly type: "uint8array";
|
|
498
|
+
};
|
|
499
|
+
export declare const codecName: {
|
|
500
|
+
readonly name: "CodecName";
|
|
501
|
+
readonly type: "string";
|
|
502
|
+
};
|
|
503
|
+
export declare const trackTimestampScale: {
|
|
504
|
+
readonly name: "TrackTimestampScale";
|
|
505
|
+
readonly type: "float";
|
|
506
|
+
};
|
|
507
|
+
export declare const trackEntry: {
|
|
508
|
+
readonly name: "TrackEntry";
|
|
509
|
+
readonly type: "children";
|
|
510
|
+
};
|
|
511
|
+
export declare const tracks: {
|
|
512
|
+
readonly name: "Tracks";
|
|
513
|
+
readonly type: "children";
|
|
514
|
+
};
|
|
515
|
+
export declare const timestampEntry: {
|
|
516
|
+
readonly name: "Timestamp";
|
|
517
|
+
readonly type: "uint";
|
|
518
|
+
};
|
|
519
|
+
export declare const block: {
|
|
520
|
+
readonly name: "Block";
|
|
521
|
+
readonly type: "uint8array";
|
|
522
|
+
};
|
|
523
|
+
export declare const simpleBlock: {
|
|
524
|
+
readonly name: "SimpleBlock";
|
|
525
|
+
readonly type: "uint8array";
|
|
526
|
+
};
|
|
527
|
+
export declare const blockGroup: {
|
|
528
|
+
readonly name: "BlockGroup";
|
|
529
|
+
readonly type: "children";
|
|
530
|
+
};
|
|
531
|
+
export declare const segment: {
|
|
532
|
+
readonly name: "Segment";
|
|
533
|
+
readonly type: "children";
|
|
534
|
+
};
|
|
535
|
+
export declare const cluster: {
|
|
536
|
+
readonly name: "Cluster";
|
|
537
|
+
readonly type: "children";
|
|
538
|
+
};
|
|
539
|
+
export type CodecIdSegment = EbmlParsed<typeof codecID>;
|
|
540
|
+
export type TrackTypeSegment = EbmlParsed<typeof trackType>;
|
|
541
|
+
export type WidthSegment = EbmlParsed<typeof widthType>;
|
|
542
|
+
export type HeightSegment = EbmlParsed<typeof heightType>;
|
|
543
|
+
export type TimestampScaleSegment = EbmlParsed<typeof timestampScale>;
|
|
544
|
+
export type DurationSegment = EbmlParsed<typeof duration>;
|
|
545
|
+
export type DisplayWidthSegment = EbmlParsed<typeof displayWidth>;
|
|
546
|
+
export type DisplayHeightSegment = EbmlParsed<typeof displayHeight>;
|
|
547
|
+
export type TrackNumberSegment = EbmlParsed<typeof trackNumber>;
|
|
548
|
+
export type AudioSegment = EbmlParsed<typeof audioSegment>;
|
|
549
|
+
export type VideoSegment = EbmlParsed<typeof videoSegment>;
|
|
550
|
+
export type TrackEntry = EbmlParsed<typeof trackEntry>;
|
|
551
|
+
export type BlockSegment = EbmlParsed<typeof block>;
|
|
552
|
+
export type SimpleBlockSegment = EbmlParsed<typeof simpleBlock>;
|
|
553
|
+
export type MainSegment = EbmlParsed<typeof segment>;
|
|
554
|
+
export type ClusterSegment = EbmlParsed<typeof cluster>;
|
|
555
|
+
export type Tracks = EbmlParsed<typeof tracks>;
|
|
556
|
+
export type FloatWithSize = {
|
|
557
|
+
value: number;
|
|
558
|
+
size: '32' | '64';
|
|
559
|
+
};
|
|
560
|
+
export type UintWithSize = {
|
|
561
|
+
value: number;
|
|
562
|
+
byteLength: number;
|
|
563
|
+
};
|
|
564
|
+
export type EbmlValue<T extends Ebml, Child = PossibleEbml> = T extends EbmlWithUint ? UintWithSize : T extends EbmlWithString ? string : T extends EbmlWithFloat ? FloatWithSize : T extends EbmlWithHexString ? string : T extends EbmlWithUint8Array ? Uint8Array : T extends EbmlWithChildren ? Child[] : never;
|
|
565
|
+
export type EbmlValueOrUint8Array<T extends Ebml> = Uint8Array | EbmlValue<T, PossibleEbmlOrUint8Array>;
|
|
566
|
+
export type EbmlParsed<T extends Ebml> = {
|
|
567
|
+
type: T['name'];
|
|
568
|
+
value: EbmlValue<T>;
|
|
569
|
+
minVintWidth: number;
|
|
570
|
+
};
|
|
571
|
+
export type EbmlParsedOrUint8Array<T extends Ebml> = {
|
|
572
|
+
type: T['name'];
|
|
573
|
+
value: EbmlValueOrUint8Array<T>;
|
|
574
|
+
minVintWidth: number;
|
|
575
|
+
};
|
|
576
|
+
export declare const ebmlMap: {
|
|
577
|
+
readonly "0x1a45dfa3": {
|
|
578
|
+
readonly name: "Header";
|
|
579
|
+
readonly type: "children";
|
|
580
|
+
};
|
|
581
|
+
readonly "0x4282": {
|
|
582
|
+
name: "DocType";
|
|
583
|
+
type: "string";
|
|
584
|
+
};
|
|
585
|
+
readonly "0x4287": {
|
|
586
|
+
name: "DocTypeVersion";
|
|
587
|
+
type: "uint";
|
|
588
|
+
};
|
|
589
|
+
readonly "0x4285": {
|
|
590
|
+
name: "DocTypeReadVersion";
|
|
591
|
+
type: "uint";
|
|
592
|
+
};
|
|
593
|
+
readonly "0x4286": {
|
|
594
|
+
name: "EBMLVersion";
|
|
595
|
+
type: "uint";
|
|
596
|
+
};
|
|
597
|
+
readonly "0x42f7": {
|
|
598
|
+
name: "EBMLReadVersion";
|
|
599
|
+
type: "uint";
|
|
600
|
+
};
|
|
601
|
+
readonly "0x42f2": {
|
|
602
|
+
name: "EBMLMaxIDLength";
|
|
603
|
+
type: "uint";
|
|
604
|
+
};
|
|
605
|
+
readonly "0x42f3": {
|
|
606
|
+
name: "EBMLMaxSizeLength";
|
|
607
|
+
type: "uint";
|
|
608
|
+
};
|
|
609
|
+
readonly "0xec": {
|
|
610
|
+
name: "Void";
|
|
611
|
+
type: "uint8array";
|
|
612
|
+
};
|
|
613
|
+
readonly "0x1c53bb6b": {
|
|
614
|
+
readonly name: "Cues";
|
|
615
|
+
readonly type: "uint8array";
|
|
616
|
+
};
|
|
617
|
+
readonly "0x4461": {
|
|
618
|
+
readonly name: "DateUTC";
|
|
619
|
+
readonly type: "uint8array";
|
|
620
|
+
};
|
|
621
|
+
readonly "0x23314f": {
|
|
622
|
+
readonly name: "TrackTimestampScale";
|
|
623
|
+
readonly type: "float";
|
|
624
|
+
};
|
|
625
|
+
readonly "0x56aa": {
|
|
626
|
+
readonly name: "CodecDelay";
|
|
627
|
+
readonly type: "uint8array";
|
|
628
|
+
};
|
|
629
|
+
readonly "0x56bb": {
|
|
630
|
+
readonly name: "SeekPreRoll";
|
|
631
|
+
readonly type: "uint8array";
|
|
632
|
+
};
|
|
633
|
+
readonly "0x75a2": {
|
|
634
|
+
readonly name: "DiscardPadding";
|
|
635
|
+
readonly type: "uint8array";
|
|
636
|
+
};
|
|
637
|
+
readonly "0x78b5": {
|
|
638
|
+
readonly name: "OutputSamplingFrequency";
|
|
639
|
+
readonly type: "uint8array";
|
|
640
|
+
};
|
|
641
|
+
readonly "0x258688": {
|
|
642
|
+
readonly name: "CodecName";
|
|
643
|
+
readonly type: "string";
|
|
644
|
+
};
|
|
645
|
+
readonly "0xa7": {
|
|
646
|
+
readonly name: "Position";
|
|
647
|
+
readonly type: "uint8array";
|
|
648
|
+
};
|
|
649
|
+
readonly "0xcf": {
|
|
650
|
+
readonly name: "SliceDuration";
|
|
651
|
+
readonly type: "uint8array";
|
|
652
|
+
};
|
|
653
|
+
readonly "0x114d9b74": {
|
|
654
|
+
readonly name: "SeekHead";
|
|
655
|
+
readonly type: "children";
|
|
656
|
+
};
|
|
657
|
+
readonly "0x4dbb": {
|
|
658
|
+
readonly name: "Seek";
|
|
659
|
+
readonly type: "children";
|
|
660
|
+
};
|
|
661
|
+
readonly "0x53ab": {
|
|
662
|
+
readonly name: "SeekID";
|
|
663
|
+
readonly type: "hex-string";
|
|
664
|
+
};
|
|
665
|
+
readonly "0x53ac": {
|
|
666
|
+
readonly name: "SeekPosition";
|
|
667
|
+
readonly type: "uint";
|
|
668
|
+
};
|
|
669
|
+
readonly "0xbf": {
|
|
670
|
+
readonly name: "Crc32";
|
|
671
|
+
readonly type: "uint8array";
|
|
672
|
+
};
|
|
673
|
+
readonly "0x4d80": {
|
|
674
|
+
readonly name: "MuxingApp";
|
|
675
|
+
readonly type: "string";
|
|
676
|
+
};
|
|
677
|
+
readonly "0x5741": {
|
|
678
|
+
readonly name: "WritingApp";
|
|
679
|
+
readonly type: "string";
|
|
680
|
+
};
|
|
681
|
+
readonly "0x73a4": {
|
|
682
|
+
readonly name: "SegmentUUID";
|
|
683
|
+
readonly type: "string";
|
|
684
|
+
};
|
|
685
|
+
readonly "0x4489": {
|
|
686
|
+
readonly name: "Duration";
|
|
687
|
+
readonly type: "float";
|
|
688
|
+
};
|
|
689
|
+
readonly "0x86": {
|
|
690
|
+
readonly name: "CodecID";
|
|
691
|
+
readonly type: "string";
|
|
692
|
+
};
|
|
693
|
+
readonly "0x83": {
|
|
694
|
+
readonly name: "TrackType";
|
|
695
|
+
readonly type: "uint";
|
|
696
|
+
};
|
|
697
|
+
readonly "0xb0": {
|
|
698
|
+
readonly name: "PixelWidth";
|
|
699
|
+
readonly type: "uint";
|
|
700
|
+
};
|
|
701
|
+
readonly "0xba": {
|
|
702
|
+
readonly name: "PixelHeight";
|
|
703
|
+
readonly type: "uint";
|
|
704
|
+
};
|
|
705
|
+
readonly "0x2ad7b1": {
|
|
706
|
+
readonly name: "TimestampScale";
|
|
707
|
+
readonly type: "uint";
|
|
708
|
+
};
|
|
709
|
+
readonly "0x1549a966": {
|
|
710
|
+
readonly name: "Info";
|
|
711
|
+
readonly type: "children";
|
|
712
|
+
};
|
|
713
|
+
readonly "0x7ba9": {
|
|
714
|
+
readonly name: "Title";
|
|
715
|
+
readonly type: "string";
|
|
716
|
+
};
|
|
717
|
+
readonly "0xb5": {
|
|
718
|
+
readonly name: "SamplingFrequency";
|
|
719
|
+
readonly type: "float";
|
|
720
|
+
};
|
|
721
|
+
readonly "0x9f": {
|
|
722
|
+
readonly name: "Channels";
|
|
723
|
+
readonly type: "uint";
|
|
724
|
+
};
|
|
725
|
+
readonly "0x53c0": {
|
|
726
|
+
readonly name: "AlphaMode";
|
|
727
|
+
readonly type: "uint";
|
|
728
|
+
};
|
|
729
|
+
readonly "0x9a": {
|
|
730
|
+
readonly name: "FlagInterlaced";
|
|
731
|
+
readonly type: "uint";
|
|
732
|
+
};
|
|
733
|
+
readonly "0x6264": {
|
|
734
|
+
readonly name: "BitDepth";
|
|
735
|
+
readonly type: "uint";
|
|
736
|
+
};
|
|
737
|
+
readonly "0x54ba": {
|
|
738
|
+
readonly name: "DisplayHeight";
|
|
739
|
+
readonly type: "uint";
|
|
740
|
+
};
|
|
741
|
+
readonly "0x54b0": {
|
|
742
|
+
readonly name: "DisplayWidth";
|
|
743
|
+
readonly type: "uint";
|
|
744
|
+
};
|
|
745
|
+
readonly "0x9c": {
|
|
746
|
+
readonly name: "FlagLacing";
|
|
747
|
+
readonly type: "uint";
|
|
748
|
+
};
|
|
749
|
+
readonly "0x1254c367": {
|
|
750
|
+
readonly name: "Tags";
|
|
751
|
+
readonly type: "children";
|
|
752
|
+
};
|
|
753
|
+
readonly "0x7373": {
|
|
754
|
+
readonly name: "Tag";
|
|
755
|
+
readonly type: "uint8array";
|
|
756
|
+
};
|
|
757
|
+
readonly "0xd7": {
|
|
758
|
+
readonly name: "TrackNumber";
|
|
759
|
+
readonly type: "uint";
|
|
760
|
+
};
|
|
761
|
+
readonly "0x73c5": {
|
|
762
|
+
readonly name: "TrackUID";
|
|
763
|
+
readonly type: "hex-string";
|
|
764
|
+
};
|
|
765
|
+
readonly "0x55b0": {
|
|
766
|
+
readonly name: "Colour";
|
|
767
|
+
readonly type: "uint8array";
|
|
768
|
+
};
|
|
769
|
+
readonly "0x22b59c": {
|
|
770
|
+
readonly name: "Language";
|
|
771
|
+
readonly type: "string";
|
|
772
|
+
};
|
|
773
|
+
readonly "0x23e383": {
|
|
774
|
+
readonly name: "DefaultDuration";
|
|
775
|
+
readonly type: "uint";
|
|
776
|
+
};
|
|
777
|
+
readonly "0x63a2": {
|
|
778
|
+
readonly name: "CodecPrivate";
|
|
779
|
+
readonly type: "uint8array";
|
|
780
|
+
};
|
|
781
|
+
readonly "0x75a1": {
|
|
782
|
+
readonly name: "BlockAdditions";
|
|
783
|
+
readonly type: "uint8array";
|
|
784
|
+
};
|
|
785
|
+
readonly "0x55ee": {
|
|
786
|
+
readonly name: "MaxBlockAdditionID";
|
|
787
|
+
readonly type: "uint";
|
|
788
|
+
};
|
|
789
|
+
readonly "0xe1": {
|
|
790
|
+
readonly name: "Audio";
|
|
791
|
+
readonly type: "children";
|
|
792
|
+
};
|
|
793
|
+
readonly "0xe0": {
|
|
794
|
+
readonly name: "Video";
|
|
795
|
+
readonly type: "children";
|
|
796
|
+
};
|
|
797
|
+
readonly "0x88": {
|
|
798
|
+
readonly name: "FlagDefault";
|
|
799
|
+
readonly type: "uint8array";
|
|
800
|
+
};
|
|
801
|
+
readonly "0xfb": {
|
|
802
|
+
readonly name: "ReferenceBlock";
|
|
803
|
+
readonly type: "uint";
|
|
804
|
+
};
|
|
805
|
+
readonly "0xae": {
|
|
806
|
+
readonly name: "TrackEntry";
|
|
807
|
+
readonly type: "children";
|
|
808
|
+
};
|
|
809
|
+
readonly "0xe7": {
|
|
810
|
+
readonly name: "Timestamp";
|
|
811
|
+
readonly type: "uint";
|
|
812
|
+
};
|
|
813
|
+
readonly "0x1654ae6b": {
|
|
814
|
+
readonly name: "Tracks";
|
|
815
|
+
readonly type: "children";
|
|
816
|
+
};
|
|
817
|
+
readonly "0xa1": {
|
|
818
|
+
readonly name: "Block";
|
|
819
|
+
readonly type: "uint8array";
|
|
820
|
+
};
|
|
821
|
+
readonly "0xa3": {
|
|
822
|
+
readonly name: "SimpleBlock";
|
|
823
|
+
readonly type: "uint8array";
|
|
824
|
+
};
|
|
825
|
+
readonly "0xa0": {
|
|
826
|
+
readonly name: "BlockGroup";
|
|
827
|
+
readonly type: "children";
|
|
828
|
+
};
|
|
829
|
+
readonly "0x18538067": {
|
|
830
|
+
readonly name: "Segment";
|
|
831
|
+
readonly type: "children";
|
|
832
|
+
};
|
|
833
|
+
readonly "0x1f43b675": {
|
|
834
|
+
readonly name: "Cluster";
|
|
835
|
+
readonly type: "children";
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
export type PossibleEbml = Prettify<{
|
|
839
|
+
[key in keyof typeof ebmlMap]: EbmlParsed<(typeof ebmlMap)[key]>;
|
|
840
|
+
}[keyof typeof ebmlMap]>;
|
|
841
|
+
export type PossibleEbmlOrUint8Array = Prettify<{
|
|
842
|
+
[key in keyof typeof ebmlMap]: EbmlParsedOrUint8Array<(typeof ebmlMap)[key]>;
|
|
843
|
+
}[keyof typeof ebmlMap]> | Uint8Array;
|
|
844
|
+
export type EbmlMapKey = keyof typeof ebmlMap;
|
|
845
|
+
export {};
|