@remotion/media-parser 4.0.269 → 4.0.271

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 (339) hide show
  1. package/dist/aac-codecprivate.js +6 -13
  2. package/dist/add-avc-profile-to-track.js +5 -9
  3. package/dist/buffer-iterator.js +8 -13
  4. package/dist/combine-uint8-arrays.js +1 -5
  5. package/dist/containers/aac/parse-aac.js +9 -13
  6. package/dist/containers/aac/types.js +1 -2
  7. package/dist/containers/avc/codec-string.js +1 -5
  8. package/dist/containers/avc/color.js +3 -9
  9. package/dist/containers/avc/create-sps-pps-data.js +5 -9
  10. package/dist/containers/avc/interpret-sps.js +7 -13
  11. package/dist/containers/avc/key.js +1 -5
  12. package/dist/containers/avc/parse-avc.js +3 -7
  13. package/dist/containers/avc/sps-and-pps.js +1 -5
  14. package/dist/containers/flac/get-block-size.js +1 -5
  15. package/dist/containers/flac/get-channel-count.d.ts +1 -1
  16. package/dist/containers/flac/get-channel-count.js +1 -5
  17. package/dist/containers/flac/get-duration-from-flac.js +1 -5
  18. package/dist/containers/flac/get-metadata-from-flac.js +1 -5
  19. package/dist/containers/flac/get-sample-rate.js +1 -5
  20. package/dist/containers/flac/parse-flac-frame.js +14 -19
  21. package/dist/containers/flac/parse-flac.js +15 -19
  22. package/dist/containers/flac/parse-header.js +1 -5
  23. package/dist/containers/flac/parse-metadata.js +1 -5
  24. package/dist/containers/flac/parse-streaminfo.js +3 -7
  25. package/dist/containers/flac/parse-unknown-block.js +1 -5
  26. package/dist/containers/flac/types.d.ts +2 -2
  27. package/dist/containers/flac/types.js +1 -2
  28. package/dist/containers/iso-base-media/base-media-box.js +1 -2
  29. package/dist/containers/iso-base-media/base-type.js +1 -2
  30. package/dist/containers/iso-base-media/esds/decoder-specific-config.js +1 -5
  31. package/dist/containers/iso-base-media/esds/esds-descriptors.js +5 -10
  32. package/dist/containers/iso-base-media/esds/esds.js +3 -7
  33. package/dist/containers/iso-base-media/ftyp.js +1 -5
  34. package/dist/containers/iso-base-media/get-actual-number-of-channels.js +4 -8
  35. package/dist/containers/iso-base-media/get-children.js +3 -7
  36. package/dist/containers/iso-base-media/get-keyframes.js +7 -11
  37. package/dist/containers/iso-base-media/get-moov-atom.js +22 -15
  38. package/dist/containers/iso-base-media/get-sample-positions-from-track.js +20 -24
  39. package/dist/containers/iso-base-media/get-video-codec-from-iso-track.d.ts +1 -1
  40. package/dist/containers/iso-base-media/get-video-codec-from-iso-track.js +3 -7
  41. package/dist/containers/iso-base-media/make-track.js +30 -34
  42. package/dist/containers/iso-base-media/mdat/mdat.js +16 -20
  43. package/dist/containers/iso-base-media/mdhd.js +1 -5
  44. package/dist/containers/iso-base-media/meta/hdlr.js +1 -5
  45. package/dist/containers/iso-base-media/meta/ilst.js +1 -5
  46. package/dist/containers/iso-base-media/moov/moov.js +3 -7
  47. package/dist/containers/iso-base-media/mvhd.js +7 -11
  48. package/dist/containers/iso-base-media/parse-boxes.js +5 -9
  49. package/dist/containers/iso-base-media/parse-icc-profile.js +4 -8
  50. package/dist/containers/iso-base-media/process-box.js +63 -67
  51. package/dist/containers/iso-base-media/stsd/av1c.js +1 -5
  52. package/dist/containers/iso-base-media/stsd/avcc.js +1 -5
  53. package/dist/containers/iso-base-media/stsd/colr.js +3 -7
  54. package/dist/containers/iso-base-media/stsd/ctts.js +1 -5
  55. package/dist/containers/iso-base-media/stsd/hvcc.js +3 -7
  56. package/dist/containers/iso-base-media/stsd/keys.js +1 -5
  57. package/dist/containers/iso-base-media/stsd/mebx.js +3 -7
  58. package/dist/containers/iso-base-media/stsd/pasp.js +1 -5
  59. package/dist/containers/iso-base-media/stsd/samples.js +8 -13
  60. package/dist/containers/iso-base-media/stsd/stco.js +1 -5
  61. package/dist/containers/iso-base-media/stsd/stsc.js +1 -5
  62. package/dist/containers/iso-base-media/stsd/stsd.js +3 -7
  63. package/dist/containers/iso-base-media/stsd/stss.js +1 -5
  64. package/dist/containers/iso-base-media/stsd/stsz.js +1 -5
  65. package/dist/containers/iso-base-media/stsd/stts.js +1 -5
  66. package/dist/containers/iso-base-media/tfdt.js +1 -5
  67. package/dist/containers/iso-base-media/tfhd.js +1 -5
  68. package/dist/containers/iso-base-media/tkhd.js +4 -8
  69. package/dist/containers/iso-base-media/to-date.js +1 -5
  70. package/dist/containers/iso-base-media/trak/trak.js +3 -7
  71. package/dist/containers/iso-base-media/traversal.d.ts +3 -2
  72. package/dist/containers/iso-base-media/traversal.js +42 -57
  73. package/dist/containers/iso-base-media/trun.js +2 -6
  74. package/dist/containers/iso-base-media/void-box.js +1 -2
  75. package/dist/containers/m3u/after-manifest-fetch.d.ts +8 -8
  76. package/dist/containers/m3u/after-manifest-fetch.js +33 -51
  77. package/dist/containers/m3u/fetch-m3u8-stream.d.ts +5 -2
  78. package/dist/containers/m3u/fetch-m3u8-stream.js +4 -12
  79. package/dist/containers/m3u/get-chunks.d.ts +1 -0
  80. package/dist/containers/m3u/get-chunks.js +6 -6
  81. package/dist/containers/m3u/get-duration-from-m3u.d.ts +2 -2
  82. package/dist/containers/m3u/get-duration-from-m3u.js +9 -8
  83. package/dist/containers/m3u/get-playlist.d.ts +6 -1
  84. package/dist/containers/m3u/get-playlist.js +19 -16
  85. package/dist/containers/m3u/get-streams.d.ts +14 -7
  86. package/dist/containers/m3u/get-streams.js +15 -18
  87. package/dist/containers/m3u/iterate-over-segment-files.d.ts +19 -0
  88. package/dist/containers/m3u/iterate-over-segment-files.js +106 -0
  89. package/dist/containers/m3u/m3u-child-stream.d.ts +0 -0
  90. package/dist/containers/m3u/m3u-child-stream.js +1 -0
  91. package/dist/containers/m3u/parse-directive.js +37 -10
  92. package/dist/containers/m3u/parse-m3u-manifest.js +3 -7
  93. package/dist/containers/m3u/parse-m3u-media-directive.d.ts +1 -0
  94. package/dist/containers/m3u/parse-m3u-media-directive.js +7 -7
  95. package/dist/containers/m3u/parse-m3u.js +18 -11
  96. package/dist/containers/m3u/parse-m3u8-text.js +3 -7
  97. package/dist/containers/m3u/parse-stream-inf.js +2 -7
  98. package/dist/containers/m3u/return-packets.d.ts +3 -2
  99. package/dist/containers/m3u/return-packets.js +92 -54
  100. package/dist/containers/m3u/run-over-m3u.d.ts +9 -0
  101. package/dist/containers/m3u/run-over-m3u.js +85 -0
  102. package/dist/containers/m3u/sample-sorter.d.ts +13 -0
  103. package/dist/containers/m3u/sample-sorter.js +60 -0
  104. package/dist/containers/m3u/select-stream.d.ts +10 -1
  105. package/dist/containers/m3u/select-stream.js +23 -7
  106. package/dist/containers/m3u/types.d.ts +15 -1
  107. package/dist/containers/m3u/types.js +1 -2
  108. package/dist/containers/mp3/get-duration.js +5 -9
  109. package/dist/containers/mp3/get-frame-length.js +2 -7
  110. package/dist/containers/mp3/get-metadata-from-mp3.d.ts +2 -2
  111. package/dist/containers/mp3/get-metadata-from-mp3.js +1 -5
  112. package/dist/containers/mp3/id3-v1.js +1 -5
  113. package/dist/containers/mp3/id3.js +1 -5
  114. package/dist/containers/mp3/parse-mp3.js +7 -11
  115. package/dist/containers/mp3/parse-mpeg-header.js +10 -14
  116. package/dist/containers/mp3/samples-per-mpeg-file.js +1 -5
  117. package/dist/containers/riff/expect-riff-box.js +11 -15
  118. package/dist/containers/riff/get-duration.js +7 -12
  119. package/dist/containers/riff/get-tracks-from-avi.js +20 -28
  120. package/dist/containers/riff/is-movi.js +1 -5
  121. package/dist/containers/riff/parse-avih.js +1 -5
  122. package/dist/containers/riff/parse-isft.js +1 -5
  123. package/dist/containers/riff/parse-list-box.js +3 -7
  124. package/dist/containers/riff/parse-movi.js +13 -18
  125. package/dist/containers/riff/parse-riff-body.js +9 -13
  126. package/dist/containers/riff/parse-riff-box.js +9 -13
  127. package/dist/containers/riff/parse-riff-header.js +1 -5
  128. package/dist/containers/riff/parse-riff.js +5 -9
  129. package/dist/containers/riff/parse-strf.js +1 -5
  130. package/dist/containers/riff/parse-strh.js +3 -7
  131. package/dist/containers/riff/parse-video-section.js +7 -11
  132. package/dist/containers/riff/riff-box.js +1 -2
  133. package/dist/containers/riff/timescale.js +1 -4
  134. package/dist/containers/riff/traversal.js +7 -15
  135. package/dist/containers/transport-stream/adts-header.js +6 -10
  136. package/dist/containers/transport-stream/boxes.js +1 -2
  137. package/dist/containers/transport-stream/discard-rest-of-packet.js +2 -7
  138. package/dist/containers/transport-stream/find-separator.js +1 -4
  139. package/dist/containers/transport-stream/get-tracks.js +7 -12
  140. package/dist/containers/transport-stream/handle-aac-packet.js +12 -16
  141. package/dist/containers/transport-stream/handle-avc-packet.js +22 -26
  142. package/dist/containers/transport-stream/next-pes-header-store.js +1 -5
  143. package/dist/containers/transport-stream/parse-packet.js +13 -17
  144. package/dist/containers/transport-stream/parse-pat.js +5 -10
  145. package/dist/containers/transport-stream/parse-pes.js +1 -5
  146. package/dist/containers/transport-stream/parse-pmt.js +3 -7
  147. package/dist/containers/transport-stream/parse-stream-packet.js +13 -17
  148. package/dist/containers/transport-stream/parse-transport-stream.js +5 -9
  149. package/dist/containers/transport-stream/process-stream-buffers.js +10 -15
  150. package/dist/containers/transport-stream/traversal.js +4 -10
  151. package/dist/containers/wav/get-duration-from-wav.js +3 -8
  152. package/dist/containers/wav/get-metadata-from-wav.d.ts +2 -2
  153. package/dist/containers/wav/get-metadata-from-wav.js +1 -5
  154. package/dist/containers/wav/parse-data.js +5 -9
  155. package/dist/containers/wav/parse-fmt.js +3 -7
  156. package/dist/containers/wav/parse-header.js +1 -5
  157. package/dist/containers/wav/parse-id3.js +1 -5
  158. package/dist/containers/wav/parse-list.js +10 -6
  159. package/dist/containers/wav/parse-video-section.js +3 -7
  160. package/dist/containers/wav/parse-wav.js +15 -19
  161. package/dist/containers/wav/types.d.ts +2 -2
  162. package/dist/containers/wav/types.js +1 -2
  163. package/dist/containers/webm/allowed-partial-segments.js +1 -4
  164. package/dist/containers/webm/av1-codec-private.js +3 -7
  165. package/dist/containers/webm/color.js +6 -10
  166. package/dist/containers/webm/description.js +6 -10
  167. package/dist/containers/webm/get-ready-tracks.js +13 -18
  168. package/dist/containers/webm/get-sample-from-block.js +12 -16
  169. package/dist/containers/webm/make-track.js +43 -48
  170. package/dist/containers/webm/parse-ebml.js +14 -19
  171. package/dist/containers/webm/parse-webm-header.js +3 -7
  172. package/dist/containers/webm/segments/all-segments.js +168 -173
  173. package/dist/containers/webm/segments/block-simple-block-flags.js +4 -8
  174. package/dist/containers/webm/segments/track-entry.js +1 -5
  175. package/dist/containers/webm/segments.js +9 -13
  176. package/dist/containers/webm/traversal.js +37 -67
  177. package/dist/convert-audio-or-video-sample.js +1 -5
  178. package/dist/download-and-parse-media.js +44 -46
  179. package/dist/emit-available-info.js +38 -38
  180. package/dist/emitter.js +1 -5
  181. package/dist/errors.d.ts +2 -17
  182. package/dist/errors.js +10 -30
  183. package/dist/esm/fetch.mjs +93 -67
  184. package/dist/esm/index.mjs +1189 -355
  185. package/dist/esm/node.mjs +59 -36
  186. package/dist/esm/universal.mjs +323 -0
  187. package/dist/esm/web-file.mjs +55 -43
  188. package/dist/esm/web.mjs +257 -0
  189. package/dist/esm/worker-server-entry.mjs +13056 -0
  190. package/dist/esm/worker-server.mjs +12914 -0
  191. package/dist/esm/worker-web-entry.mjs +12969 -0
  192. package/dist/esm/worker.mjs +439 -0
  193. package/dist/fetch.js +1 -17
  194. package/dist/file-types/bmp.js +3 -7
  195. package/dist/file-types/detect-file-type.js +24 -38
  196. package/dist/file-types/index.js +22 -26
  197. package/dist/file-types/jpeg.js +4 -9
  198. package/dist/file-types/pdf.js +3 -7
  199. package/dist/file-types/png.js +4 -9
  200. package/dist/file-types/webp.js +3 -7
  201. package/dist/forward-controller.js +1 -5
  202. package/dist/get-audio-codec.js +25 -38
  203. package/dist/get-container.d.ts +3 -3
  204. package/dist/get-container.js +5 -10
  205. package/dist/get-dimensions.js +8 -13
  206. package/dist/get-duration.js +27 -34
  207. package/dist/get-fields-from-callbacks.js +1 -5
  208. package/dist/get-fps.js +24 -34
  209. package/dist/get-is-hdr.js +5 -10
  210. package/dist/get-keyframes.js +6 -11
  211. package/dist/get-location.js +4 -9
  212. package/dist/get-number-of-audio-channels.js +2 -7
  213. package/dist/get-sample-aspect-ratio.js +17 -30
  214. package/dist/get-sample-positions-from-lpcm.js +5 -9
  215. package/dist/get-sample-positions.js +1 -5
  216. package/dist/get-sample-rate.js +2 -7
  217. package/dist/get-tracks.d.ts +5 -0
  218. package/dist/get-tracks.js +37 -44
  219. package/dist/get-video-codec.js +26 -34
  220. package/dist/has-all-info.js +33 -38
  221. package/dist/index.d.ts +44 -36
  222. package/dist/index.js +34 -47
  223. package/dist/init-video.d.ts +1 -1
  224. package/dist/init-video.js +47 -20
  225. package/dist/internal-parse-media.js +39 -41
  226. package/dist/is-audio-structure.d.ts +2 -2
  227. package/dist/is-audio-structure.js +1 -5
  228. package/dist/log.js +8 -12
  229. package/dist/make-hvc1-codec-strings.js +1 -5
  230. package/dist/media-parser-controller.js +7 -11
  231. package/dist/metadata/get-metadata.d.ts +4 -4
  232. package/dist/metadata/get-metadata.js +17 -22
  233. package/dist/metadata/metadata-from-iso.d.ts +3 -3
  234. package/dist/metadata/metadata-from-iso.js +12 -17
  235. package/dist/metadata/metadata-from-matroska.d.ts +2 -2
  236. package/dist/metadata/metadata-from-matroska.js +3 -7
  237. package/dist/metadata/metadata-from-riff.d.ts +2 -2
  238. package/dist/metadata/metadata-from-riff.js +3 -7
  239. package/dist/node-writer.js +1 -17
  240. package/dist/node.js +1 -17
  241. package/dist/options.d.ts +32 -25
  242. package/dist/options.js +1 -2
  243. package/dist/parse-media-on-browser-worker.d.ts +2 -0
  244. package/dist/parse-media-on-browser-worker.js +4 -0
  245. package/dist/parse-media-on-server-worker.d.ts +2 -0
  246. package/dist/parse-media-on-server-worker.js +4 -0
  247. package/dist/parse-media-on-web-worker.d.ts +2 -0
  248. package/dist/parse-media-on-web-worker.js +4 -0
  249. package/dist/parse-media-on-worker-entry.d.ts +2 -0
  250. package/dist/parse-media-on-worker-entry.js +269 -0
  251. package/dist/parse-media-on-worker.d.ts +2 -0
  252. package/dist/parse-media-on-worker.js +4 -0
  253. package/dist/parse-media.js +10 -12
  254. package/dist/parse-result.d.ts +3 -3
  255. package/dist/parse-result.js +1 -2
  256. package/dist/pause-signal.js +1 -5
  257. package/dist/perform-seek.js +6 -10
  258. package/dist/readers/fetch/get-body-and-reader.js +1 -5
  259. package/dist/readers/fetch/resolve-url.d.ts +1 -1
  260. package/dist/readers/fetch/resolve-url.js +1 -5
  261. package/dist/readers/from-fetch.d.ts +4 -1
  262. package/dist/readers/from-fetch.js +109 -94
  263. package/dist/readers/from-node.d.ts +4 -1
  264. package/dist/readers/from-node.js +58 -41
  265. package/dist/readers/from-web-file.d.ts +4 -1
  266. package/dist/readers/from-web-file.js +55 -49
  267. package/dist/readers/reader.d.ts +5 -1
  268. package/dist/readers/reader.js +1 -2
  269. package/dist/readers/universal.d.ts +2 -0
  270. package/dist/readers/universal.js +35 -0
  271. package/dist/readers/web.d.ts +2 -0
  272. package/dist/readers/web.js +22 -0
  273. package/dist/register-track.js +9 -15
  274. package/dist/remotion-license-acknowledge.js +4 -8
  275. package/dist/run-parse-iteration.js +26 -25
  276. package/dist/samples-from-moof.js +8 -12
  277. package/dist/skip.js +1 -5
  278. package/dist/state/aac-state.js +1 -5
  279. package/dist/state/can-skip-tracks.d.ts +2 -2
  280. package/dist/state/can-skip-tracks.js +3 -8
  281. package/dist/state/emitted-fields.js +1 -5
  282. package/dist/state/flac-state.js +1 -5
  283. package/dist/state/has-tracks-section.js +3 -7
  284. package/dist/state/images.js +1 -5
  285. package/dist/state/iso-base-media/cached-sample-positions.js +8 -13
  286. package/dist/state/iso-base-media/iso-state.js +5 -9
  287. package/dist/state/iso-base-media/moov-box.js +1 -5
  288. package/dist/state/keyframes.js +1 -5
  289. package/dist/state/last-eventloop-break.js +3 -7
  290. package/dist/state/m3u-state.d.ts +37 -16
  291. package/dist/state/m3u-state.js +98 -29
  292. package/dist/state/may-skip-video-data.js +3 -7
  293. package/dist/state/mp3.js +1 -5
  294. package/dist/state/need-samples-for-fields.js +1 -5
  295. package/dist/state/parser-state.d.ts +39 -33
  296. package/dist/state/parser-state.js +37 -41
  297. package/dist/state/riff.js +1 -5
  298. package/dist/state/sample-callbacks.js +8 -12
  299. package/dist/state/slow-duration-fps.js +1 -5
  300. package/dist/state/structure.d.ts +4 -4
  301. package/dist/state/structure.js +1 -5
  302. package/dist/state/transport-stream.js +3 -7
  303. package/dist/state/video-section.js +1 -5
  304. package/dist/state/webm.js +5 -9
  305. package/dist/throttled-progress.js +21 -14
  306. package/dist/truthy.js +1 -4
  307. package/dist/universal.d.ts +1 -0
  308. package/dist/universal.js +1 -0
  309. package/dist/version.d.ts +1 -1
  310. package/dist/version.js +1 -4
  311. package/dist/web-file.js +1 -17
  312. package/dist/web.d.ts +1 -0
  313. package/dist/web.js +1 -0
  314. package/dist/webcodec-sample-types.d.ts +6 -4
  315. package/dist/webcodec-sample-types.js +1 -2
  316. package/dist/worker/forward-controller.d.ts +3 -0
  317. package/dist/worker/forward-controller.js +20 -0
  318. package/dist/worker/serialize-error.d.ts +4 -0
  319. package/dist/worker/serialize-error.js +95 -0
  320. package/dist/worker/worker-types.d.ts +243 -0
  321. package/dist/worker/worker-types.js +1 -0
  322. package/dist/worker-bun-entry.d.ts +1 -0
  323. package/dist/worker-bun-entry.js +5 -0
  324. package/dist/worker-entry.d.ts +1 -0
  325. package/dist/worker-entry.js +5 -0
  326. package/dist/worker-server-entry.d.ts +1 -0
  327. package/dist/worker-server-entry.js +5 -0
  328. package/dist/worker-server.d.ts +2 -0
  329. package/dist/worker-server.js +381 -0
  330. package/dist/worker-web-entry.d.ts +1 -0
  331. package/dist/worker-web-entry.js +5 -0
  332. package/dist/worker.d.ts +2 -0
  333. package/dist/worker.js +267 -0
  334. package/dist/writers/node.js +16 -23
  335. package/dist/writers/writer.js +1 -2
  336. package/package.json +40 -21
  337. package/fetch.js +0 -2
  338. package/test.json +0 -663
  339. package/web-file.js +0 -2
