@dragon708/docmind-markdown 1.2.5 → 1.2.6

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.
Files changed (321) hide show
  1. package/node_modules/music-metadata/LICENSE.txt +3 -3
  2. package/node_modules/music-metadata/README.md +246 -690
  3. package/node_modules/music-metadata/lib/ParserFactory.d.ts +31 -27
  4. package/node_modules/music-metadata/lib/ParserFactory.js +219 -108
  5. package/node_modules/music-metadata/lib/aiff/AiffParser.d.ts +2 -2
  6. package/node_modules/music-metadata/lib/aiff/AiffParser.js +38 -34
  7. package/node_modules/music-metadata/lib/aiff/AiffTagMap.d.ts +1 -1
  8. package/node_modules/music-metadata/lib/aiff/AiffTagMap.js +7 -2
  9. package/node_modules/music-metadata/lib/aiff/AiffToken.d.ts +6 -32
  10. package/node_modules/music-metadata/lib/aiff/AiffToken.js +17 -27
  11. package/node_modules/music-metadata/lib/apev2/APEv2Parser.d.ts +8 -24
  12. package/node_modules/music-metadata/lib/apev2/APEv2Parser.js +66 -78
  13. package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.d.ts +1 -1
  14. package/node_modules/music-metadata/lib/apev2/APEv2TagMapper.js +8 -4
  15. package/node_modules/music-metadata/lib/apev2/APEv2Token.d.ts +11 -10
  16. package/node_modules/music-metadata/lib/apev2/APEv2Token.js +27 -16
  17. package/node_modules/music-metadata/lib/asf/AsfObject.d.ts +53 -59
  18. package/node_modules/music-metadata/lib/asf/AsfObject.js +131 -97
  19. package/node_modules/music-metadata/lib/asf/AsfParser.d.ts +1 -1
  20. package/node_modules/music-metadata/lib/asf/AsfParser.js +43 -42
  21. package/node_modules/music-metadata/lib/asf/AsfTagMapper.d.ts +2 -2
  22. package/node_modules/music-metadata/lib/asf/AsfTagMapper.js +10 -6
  23. package/node_modules/music-metadata/lib/asf/AsfUtil.d.ts +13 -4
  24. package/node_modules/music-metadata/lib/asf/AsfUtil.js +36 -30
  25. package/node_modules/music-metadata/lib/asf/GUID.d.ts +84 -0
  26. package/node_modules/music-metadata/lib/asf/GUID.js +121 -0
  27. package/node_modules/music-metadata/lib/common/BasicParser.d.ts +9 -9
  28. package/node_modules/music-metadata/lib/common/BasicParser.js +7 -2
  29. package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.d.ts +3 -3
  30. package/node_modules/music-metadata/lib/common/CaseInsensitiveTagMap.js +7 -2
  31. package/node_modules/music-metadata/lib/common/CombinedTagMapper.d.ts +5 -5
  32. package/node_modules/music-metadata/lib/common/CombinedTagMapper.js +28 -24
  33. package/node_modules/music-metadata/lib/common/FourCC.d.ts +1 -1
  34. package/node_modules/music-metadata/lib/common/FourCC.js +11 -10
  35. package/node_modules/music-metadata/lib/common/GenericTagMapper.d.ts +13 -13
  36. package/node_modules/music-metadata/lib/common/GenericTagMapper.js +12 -7
  37. package/node_modules/music-metadata/lib/common/GenericTagTypes.d.ts +6 -7
  38. package/node_modules/music-metadata/lib/common/GenericTagTypes.js +85 -86
  39. package/node_modules/music-metadata/lib/common/MetadataCollector.d.ts +10 -20
  40. package/node_modules/music-metadata/lib/common/MetadataCollector.js +69 -100
  41. package/node_modules/music-metadata/lib/common/RandomFileReader.d.ts +22 -0
  42. package/node_modules/music-metadata/lib/common/RandomFileReader.js +34 -0
  43. package/node_modules/music-metadata/lib/common/RandomUint8ArrayReader.d.ts +18 -0
  44. package/node_modules/music-metadata/lib/common/RandomUint8ArrayReader.js +25 -0
  45. package/node_modules/music-metadata/lib/common/Util.d.ts +12 -11
  46. package/node_modules/music-metadata/lib/common/Util.js +53 -47
  47. package/node_modules/music-metadata/lib/core.d.ts +15 -42
  48. package/node_modules/music-metadata/lib/core.js +38 -74
  49. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.d.ts +1 -16
  50. package/node_modules/music-metadata/lib/dsdiff/DsdiffParser.js +44 -55
  51. package/node_modules/music-metadata/lib/dsdiff/DsdiffToken.d.ts +3 -3
  52. package/node_modules/music-metadata/lib/dsdiff/DsdiffToken.js +7 -4
  53. package/node_modules/music-metadata/lib/dsf/DsfChunk.d.ts +10 -11
  54. package/node_modules/music-metadata/lib/dsf/DsfChunk.js +19 -15
  55. package/node_modules/music-metadata/lib/dsf/DsfParser.d.ts +1 -16
  56. package/node_modules/music-metadata/lib/dsf/DsfParser.js +20 -21
  57. package/node_modules/music-metadata/lib/flac/FlacParser.d.ts +15 -16
  58. package/node_modules/music-metadata/lib/flac/FlacParser.js +119 -69
  59. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.d.ts +3 -7
  60. package/node_modules/music-metadata/lib/id3v1/ID3v1Parser.js +36 -39
  61. package/node_modules/music-metadata/lib/id3v1/ID3v1TagMap.d.ts +1 -1
  62. package/node_modules/music-metadata/lib/id3v1/ID3v1TagMap.js +7 -2
  63. package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.d.ts +2 -2
  64. package/node_modules/music-metadata/lib/id3v2/AbstractID3Parser.js +19 -15
  65. package/node_modules/music-metadata/lib/id3v2/FrameParser.d.ts +3 -64
  66. package/node_modules/music-metadata/lib/id3v2/FrameParser.js +103 -244
  67. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.d.ts +2 -2
  68. package/node_modules/music-metadata/lib/id3v2/ID3v22TagMapper.js +16 -6
  69. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.d.ts +5 -5
  70. package/node_modules/music-metadata/lib/id3v2/ID3v24TagMapper.js +35 -36
  71. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.d.ts +6 -11
  72. package/node_modules/music-metadata/lib/id3v2/ID3v2Parser.js +104 -91
  73. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.d.ts +29 -67
  74. package/node_modules/music-metadata/lib/id3v2/ID3v2Token.js +36 -76
  75. package/node_modules/music-metadata/lib/iff/index.d.ts +1 -1
  76. package/node_modules/music-metadata/lib/iff/index.js +7 -4
  77. package/node_modules/music-metadata/lib/index.d.ts +31 -8
  78. package/node_modules/music-metadata/lib/index.js +53 -32
  79. package/node_modules/music-metadata/lib/lyrics3/Lyrics3.d.ts +2 -2
  80. package/node_modules/music-metadata/lib/lyrics3/Lyrics3.js +13 -13
  81. package/node_modules/music-metadata/lib/matroska/MatroskaDtd.d.ts +2 -2
  82. package/node_modules/music-metadata/lib/matroska/MatroskaDtd.js +242 -246
  83. package/node_modules/music-metadata/lib/matroska/MatroskaParser.d.ts +24 -6
  84. package/node_modules/music-metadata/lib/matroska/MatroskaParser.js +218 -124
  85. package/node_modules/music-metadata/lib/matroska/MatroskaTagMapper.d.ts +1 -1
  86. package/node_modules/music-metadata/lib/matroska/MatroskaTagMapper.js +7 -3
  87. package/node_modules/music-metadata/lib/matroska/types.d.ts +76 -43
  88. package/node_modules/music-metadata/lib/matroska/types.js +33 -27
  89. package/node_modules/music-metadata/lib/mp4/Atom.d.ts +7 -7
  90. package/node_modules/music-metadata/lib/mp4/Atom.js +22 -15
  91. package/node_modules/music-metadata/lib/mp4/AtomToken.d.ts +18 -110
  92. package/node_modules/music-metadata/lib/mp4/AtomToken.js +66 -184
  93. package/node_modules/music-metadata/lib/mp4/MP4Parser.d.ts +4 -6
  94. package/node_modules/music-metadata/lib/mp4/MP4Parser.js +128 -255
  95. package/node_modules/music-metadata/lib/mp4/MP4TagMapper.d.ts +4 -4
  96. package/node_modules/music-metadata/lib/mp4/MP4TagMapper.js +12 -8
  97. package/node_modules/music-metadata/lib/mpeg/ExtendedLameHeader.d.ts +5 -5
  98. package/node_modules/music-metadata/lib/mpeg/ExtendedLameHeader.js +10 -7
  99. package/node_modules/music-metadata/lib/mpeg/MpegParser.d.ts +4 -17
  100. package/node_modules/music-metadata/lib/mpeg/MpegParser.js +131 -176
  101. package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.d.ts +14 -16
  102. package/node_modules/music-metadata/lib/mpeg/ReplayGainDataFormat.js +19 -14
  103. package/node_modules/music-metadata/lib/mpeg/XingTag.d.ts +7 -6
  104. package/node_modules/music-metadata/lib/mpeg/XingTag.js +18 -14
  105. package/node_modules/music-metadata/lib/musepack/index.d.ts +5 -0
  106. package/node_modules/music-metadata/lib/musepack/index.js +32 -0
  107. package/node_modules/music-metadata/lib/musepack/sv7/BitReader.d.ts +2 -2
  108. package/node_modules/music-metadata/lib/musepack/sv7/BitReader.js +24 -16
  109. package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.d.ts +1 -1
  110. package/node_modules/music-metadata/lib/musepack/sv7/MpcSv7Parser.js +15 -16
  111. package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.d.ts +1 -1
  112. package/node_modules/music-metadata/lib/musepack/sv7/StreamVersion7.js +7 -5
  113. package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.d.ts +1 -1
  114. package/node_modules/music-metadata/lib/musepack/sv8/MpcSv8Parser.js +17 -18
  115. package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.d.ts +3 -5
  116. package/node_modules/music-metadata/lib/musepack/sv8/StreamVersion8.js +12 -14
  117. package/node_modules/music-metadata/lib/ogg/{OggToken.d.ts → Ogg.d.ts} +6 -17
  118. package/node_modules/music-metadata/lib/ogg/Ogg.js +2 -0
  119. package/node_modules/music-metadata/lib/ogg/OggParser.d.ts +12 -16
  120. package/node_modules/music-metadata/lib/ogg/OggParser.js +102 -101
  121. package/node_modules/music-metadata/lib/ogg/opus/Opus.d.ts +2 -17
  122. package/node_modules/music-metadata/lib/ogg/opus/Opus.js +14 -13
  123. package/node_modules/music-metadata/lib/ogg/opus/OpusParser.d.ts +25 -0
  124. package/node_modules/music-metadata/lib/ogg/opus/{OpusStream.js → OpusParser.js} +18 -18
  125. package/node_modules/music-metadata/lib/ogg/speex/Speex.d.ts +1 -1
  126. package/node_modules/music-metadata/lib/ogg/speex/Speex.js +19 -16
  127. package/node_modules/music-metadata/lib/ogg/speex/SpeexParser.d.ts +22 -0
  128. package/node_modules/music-metadata/lib/ogg/speex/{SpeexStream.js → SpeexParser.js} +13 -9
  129. package/node_modules/music-metadata/lib/ogg/theora/Theora.d.ts +1 -1
  130. package/node_modules/music-metadata/lib/ogg/theora/Theora.js +11 -8
  131. package/node_modules/music-metadata/lib/ogg/theora/TheoraParser.d.ts +28 -0
  132. package/node_modules/music-metadata/lib/ogg/theora/TheoraParser.js +44 -0
  133. package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.d.ts +7 -6
  134. package/node_modules/music-metadata/lib/ogg/vorbis/Vorbis.js +29 -34
  135. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.d.ts +1 -1
  136. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisDecoder.js +9 -6
  137. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisParser.d.ts +36 -0
  138. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisParser.js +128 -0
  139. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.d.ts +3 -3
  140. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisTagMapper.js +9 -5
  141. package/node_modules/music-metadata/lib/riff/RiffChunk.d.ts +5 -5
  142. package/node_modules/music-metadata/lib/riff/RiffChunk.js +9 -5
  143. package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.d.ts +2 -2
  144. package/node_modules/music-metadata/lib/riff/RiffInfoTagMap.js +25 -20
  145. package/node_modules/music-metadata/lib/type.d.ts +52 -121
  146. package/node_modules/music-metadata/lib/type.js +6 -2
  147. package/node_modules/music-metadata/lib/wav/BwfChunk.d.ts +1 -1
  148. package/node_modules/music-metadata/lib/wav/BwfChunk.js +11 -8
  149. package/node_modules/music-metadata/lib/wav/WaveChunk.d.ts +20 -50
  150. package/node_modules/music-metadata/lib/wav/WaveChunk.js +32 -45
  151. package/node_modules/music-metadata/lib/wav/WaveParser.d.ts +2 -2
  152. package/node_modules/music-metadata/lib/wav/WaveParser.js +39 -46
  153. package/node_modules/music-metadata/lib/wavpack/WavPackParser.d.ts +2 -18
  154. package/node_modules/music-metadata/lib/wavpack/WavPackParser.js +32 -42
  155. package/node_modules/music-metadata/lib/wavpack/WavPackToken.d.ts +18 -14
  156. package/node_modules/music-metadata/lib/wavpack/WavPackToken.js +30 -24
  157. package/node_modules/music-metadata/package.json +74 -81
  158. package/package.json +1 -5
  159. package/node_modules/@borewit/text-codec/LICENSE.txt +0 -9
  160. package/node_modules/@borewit/text-codec/README.md +0 -87
  161. package/node_modules/@borewit/text-codec/lib/index.d.ts +0 -6
  162. package/node_modules/@borewit/text-codec/lib/index.js +0 -380
  163. package/node_modules/@borewit/text-codec/package.json +0 -70
  164. package/node_modules/music-metadata/lib/ParseError.d.ts +0 -87
  165. package/node_modules/music-metadata/lib/ParseError.js +0 -38
  166. package/node_modules/music-metadata/lib/aiff/AiffLoader.d.ts +0 -2
  167. package/node_modules/music-metadata/lib/aiff/AiffLoader.js +0 -8
  168. package/node_modules/music-metadata/lib/apev2/Apev2Loader.d.ts +0 -2
  169. package/node_modules/music-metadata/lib/apev2/Apev2Loader.js +0 -8
  170. package/node_modules/music-metadata/lib/asf/AsfGuid.d.ts +0 -83
  171. package/node_modules/music-metadata/lib/asf/AsfGuid.js +0 -109
  172. package/node_modules/music-metadata/lib/asf/AsfLoader.d.ts +0 -2
  173. package/node_modules/music-metadata/lib/asf/AsfLoader.js +0 -8
  174. package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.d.ts +0 -2
  175. package/node_modules/music-metadata/lib/dsdiff/DsdiffLoader.js +0 -8
  176. package/node_modules/music-metadata/lib/dsf/DsfLoader.d.ts +0 -2
  177. package/node_modules/music-metadata/lib/dsf/DsfLoader.js +0 -8
  178. package/node_modules/music-metadata/lib/ebml/EbmlIterator.d.ts +0 -67
  179. package/node_modules/music-metadata/lib/ebml/EbmlIterator.js +0 -218
  180. package/node_modules/music-metadata/lib/ebml/types.d.ts +0 -37
  181. package/node_modules/music-metadata/lib/ebml/types.js +0 -8
  182. package/node_modules/music-metadata/lib/flac/FlacLoader.d.ts +0 -2
  183. package/node_modules/music-metadata/lib/flac/FlacLoader.js +0 -8
  184. package/node_modules/music-metadata/lib/flac/FlacToken.d.ts +0 -45
  185. package/node_modules/music-metadata/lib/flac/FlacToken.js +0 -63
  186. package/node_modules/music-metadata/lib/id3v2/FrameHeader.d.ts +0 -31
  187. package/node_modules/music-metadata/lib/id3v2/FrameHeader.js +0 -73
  188. package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.d.ts +0 -11
  189. package/node_modules/music-metadata/lib/id3v2/ID3v2ChapterToken.js +0 -17
  190. package/node_modules/music-metadata/lib/lrc/LyricsParser.d.ts +0 -9
  191. package/node_modules/music-metadata/lib/lrc/LyricsParser.js +0 -45
  192. package/node_modules/music-metadata/lib/matroska/MatroskaLoader.d.ts +0 -2
  193. package/node_modules/music-metadata/lib/matroska/MatroskaLoader.js +0 -8
  194. package/node_modules/music-metadata/lib/mp4/Mp4Loader.d.ts +0 -2
  195. package/node_modules/music-metadata/lib/mp4/Mp4Loader.js +0 -8
  196. package/node_modules/music-metadata/lib/mpeg/MpegLoader.d.ts +0 -2
  197. package/node_modules/music-metadata/lib/mpeg/MpegLoader.js +0 -8
  198. package/node_modules/music-metadata/lib/musepack/MusepackConentError.d.ts +0 -15
  199. package/node_modules/music-metadata/lib/musepack/MusepackConentError.js +0 -3
  200. package/node_modules/music-metadata/lib/musepack/MusepackLoader.d.ts +0 -2
  201. package/node_modules/music-metadata/lib/musepack/MusepackLoader.js +0 -8
  202. package/node_modules/music-metadata/lib/musepack/MusepackParser.d.ts +0 -4
  203. package/node_modules/music-metadata/lib/musepack/MusepackParser.js +0 -30
  204. package/node_modules/music-metadata/lib/ogg/OggLoader.d.ts +0 -2
  205. package/node_modules/music-metadata/lib/ogg/OggLoader.js +0 -8
  206. package/node_modules/music-metadata/lib/ogg/OggToken.js +0 -41
  207. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.d.ts +0 -29
  208. package/node_modules/music-metadata/lib/ogg/flac/FlacStream.js +0 -74
  209. package/node_modules/music-metadata/lib/ogg/opus/OpusStream.d.ts +0 -24
  210. package/node_modules/music-metadata/lib/ogg/speex/SpeexStream.d.ts +0 -20
  211. package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.d.ts +0 -25
  212. package/node_modules/music-metadata/lib/ogg/theora/TheoraStream.js +0 -39
  213. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.d.ts +0 -53
  214. package/node_modules/music-metadata/lib/ogg/vorbis/VorbisStream.js +0 -136
  215. package/node_modules/music-metadata/lib/wav/WaveLoader.d.ts +0 -2
  216. package/node_modules/music-metadata/lib/wav/WaveLoader.js +0 -8
  217. package/node_modules/music-metadata/lib/wavpack/WavPackLoader.d.ts +0 -2
  218. package/node_modules/music-metadata/lib/wavpack/WavPackLoader.js +0 -8
  219. package/node_modules/music-metadata/node_modules/file-type/core.d.ts +0 -253
  220. package/node_modules/music-metadata/node_modules/file-type/core.js +0 -2899
  221. package/node_modules/music-metadata/node_modules/file-type/index.d.ts +0 -98
  222. package/node_modules/music-metadata/node_modules/file-type/index.js +0 -163
  223. package/node_modules/music-metadata/node_modules/file-type/license +0 -9
  224. package/node_modules/music-metadata/node_modules/file-type/package.json +0 -290
  225. package/node_modules/music-metadata/node_modules/file-type/readme.md +0 -667
  226. package/node_modules/music-metadata/node_modules/file-type/supported.js +0 -360
  227. package/node_modules/music-metadata/node_modules/file-type/util.js +0 -60
  228. package/node_modules/music-metadata/node_modules/strtok3/LICENSE.txt +0 -21
  229. package/node_modules/music-metadata/node_modules/strtok3/README.md +0 -399
  230. package/node_modules/music-metadata/node_modules/strtok3/lib/AbstractTokenizer.d.ts +0 -76
  231. package/node_modules/music-metadata/node_modules/strtok3/lib/AbstractTokenizer.js +0 -111
  232. package/node_modules/music-metadata/node_modules/strtok3/lib/BlobTokenizer.d.ts +0 -29
  233. package/node_modules/music-metadata/node_modules/strtok3/lib/BlobTokenizer.js +0 -53
  234. package/node_modules/music-metadata/node_modules/strtok3/lib/BufferTokenizer.d.ts +0 -29
  235. package/node_modules/music-metadata/node_modules/strtok3/lib/BufferTokenizer.js +0 -52
  236. package/node_modules/music-metadata/node_modules/strtok3/lib/FileTokenizer.d.ts +0 -37
  237. package/node_modules/music-metadata/node_modules/strtok3/lib/FileTokenizer.js +0 -61
  238. package/node_modules/music-metadata/node_modules/strtok3/lib/ReadStreamTokenizer.d.ts +0 -34
  239. package/node_modules/music-metadata/node_modules/strtok3/lib/ReadStreamTokenizer.js +0 -107
  240. package/node_modules/music-metadata/node_modules/strtok3/lib/core.d.ts +0 -40
  241. package/node_modules/music-metadata/node_modules/strtok3/lib/core.js +0 -62
  242. package/node_modules/music-metadata/node_modules/strtok3/lib/index.d.ts +0 -16
  243. package/node_modules/music-metadata/node_modules/strtok3/lib/index.js +0 -22
  244. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/AbstractStreamReader.d.ts +0 -54
  245. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/AbstractStreamReader.js +0 -71
  246. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Deferred.d.ts +0 -6
  247. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Deferred.js +0 -10
  248. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Errors.d.ts +0 -10
  249. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/Errors.js +0 -16
  250. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/StreamReader.d.ts +0 -29
  251. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/StreamReader.js +0 -83
  252. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamByobReader.d.ts +0 -14
  253. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamByobReader.js +0 -27
  254. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamDefaultReader.d.ts +0 -19
  255. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamDefaultReader.js +0 -62
  256. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReader.d.ts +0 -14
  257. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReader.js +0 -13
  258. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReaderFactory.d.ts +0 -5
  259. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/WebStreamReaderFactory.js +0 -19
  260. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/index.d.ts +0 -6
  261. package/node_modules/music-metadata/node_modules/strtok3/lib/stream/index.js +0 -5
  262. package/node_modules/music-metadata/node_modules/strtok3/lib/types.d.ts +0 -139
  263. package/node_modules/music-metadata/node_modules/strtok3/lib/types.js +0 -1
  264. package/node_modules/music-metadata/node_modules/strtok3/package.json +0 -94
  265. package/node_modules/music-metadata/node_modules/token-types/LICENSE.txt +0 -9
  266. package/node_modules/music-metadata/node_modules/token-types/README.md +0 -120
  267. package/node_modules/music-metadata/node_modules/token-types/lib/index.d.ts +0 -135
  268. package/node_modules/music-metadata/node_modules/token-types/lib/index.js +0 -401
  269. package/node_modules/music-metadata/node_modules/token-types/package.json +0 -81
  270. package/node_modules/sprintf-js/.npmignore +0 -1
  271. package/node_modules/sprintf-js/LICENSE +0 -24
  272. package/node_modules/sprintf-js/README.md +0 -88
  273. package/node_modules/sprintf-js/bower.json +0 -14
  274. package/node_modules/sprintf-js/demo/angular.html +0 -20
  275. package/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
  276. package/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
  277. package/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
  278. package/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
  279. package/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
  280. package/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
  281. package/node_modules/sprintf-js/gruntfile.js +0 -36
  282. package/node_modules/sprintf-js/package.json +0 -22
  283. package/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
  284. package/node_modules/sprintf-js/src/sprintf.js +0 -208
  285. package/node_modules/sprintf-js/test/test.js +0 -82
  286. package/node_modules/uint8array-extras/index.d.ts +0 -331
  287. package/node_modules/uint8array-extras/index.js +0 -318
  288. package/node_modules/uint8array-extras/license +0 -9
  289. package/node_modules/uint8array-extras/package.json +0 -54
  290. package/node_modules/uint8array-extras/readme.md +0 -318
  291. package/node_modules/win-guid/LICENSE.txt +0 -9
  292. package/node_modules/win-guid/README.md +0 -113
  293. package/node_modules/win-guid/lib/guid.d.ts +0 -20
  294. package/node_modules/win-guid/lib/guid.js +0 -107
  295. package/node_modules/win-guid/package.json +0 -55
  296. /package/node_modules/{argparse → mammoth/node_modules/argparse}/LICENSE +0 -0
  297. /package/node_modules/{argparse → mammoth/node_modules/argparse}/README.md +0 -0
  298. /package/node_modules/{argparse → mammoth/node_modules/argparse}/index.js +0 -0
  299. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/append/constant.js +0 -0
  300. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/append.js +0 -0
  301. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/count.js +0 -0
  302. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/help.js +0 -0
  303. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store/constant.js +0 -0
  304. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store/false.js +0 -0
  305. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store/true.js +0 -0
  306. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/store.js +0 -0
  307. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/subparsers.js +0 -0
  308. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action/version.js +0 -0
  309. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action.js +0 -0
  310. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/action_container.js +0 -0
  311. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argparse.js +0 -0
  312. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument/error.js +0 -0
  313. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument/exclusive.js +0 -0
  314. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument/group.js +0 -0
  315. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/argument_parser.js +0 -0
  316. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/const.js +0 -0
  317. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/help/added_formatters.js +0 -0
  318. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/help/formatter.js +0 -0
  319. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/namespace.js +0 -0
  320. /package/node_modules/{argparse → mammoth/node_modules/argparse}/lib/utils.js +0 -0
  321. /package/node_modules/{argparse → mammoth/node_modules/argparse}/package.json +0 -0
