music-metadata 10.0.1 → 10.2.0
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/LICENSE.txt +9 -9
- package/README.md +535 -520
- package/lib/ParserFactory.d.ts +20 -28
- package/lib/ParserFactory.js +204 -207
- package/lib/aiff/AiffParser.js +20 -19
- package/lib/aiff/AiffToken.d.ts +14 -2
- package/lib/aiff/AiffToken.js +12 -0
- package/lib/apev2/APEv2Parser.d.ts +4 -4
- package/lib/apev2/APEv2Parser.js +12 -10
- package/lib/apev2/APEv2Token.d.ts +2 -4
- package/lib/apev2/APEv2Token.js +0 -3
- package/lib/asf/AsfObject.d.ts +7 -16
- package/lib/asf/AsfObject.js +8 -34
- package/lib/asf/AsfParser.js +17 -10
- package/lib/asf/AsfTagMapper.d.ts +1 -1
- package/lib/asf/AsfTagMapper.js +3 -2
- package/lib/asf/AsfUtil.d.ts +3 -11
- package/lib/asf/AsfUtil.js +29 -30
- package/lib/asf/GUID.js +6 -9
- package/lib/common/BasicParser.d.ts +4 -4
- package/lib/common/BasicParser.js +6 -0
- package/lib/common/CaseInsensitiveTagMap.d.ts +1 -1
- package/lib/common/CombinedTagMapper.d.ts +5 -5
- package/lib/common/CombinedTagMapper.js +1 -1
- package/lib/common/FourCC.d.ts +1 -1
- package/lib/common/GenericTagMapper.d.ts +8 -8
- package/lib/common/GenericTagMapper.js +4 -4
- package/lib/common/GenericTagTypes.d.ts +5 -4
- package/lib/common/GenericTagTypes.js +2 -2
- package/lib/common/MetadataCollector.d.ts +9 -9
- package/lib/common/MetadataCollector.js +22 -17
- package/lib/common/RandomFileReader.d.ts +1 -1
- package/lib/common/RandomFileReader.js +1 -1
- package/lib/common/RandomUint8ArrayReader.d.ts +1 -1
- package/lib/common/Util.d.ts +2 -6
- package/lib/common/Util.js +9 -11
- package/lib/core.d.ts +7 -9
- package/lib/core.js +10 -7
- package/lib/dsdiff/DsdiffParser.js +26 -14
- package/lib/dsdiff/DsdiffToken.d.ts +2 -2
- package/lib/dsdiff/DsdiffToken.js +1 -0
- package/lib/dsf/DsfChunk.js +1 -0
- package/lib/dsf/DsfParser.js +4 -2
- package/lib/ebml/EbmlIterator.d.ts +52 -0
- package/lib/ebml/EbmlIterator.js +220 -0
- package/lib/ebml/types.d.ts +36 -0
- package/lib/ebml/types.js +10 -0
- package/lib/flac/FlacParser.d.ts +3 -3
- package/lib/flac/FlacParser.js +9 -12
- package/lib/id3v1/ID3v1Parser.d.ts +1 -1
- package/lib/id3v1/ID3v1Parser.js +7 -4
- package/lib/id3v2/AbstractID3Parser.d.ts +1 -1
- package/lib/id3v2/AbstractID3Parser.js +2 -1
- package/lib/id3v2/FrameParser.d.ts +28 -3
- package/lib/id3v2/FrameParser.js +50 -28
- package/lib/id3v2/ID3v22TagMapper.d.ts +1 -1
- package/lib/id3v2/ID3v24TagMapper.d.ts +2 -1
- package/lib/id3v2/ID3v24TagMapper.js +23 -16
- package/lib/id3v2/ID3v2Parser.d.ts +2 -2
- package/lib/id3v2/ID3v2Parser.js +18 -8
- package/lib/iff/index.js +1 -0
- package/lib/index.d.ts +5 -6
- package/lib/index.js +7 -8
- package/lib/lyrics3/Lyrics3.d.ts +1 -1
- package/lib/lyrics3/Lyrics3.js +1 -1
- package/lib/matroska/MatroskaDtd.d.ts +2 -2
- package/lib/matroska/MatroskaDtd.js +247 -239
- package/lib/matroska/MatroskaParser.d.ts +10 -24
- package/lib/matroska/MatroskaParser.js +120 -205
- package/lib/matroska/types.d.ts +12 -46
- package/lib/matroska/types.js +0 -9
- package/lib/mp4/Atom.d.ts +3 -3
- package/lib/mp4/Atom.js +4 -7
- package/lib/mp4/AtomToken.js +2 -1
- package/lib/mp4/MP4Parser.js +29 -20
- package/lib/mp4/MP4TagMapper.d.ts +2 -2
- package/lib/mp4/MP4TagMapper.js +1 -1
- package/lib/mpeg/ExtendedLameHeader.d.ts +4 -4
- package/lib/mpeg/ExtendedLameHeader.js +2 -1
- package/lib/mpeg/MpegParser.d.ts +1 -1
- package/lib/mpeg/MpegParser.js +145 -96
- package/lib/mpeg/ReplayGainDataFormat.d.ts +1 -1
- package/lib/mpeg/ReplayGainDataFormat.js +1 -0
- package/lib/mpeg/XingTag.d.ts +4 -4
- package/lib/mpeg/XingTag.js +5 -4
- package/lib/musepack/index.js +1 -0
- package/lib/musepack/sv7/BitReader.js +14 -17
- package/lib/musepack/sv7/MpcSv7Parser.js +6 -1
- package/lib/musepack/sv7/StreamVersion7.js +1 -0
- package/lib/musepack/sv8/MpcSv8Parser.js +6 -2
- package/lib/musepack/sv8/StreamVersion8.d.ts +1 -1
- package/lib/musepack/sv8/StreamVersion8.js +1 -0
- package/lib/ogg/Ogg.d.ts +1 -1
- package/lib/ogg/Ogg.js +1 -0
- package/lib/ogg/OggParser.d.ts +3 -3
- package/lib/ogg/OggParser.js +25 -16
- package/lib/ogg/opus/Opus.d.ts +1 -1
- package/lib/ogg/opus/Opus.js +1 -0
- package/lib/ogg/opus/OpusParser.d.ts +4 -4
- package/lib/ogg/opus/OpusParser.js +2 -0
- package/lib/ogg/speex/Speex.js +1 -0
- package/lib/ogg/speex/SpeexParser.d.ts +4 -4
- package/lib/ogg/speex/SpeexParser.js +1 -0
- package/lib/ogg/theora/Theora.js +1 -0
- package/lib/ogg/theora/TheoraParser.d.ts +4 -4
- package/lib/ogg/theora/TheoraParser.js +1 -0
- package/lib/ogg/vorbis/Vorbis.d.ts +3 -3
- package/lib/ogg/vorbis/Vorbis.js +22 -11
- package/lib/ogg/vorbis/VorbisDecoder.d.ts +1 -1
- package/lib/ogg/vorbis/VorbisDecoder.js +1 -0
- package/lib/ogg/vorbis/VorbisParser.d.ts +4 -4
- package/lib/ogg/vorbis/VorbisParser.js +3 -2
- package/lib/ogg/vorbis/VorbisTagMapper.d.ts +2 -2
- package/lib/ogg/vorbis/VorbisTagMapper.js +2 -2
- package/lib/riff/RiffChunk.d.ts +3 -3
- package/lib/riff/RiffChunk.js +1 -0
- package/lib/riff/RiffInfoTagMap.d.ts +1 -1
- package/lib/type.d.ts +44 -25
- package/lib/wav/BwfChunk.js +1 -0
- package/lib/wav/WaveChunk.d.ts +1 -1
- package/lib/wav/WaveChunk.js +1 -0
- package/lib/wav/WaveParser.js +27 -17
- package/lib/wavpack/WavPackParser.d.ts +1 -1
- package/lib/wavpack/WavPackParser.js +22 -13
- package/lib/wavpack/WavPackToken.d.ts +13 -17
- package/lib/wavpack/WavPackToken.js +22 -23
- package/package.json +139 -150
|
@@ -1,231 +1,238 @@
|
|
|
1
|
-
import { DataType } from '
|
|
1
|
+
import { DataType } from '../ebml/types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Elements of document type description
|
|
4
4
|
* Derived from https://github.com/tungol/EBML/blob/master/doctypes/matroska.dtd
|
|
5
5
|
* Extended with:
|
|
6
6
|
* - https://www.matroska.org/technical/specs/index.html
|
|
7
7
|
*/
|
|
8
|
-
export const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
8
|
+
export const matroskaDtd = {
|
|
9
|
+
name: 'dtd',
|
|
10
|
+
container: {
|
|
11
|
+
0x1a45dfa3: {
|
|
12
|
+
name: 'ebml',
|
|
13
|
+
container: {
|
|
14
|
+
0x4286: { name: 'ebmlVersion', value: DataType.uint }, // 5.1.1
|
|
15
|
+
0x42f7: { name: 'ebmlReadVersion', value: DataType.uint }, // 5.1.2
|
|
16
|
+
0x42f2: { name: 'ebmlMaxIDWidth', value: DataType.uint }, // 5.1.3
|
|
17
|
+
0x42f3: { name: 'ebmlMaxSizeWidth', value: DataType.uint }, // 5.1.4
|
|
18
|
+
0x4282: { name: 'docType', value: DataType.string }, // 5.1.5
|
|
19
|
+
0x4287: { name: 'docTypeVersion', value: DataType.uint }, // 5.1.6
|
|
20
|
+
0x4285: { name: 'docTypeReadVersion', value: DataType.uint } // 5.1.7
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
// Matroska segments
|
|
24
|
+
0x18538067: {
|
|
25
|
+
name: 'segment',
|
|
26
|
+
container: {
|
|
27
|
+
// Meta Seek Information (also known as MetaSeek)
|
|
28
|
+
0x114d9b74: {
|
|
29
|
+
name: 'seekHead',
|
|
30
|
+
container: {
|
|
31
|
+
0x4dbb: {
|
|
32
|
+
name: 'seek',
|
|
33
|
+
multiple: true,
|
|
34
|
+
container: {
|
|
35
|
+
0x53ab: { name: 'id', value: DataType.binary },
|
|
36
|
+
0x53ac: { name: 'position', value: DataType.uint }
|
|
37
|
+
}
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
40
|
+
},
|
|
41
|
+
// Segment Information
|
|
42
|
+
0x1549a966: {
|
|
43
|
+
name: 'info',
|
|
44
|
+
container: {
|
|
45
|
+
0x73a4: { name: 'uid', value: DataType.uid },
|
|
46
|
+
0x7384: { name: 'filename', value: DataType.string },
|
|
47
|
+
0x3cb923: { name: 'prevUID', value: DataType.uid },
|
|
48
|
+
0x3c83ab: { name: 'prevFilename', value: DataType.string },
|
|
49
|
+
0x3eb923: { name: 'nextUID', value: DataType.uid },
|
|
50
|
+
0x3e83bb: { name: 'nextFilename', value: DataType.string },
|
|
51
|
+
0x2ad7b1: { name: 'timecodeScale', value: DataType.uint },
|
|
52
|
+
0x4489: { name: 'duration', value: DataType.float },
|
|
53
|
+
0x4461: { name: 'dateUTC', value: DataType.uint },
|
|
54
|
+
0x7ba9: { name: 'title', value: DataType.string },
|
|
55
|
+
0x4d80: { name: 'muxingApp', value: DataType.string },
|
|
56
|
+
0x5741: { name: 'writingApp', value: DataType.string }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
// Cluster
|
|
60
|
+
0x1f43b675: {
|
|
61
|
+
name: 'cluster',
|
|
62
|
+
multiple: true,
|
|
63
|
+
container: {
|
|
64
|
+
0xe7: { name: 'timecode', value: DataType.uid },
|
|
65
|
+
0x58d7: { name: 'silentTracks ', multiple: true },
|
|
66
|
+
0xa7: { name: 'position', value: DataType.uid },
|
|
67
|
+
0xab: { name: 'prevSize', value: DataType.uid },
|
|
68
|
+
0xa0: { name: 'blockGroup' },
|
|
69
|
+
0xa3: { name: 'simpleBlock' }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
// Track
|
|
73
|
+
0x1654ae6b: {
|
|
74
|
+
name: 'tracks',
|
|
75
|
+
container: {
|
|
76
|
+
0xae: {
|
|
77
|
+
name: 'entries',
|
|
78
|
+
multiple: true,
|
|
79
|
+
container: {
|
|
80
|
+
0xd7: { name: 'trackNumber', value: DataType.uint },
|
|
81
|
+
0x73c5: { name: 'uid', value: DataType.uid },
|
|
82
|
+
0x83: { name: 'trackType', value: DataType.uint },
|
|
83
|
+
0xb9: { name: 'flagEnabled', value: DataType.bool },
|
|
84
|
+
0x88: { name: 'flagDefault', value: DataType.bool },
|
|
85
|
+
0x55aa: { name: 'flagForced', value: DataType.bool }, // extended
|
|
86
|
+
0x9c: { name: 'flagLacing', value: DataType.bool },
|
|
87
|
+
0x6de7: { name: 'minCache', value: DataType.uint },
|
|
88
|
+
0x6de8: { name: 'maxCache', value: DataType.uint },
|
|
89
|
+
0x23e383: { name: 'defaultDuration', value: DataType.uint },
|
|
90
|
+
0x23314f: { name: 'timecodeScale', value: DataType.float },
|
|
91
|
+
0x536e: { name: 'name', value: DataType.string },
|
|
92
|
+
0x22b59c: { name: 'language', value: DataType.string },
|
|
93
|
+
0x86: { name: 'codecID', value: DataType.string },
|
|
94
|
+
0x63a2: { name: 'codecPrivate', value: DataType.binary },
|
|
95
|
+
0x258688: { name: 'codecName', value: DataType.string },
|
|
96
|
+
0x3a9697: { name: 'codecSettings', value: DataType.string },
|
|
97
|
+
0x3b4040: { name: 'codecInfoUrl', value: DataType.string },
|
|
98
|
+
0x26b240: { name: 'codecDownloadUrl', value: DataType.string },
|
|
99
|
+
0xaa: { name: 'codecDecodeAll', value: DataType.bool },
|
|
100
|
+
0x6fab: { name: 'trackOverlay', value: DataType.uint },
|
|
101
|
+
// Video
|
|
102
|
+
0xe0: {
|
|
103
|
+
name: 'video',
|
|
104
|
+
container: {
|
|
105
|
+
0x9a: { name: 'flagInterlaced', value: DataType.bool },
|
|
106
|
+
0x53b8: { name: 'stereoMode', value: DataType.uint },
|
|
107
|
+
0xb0: { name: 'pixelWidth', value: DataType.uint },
|
|
108
|
+
0xba: { name: 'pixelHeight', value: DataType.uint },
|
|
109
|
+
0x54b0: { name: 'displayWidth', value: DataType.uint },
|
|
110
|
+
0x54ba: { name: 'displayHeight', value: DataType.uint },
|
|
111
|
+
0x54b3: { name: 'aspectRatioType', value: DataType.uint },
|
|
112
|
+
0x2eb524: { name: 'colourSpace', value: DataType.uint },
|
|
113
|
+
0x2fb523: { name: 'gammaValue', value: DataType.float }
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
// Audio
|
|
117
|
+
0xe1: {
|
|
118
|
+
name: 'audio',
|
|
119
|
+
container: {
|
|
120
|
+
0xb5: { name: 'samplingFrequency', value: DataType.float },
|
|
121
|
+
0x78b5: { name: 'outputSamplingFrequency', value: DataType.float },
|
|
122
|
+
0x9f: { name: 'channels', value: DataType.uint }, // https://www.matroska.org/technical/specs/index.html
|
|
123
|
+
0x94: { name: 'channels', value: DataType.uint },
|
|
124
|
+
0x7d7b: { name: 'channelPositions', value: DataType.binary },
|
|
125
|
+
0x6264: { name: 'bitDepth', value: DataType.uint }
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
// Content Encoding
|
|
129
|
+
0x6d80: {
|
|
130
|
+
name: 'contentEncodings',
|
|
131
|
+
container: {
|
|
132
|
+
0x6240: {
|
|
133
|
+
name: 'contentEncoding',
|
|
134
|
+
container: {
|
|
135
|
+
0x5031: { name: 'order', value: DataType.uint },
|
|
136
|
+
0x5032: { name: 'scope', value: DataType.bool },
|
|
137
|
+
0x5033: { name: 'type', value: DataType.uint },
|
|
138
|
+
0x5034: {
|
|
139
|
+
name: 'contentEncoding',
|
|
140
|
+
container: {
|
|
141
|
+
0x4254: { name: 'contentCompAlgo', value: DataType.uint },
|
|
142
|
+
0x4255: { name: 'contentCompSettings', value: DataType.binary }
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
0x5035: {
|
|
146
|
+
name: 'contentEncoding',
|
|
147
|
+
container: {
|
|
148
|
+
0x47e1: { name: 'contentEncAlgo', value: DataType.uint },
|
|
149
|
+
0x47e2: { name: 'contentEncKeyID', value: DataType.binary },
|
|
150
|
+
0x47e3: { name: 'contentSignature ', value: DataType.binary },
|
|
151
|
+
0x47e4: { name: 'ContentSigKeyID ', value: DataType.binary },
|
|
152
|
+
0x47e5: { name: 'contentSigAlgo ', value: DataType.uint },
|
|
153
|
+
0x47e6: { name: 'contentSigHashAlgo ', value: DataType.uint }
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
0x6264: { name: 'bitDepth', value: DataType.uint }
|
|
157
|
+
}
|
|
152
158
|
}
|
|
153
159
|
}
|
|
154
160
|
}
|
|
155
161
|
}
|
|
156
162
|
}
|
|
157
163
|
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
|
|
164
|
+
},
|
|
165
|
+
// Cueing Data
|
|
166
|
+
0x1c53bb6b: {
|
|
167
|
+
name: 'cues',
|
|
168
|
+
container: {
|
|
169
|
+
0xbb: {
|
|
170
|
+
name: 'cuePoint',
|
|
171
|
+
container: {
|
|
172
|
+
0xb3: { name: 'cueTime', value: DataType.uid },
|
|
173
|
+
0xb7: {
|
|
174
|
+
name: 'positions',
|
|
175
|
+
container: {
|
|
176
|
+
0xf7: { name: 'track', value: DataType.uint },
|
|
177
|
+
0xf1: { name: 'clusterPosition', value: DataType.uint },
|
|
178
|
+
0x5378: { name: 'blockNumber', value: DataType.uint },
|
|
179
|
+
0xea: { name: 'codecState', value: DataType.uint },
|
|
180
|
+
0xdb: {
|
|
181
|
+
name: 'reference', container: {
|
|
182
|
+
0x96: { name: 'time', value: DataType.uint },
|
|
183
|
+
0x97: { name: 'cluster', value: DataType.uint },
|
|
184
|
+
0x535f: { name: 'number', value: DataType.uint },
|
|
185
|
+
0xeb: { name: 'codecState', value: DataType.uint }
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
0xf0: { name: 'relativePosition', value: DataType.uint } // extended
|
|
189
|
+
}
|
|
184
190
|
}
|
|
185
191
|
}
|
|
186
192
|
}
|
|
187
193
|
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
194
|
+
},
|
|
195
|
+
// Attachment
|
|
196
|
+
0x1941a469: {
|
|
197
|
+
name: 'attachments',
|
|
198
|
+
container: {
|
|
199
|
+
0x61a7: {
|
|
200
|
+
name: 'attachedFiles',
|
|
201
|
+
multiple: true,
|
|
202
|
+
container: {
|
|
203
|
+
0x467e: { name: 'description', value: DataType.string },
|
|
204
|
+
0x466e: { name: 'name', value: DataType.string },
|
|
205
|
+
0x4660: { name: 'mimeType', value: DataType.string },
|
|
206
|
+
0x465c: { name: 'data', value: DataType.binary },
|
|
207
|
+
0x46ae: { name: 'uid', value: DataType.uid }
|
|
208
|
+
}
|
|
203
209
|
}
|
|
204
210
|
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
211
|
+
},
|
|
212
|
+
// Chapters
|
|
213
|
+
0x1043a770: {
|
|
214
|
+
name: 'chapters',
|
|
215
|
+
container: {
|
|
216
|
+
0x45b9: {
|
|
217
|
+
name: 'editionEntry',
|
|
218
|
+
container: {
|
|
219
|
+
0xb6: {
|
|
220
|
+
name: 'chapterAtom',
|
|
221
|
+
container: {
|
|
222
|
+
0x73c4: { name: 'uid', value: DataType.uid },
|
|
223
|
+
0x91: { name: 'timeStart', value: DataType.uint },
|
|
224
|
+
0x92: { name: 'timeEnd', value: DataType.uid },
|
|
225
|
+
0x98: { name: 'hidden', value: DataType.bool },
|
|
226
|
+
0x4598: { name: 'enabled', value: DataType.uid },
|
|
227
|
+
0x8f: {
|
|
228
|
+
name: 'track', container: {
|
|
229
|
+
0x89: { name: 'trackNumber', value: DataType.uid },
|
|
230
|
+
0x80: {
|
|
231
|
+
name: 'display', container: {
|
|
232
|
+
0x85: { name: 'string', value: DataType.string },
|
|
233
|
+
0x437c: { name: 'language ', value: DataType.string },
|
|
234
|
+
0x437e: { name: 'country ', value: DataType.string }
|
|
235
|
+
}
|
|
229
236
|
}
|
|
230
237
|
}
|
|
231
238
|
}
|
|
@@ -234,37 +241,37 @@ export const elements = {
|
|
|
234
241
|
}
|
|
235
242
|
}
|
|
236
243
|
}
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
244
|
+
},
|
|
245
|
+
// Tagging
|
|
246
|
+
0x1254c367: {
|
|
247
|
+
name: 'tags',
|
|
248
|
+
container: {
|
|
249
|
+
0x7373: {
|
|
250
|
+
name: 'tag',
|
|
251
|
+
multiple: true,
|
|
252
|
+
container: {
|
|
253
|
+
0x63c0: {
|
|
254
|
+
name: 'target',
|
|
255
|
+
container: {
|
|
256
|
+
0x63c5: { name: 'tagTrackUID', value: DataType.uid },
|
|
257
|
+
0x63c4: { name: 'tagChapterUID', value: DataType.uint },
|
|
258
|
+
0x63c6: { name: 'tagAttachmentUID', value: DataType.uid },
|
|
259
|
+
0x63ca: { name: 'targetType', value: DataType.string }, // extended
|
|
260
|
+
0x68ca: { name: 'targetTypeValue', value: DataType.uint }, // extended
|
|
261
|
+
0x63c9: { name: 'tagEditionUID', value: DataType.uid } // extended
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
0x67c8: {
|
|
265
|
+
name: 'simpleTags',
|
|
266
|
+
multiple: true,
|
|
267
|
+
container: {
|
|
268
|
+
0x45a3: { name: 'name', value: DataType.string },
|
|
269
|
+
0x4487: { name: 'string', value: DataType.string },
|
|
270
|
+
0x4485: { name: 'binary', value: DataType.binary },
|
|
271
|
+
0x447a: { name: 'language', value: DataType.string }, // extended
|
|
272
|
+
0x447b: { name: 'languageIETF', value: DataType.string }, // extended
|
|
273
|
+
0x4484: { name: 'default', value: DataType.bool } // extended
|
|
274
|
+
}
|
|
268
275
|
}
|
|
269
276
|
}
|
|
270
277
|
}
|
|
@@ -274,3 +281,4 @@ export const elements = {
|
|
|
274
281
|
}
|
|
275
282
|
}
|
|
276
283
|
};
|
|
284
|
+
//# sourceMappingURL=MatroskaDtd.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ITokenizer } from 'strtok3';
|
|
2
|
-
import { INativeMetadataCollector } from '../common/MetadataCollector.js';
|
|
2
|
+
import type { INativeMetadataCollector } from '../common/MetadataCollector.js';
|
|
3
3
|
import { BasicParser } from '../common/BasicParser.js';
|
|
4
|
-
import { IOptions } from '../type.js';
|
|
5
|
-
import { ITokenParser } from '../ParserFactory.js';
|
|
4
|
+
import type { IOptions } from '../type.js';
|
|
5
|
+
import type { ITokenParser } from '../ParserFactory.js';
|
|
6
6
|
/**
|
|
7
7
|
* Extensible Binary Meta Language (EBML) parser
|
|
8
8
|
* https://en.wikipedia.org/wiki/Extensible_Binary_Meta_Language
|
|
@@ -11,11 +11,13 @@ import { ITokenParser } from '../ParserFactory.js';
|
|
|
11
11
|
* WEBM VP8 AUDIO FILE
|
|
12
12
|
*/
|
|
13
13
|
export declare class MatroskaParser extends BasicParser {
|
|
14
|
-
private
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
private seekHead;
|
|
15
|
+
private seekHeadOffset;
|
|
16
|
+
/**
|
|
17
|
+
* Use index to skip multiple segment/cluster elements at once.
|
|
18
|
+
* Significant performance impact
|
|
19
|
+
*/
|
|
20
|
+
private flagUseIndexToSkipClusters;
|
|
19
21
|
/**
|
|
20
22
|
* Initialize parser with output (metadata), input (tokenizer) & parsing options (options).
|
|
21
23
|
* @param {INativeMetadataCollector} metadata Output
|
|
@@ -24,21 +26,5 @@ export declare class MatroskaParser extends BasicParser {
|
|
|
24
26
|
*/
|
|
25
27
|
init(metadata: INativeMetadataCollector, tokenizer: ITokenizer, options: IOptions): ITokenParser;
|
|
26
28
|
parse(): Promise<void>;
|
|
27
|
-
private parseContainer;
|
|
28
|
-
private readVintData;
|
|
29
|
-
private readElement;
|
|
30
|
-
private readFloat;
|
|
31
|
-
private readFlag;
|
|
32
|
-
private readUint;
|
|
33
|
-
private readString;
|
|
34
|
-
private readBuffer;
|
|
35
29
|
private addTag;
|
|
36
|
-
private static readUIntBE;
|
|
37
|
-
/**
|
|
38
|
-
* Reeds an unsigned integer from a big endian buffer of length `len`
|
|
39
|
-
* @param buf Buffer to decode from
|
|
40
|
-
* @param len Number of bytes
|
|
41
|
-
* @private
|
|
42
|
-
*/
|
|
43
|
-
private static readUIntBeAsBigInt;
|
|
44
30
|
}
|