@@ -1,12 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseMebx = void 0;
4
- const get_children_1 = require("../get-children");
5
- const parseMebx = async ({ offset, size, state, }) => {
1
+ import { getIsoBaseMediaChildren } from '../get-children';
2
+ export const parseMebx = async ({ offset, size, state, }) => {
6
3
  // reserved, 6 bit
7
4
  state.iterator.discard(6);
8
5
  const dataReferenceIndex = state.iterator.getUint16();
9
- const children = await (0, get_children_1.getIsoBaseMediaChildren)({
6
+ const children = await getIsoBaseMediaChildren({
10
7
  state,
11
8
  size: size - 8,
12
9
  });
@@ -19,4 +16,3 @@ const parseMebx = async ({ offset, size, state, }) => {
19
16
  children,
20
17
  };
21
18
  };
22
- exports.parseMebx = parseMebx;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parsePasp = void 0;
4
- const parsePasp = ({ iterator, offset, size, }) => {
1
+ export const parsePasp = ({ iterator, offset, size, }) => {
5
2
  const hSpacing = iterator.getUint32();
6
3
  const vSpacing = iterator.getUint32();
7
4
  const bytesRemainingInBox = size - (iterator.counter.getOffset() - offset);
@@ -14,4 +11,3 @@ const parsePasp = ({ iterator, offset, size, }) => {
14
11
  vSpacing,
15
12
  };
16
13
  };
17
- exports.parsePasp = parsePasp;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseIsoFormatBoxes = exports.processIsoFormatBox = void 0;
4
- const get_children_1 = require("../get-children");
1
+ import { getIsoBaseMediaChildren } from '../get-children';
5
2
  // https://developer.apple.com/documentation/quicktime-file-format/video_sample_description
6
3
  const videoTags = [
7
4
  'cvid',
@@ -63,7 +60,7 @@ const audioTags = [
63
60
  'mp4a',
64
61
  'ac-3',
65
62
  ];
66
- const processIsoFormatBox = async ({ state, }) => {
63
+ export const processIsoFormatBox = async ({ state, }) => {
67
64
  const { iterator } = state;
68
65
  const fileOffset = iterator.counter.getOffset();
69
66
  const bytesRemaining = iterator.bytesRemaining();
@@ -100,7 +97,7 @@ const processIsoFormatBox = async ({ state, }) => {
100
97
  const compressionId = iterator.getUint16();
101
98
  const packetSize = iterator.getUint16();
102
99
  const sampleRate = iterator.getFixedPointUnsigned1616Number();
103
- const children = await (0, get_children_1.getIsoBaseMediaChildren)({
100
+ const children = await getIsoBaseMediaChildren({
104
101
  state,
105
102
  size: boxSize - (iterator.counter.getOffset() - fileOffset),
106
103
  });
@@ -137,7 +134,7 @@ const processIsoFormatBox = async ({ state, }) => {
137
134
  const bytesPerPacket = iterator.getUint32();
138
135
  const bytesPerFrame = iterator.getUint32();
139
136
  const bytesPerSample = iterator.getUint32();
140
- const children = await (0, get_children_1.getIsoBaseMediaChildren)({
137
+ const children = await getIsoBaseMediaChildren({
141
138
  state,
142
139
  size: boxSize - (iterator.counter.getOffset() - fileOffset),
143
140
  });
@@ -178,7 +175,7 @@ const processIsoFormatBox = async ({ state, }) => {
178
175
  iterator.getUint32(); // ignore;
179
176
  const bytesPerFrame = iterator.getUint32();
180
177
  const samplesPerPacket = iterator.getUint32();
181
- const children = await (0, get_children_1.getIsoBaseMediaChildren)({
178
+ const children = await getIsoBaseMediaChildren({
182
179
  state,
183
180
  size: boxSize - (iterator.counter.getOffset() - fileOffset),
184
181
  });
@@ -224,7 +221,7 @@ const processIsoFormatBox = async ({ state, }) => {
224
221
  const colorTableId = iterator.getInt16();
225
222
  const bytesRemainingInBox = boxSize - (iterator.counter.getOffset() - fileOffset);
226
223
  const children = bytesRemainingInBox > 8
227
- ? await (0, get_children_1.getIsoBaseMediaChildren)({
224
+ ? await getIsoBaseMediaChildren({
228
225
  state,
229
226
  size: bytesRemainingInBox,
230
227
  })
@@ -256,14 +253,13 @@ const processIsoFormatBox = async ({ state, }) => {
256
253
  }
257
254
  throw new Error(`Unknown sample format ${boxFormat}`);
258
255
  };
259
- exports.processIsoFormatBox = processIsoFormatBox;
260
- const parseIsoFormatBoxes = async ({ maxBytes, state, }) => {
256
+ export const parseIsoFormatBoxes = async ({ maxBytes, state, }) => {
261
257
  const { iterator } = state;
262
258
  const samples = [];
263
259
  const initialOffset = iterator.counter.getOffset();
264
260
  while (iterator.bytesRemaining() > 0 &&
265
261
  iterator.counter.getOffset() - initialOffset < maxBytes) {
266
- const { sample } = await (0, exports.processIsoFormatBox)({
262
+ const { sample } = await processIsoFormatBox({
267
263
  state,
268
264
  });
269
265
  if (sample) {
@@ -272,4 +268,3 @@ const parseIsoFormatBoxes = async ({ maxBytes, state, }) => {
272
268
  }
273
269
  return samples;
274
270
  };
275
- exports.parseIsoFormatBoxes = parseIsoFormatBoxes;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStco = void 0;
4
- const parseStco = ({ iterator, offset, size, mode64Bit, }) => {
1
+ export const parseStco = ({ iterator, offset, size, mode64Bit, }) => {
5
2
  const version = iterator.getUint8();
6
3
  if (version !== 0) {
7
4
  throw new Error(`Unsupported STSD version ${version}`);
@@ -27,4 +24,3 @@ const parseStco = ({ iterator, offset, size, mode64Bit, }) => {
27
24
  entryCount,
28
25
  };
29
26
  };
30
- exports.parseStco = parseStco;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStsc = void 0;
4
- const parseStsc = ({ iterator, offset, size, }) => {
1
+ export const parseStsc = ({ iterator, offset, size, }) => {
5
2
  const version = iterator.getUint8();
6
3
  if (version !== 0) {
7
4
  throw new Error(`Unsupported STSD version ${version}`);
@@ -31,4 +28,3 @@ const parseStsc = ({ iterator, offset, size, }) => {
31
28
  entries,
32
29
  };
33
30
  };
34
- exports.parseStsc = parseStsc;
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStsd = void 0;
4
- const samples_1 = require("./samples");
5
- const parseStsd = async ({ offset, size, state, }) => {
1
+ import { parseIsoFormatBoxes } from './samples';
2
+ export const parseStsd = async ({ offset, size, state, }) => {
6
3
  const { iterator } = state;
7
4
  const version = iterator.getUint8();
8
5
  if (version !== 0) {
@@ -12,7 +9,7 @@ const parseStsd = async ({ offset, size, state, }) => {
12
9
  iterator.discard(3);
13
10
  const numberOfEntries = iterator.getUint32();
14
11
  const bytesRemainingInBox = size - (iterator.counter.getOffset() - offset);
15
- const boxes = await (0, samples_1.parseIsoFormatBoxes)({
12
+ const boxes = await parseIsoFormatBoxes({
16
13
  maxBytes: bytesRemainingInBox,
17
14
  state,
18
15
  });
@@ -27,4 +24,3 @@ const parseStsd = async ({ offset, size, state, }) => {
27
24
  samples: boxes,
28
25
  };
29
26
  };
30
- exports.parseStsd = parseStsd;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStss = void 0;
4
- const parseStss = ({ iterator, offset, boxSize, }) => {
1
+ export const parseStss = ({ iterator, offset, boxSize, }) => {
5
2
  const version = iterator.getUint8();
6
3
  if (version !== 0) {
7
4
  throw new Error(`Unsupported STSS version ${version}`);
@@ -25,4 +22,3 @@ const parseStss = ({ iterator, offset, boxSize, }) => {
25
22
  offset,
26
23
  };
27
24
  };
28
- exports.parseStss = parseStss;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStsz = void 0;
4
- const parseStsz = ({ iterator, offset, size, }) => {
1
+ export const parseStsz = ({ iterator, offset, size, }) => {
5
2
  const version = iterator.getUint8();
6
3
  if (version !== 0) {
7
4
  throw new Error(`Unsupported STSD version ${version}`);
@@ -41,4 +38,3 @@ const parseStsz = ({ iterator, offset, size, }) => {
41
38
  entries: samples,
42
39
  };
43
40
  };
44
- exports.parseStsz = parseStsz;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseStts = void 0;
4
- const parseStts = ({ data, size, fileOffset, }) => {
1
+ export const parseStts = ({ data, size, fileOffset, }) => {
5
2
  const initialOffset = data.counter.getOffset();
6
3
  const initialCounter = initialOffset - fileOffset;
7
4
  const version = data.getUint8();
@@ -32,4 +29,3 @@ const parseStts = ({ data, size, fileOffset, }) => {
32
29
  sampleDistribution: sampleDistributions,
33
30
  };
34
31
  };
35
- exports.parseStts = parseStts;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseTfdt = void 0;
4
- const parseTfdt = ({ iterator, size, offset, }) => {
1
+ export const parseTfdt = ({ iterator, size, offset, }) => {
5
2
  const version = iterator.getUint8();
6
3
  iterator.discard(3);
7
4
  // Flags, discard them
@@ -17,4 +14,3 @@ const parseTfdt = ({ iterator, size, offset, }) => {
17
14
  offset,
18
15
  };
19
16
  };
20
- exports.parseTfdt = parseTfdt;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTfhd = void 0;
4
- const getTfhd = ({ iterator, offset, size, }) => {
1
+ export const getTfhd = ({ iterator, offset, size, }) => {
5
2
  const version = iterator.getUint8();
6
3
  const flags = iterator.getUint24();
7
4
  const trackId = iterator.getUint32();
@@ -38,4 +35,3 @@ const getTfhd = ({ iterator, offset, size, }) => {
38
35
  defaultSampleFlags,
39
36
  };
40
37
  };
41
- exports.getTfhd = getTfhd;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseTkhd = void 0;
4
- const to_date_1 = require("./to-date");
1
+ import { toUnixTimestamp } from './to-date';
5
2
  function getRotationAngleFromMatrix(matrix) {
6
3
  // Extract elements from the matrix
7
4
  const [a, b, c, d] = matrix;
@@ -25,7 +22,7 @@ const applyRotation = ({ matrix, width, height, }) => {
25
22
  height: Math.abs(newHeight),
26
23
  };
27
24
  };
28
- const parseTkhd = ({ iterator, offset, size, }) => {
25
+ export const parseTkhd = ({ iterator, offset, size, }) => {
29
26
  const version = iterator.getUint8();
30
27
  // Flags, we discard them
31
28
  iterator.discard(3);
@@ -68,8 +65,8 @@ const parseTkhd = ({ iterator, offset, size, }) => {
68
65
  offset,
69
66
  boxSize: size,
70
67
  type: 'tkhd-box',
71
- creationTime: (0, to_date_1.toUnixTimestamp)(Number(creationTime)),
72
- modificationTime: (0, to_date_1.toUnixTimestamp)(Number(modificationTime)),
68
+ creationTime: toUnixTimestamp(Number(creationTime)),
69
+ modificationTime: toUnixTimestamp(Number(modificationTime)),
73
70
  trackId,
74
71
  duration: Number(duration),
75
72
  layer,
@@ -84,4 +81,3 @@ const parseTkhd = ({ iterator, offset, size, }) => {
84
81
  unrotatedHeight: heightWithoutRotationApplied,
85
82
  };
86
83
  };
87
- exports.parseTkhd = parseTkhd;
@@ -1,11 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.toUnixTimestamp = void 0;
4
- const toUnixTimestamp = (value) => {
1
+ export const toUnixTimestamp = (value) => {
5
2
  if (value === 0) {
6
3
  return null;
7
4
  }
8
5
  const baseDate = new Date('1904-01-01T00:00:00Z');
9
6
  return Math.floor(value + baseDate.getTime() / 1000) * 1000;
10
7
  };
11
- exports.toUnixTimestamp = toUnixTimestamp;
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseTrak = void 0;
4
- const get_children_1 = require("../get-children");
5
- const parseTrak = async ({ size, offsetAtStart, state: options, }) => {
6
- const children = await (0, get_children_1.getIsoBaseMediaChildren)({
1
+ import { getIsoBaseMediaChildren } from '../get-children';
2
+ export const parseTrak = async ({ size, offsetAtStart, state: options, }) => {
3
+ const children = await getIsoBaseMediaChildren({
7
4
  state: options,
8
5
  size: size - 8,
9
6
  });
@@ -14,4 +11,3 @@ const parseTrak = async ({ size, offsetAtStart, state: options, }) => {
14
11
  children,
15
12
  };
16
13
  };
17
- exports.parseTrak = parseTrak;
@@ -1,4 +1,4 @@
1
- import type { AnySegment } from '../../parse-result';
1
+ import type { AnySegment, IsoBaseMediaStructure } from '../../parse-result';
2
2
  import type { ParserState } from '../../state/parser-state';
3
3
  import type { IsoBaseMediaBox, RegularBox } from './base-media-box';
4
4
  import type { FtypBox } from './ftyp';
@@ -18,7 +18,8 @@ import type { TkhdBox } from './tkhd';
18
18
  import type { TrakBox } from './trak/trak';
19
19
  import type { TrunBox } from './trun';
20
20
  export declare const getFtypBox: (segments: AnySegment[]) => FtypBox | null;
21
- export declare const getMoovBox: (state: ParserState) => MoovBox | null;
21
+ export declare const getMoovFromFromIsoStructure: (structure: IsoBaseMediaStructure) => MoovBox | null;
22
+ export declare const getMoovBoxFromState: (state: ParserState) => MoovBox | null;
22
23
  export declare const getMoofBoxes: (main: AnySegment[]) => IsoBaseMediaBox[];
23
24
  export declare const getMvhdBox: (moovBox: MoovBox) => MvhdBox | null;
24
25
  export declare const getTraks: (moovBox: MoovBox) => TrakBox[];
@@ -1,67 +1,64 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTrunBoxes = exports.getTfhdBox = exports.getTfdtBox = exports.getStssBox = exports.getStscBox = exports.getStszBox = exports.getCttsBox = exports.getSttsBox = exports.getStcoBox = exports.getVideoDescriptors = exports.getStsdBox = exports.getStblBox = exports.getMdhdBox = exports.getMdiaBox = exports.getTkhdBox = exports.getTraks = exports.getMvhdBox = exports.getMoofBoxes = exports.getMoovBox = exports.getFtypBox = void 0;
4
- const getFtypBox = (segments) => {
1
+ export const getFtypBox = (segments) => {
5
2
  const ftypBox = segments.find((s) => s.type === 'ftyp-box');
6
3
  if (!ftypBox || ftypBox.type !== 'ftyp-box') {
7
4
  return null;
8
5
  }
9
6
  return ftypBox;
10
7
  };
11
- exports.getFtypBox = getFtypBox;
12
- const getMoovBox = (state) => {
13
- if (state.iso.moov.getMoovBox()) {
14
- return state.iso.moov.getMoovBox();
15
- }
16
- const structure = state.getIsoStructure();
8
+ export const getMoovFromFromIsoStructure = (structure) => {
17
9
  const moovBox = structure.boxes.find((s) => s.type === 'moov-box');
18
10
  if (!moovBox || moovBox.type !== 'moov-box') {
19
11
  return null;
20
12
  }
21
13
  return moovBox;
22
14
  };
23
- exports.getMoovBox = getMoovBox;
24
- const getMoofBoxes = (main) => {
15
+ export const getMoovBoxFromState = (state) => {
16
+ const got = state.iso.moov.getMoovBox();
17
+ if (got) {
18
+ return got;
19
+ }
20
+ const a = state.mp4HeaderSegment;
21
+ if (a) {
22
+ return getMoovFromFromIsoStructure(a);
23
+ }
24
+ const structure = state.getIsoStructure();
25
+ return getMoovFromFromIsoStructure(structure);
26
+ };
27
+ export const getMoofBoxes = (main) => {
25
28
  const moofBoxes = main.filter((s) => s.type === 'regular-box' && s.boxType === 'moof');
26
29
  return moofBoxes;
27
30
  };
28
- exports.getMoofBoxes = getMoofBoxes;
29
- const getMvhdBox = (moovBox) => {
31
+ export const getMvhdBox = (moovBox) => {
30
32
  const mvHdBox = moovBox.children.find((s) => s.type === 'mvhd-box');
31
33
  if (!mvHdBox || mvHdBox.type !== 'mvhd-box') {
32
34
  return null;
33
35
  }
34
36
  return mvHdBox;
35
37
  };
36
- exports.getMvhdBox = getMvhdBox;
37
- const getTraks = (moovBox) => {
38
+ export const getTraks = (moovBox) => {
38
39
  return moovBox.children.filter((s) => s.type === 'trak-box');
39
40
  };
40
- exports.getTraks = getTraks;
41
- const getTkhdBox = (trakBox) => {
41
+ export const getTkhdBox = (trakBox) => {
42
42
  const tkhdBox = trakBox.children.find((s) => s.type === 'tkhd-box');
43
43
  return tkhdBox;
44
44
  };
45
- exports.getTkhdBox = getTkhdBox;
46
- const getMdiaBox = (trakBox) => {
45
+ export const getMdiaBox = (trakBox) => {
47
46
  const mdiaBox = trakBox.children.find((s) => s.type === 'regular-box' && s.boxType === 'mdia');
48
47
  if (!mdiaBox || mdiaBox.type !== 'regular-box') {
49
48
  return null;
50
49
  }
51
50
  return mdiaBox;
52
51
  };
53
- exports.getMdiaBox = getMdiaBox;
54
- const getMdhdBox = (trakBox) => {
55
- const mdiaBox = (0, exports.getMdiaBox)(trakBox);
52
+ export const getMdhdBox = (trakBox) => {
53
+ const mdiaBox = getMdiaBox(trakBox);
56
54
  if (!mdiaBox) {
57
55
  return null;
58
56
  }
59
57
  const mdhdBox = mdiaBox.children.find((c) => c.type === 'mdhd-box');
60
58
  return mdhdBox;
61
59
  };
62
- exports.getMdhdBox = getMdhdBox;
63
- const getStblBox = (trakBox) => {
64
- const mdiaBox = (0, exports.getMdiaBox)(trakBox);
60
+ export const getStblBox = (trakBox) => {
61
+ const mdiaBox = getMdiaBox(trakBox);
65
62
  if (!mdiaBox) {
66
63
  return null;
67
64
  }
@@ -75,19 +72,17 @@ const getStblBox = (trakBox) => {
75
72
  }
76
73
  return stblBox;
77
74
  };
78
- exports.getStblBox = getStblBox;
79
- const getStsdBox = (trakBox) => {
80
- const stblBox = (0, exports.getStblBox)(trakBox);
75
+ export const getStsdBox = (trakBox) => {
76
+ const stblBox = getStblBox(trakBox);
81
77
  if (!stblBox || stblBox.type !== 'regular-box') {
82
78
  return null;
83
79
  }
84
80
  const stsdBox = stblBox.children.find((s) => s.type === 'stsd-box');
85
81
  return stsdBox;
86
82
  };
87
- exports.getStsdBox = getStsdBox;
88
- const getVideoDescriptors = (trakBox) => {
83
+ export const getVideoDescriptors = (trakBox) => {
89
84
  var _a;
90
- const stsdBox = (0, exports.getStsdBox)(trakBox);
85
+ const stsdBox = getStsdBox(trakBox);
91
86
  if (!stsdBox) {
92
87
  return null;
93
88
  }
@@ -104,62 +99,55 @@ const getVideoDescriptors = (trakBox) => {
104
99
  });
105
100
  return (_a = descriptors.flat(1).filter(Boolean)[0]) !== null && _a !== void 0 ? _a : null;
106
101
  };
107
- exports.getVideoDescriptors = getVideoDescriptors;
108
- const getStcoBox = (trakBox) => {
109
- const stblBox = (0, exports.getStblBox)(trakBox);
102
+ export const getStcoBox = (trakBox) => {
103
+ const stblBox = getStblBox(trakBox);
110
104
  if (!stblBox || stblBox.type !== 'regular-box') {
111
105
  return null;
112
106
  }
113
107
  const stcoBox = stblBox.children.find((s) => s.type === 'stco-box');
114
108
  return stcoBox;
115
109
  };
116
- exports.getStcoBox = getStcoBox;
117
- const getSttsBox = (trakBox) => {
118
- const stblBox = (0, exports.getStblBox)(trakBox);
110
+ export const getSttsBox = (trakBox) => {
111
+ const stblBox = getStblBox(trakBox);
119
112
  if (!stblBox || stblBox.type !== 'regular-box') {
120
113
  return null;
121
114
  }
122
115
  const sttsBox = stblBox.children.find((s) => s.type === 'stts-box');
123
116
  return sttsBox;
124
117
  };
125
- exports.getSttsBox = getSttsBox;
126
- const getCttsBox = (trakBox) => {
127
- const stblBox = (0, exports.getStblBox)(trakBox);
118
+ export const getCttsBox = (trakBox) => {
119
+ const stblBox = getStblBox(trakBox);
128
120
  if (!stblBox || stblBox.type !== 'regular-box') {
129
121
  return null;
130
122
  }
131
123
  const cttsBox = stblBox.children.find((s) => s.type === 'ctts-box');
132
124
  return cttsBox;
133
125
  };
134
- exports.getCttsBox = getCttsBox;
135
- const getStszBox = (trakBox) => {
136
- const stblBox = (0, exports.getStblBox)(trakBox);
126
+ export const getStszBox = (trakBox) => {
127
+ const stblBox = getStblBox(trakBox);
137
128
  if (!stblBox || stblBox.type !== 'regular-box') {
138
129
  return null;
139
130
  }
140
131
  const stszBox = stblBox.children.find((s) => s.type === 'stsz-box');
141
132
  return stszBox;
142
133
  };
143
- exports.getStszBox = getStszBox;
144
- const getStscBox = (trakBox) => {
145
- const stblBox = (0, exports.getStblBox)(trakBox);
134
+ export const getStscBox = (trakBox) => {
135
+ const stblBox = getStblBox(trakBox);
146
136
  if (!stblBox || stblBox.type !== 'regular-box') {
147
137
  return null;
148
138
  }
149
139
  const stcoBox = stblBox.children.find((b) => b.type === 'stsc-box');
150
140
  return stcoBox;
151
141
  };
152
- exports.getStscBox = getStscBox;
153
- const getStssBox = (trakBox) => {
154
- const stblBox = (0, exports.getStblBox)(trakBox);
142
+ export const getStssBox = (trakBox) => {
143
+ const stblBox = getStblBox(trakBox);
155
144
  if (!stblBox || stblBox.type !== 'regular-box') {
156
145
  return null;
157
146
  }
158
147
  const stssBox = stblBox.children.find((b) => b.type === 'stss-box');
159
148
  return stssBox;
160
149
  };
161
- exports.getStssBox = getStssBox;
162
- const getTfdtBox = (segment) => {
150
+ export const getTfdtBox = (segment) => {
163
151
  if (segment.type !== 'regular-box' || segment.boxType !== 'traf') {
164
152
  throw new Error('Expected traf-box');
165
153
  }
@@ -169,8 +157,7 @@ const getTfdtBox = (segment) => {
169
157
  }
170
158
  return tfhdBox;
171
159
  };
172
- exports.getTfdtBox = getTfdtBox;
173
- const getTfhdBox = (segment) => {
160
+ export const getTfhdBox = (segment) => {
174
161
  if (segment.type !== 'regular-box' || segment.boxType !== 'traf') {
175
162
  throw new Error('Expected traf-box');
176
163
  }
@@ -180,12 +167,10 @@ const getTfhdBox = (segment) => {
180
167
  }
181
168
  return tfhdBox;
182
169
  };
183
- exports.getTfhdBox = getTfhdBox;
184
- const getTrunBoxes = (segment) => {
170
+ export const getTrunBoxes = (segment) => {
185
171
  if (segment.type !== 'regular-box' || segment.boxType !== 'traf') {
186
172
  throw new Error('Expected traf-box');
187
173
  }
188
174
  const trunBoxes = segment.children.filter((c) => c.type === 'trun-box');
189
175
  return trunBoxes;
190
176
  };
191
- exports.getTrunBoxes = getTrunBoxes;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.parseTrun = void 0;
4
- const parseTrun = ({ iterator, offset, size, }) => {
1
+ export const parseTrun = ({ iterator, offset, size, }) => {
5
2
  const version = iterator.getUint8();
6
3
  if (version !== 0 && version !== 1) {
7
4
  throw new Error(`Unsupported TRUN version ${version}`);
@@ -18,7 +15,7 @@ const parseTrun = ({ iterator, offset, size, }) => {
18
15
  const sampleCompositionTimeOffset = flags & 0x800
19
16
  ? version === 0
20
17
  ? iterator.getUint32()
21
- : iterator.getInt32Le()
18
+ : iterator.getInt32()
22
19
  : null;
23
20
  samples.push({
24
21
  sampleDuration,
@@ -41,4 +38,3 @@ const parseTrun = ({ iterator, offset, size, }) => {
41
38
  samples,
42
39
  };
43
40
  };
44
- exports.parseTrun = parseTrun;
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,14 +1,14 @@
1
+ import type { LogLevel } from '../../log';
2
+ import type { ReaderInterface } from '../../readers/reader';
1
3
  import type { M3uState } from '../../state/m3u-state';
2
- import type { ParserState } from '../../state/parser-state';
3
- import type { SelectM3uStreamFn } from './select-stream';
4
+ import type { SelectM3uAssociatedPlaylistsFn, SelectM3uStreamFn } from './select-stream';
4
5
  import type { M3uStructure } from './types';
5
- export declare const afterManifestFetch: ({ structure, m3uState, src, selectM3uStreamFn, }: {
6
+ export declare const afterManifestFetch: ({ structure, m3uState, src, selectM3uStreamFn, logLevel, selectAssociatedPlaylistsFn, readerInterface, }: {
6
7
  structure: M3uStructure;
7
8
  m3uState: M3uState;
8
- src: string | null;
9
+ src: string;
9
10
  selectM3uStreamFn: SelectM3uStreamFn;
10
- }) => Promise<void>;
11
- export declare const runOverM3u: ({ state, structure, }: {
12
- state: ParserState;
13
- structure: M3uStructure;
11
+ selectAssociatedPlaylistsFn: SelectM3uAssociatedPlaylistsFn;
12
+ logLevel: LogLevel;
13
+ readerInterface: ReaderInterface;
14
14
  }) => Promise<void>;