@@ -1,32 +1,39 @@
1
- import * as Token from 'token-types';
2
- import initDebug from 'debug';
3
- import { FourCcToken } from '../common/FourCC.js';
4
- import { makeUnexpectedFileContentError } from '../ParseError.js';
5
- import * as util from '../common/Util.js';
6
- const debug = initDebug('music-metadata:parser:MP4:atom');
7
- export class Mp4ContentError extends makeUnexpectedFileContentError('MP4') {
8
- }
9
- export const Header = {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChapterText = exports.StcoAtom = exports.StszAtom = exports.StscAtom = exports.SampleToChunkToken = exports.SttsAtom = exports.TimeToSampleToken = exports.SoundSampleDescriptionV0 = exports.SoundSampleDescriptionVersion = exports.StsdAtom = exports.TrackHeaderAtom = exports.NameAtom = exports.DataAtom = exports.MvhdAtom = exports.MdhdAtom = exports.FixedLengthAtom = exports.mhdr = exports.tkhd = exports.ftyp = exports.ExtendedSize = exports.Header = void 0;
4
+ const Token = require("token-types");
5
+ const debug_1 = require("debug");
6
+ const FourCC_1 = require("../common/FourCC");
7
+ const debug = (0, debug_1.default)('music-metadata:parser:MP4:atom');
8
+ exports.Header = {
10
9
  len: 8,
11
10
  get: (buf, off) => {
12
11
  const length = Token.UINT32_BE.get(buf, off);
13
12
  if (length < 0)
14
- throw new Mp4ContentError('Invalid atom header length');
13
+ throw new Error('Invalid atom header length');
15
14
  return {
16
15
  length: BigInt(length),
17
- name: new Token.StringType(4, 'latin1').get(buf, off + 4)
16
+ name: new Token.StringType(4, 'binary').get(buf, off + 4)
18
17
  };
19
18
  },
20
19
  put: (buf, off, hdr) => {
21
20
  Token.UINT32_BE.put(buf, off, Number(hdr.length));
22
- return FourCcToken.put(buf, off + 4, hdr.name);
21
+ return FourCC_1.FourCcToken.put(buf, off + 4, hdr.name);
23
22
  }
24
23
  };
25
24
  /**
26
25
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap1/qtff1.html#//apple_ref/doc/uid/TP40000939-CH203-38190
27
26
  */
28
- export const ExtendedSize = Token.UINT64_BE;
29
- export const ftyp = {
27
+ exports.ExtendedSize = Token.UINT64_BE;
28
+ exports.ftyp = {
29
+ len: 4,
30
+ get: (buf, off) => {
31
+ return {
32
+ type: new Token.StringType(4, 'ascii').get(buf, off)
33
+ };
34
+ }
35
+ };
36
+ exports.tkhd = {
30
37
  len: 4,
31
38
  get: (buf, off) => {
32
39
  return {
@@ -37,7 +44,7 @@ export const ftyp = {
37
44
  /**
38
45
  * Token: Movie Header Atom
39
46
  */
40
- export const mhdr = {
47
+ exports.mhdr = {
41
48
  len: 8,
42
49
  get: (buf, off) => {
43
50
  return {
@@ -52,23 +59,23 @@ export const mhdr = {
52
59
  * In some cases these atoms are longer then the sum of the described fields.
53
60
  * Issue: https://github.com/Borewit/music-metadata/issues/120
54
61
  */
55
- export class FixedLengthAtom {
62
+ class FixedLengthAtom {
56
63
  /**
57
64
  *
58
65
  * @param {number} len Length as specified in the size field
59
66
  * @param {number} expLen Total length of sum of specified fields in the standard
60
- * @param atomId Atom ID
61
67
  */
62
68
  constructor(len, expLen, atomId) {
69
+ this.len = len;
63
70
  if (len < expLen) {
64
- throw new Mp4ContentError(`Atom ${atomId} expected to be ${expLen}, but specifies ${len} bytes long.`);
71
+ throw new Error(`Atom ${atomId} expected to be ${expLen}, but specifies ${len} bytes long.`);
65
72
  }
66
- if (len > expLen) {
73
+ else if (len > expLen) {
67
74
  debug(`Warning: atom ${atomId} expected to be ${expLen}, but was actually ${len} bytes long.`);
68
75
  }
69
- this.len = len;
70
76
  }
71
77
  }
78
+ exports.FixedLengthAtom = FixedLengthAtom;
72
79
  /**
73
80
  * Timestamp stored in seconds since Mac Epoch (1 January 1904)
74
81
  */
@@ -85,9 +92,10 @@ const SecondsSinceMacEpoch = {
85
92
  * - https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-SW34
86
93
  * - https://wiki.multimedia.cx/index.php/QuickTime_container#mdhd
87
94
  */
88
- export class MdhdAtom extends FixedLengthAtom {
95
+ class MdhdAtom extends FixedLengthAtom {
89
96
  constructor(len) {
90
97
  super(len, 24, 'mdhd');
98
+ this.len = len;
91
99
  }
92
100
  get(buf, off) {
93
101
  return {
@@ -102,12 +110,14 @@ export class MdhdAtom extends FixedLengthAtom {
102
110
  };
103
111
  }
104
112
  }
113
+ exports.MdhdAtom = MdhdAtom;
105
114
  /**
106
115
  * Token: Movie Header Atom
107
116
  */
108
- export class MvhdAtom extends FixedLengthAtom {
117
+ class MvhdAtom extends FixedLengthAtom {
109
118
  constructor(len) {
110
119
  super(len, 100, 'mvhd');
120
+ this.len = len;
111
121
  }
112
122
  get(buf, off) {
113
123
  return {
@@ -131,10 +141,11 @@ export class MvhdAtom extends FixedLengthAtom {
131
141
  };
132
142
  }
133
143
  }
144
+ exports.MvhdAtom = MvhdAtom;
134
145
  /**
135
146
  * Data Atom Structure
136
147
  */
137
- export class DataAtom {
148
+ class DataAtom {
138
149
  constructor(len) {
139
150
  this.len = len;
140
151
  }
@@ -145,15 +156,16 @@ export class DataAtom {
145
156
  type: Token.UINT24_BE.get(buf, off + 1)
146
157
  },
147
158
  locale: Token.UINT24_BE.get(buf, off + 4),
148
- value: new Token.Uint8ArrayType(this.len - 8).get(buf, off + 8)
159
+ value: Buffer.from(new Token.Uint8ArrayType(this.len - 8).get(buf, off + 8))
149
160
  };
150
161
  }
151
162
  }
163
+ exports.DataAtom = DataAtom;
152
164
  /**
153
165
  * Data Atom Structure
154
166
  * Ref: https://developer.apple.com/library/content/documentation/QuickTime/QTFF/Metadata/Metadata.html#//apple_ref/doc/uid/TP40000939-CH1-SW31
155
167
  */
156
- export class NameAtom {
168
+ class NameAtom {
157
169
  constructor(len) {
158
170
  this.len = len;
159
171
  }
@@ -165,11 +177,12 @@ export class NameAtom {
165
177
  };
166
178
  }
167
179
  }
180
+ exports.NameAtom = NameAtom;
168
181
  /**
169
- * Track Header Atoms structure (`tkhd`)
182
+ * Track Header Atoms structure
170
183
  * Ref: https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25550
171
184
  */
172
- export class TrackHeaderAtom {
185
+ class TrackHeaderAtom {
173
186
  constructor(len) {
174
187
  this.len = len;
175
188
  }
@@ -189,6 +202,7 @@ export class TrackHeaderAtom {
189
202
  };
190
203
  }
191
204
  }
205
+ exports.TrackHeaderAtom = TrackHeaderAtom;
192
206
  /**
193
207
  * Atom: Sample Description Atom ('stsd')
194
208
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25691
@@ -205,18 +219,17 @@ const stsdHeader = {
205
219
  };
206
220
  /**
207
221
  * Atom: Sample Description Atom ('stsd')
208
- * Ref: https://developer.apple.com/documentation/quicktime-file-format/sample_description_atom
222
+ * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25691
209
223
  */
210
224
  class SampleDescriptionTable {
211
225
  constructor(len) {
212
226
  this.len = len;
213
227
  }
214
228
  get(buf, off) {
215
- const descrLen = this.len - 12;
216
229
  return {
217
- dataFormat: FourCcToken.get(buf, off),
230
+ dataFormat: FourCC_1.FourCcToken.get(buf, off),
218
231
  dataReferenceIndex: Token.UINT16_BE.get(buf, off + 10),
219
- description: descrLen > 0 ? new Token.Uint8ArrayType(descrLen).get(buf, off + 12) : undefined
232
+ description: new Token.Uint8ArrayType(this.len - 12).get(buf, off + 12)
220
233
  };
221
234
  }
222
235
  }
@@ -224,7 +237,7 @@ class SampleDescriptionTable {
224
237
  * Atom: Sample-description Atom ('stsd')
225
238
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25691
226
239
  */
227
- export class StsdAtom {
240
+ class StsdAtom {
228
241
  constructor(len) {
229
242
  this.len = len;
230
243
  }
@@ -235,7 +248,7 @@ export class StsdAtom {
235
248
  for (let n = 0; n < header.numberOfEntries; ++n) {
236
249
  const size = Token.UINT32_BE.get(buf, off); // Sample description size
237
250
  off += Token.UINT32_BE.len;
238
- table.push(new SampleDescriptionTable(size - Token.UINT32_BE.len).get(buf, off));
251
+ table.push(new SampleDescriptionTable(size).get(buf, off));
239
252
  off += size;
240
253
  }
241
254
  return {
@@ -244,11 +257,12 @@ export class StsdAtom {
244
257
  };
245
258
  }
246
259
  }
260
+ exports.StsdAtom = StsdAtom;
247
261
  /**
248
262
  * Common Sound Sample Description (version & revision)
249
263
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-57317
250
264
  */
251
- export const SoundSampleDescriptionVersion = {
265
+ exports.SoundSampleDescriptionVersion = {
252
266
  len: 8,
253
267
  get(buf, off) {
254
268
  return {
@@ -262,7 +276,7 @@ export const SoundSampleDescriptionVersion = {
262
276
  * Sound Sample Description (Version 0)
263
277
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html#//apple_ref/doc/uid/TP40000939-CH205-130736
264
278
  */
265
- export const SoundSampleDescriptionV0 = {
279
+ exports.SoundSampleDescriptionV0 = {
266
280
  len: 12,
267
281
  get(buf, off) {
268
282
  return {
@@ -289,7 +303,7 @@ class SimpleTableAtom {
289
303
  };
290
304
  }
291
305
  }
292
- export const TimeToSampleToken = {
306
+ exports.TimeToSampleToken = {
293
307
  len: 8,
294
308
  get(buf, off) {
295
309
  return {
@@ -303,12 +317,14 @@ export const TimeToSampleToken = {
303
317
  * Store duration information for a media’s samples.
304
318
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25696
305
319
  */
306
- export class SttsAtom extends SimpleTableAtom {
320
+ class SttsAtom extends SimpleTableAtom {
307
321
  constructor(len) {
308
- super(len, TimeToSampleToken);
322
+ super(len, exports.TimeToSampleToken);
323
+ this.len = len;
309
324
  }
310
325
  }
311
- export const SampleToChunkToken = {
326
+ exports.SttsAtom = SttsAtom;
327
+ exports.SampleToChunkToken = {
312
328
  len: 12,
313
329
  get(buf, off) {
314
330
  return {
@@ -322,16 +338,18 @@ export const SampleToChunkToken = {
322
338
  * Sample-to-Chunk ('stsc') atom interface
323
339
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25706
324
340
  */
325
- export class StscAtom extends SimpleTableAtom {
341
+ class StscAtom extends SimpleTableAtom {
326
342
  constructor(len) {
327
- super(len, SampleToChunkToken);
343
+ super(len, exports.SampleToChunkToken);
344
+ this.len = len;
328
345
  }
329
346
  }
347
+ exports.StscAtom = StscAtom;
330
348
  /**
331
349
  * Sample-size ('stsz') atom
332
350
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25710
333
351
  */
334
- export class StszAtom {
352
+ class StszAtom {
335
353
  constructor(len) {
336
354
  this.len = len;
337
355
  }
@@ -346,20 +364,22 @@ export class StszAtom {
346
364
  };
347
365
  }
348
366
  }
367
+ exports.StszAtom = StszAtom;
349
368
  /**
350
369
  * Chunk offset atom, 'stco'
351
370
  * Ref: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-25715
352
371
  */
353
- export class StcoAtom extends SimpleTableAtom {
372
+ class StcoAtom extends SimpleTableAtom {
354
373
  constructor(len) {
355
374
  super(len, Token.INT32_BE);
356
375
  this.len = len;
357
376
  }
358
377
  }
378
+ exports.StcoAtom = StcoAtom;
359
379
  /**
360
380
  * Token used to decode text-track from 'mdat' atom (raw data stream)
361
381
  */
362
- export class ChapterText {
382
+ class ChapterText {
363
383
  constructor(len) {
364
384
  this.len = len;
365
385
  }
@@ -369,12 +389,13 @@ export class ChapterText {
369
389
  return str.get(buf, off + 2);
370
390
  }
371
391
  }
392
+ exports.ChapterText = ChapterText;
372
393
  function readTokenTable(buf, token, off, remainingLen, numberOfEntries) {
373
394
  debug(`remainingLen=${remainingLen}, numberOfEntries=${numberOfEntries} * token-len=${token.len}`);
374
395
  if (remainingLen === 0)
375
396
  return [];
376
397
  if (remainingLen !== numberOfEntries * token.len)
377
- throw new Mp4ContentError('mismatch number-of-entries with remaining atom-length');
398
+ throw new Error('mismatch number-of-entries with remaining atom-length');
378
399
  const entries = [];
379
400
  // parse offset-table
380
401
  for (let n = 0; n < numberOfEntries; ++n) {
@@ -383,142 +404,3 @@ function readTokenTable(buf, token, off, remainingLen, numberOfEntries) {
383
404
  }
384
405
  return entries;
385
406
  }
386
- /**
387
- * Sample-size ('tfhd') TrackFragmentHeaderBox
388
- */
389
- export class TrackFragmentHeaderBox {
390
- constructor(len) {
391
- this.len = len;
392
- }
393
- get(buf, off) {
394
- const flagOffset = off + 1;
395
- const header = {
396
- version: Token.INT8.get(buf, off),
397
- flags: {
398
- baseDataOffsetPresent: util.getBit(buf, flagOffset + 2, 0),
399
- sampleDescriptionIndexPresent: util.getBit(buf, flagOffset + 2, 1),
400
- defaultSampleDurationPresent: util.getBit(buf, flagOffset + 2, 3),
401
- defaultSampleSizePresent: util.getBit(buf, flagOffset + 2, 4),
402
- defaultSampleFlagsPresent: util.getBit(buf, flagOffset + 2, 5),
403
- defaultDurationIsEmpty: util.getBit(buf, flagOffset, 0),
404
- defaultBaseIsMoof: util.getBit(buf, flagOffset, 1)
405
- },
406
- trackId: Token.UINT32_BE.get(buf, 4)
407
- };
408
- let dynOffset = 8;
409
- if (header.flags.baseDataOffsetPresent) {
410
- header.baseDataOffset = Token.UINT64_BE.get(buf, dynOffset);
411
- dynOffset += 8;
412
- }
413
- if (header.flags.sampleDescriptionIndexPresent) {
414
- header.sampleDescriptionIndex = Token.UINT32_BE.get(buf, dynOffset);
415
- dynOffset += 4;
416
- }
417
- if (header.flags.defaultSampleDurationPresent) {
418
- header.defaultSampleDuration = Token.UINT32_BE.get(buf, dynOffset);
419
- dynOffset += 4;
420
- }
421
- if (header.flags.defaultSampleSizePresent) {
422
- header.defaultSampleSize = Token.UINT32_BE.get(buf, dynOffset);
423
- dynOffset += 4;
424
- }
425
- if (header.flags.defaultSampleFlagsPresent) {
426
- header.defaultSampleFlags = Token.UINT32_BE.get(buf, dynOffset);
427
- }
428
- return header;
429
- }
430
- }
431
- /**
432
- * Sample-size ('trun') TrackRunBox
433
- */
434
- export class TrackRunBox {
435
- constructor(len) {
436
- this.len = len;
437
- }
438
- get(buf, off) {
439
- const flagOffset = off + 1;
440
- const trun = {
441
- version: Token.INT8.get(buf, off),
442
- flags: {
443
- dataOffsetPresent: util.getBit(buf, flagOffset + 2, 0),
444
- firstSampleFlagsPresent: util.getBit(buf, flagOffset + 2, 2),
445
- sampleDurationPresent: util.getBit(buf, flagOffset + 1, 0),
446
- sampleSizePresent: util.getBit(buf, flagOffset + 1, 1),
447
- sampleFlagsPresent: util.getBit(buf, flagOffset + 1, 2),
448
- sampleCompositionTimeOffsetsPresent: util.getBit(buf, flagOffset + 1, 3)
449
- },
450
- sampleCount: Token.UINT32_BE.get(buf, off + 4),
451
- samples: []
452
- };
453
- let dynOffset = off + 8;
454
- if (trun.flags.dataOffsetPresent) {
455
- trun.dataOffset = Token.UINT32_BE.get(buf, dynOffset);
456
- dynOffset += 4;
457
- }
458
- if (trun.flags.firstSampleFlagsPresent) {
459
- trun.firstSampleFlags = Token.UINT32_BE.get(buf, dynOffset);
460
- dynOffset += 4;
461
- }
462
- for (let n = 0; n < trun.sampleCount; ++n) {
463
- if (dynOffset >= this.len) {
464
- debug("TrackRunBox size mismatch");
465
- break;
466
- }
467
- const sample = {};
468
- if (trun.flags.sampleDurationPresent) {
469
- sample.sampleDuration = Token.UINT32_BE.get(buf, dynOffset);
470
- dynOffset += 4;
471
- }
472
- if (trun.flags.sampleSizePresent) {
473
- sample.sampleSize = Token.UINT32_BE.get(buf, dynOffset);
474
- dynOffset += 4;
475
- }
476
- if (trun.flags.sampleFlagsPresent) {
477
- sample.sampleFlags = Token.UINT32_BE.get(buf, dynOffset);
478
- dynOffset += 4;
479
- }
480
- if (trun.flags.sampleCompositionTimeOffsetsPresent) {
481
- sample.sampleCompositionTimeOffset = Token.UINT32_BE.get(buf, dynOffset);
482
- dynOffset += 4;
483
- }
484
- trun.samples.push(sample);
485
- }
486
- return trun;
487
- }
488
- }
489
- /**
490
- * HandlerBox (`hdlr`)
491
- */
492
- export class HandlerBox {
493
- constructor(len) {
494
- this.len = len;
495
- }
496
- get(buf, off) {
497
- const _flagOffset = off + 1;
498
- const charTypeToken = new Token.StringType(4, 'utf-8');
499
- return {
500
- version: Token.INT8.get(buf, off),
501
- flags: Token.UINT24_BE.get(buf, off + 1),
502
- componentType: charTypeToken.get(buf, off + 4),
503
- handlerType: charTypeToken.get(buf, off + 8),
504
- componentName: new Token.StringType(this.len - 28, 'utf-8').get(buf, off + 28),
505
- };
506
- }
507
- }
508
- /**
509
- * Chapter Track Reference Box (`chap`)
510
- */
511
- export class ChapterTrackReferenceBox {
512
- constructor(len) {
513
- this.len = len;
514
- }
515
- get(buf, off) {
516
- let dynOffset = 0;
517
- const trackIds = [];
518
- while (dynOffset < this.len) {
519
- trackIds.push(Token.UINT32_BE.get(buf, off + dynOffset));
520
- dynOffset += 4;
521
- }
522
- return trackIds;
523
- }
524
- }
@@ -1,13 +1,13 @@
1
- import { BasicParser } from '../common/BasicParser.js';
2
- import { Atom } from './Atom.js';
1
+ import { BasicParser } from '../common/BasicParser';
2
+ import { Atom } from './Atom';
3
3
  export declare class MP4Parser extends BasicParser {
4
4
  private static read_BE_Integer;
5
+ private audioLengthInBytes;
5
6
  private tracks;
6
- private hasVideoTrack;
7
- private hasAudioTrack;
8
7
  parse(): Promise<void>;
9
8
  handleAtom(atom: Atom, remaining: number): Promise<void>;
10
9
  private getTrackDescription;
10
+ private calculateBitRate;
11
11
  private addTag;
12
12
  private addWarning;
13
13
  /**
@@ -17,8 +17,6 @@ export declare class MP4Parser extends BasicParser {
17
17
  */
18
18
  private parseMetadataItemData;
19
19
  private parseValueAtom;
20
- private parseTrackBox;
21
- private parseTrackFragmentBox;
22
20
  private atomParsers;
23
21
  /**
24
22
  * @param sampleDescription