feat: support matroska v4 and add codegen

This commit is contained in:
2025-03-21 01:53:06 +08:00
parent 510592a8c5
commit 6df4f5e1de
25 changed files with 6121 additions and 2164 deletions

View File

@@ -90,7 +90,7 @@ describe('Ebml Decoder', () => {
assert.strictEqual(tag.position, EbmlTagPosition.Content);
assert.strictEqual(tag.id.toString(16), '4286');
assert.strictEqual(tag.contentLength, 0x01);
assert.strictEqual(tag.type, EbmlElementType.UnsignedInt);
assert.strictEqual(tag.type, EbmlElementType.Uint);
assert.ok(tag instanceof EbmlDataTag);
assert.deepStrictEqual(tag.data, 1);
});

View File

@@ -66,7 +66,7 @@ describe('EBML Values in tags', () => {
makeAVC1StreamTest((tag, done) => {
if (
tag instanceof EbmlDataTag &&
tag.id === EbmlTagIdEnum.TimecodeScale
tag.id === EbmlTagIdEnum.TimestampScale
) {
assert.strictEqual(tag.data, 1000000);
done();
@@ -142,11 +142,11 @@ describe('EBML Values in tags', () => {
}
}));
it('should get a correct TimeCodeScale value from a video/webm; codecs="vp8" file (3-byte unsigned int)', () =>
it('should get a correct TimestamScale value from a video/webm; codecs="vp8" file (3-byte unsigned int)', () =>
makeVP8StreamTest((tag, done) => {
if (
tag instanceof EbmlDataTag &&
tag.id === EbmlTagIdEnum.TimecodeScale
tag.id === EbmlTagIdEnum.TimestampScale
) {
assert.strictEqual(tag.data, 1000000);
done();