supervision 0.1.7 → 0.2.0-next.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.
Files changed (215) hide show
  1. package/dist/detections/chunked-detection-frame-source.d.ts.map +1 -1
  2. package/dist/index.d.ts +11 -4
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +8856 -4559
  5. package/dist/index.js.map +1 -1
  6. package/dist/mask-preparation.worker.js +310 -164
  7. package/dist/mask-preparation.worker.js.map +1 -1
  8. package/dist/media/display-pixel-ratio.d.ts +15 -0
  9. package/dist/media/display-pixel-ratio.d.ts.map +1 -0
  10. package/dist/media/engine-import-failure.d.ts +16 -0
  11. package/dist/media/engine-import-failure.d.ts.map +1 -0
  12. package/dist/media/media-condition-probe.d.ts +51 -0
  13. package/dist/media/media-condition-probe.d.ts.map +1 -0
  14. package/dist/media/media-conditions.d.ts +28 -0
  15. package/dist/media/media-conditions.d.ts.map +1 -0
  16. package/dist/media/media-errors.d.ts +6 -0
  17. package/dist/media/media-errors.d.ts.map +1 -1
  18. package/dist/media/media-normalization.d.ts.map +1 -1
  19. package/dist/media/media-probe.d.ts.map +1 -1
  20. package/dist/media/media-source.d.ts +17 -0
  21. package/dist/media/media-source.d.ts.map +1 -1
  22. package/dist/media/mediabunny-media-source.d.ts.map +1 -1
  23. package/dist/media/video-engine-media-source.d.ts +44 -0
  24. package/dist/media/video-engine-media-source.d.ts.map +1 -0
  25. package/dist/render-preparation/mask-frame-artifact.d.ts +46 -12
  26. package/dist/render-preparation/mask-frame-artifact.d.ts.map +1 -1
  27. package/dist/render-preparation/mask-frame-compositor.d.ts +5 -5
  28. package/dist/render-preparation/mask-frame-compositor.d.ts.map +1 -1
  29. package/dist/render-preparation/mask-frame-preparer.d.ts.map +1 -1
  30. package/dist/render-preparation/mask-preparation-worker-count.d.ts +4 -4
  31. package/dist/render-preparation/mask-preparation-worker-protocol.d.ts +12 -3
  32. package/dist/render-preparation/mask-preparation-worker-protocol.d.ts.map +1 -1
  33. package/dist/render-preparation/prepared-render-window.d.ts +23 -0
  34. package/dist/render-preparation/prepared-render-window.d.ts.map +1 -1
  35. package/dist/render-preparation/prepared-window-timeline.d.ts +2 -6
  36. package/dist/render-preparation/prepared-window-timeline.d.ts.map +1 -1
  37. package/dist/renderers/mask-palette.d.ts +14 -0
  38. package/dist/renderers/mask-palette.d.ts.map +1 -0
  39. package/dist/renderers/mask-vertex.d.ts +14 -0
  40. package/dist/renderers/mask-vertex.d.ts.map +1 -0
  41. package/dist/renderers/media-renderer-core.d.ts.map +1 -1
  42. package/dist/renderers/media-renderer-scene.d.ts +37 -0
  43. package/dist/renderers/media-renderer-scene.d.ts.map +1 -1
  44. package/dist/renderers/media-renderer-state.d.ts +11 -1
  45. package/dist/renderers/media-renderer-state.d.ts.map +1 -1
  46. package/dist/renderers/media-renderer-transport.d.ts +59 -0
  47. package/dist/renderers/media-renderer-transport.d.ts.map +1 -0
  48. package/dist/renderers/pixi-box-layer.d.ts +5 -0
  49. package/dist/renderers/pixi-box-layer.d.ts.map +1 -1
  50. package/dist/renderers/pixi-focus-layer.d.ts +18 -2
  51. package/dist/renderers/pixi-focus-layer.d.ts.map +1 -1
  52. package/dist/renderers/pixi-frame-present.d.ts +77 -0
  53. package/dist/renderers/pixi-frame-present.d.ts.map +1 -0
  54. package/dist/renderers/pixi-id-mask-shader.d.ts +12 -2
  55. package/dist/renderers/pixi-id-mask-shader.d.ts.map +1 -1
  56. package/dist/renderers/pixi-interaction-layer.d.ts.map +1 -1
  57. package/dist/renderers/pixi-interaction-presentation-layer.d.ts +13 -2
  58. package/dist/renderers/pixi-interaction-presentation-layer.d.ts.map +1 -1
  59. package/dist/renderers/pixi-mask-halo.d.ts +24 -0
  60. package/dist/renderers/pixi-mask-halo.d.ts.map +1 -1
  61. package/dist/renderers/pixi-mask-layer.d.ts +71 -8
  62. package/dist/renderers/pixi-mask-layer.d.ts.map +1 -1
  63. package/dist/renderers/pixi-media-scene.d.ts +67 -0
  64. package/dist/renderers/pixi-media-scene.d.ts.map +1 -1
  65. package/dist/renderers/pixi-polygon-layer.d.ts +7 -2
  66. package/dist/renderers/pixi-polygon-layer.d.ts.map +1 -1
  67. package/dist/renderers/pixi-region-coverage-mask.d.ts +91 -0
  68. package/dist/renderers/pixi-region-coverage-mask.d.ts.map +1 -0
  69. package/dist/renderers/pixi-region-effect.d.ts +42 -0
  70. package/dist/renderers/pixi-region-effect.d.ts.map +1 -0
  71. package/dist/renderers/pixi-region-layer.d.ts +68 -2
  72. package/dist/renderers/pixi-region-layer.d.ts.map +1 -1
  73. package/dist/renderers/pixi-vector-layer.d.ts.map +1 -1
  74. package/dist/renderers/prepared-annotation-window.d.ts +47 -0
  75. package/dist/renderers/prepared-annotation-window.d.ts.map +1 -0
  76. package/dist/renderers/presented-frame-channel.d.ts +107 -0
  77. package/dist/renderers/presented-frame-channel.d.ts.map +1 -0
  78. package/dist/renderers/scene-render-scheduler.d.ts +20 -0
  79. package/dist/renderers/scene-render-scheduler.d.ts.map +1 -0
  80. package/dist/sessions/media-session-defaults.d.ts +10 -6
  81. package/dist/sessions/media-session-defaults.d.ts.map +1 -1
  82. package/dist/sessions/media-session-media.d.ts.map +1 -1
  83. package/dist/sessions/media-session-state.d.ts.map +1 -1
  84. package/dist/sessions/media-session.d.ts.map +1 -1
  85. package/dist/tracking.worker.js +58 -3
  86. package/dist/tracking.worker.js.map +1 -1
  87. package/dist/types/media-conditions.d.ts +149 -0
  88. package/dist/types/media-conditions.d.ts.map +1 -0
  89. package/dist/types/media-normalization.d.ts +34 -0
  90. package/dist/types/media-normalization.d.ts.map +1 -1
  91. package/dist/types/media-renderer.d.ts +31 -1
  92. package/dist/types/media-renderer.d.ts.map +1 -1
  93. package/dist/types/media-session.d.ts +89 -8
  94. package/dist/types/media-session.d.ts.map +1 -1
  95. package/dist/types/render-preparation.d.ts +101 -4
  96. package/dist/types/render-preparation.d.ts.map +1 -1
  97. package/dist/web-video-engine/analysis-session.d.ts +76 -0
  98. package/dist/web-video-engine/analysis-session.d.ts.map +1 -0
  99. package/dist/web-video-engine/analysis.d.ts +7 -0
  100. package/dist/web-video-engine/analysis.d.ts.map +1 -0
  101. package/dist/web-video-engine/analysis.js +1678 -0
  102. package/dist/web-video-engine/analysis.js.map +1 -0
  103. package/dist/web-video-engine/cache-budget.d.ts +19 -0
  104. package/dist/web-video-engine/cache-budget.d.ts.map +1 -0
  105. package/dist/web-video-engine/canvas-sink-scrub-cursor.d.ts +90 -0
  106. package/dist/web-video-engine/canvas-sink-scrub-cursor.d.ts.map +1 -0
  107. package/dist/web-video-engine/clock.d.ts +83 -0
  108. package/dist/web-video-engine/clock.d.ts.map +1 -0
  109. package/dist/web-video-engine/constants.d.ts +253 -0
  110. package/dist/web-video-engine/constants.d.ts.map +1 -0
  111. package/dist/web-video-engine/create-scrub-cursor.d.ts +62 -0
  112. package/dist/web-video-engine/create-scrub-cursor.d.ts.map +1 -0
  113. package/dist/web-video-engine/decode-resolution.d.ts +115 -0
  114. package/dist/web-video-engine/decode-resolution.d.ts.map +1 -0
  115. package/dist/web-video-engine/decode-scheduler.d.ts +356 -0
  116. package/dist/web-video-engine/decode-scheduler.d.ts.map +1 -0
  117. package/dist/web-video-engine/decode-session.d.ts +276 -0
  118. package/dist/web-video-engine/decode-session.d.ts.map +1 -0
  119. package/dist/web-video-engine/decode-source.d.ts +250 -0
  120. package/dist/web-video-engine/decode-source.d.ts.map +1 -0
  121. package/dist/web-video-engine/diagnostics-store.d.ts +18 -0
  122. package/dist/web-video-engine/diagnostics-store.d.ts.map +1 -0
  123. package/dist/web-video-engine/diagnostics.d.ts +316 -0
  124. package/dist/web-video-engine/diagnostics.d.ts.map +1 -0
  125. package/dist/web-video-engine/embedded-engine-worker.d.ts +2 -0
  126. package/dist/web-video-engine/embedded-engine-worker.d.ts.map +1 -0
  127. package/dist/web-video-engine/engine-core.d.ts +258 -0
  128. package/dist/web-video-engine/engine-core.d.ts.map +1 -0
  129. package/dist/web-video-engine/engine.d.ts +26 -0
  130. package/dist/web-video-engine/engine.d.ts.map +1 -0
  131. package/dist/web-video-engine/engine.js +873 -0
  132. package/dist/web-video-engine/engine.js.map +1 -0
  133. package/dist/web-video-engine/engine.worker.d.ts +2 -0
  134. package/dist/web-video-engine/engine.worker.d.ts.map +1 -0
  135. package/dist/web-video-engine/engine.worker.js +31320 -0
  136. package/dist/web-video-engine/engine.worker.js.map +1 -0
  137. package/dist/web-video-engine/frame-cache.d.ts +129 -0
  138. package/dist/web-video-engine/frame-cache.d.ts.map +1 -0
  139. package/dist/web-video-engine/frame-extractor.d.ts +28 -0
  140. package/dist/web-video-engine/frame-extractor.d.ts.map +1 -0
  141. package/dist/web-video-engine/frame-timeline-GINI8Gum.js +560 -0
  142. package/dist/web-video-engine/frame-timeline-GINI8Gum.js.map +1 -0
  143. package/dist/web-video-engine/frame-timeline.d.ts +71 -0
  144. package/dist/web-video-engine/frame-timeline.d.ts.map +1 -0
  145. package/dist/web-video-engine/frame-walker.d.ts +74 -0
  146. package/dist/web-video-engine/frame-walker.d.ts.map +1 -0
  147. package/dist/web-video-engine/index.d.ts +3 -0
  148. package/dist/web-video-engine/index.d.ts.map +1 -0
  149. package/dist/web-video-engine/index.js +3 -0
  150. package/dist/web-video-engine/index.js.map +1 -0
  151. package/dist/web-video-engine/key-packet.d.ts +65 -0
  152. package/dist/web-video-engine/key-packet.d.ts.map +1 -0
  153. package/dist/web-video-engine/keyframe-index.d.ts +91 -0
  154. package/dist/web-video-engine/keyframe-index.d.ts.map +1 -0
  155. package/dist/web-video-engine/mirror-store.d.ts +56 -0
  156. package/dist/web-video-engine/mirror-store.d.ts.map +1 -0
  157. package/dist/web-video-engine/renderer.d.ts +94 -0
  158. package/dist/web-video-engine/renderer.d.ts.map +1 -0
  159. package/dist/web-video-engine/rotation.d.ts +35 -0
  160. package/dist/web-video-engine/rotation.d.ts.map +1 -0
  161. package/dist/web-video-engine/scrub-controller.d.ts +376 -0
  162. package/dist/web-video-engine/scrub-controller.d.ts.map +1 -0
  163. package/dist/web-video-engine/scrub-cursor.d.ts +342 -0
  164. package/dist/web-video-engine/scrub-cursor.d.ts.map +1 -0
  165. package/dist/web-video-engine/scrub-trajectory.d.ts +30 -0
  166. package/dist/web-video-engine/scrub-trajectory.d.ts.map +1 -0
  167. package/dist/web-video-engine/source-residency.d.ts +57 -0
  168. package/dist/web-video-engine/source-residency.d.ts.map +1 -0
  169. package/dist/web-video-engine/trace-recorder.d.ts +164 -0
  170. package/dist/web-video-engine/trace-recorder.d.ts.map +1 -0
  171. package/dist/web-video-engine/types.d.ts +204 -0
  172. package/dist/web-video-engine/types.d.ts.map +1 -0
  173. package/dist/web-video-engine/video-engine.d.ts +426 -0
  174. package/dist/web-video-engine/video-engine.d.ts.map +1 -0
  175. package/dist/web-video-engine/webgpu-renderer.d.ts +62 -0
  176. package/dist/web-video-engine/webgpu-renderer.d.ts.map +1 -0
  177. package/dist/web-video-engine/worker-bridge.d.ts +12 -0
  178. package/dist/web-video-engine/worker-bridge.d.ts.map +1 -0
  179. package/dist/web-video-engine/worker-dispatch.d.ts +17 -0
  180. package/dist/web-video-engine/worker-dispatch.d.ts.map +1 -0
  181. package/dist/web-video-engine/worker-protocol.d.ts +267 -0
  182. package/dist/web-video-engine/worker-protocol.d.ts.map +1 -0
  183. package/node_modules/supervision-js-core/dist/detections/buffered-detection-timeline.d.ts.map +1 -1
  184. package/node_modules/supervision-js-core/dist/detections/composite-detection-frame-source.d.ts.map +1 -1
  185. package/node_modules/supervision-js-core/dist/index.d.ts +4 -3
  186. package/node_modules/supervision-js-core/dist/index.d.ts.map +1 -1
  187. package/node_modules/supervision-js-core/dist/index.js +1075 -266
  188. package/node_modules/supervision-js-core/dist/index.js.map +1 -1
  189. package/node_modules/supervision-js-core/dist/styles/default-annotation-presentation.d.ts.map +1 -1
  190. package/node_modules/supervision-js-core/dist/styles/interaction-style.d.ts +4 -36
  191. package/node_modules/supervision-js-core/dist/styles/interaction-style.d.ts.map +1 -1
  192. package/node_modules/supervision-js-core/dist/styles/polyline-style.d.ts +5 -0
  193. package/node_modules/supervision-js-core/dist/styles/polyline-style.d.ts.map +1 -1
  194. package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts +92 -7
  195. package/node_modules/supervision-js-core/dist/types/annotation-renderer.d.ts.map +1 -1
  196. package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts +179 -17
  197. package/node_modules/supervision-js-core/dist/types/detection-timeline.d.ts.map +1 -1
  198. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts +78 -2
  199. package/node_modules/supervision-js-core/dist/types/media-rendering.d.ts.map +1 -1
  200. package/node_modules/supervision-js-core/dist/types/polyline-style.d.ts +2 -0
  201. package/node_modules/supervision-js-core/dist/types/polyline-style.d.ts.map +1 -1
  202. package/node_modules/supervision-js-core/dist/types/session-lifecycle.d.ts +16 -0
  203. package/node_modules/supervision-js-core/dist/types/session-lifecycle.d.ts.map +1 -1
  204. package/node_modules/supervision-js-core/dist/utils/detection-conversions.d.ts.map +1 -1
  205. package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts +5 -0
  206. package/node_modules/supervision-js-core/dist/utils/detection-frames.d.ts.map +1 -1
  207. package/node_modules/supervision-js-core/dist/utils/detection-masks.d.ts +9 -0
  208. package/node_modules/supervision-js-core/dist/utils/detection-masks.d.ts.map +1 -1
  209. package/node_modules/supervision-js-core/dist/utils/detection-ranges.d.ts +18 -0
  210. package/node_modules/supervision-js-core/dist/utils/detection-ranges.d.ts.map +1 -0
  211. package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts +15 -2
  212. package/node_modules/supervision-js-core/dist/utils/id-mask-frame.d.ts.map +1 -1
  213. package/node_modules/supervision-js-core/dist/utils/wait-bound.d.ts +7 -0
  214. package/node_modules/supervision-js-core/dist/utils/wait-bound.d.ts.map +1 -0
  215. package/package.json +22 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analysis.js","sources":["../src/key-packet.ts","../src/rotation.ts","../src/decode-session.ts","../src/scrub-cursor.ts","../src/decode-source.ts","../src/keyframe-index.ts","../src/analysis-session.ts","../src/frame-extractor.ts","../src/frame-walker.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;AAAA;;;;;;;;;;AAUG;AAEH;;;;AAIG;AACH,MAAM,sBAAsB,GAAG,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;AAE1E;AACA,MAAM,aAAa,GAAG,IAAI;AAE1B;;;AAGG;AACH,MAAM,qBAAqB,GAAG,CAAC;AAE/B;AACA,MAAM,SAAS,GAAG,CAAC;AAEnB;;;;;AAKG;AACH,MAAM,mBAAmB,GAAG,EAAE;AAC9B,MAAM,kBAAkB,GAAG,EAAE;AAE7B;AACA,MAAM,4BAA4B,GAAG,CAAC;AAEtC,MAAM,0BAA0B,GAAG,IAAI;AAEvC;;;AAGG;AACH,MAAM,aAAa,GAAoC,CAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;AAE3E;;;;AAIG;AACG,SAAU,cAAc,CAC5B,WAA8C,EAAA;AAE9C,IAAA,IAAI,CAAC,WAAW;AAAE,QAAA,OAAO,IAAI;AAC7B,IAAA,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,CAAC;AACtC,IAAA,IAAI,MAAM,CAAC,MAAM,IAAI,4BAA4B;AAAE,QAAA,OAAO,IAAI;IAC9D,MAAM,QAAQ,GACZ,MAAM,CAAC,4BAA4B,CAAC,GAAG,0BAA0B;AACnE,IAAA,OAAO,aAAa,CAAC,QAAQ,CAAC,IAAI,IAAI;AACxC;AAEA,SAAS,UAAU,CACjB,WAA2D,EAAA;AAE3D,IAAA,IAAI,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE;AACnC,QAAA,OAAO,IAAI,UAAU,CACnB,WAAW,CAAC,MAAM,EAClB,WAAW,CAAC,UAAU,EACtB,WAAW,CAAC,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IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE;AACvE,gBAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,oBAAA,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE;oBACzB;gBACF;gBACA,MAAM,IAAI,CAAC,KAAK;YAClB;QACF;QAAE,OAAO,KAAK,EAAE;;;YAGd,IAAI,CAAC,IAAI,CAAC,MAAM;AAAE,gBAAA,MAAM,KAAK;QAC/B;gBAAU;AACR,YAAA,MAAM,IAAI,CAAC,MAAM,EAAE;QACrB;IACF;AAEA,IAAA,MAAM,KAAK,GAAA;AACT,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI;AAClB,QAAA,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;IAC7B;AACD;;;;"}
@@ -0,0 +1,19 @@
1
+ export interface CacheBudgets {
2
+ readonly exactBudgetBytes: number;
3
+ readonly previewCapacity: number;
4
+ }
5
+ /**
6
+ * Sizes both cache tiers to the device's reported RAM and the frame size.
7
+ *
8
+ * The exact tier holds a working set the access pattern fixes in frames, the
9
+ * scrub prefetch window, so its slot floor survives any frame size and the RAM
10
+ * band adds speculative slots on top only while a slot stays cheap. An 8MP
11
+ * source lands on the floor and keeps nothing speculative, which is what holds
12
+ * its resident footprint down; coverage past the window comes from the preview
13
+ * tier at a 79th of the cost per slot. That tier has no working set to protect,
14
+ * so its count is purely its byte budget over the downscaled frame size, which
15
+ * gives a square 8MP source enough coarse history without over-allocating for a
16
+ * small 16:9 one.
17
+ */
18
+ export declare function resolveCacheBudgets(decodeWidth: number, decodeHeight: number, previewWidth: number): CacheBudgets;
19
+ //# sourceMappingURL=cache-budget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache-budget.d.ts","sourceRoot":"","sources":["../src/cache-budget.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;CAClC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,EACpB,YAAY,EAAE,MAAM,GACnB,YAAY,CAyBd"}
@@ -0,0 +1,90 @@
1
+ import { type AnySourceHandle } from "./decode-source";
2
+ import type { FrameId } from "./frame-timeline";
3
+ import { type ScrubCursor, ScrubCursorState, type ScrubFrame, type ScrubFrameListener, type ScrubTrackInfo } from "./scrub-cursor";
4
+ import { type Sec } from "./types";
5
+ /**
6
+ * Uncached cursor seam: a thin latest-wins queue and play-mode forward iterator
7
+ * over an opened decode source. This is the cacheStrategy "none" backend, kept
8
+ * for consumers that do not want the scheduler's memory footprint.
9
+ *
10
+ * Random-access seeks ride the provider's getFrame(t), which does the keyframe
11
+ * walk and GOP decode internally. Forward playback uses frames(start) as a
12
+ * streaming iterator, alive only between attachPlay and detachPlay so a paused
13
+ * cursor never holds a decoder pipeline open.
14
+ *
15
+ * On the canvas source it emits CanvasScrubFrame; on the zero-copy sample source
16
+ * a fresh decode emits SampleScrubFrame, whose close the controller owns after
17
+ * paint. With no cache this cursor never blits a sample, so every fresh sample
18
+ * is handed straight to the consumer.
19
+ *
20
+ * Coalescing: seekTo/seekToKey overwrite pendingSeekTargetS; drainSeek processes
21
+ * only the latest target after the in-flight one settles, so a burst of scrub
22
+ * seeks collapses to the most recent.
23
+ */
24
+ export declare class CanvasSinkScrubCursor implements ScrubCursor {
25
+ private readonly provider;
26
+ private readonly trackInfo;
27
+ private readonly disposeSource;
28
+ /**
29
+ * Forward-playback iterator. Lives only between attachPlay and detachPlay so
30
+ * a paused cursor never holds a decoder pipeline open.
31
+ */
32
+ private iterator;
33
+ /**
34
+ * Serializes next() calls. AsyncGenerator iterators are single-consumer;
35
+ * without this chain a rAF tick racing a backup pull could double-advance
36
+ * and emit duplicate frames.
37
+ */
38
+ private nextInFlight;
39
+ private nextPending;
40
+ private currentState;
41
+ private readonly listeners;
42
+ private idleResolvers;
43
+ private settleResolvers;
44
+ private pendingSeekTargetS;
45
+ private pendingSeekKeyOnly;
46
+ private seekDraining;
47
+ private closed;
48
+ private lastEmittedFrame;
49
+ constructor(source: AnySourceHandle);
50
+ get state(): ScrubCursorState;
51
+ get track(): ScrubTrackInfo;
52
+ get isIdle(): boolean;
53
+ open(): Promise<void>;
54
+ /** No cache to read; the scheduler is the caching backend. */
55
+ peekCached(): ScrubFrame | null;
56
+ /**
57
+ * Decodes one named frame of the source and emits it.
58
+ *
59
+ * The retrieval is at-or-before a time the frame table produced, and the
60
+ * demuxer normalises that back to the same integer tick it came from, so it
61
+ * lands on that frame and no other. Nothing here walks, compares or skips,
62
+ * so a step across a frame boundary needs no epsilon.
63
+ */
64
+ seekToFrame(frame: FrameId): Promise<ScrubFrame | null>;
65
+ seekTo(timestamp: Sec): void;
66
+ /**
67
+ * getFrame(t) lands at or before t, which is the keyframe-or-earlier
68
+ * semantics seekToKey implies. The emitted frame is marked as a keyframe
69
+ * result via the keyOnly flag.
70
+ */
71
+ seekToKey(timestamp: Sec): void;
72
+ /** Floors a seek target to the track's first timestamp. A seek below the
73
+ * origin (an offset/trimmed clip) has no sample to land on, so it would
74
+ * emit nothing; clamping lands it on the first frame instead. */
75
+ private clampToOrigin;
76
+ attachPlay(startS: number): void;
77
+ detachPlay(): void;
78
+ next(): void;
79
+ idle(): Promise<void>;
80
+ seekSettled(): Promise<void>;
81
+ subscribe(listener: ScrubFrameListener): () => void;
82
+ close(): Promise<void>;
83
+ private drainSeek;
84
+ private runSeek;
85
+ private pullForwardOne;
86
+ private emitFrame;
87
+ private flushIdleResolvers;
88
+ private flushSettleResolvers;
89
+ }
90
+ //# sourceMappingURL=canvas-sink-scrub-cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canvas-sink-scrub-cursor.d.ts","sourceRoot":"","sources":["../src/canvas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,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC;IAU7D,MAAM,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;IAM5B;;;;OAIG;IACH,SAAS,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI;IAM/B;;sEAEkE;IAClE,OAAO,CAAC,aAAa;IAIrB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAMhC,UAAU,IAAI,IAAI;IAKlB,IAAI,IAAI,IAAI;IAiBZ,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKrB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAO5B,SAAS,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,IAAI;IAU7C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAad,SAAS;YAkBT,OAAO;YASP,cAAc;IAc5B,OAAO,CAAC,SAAS;IAyBjB,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,oBAAoB;CAK7B"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Media clock. Models playback time, NOT wall time. `now()` is frozen while
3
+ * paused and advances at real-time rate while playing. This is the same
4
+ * model the official mediabunny media-player example uses for its playback
5
+ * loop (audioContext.currentTime - audioContextStartTime + playbackTimeAtStart).
6
+ *
7
+ * Engine never imports AudioContext directly. The default PerformanceMediaClock
8
+ * is correct for muted scrubbing; an AudioContextMediaClock is the documented
9
+ * seam for future audio-bearing consumers needing sample-accurate A/V sync.
10
+ *
11
+ * Lifecycle:
12
+ * - play(t?): captures t (default = current media time) as the anchor; from
13
+ * here `now()` advances at wall-clock rate.
14
+ * - pause(): freezes `now()` at its current value. Subsequent reads return
15
+ * that frozen value until play() or seek() runs.
16
+ * - seek(t): sets the anchor to t. If currently playing, time continues to
17
+ * advance from t. If paused, `now()` returns t.
18
+ * - setRate(r): media seconds per wall second from here on. Only the slope
19
+ * changes; where the playhead is does not.
20
+ */
21
+ export interface MediaClock {
22
+ /** Current media time in seconds. Frozen while paused. */
23
+ now(): number;
24
+ /** Begin advancing from t (default: current value of now()). */
25
+ play(t?: number): void;
26
+ /** Freeze now() at its current value. */
27
+ pause(): void;
28
+ /** Jump to media time t. Subsequent play/pause behavior is preserved. */
29
+ seek(t: number): void;
30
+ /** True iff play() is in effect. */
31
+ readonly playing: boolean;
32
+ /** Media seconds per wall second. Forward only, so always above zero. */
33
+ readonly rate: number;
34
+ /**
35
+ * Changes the slope from now on. Implementations re-anchor on the current
36
+ * media time first, so the elapsed span already accrued keeps the rate it
37
+ * was accrued at and the playhead does not jump.
38
+ */
39
+ setRate(rate: number): void;
40
+ }
41
+ /**
42
+ * Default wall-clock-driven media clock. Uses performance.now() as the wall
43
+ * source. Suitable for muted scrubbing where A/V sync is not a concern.
44
+ */
45
+ export declare class PerformanceMediaClock implements MediaClock {
46
+ private mediaTimeAtAnchor;
47
+ private wallTimeAtAnchorMs;
48
+ private _playing;
49
+ private _rate;
50
+ get playing(): boolean;
51
+ get rate(): number;
52
+ now(): number;
53
+ setRate(rate: number): void;
54
+ play(t?: number): void;
55
+ pause(): void;
56
+ seek(t: number): void;
57
+ }
58
+ /**
59
+ * Documented future implementation for audio-bearing consumers needing
60
+ * sample-accurate A/V sync. NOT shipped. Kept as a TSDoc anchor so the
61
+ * seam exists when an audio consumer wires up.
62
+ *
63
+ * @example
64
+ * const ctx = new AudioContext()
65
+ * const clock = new AudioContextMediaClock(ctx)
66
+ * const engine = new EngineCore({ emit, clock })
67
+ */
68
+ export declare class AudioContextMediaClock implements MediaClock {
69
+ private readonly ctx;
70
+ private mediaTimeAtAnchor;
71
+ private ctxTimeAtAnchor;
72
+ private _playing;
73
+ private _rate;
74
+ constructor(ctx: AudioContext);
75
+ get playing(): boolean;
76
+ get rate(): number;
77
+ now(): number;
78
+ setRate(rate: number): void;
79
+ play(t?: number): void;
80
+ pause(): void;
81
+ seek(t: number): void;
82
+ }
83
+ //# sourceMappingURL=clock.d.ts.map
@@ -0,0 +1 @@
1
+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YAAY;IAI9C,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,GAAG,IAAI,MAAM;IAUb,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAM3B,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAUtB,KAAK,IAAI,IAAI;IAOb,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;CAItB"}
@@ -0,0 +1,253 @@
1
+ /**
2
+ * READ_AHEAD_CANVAS is the playback decode-ahead depth: how many decoded frames
3
+ * the controller keeps queued ahead of the playhead so a decode that overruns a
4
+ * frame interval does not starve the next tick (the cause of stutter even on
5
+ * small, well-encoded clips, where playback otherwise pulls one frame per paint
6
+ * with no cushion). Applies to canvas blits, which are independent and cheap to
7
+ * hold; sample (zero-copy) frames pin a decoder slot each, so the controller
8
+ * keeps those at a depth of one to spare the WebCodecs pool.
9
+ *
10
+ * REANCHOR_STALL_MS is the wall time past which a picture standing still stops
11
+ * being a hitch to work through and becomes a stretch to re-anchor across. Two
12
+ * gaps are measured against it, and they settle in opposite directions.
13
+ *
14
+ * A gap between playing render ticks is a loop nothing was driving, which a
15
+ * hidden tab produces. Nobody was watching, so the clock is the truth and the
16
+ * walk seeks forward onto the playhead.
17
+ *
18
+ * A gap between the walk's deliveries is a pipeline with nothing to show while
19
+ * the loop ran, which a seek onto unbuffered ground produces. The viewer sat
20
+ * through it waiting on a position they asked for, so the frame is the truth
21
+ * and the clock is pulled back onto it. Left to catch up instead, the walk
22
+ * replays the whole wait at decode speed on its way to the playhead: measured
23
+ * against the deployed demo over six seeks, a mean 2.4x for a second, peaking
24
+ * at 24x, with 44 source frames flashed past.
25
+ *
26
+ * Wall time is the reading in both, so a high rate legitimately moving the
27
+ * media clock several frames per gap is not read as an absence.
28
+ *
29
+ * Half a second is where the tick-gap costs cross at 1x. A backlog costs one
30
+ * decode per source frame in it, measured at 240 frames a second on the 30fps
31
+ * demo clip (4.2ms each), against a keyframe-anchored seek at p95 47ms on the
32
+ * same clip: half a second of 30fps backlog is 15 frames, so 63ms of decode
33
+ * against that 47ms, and every higher rate puts more frames in the same gap. It
34
+ * clears the worst legitimate gap of either kind by the same order: a foreground
35
+ * loop leaves a long task or a GC pause to the frame-by-frame path, and forty
36
+ * seconds of network-fed playback of the demo clip held its picture still for at
37
+ * most 51ms.
38
+ *
39
+ * The present cadence is how often playback puts a frame on screen: the rate's
40
+ * whole demand cut to the share of it the machine has been paying for, and never
41
+ * under the source's own frame rate. At a full share the pump declines nothing,
42
+ * which is where a machine with headroom stays at every rate.
43
+ * A step moves the share by PRESENT_CADENCE_STEP, taking a quarter off it when
44
+ * the pipeline has fallen behind the playhead and putting that same quarter back
45
+ * when it has room to spare. The share bottoms out at one over
46
+ * PLAYBACK_RATE.MAX, which is the deepest cut that means anything: below it even
47
+ * the fastest rate asks for less than the source rate the cadence floors at.
48
+ *
49
+ * What takes the share down is a running bill, in frames, between what the clock
50
+ * asked the pipeline for and what the play walk delivered. The bill accumulates
51
+ * rather than being read per tick, which is what tells a shortfall from noise:
52
+ * counting whole frames against a fractional demand leaves every tick out by up
53
+ * to one either way and those cancel, while a machine that cannot sustain the
54
+ * rate falls short every tick and adds up. Measured over 100ms windows on an M3
55
+ * Max at rates 2x to 8x, a pipeline with headroom stayed inside 1.5 frames of
56
+ * its demand either way, so a bill of PRESENT_CADENCE_EVIDENCE_FRAMES frames is
57
+ * one it cannot run up.
58
+ *
59
+ * What puts the share back is the walk holding a frame the clock has not run
60
+ * past, unbroken for the wall time the source takes to produce that many frames.
61
+ * That is the only evidence a pipeline can offer that it has room to spare: a
62
+ * machine at equilibrium delivers exactly what the clock asks for however much
63
+ * headroom it has, so waiting for a surplus in the bill would leave every
64
+ * machine at whatever its worst stretch measured. It is a live reading and the
65
+ * bill is a cumulative one, which is why each takes one direction: ground lost
66
+ * still reads lost once the walk is keeping up again, and catch-up pulls are
67
+ * what carry the walk back onto the playhead.
68
+ *
69
+ * Neither reading is the depth of the decode-ahead queue, which belongs to the
70
+ * decode path and not to the machine: on the zero-copy path, which pins a
71
+ * decoder slot per queued frame and so buffers one, a single frame in hand is
72
+ * full depth and one tick from empty alike.
73
+ *
74
+ * How far behind the machine is therefore sets the pace rather than the size of
75
+ * the step: the bigger the shortfall the sooner the bill reaches that figure and
76
+ * the sooner the next step lands. Zeroing on each step makes the next one gather
77
+ * its own evidence, which is what stops a share sitting at the machine's limit
78
+ * from pulsing.
79
+ *
80
+ * Frames the clock passed, frames the walk delivered and wall time on the
81
+ * playhead: nothing either reading is made of knows what the panel refreshes at,
82
+ * so one machine lands on one cadence on any panel. A faster panel offers more
83
+ * slots and a machine with the headroom fills them; what it cannot do is hold
84
+ * the pump above what the machine pays for, because the share comes down until
85
+ * the pipeline is back on the playhead.
86
+ *
87
+ * PRESENT_CADENCE_SLACK is how far under the interval still counts as a full
88
+ * one. Presents land on display ticks, so a panel refreshing at the ceiling
89
+ * measures each gap as one interval give or take rAF jitter, and an exact
90
+ * comparison would decline every second frame there. A quarter leaves 4.2ms of
91
+ * jitter room at 60Hz.
92
+ *
93
+ * PRESENT_CADENCE_HZ is the demand above which frames the pump culled or
94
+ * declined dominate the dropped-frame ledger, so the discarded-frames rule in
95
+ * evaluateWarnings stands down rather than reading a count it cannot attribute.
96
+ */
97
+ export declare const PLAYBACK: {
98
+ readonly READ_AHEAD_CANVAS: 3;
99
+ readonly PRESENT_CADENCE_EVIDENCE_FRAMES: 3;
100
+ readonly REANCHOR_STALL_MS: 500;
101
+ readonly PRESENT_CADENCE_STEP: 0.75;
102
+ readonly PRESENT_CADENCE_SLACK: 0.25;
103
+ readonly PRESENT_CADENCE_HZ: 60;
104
+ };
105
+ /**
106
+ * Forward playback-rate range the engine accepts. Reverse playback needs a
107
+ * backwards decode strategy the runtime does not have, so zero and negative
108
+ * rates are refused rather than approximated.
109
+ *
110
+ * MAX is an API bound, not a promise that every source plays smoothly there.
111
+ * Sustaining rate r means decoding r x nativeFps frames a second, and the
112
+ * decode-ahead cushion is fixed at PLAYBACK.READ_AHEAD_CANVAS frames (raising it
113
+ * would outrun the CanvasSink pool and tear), so how high a given source really
114
+ * goes is a property of that source's frame size and encode. The engine measures
115
+ * it instead of guessing: DiagnosticsSnapshot carries the commanded rate beside
116
+ * the presented one, and PLAYBACK_RATE_NOT_SUSTAINED fires when they diverge.
117
+ * SUSTAINED_SHORTFALL is the share of the commanded rate the presented one has
118
+ * to hold to count as sustained.
119
+ */
120
+ export declare const PLAYBACK_RATE: {
121
+ readonly MIN: 0.25;
122
+ readonly MAX: 8;
123
+ readonly SUSTAINED_SHORTFALL: 0.8;
124
+ };
125
+ /**
126
+ * CanvasSink frame-pool size: how many decoded canvases the sink recycles
127
+ * round-robin. The pool has no backpressure (a new decode overwrites the oldest
128
+ * slot rather than blocking), and the playback queue hands the raw pool canvas
129
+ * straight to the painter, so the pool must outnumber every canvas outstanding at
130
+ * once: the full play read-ahead, the one in flight, and the one being painted.
131
+ * Sized below that, a fresh decode stomps the pixels of a still-queued frame
132
+ * before it paints (silent tearing). The cache is unaffected; it copies into its
133
+ * own OffscreenCanvas. Derived from the read-ahead so the two cannot drift.
134
+ */
135
+ export declare const SCRUB: {
136
+ readonly DEFAULT_POOL_SIZE: number;
137
+ };
138
+ /**
139
+ * Bounds on building a track's frame timeline, the presentation-order table of
140
+ * every frame's timestamp in the container's own integer grain.
141
+ *
142
+ * MAX_FRAMES caps the metadata walk that builds it. A 70-second 30fps source
143
+ * walks 2113 packets in a measured 5.7ms; the cap is four hundred times that,
144
+ * which no ordinary file reaches and a fragmented or endless source does. Past
145
+ * it the load fails, so nothing silently runs without frame identity.
146
+ *
147
+ * FALLBACK_TICK_RATE is for a track backing that cannot state its grain. A
148
+ * microsecond is the finest timestamp WebCodecs carries, so no real timestamp is
149
+ * lost at that rate; what is lost is the guarantee that every timestamp is a
150
+ * whole tick.
151
+ */
152
+ export declare const FRAME_TIMELINE: {
153
+ readonly MAX_FRAMES: 1000000;
154
+ readonly FALLBACK_TICK_RATE: 1000000;
155
+ };
156
+ /**
157
+ * Tiered frame-cache tunables. Both tiers hold OffscreenCanvas blits, never
158
+ * VideoFrames: a raw-frame cache pins decoder output, stalling the decoder and
159
+ * growing VRAM without bound. The exact tier holds crisp full-resolution frames
160
+ * around the scrub playhead; the preview tier is the coarse downscaled history
161
+ * that answers a scrub anywhere else instantly while a crisp decode lands.
162
+ *
163
+ * Only the exact tier's window is worth holding at full resolution. A crisp
164
+ * frame the playhead has moved off is one re-anchored decode away: on the
165
+ * session path that is a probe plus a walk from the enclosing sync sample,
166
+ * measured at 49ms mean / 80ms worst on a 2840x2840 15fps source, flat in how
167
+ * far the jump travelled. Coverage past the window is worth having, not worth
168
+ * having crisp, so it lives in the preview tier at a 79th of the bytes.
169
+ *
170
+ * resolveCacheBudgets turns these into a per-source budget from
171
+ * navigator.deviceMemory and the decode frame size. A crisp slot costs
172
+ * decodeWidth x decodeHeight x 4 bytes, which spans two orders of magnitude
173
+ * across sources: 0.9MB for a 640x360 decode, 32.3MB for a square 8MP native
174
+ * decode. So a byte figure alone sets the slot count only for small frames. For
175
+ * large ones any byte figure worth spending buys fewer slots than the access
176
+ * pattern needs, and a slot floor sets the count with the bytes following from
177
+ * it. The exact tier is therefore both: EXACT_BUDGET_BYTES_PER_GB times reported
178
+ * RAM clamped to [MIN, MAX], raised to whatever MIN_EXACT_SLOTS costs at this
179
+ * frame size.
180
+ *
181
+ * MIN_EXACT_SLOTS: the scrub prefetch window, a center frame plus
182
+ * SCRUB_WINDOW_FRAMES each side. DecodeScheduler narrows its window to whatever
183
+ * the exact tier holds, so this floor is what keeps an 8MP source at the full
184
+ * window width, and slots past it would be speculative history the preview tier
185
+ * already answers.
186
+ *
187
+ * PREVIEW_SLOTS_MAX: the preview slot count is its byte budget over the
188
+ * downscaled frame size, capped here. No floor pairs with it: raising a starved
189
+ * count means overspending the byte budget, when the frame width is what a wide
190
+ * preview has to give up. At a 79th of a crisp slot the tier carries the
191
+ * timeline coverage an 8MP source cannot afford crisply: 163 slots against the
192
+ * exact tier's 13, 11s of a 15fps clip.
193
+ *
194
+ * SKIP_NEAR_MS: cache lookups that resolve to a frame within this many
195
+ * milliseconds of what the visible canvas already shows are rejected so the
196
+ * consumer falls through to a full-res decode. Keeps a frame-step gesture from
197
+ * snapping back to the already-painted neighbor. Fixed in ms, so it spans one
198
+ * frame at 15fps and three at 30fps.
199
+ *
200
+ * DEFAULT_BUCKET_MS: timestamp-bucket size when the source frame rate is
201
+ * unknown. Finer than the frame interval at any rate up to 30fps, so distinct
202
+ * frames never collapse onto one slot.
203
+ *
204
+ * DEFAULT_DEVICE_MEMORY_GB: the RAM assumed for every browser that reports
205
+ * none, which is all of them outside Chromium and any page off a secure
206
+ * context. It is a guess, and the byte clamps above are what bound a wrong
207
+ * one: at 8 the exact tier sits on its ceiling and the preview tier at two
208
+ * thirds of its own.
209
+ */
210
+ export declare const FRAME_CACHE: {
211
+ readonly PREVIEW_WIDTH_PX: 320;
212
+ readonly SKIP_NEAR_MS: 100;
213
+ readonly DEFAULT_BUCKET_MS: 33;
214
+ readonly MIN_EXACT_SLOTS: 13;
215
+ readonly DEFAULT_DEVICE_MEMORY_GB: 8;
216
+ readonly EXACT_BUDGET_BYTES_PER_GB: number;
217
+ readonly EXACT_BUDGET_BYTES_MIN: number;
218
+ readonly EXACT_BUDGET_BYTES_MAX: number;
219
+ readonly PREVIEW_BUDGET_BYTES_PER_GB: number;
220
+ readonly PREVIEW_BUDGET_BYTES_MIN: number;
221
+ readonly PREVIEW_BUDGET_BYTES_MAX: number;
222
+ readonly PREVIEW_SLOTS_MAX: 512;
223
+ };
224
+ /**
225
+ * Diagnostics instrument tunables. Inert unless a consumer opts in: the worker
226
+ * broadcasts a snapshot at BROADCAST_HZ only while subscribed, the trace rings
227
+ * allocate only while armed, and SCRUB_LATENCY_RING bounds the percentile sample.
228
+ */
229
+ export declare const DIAGNOSTICS: {
230
+ readonly BROADCAST_HZ: 10;
231
+ readonly TRACE_EVENT_CAP: 2000;
232
+ readonly TRACE_SNAPSHOT_CAP: 600;
233
+ readonly SCRUB_LATENCY_RING: 64;
234
+ };
235
+ /**
236
+ * What an armed capture actually keeps. The snapshot ring is fed at the fixed
237
+ * broadcast rate, so its capacity converts to a wall-clock window; the event
238
+ * ring is fed by paints and gestures at no fixed rate, so its bound is a count
239
+ * and nothing more. A readout that states one number for "the capture" is
240
+ * describing neither ring.
241
+ */
242
+ export declare const TRACE_RING_BOUNDS: {
243
+ readonly snapshotWindowMs: number;
244
+ readonly snapshotCap: 600;
245
+ readonly eventCap: 2000;
246
+ };
247
+ export declare const HANG_RECOVERY: {
248
+ readonly DECODE_HANG_TIMEOUT_MS: 30000;
249
+ readonly SEED_HANG_TIMEOUT_MS: 8000;
250
+ readonly SEED_DECODE_ATTEMPTS: 3;
251
+ readonly WORKER_COMMAND_TIMEOUT_MS: number;
252
+ };
253
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+FG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK;;CAER,CAAC;AAEX;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc;;;CAGjB,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;CAad,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,WAAW;;;;;CAKd,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB;;;;CAKpB,CAAC;AAsCX,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { DecodeResolutionStrategy } from "./decode-resolution";
2
+ import type { ScrubCursorFactory } from "./scrub-cursor";
3
+ import type { SourceResidency } from "./source-residency";
4
+ import type { UrlSourceReadConfig, VideoEngineError, VideoSource } from "./types";
5
+ /** On-screen canvas measurements the decode strategy reasons over. */
6
+ export interface ScrubViewport {
7
+ /** CSS-pixel width of the canvas box, or null when unmeasured. */
8
+ displayWidth: number | null;
9
+ devicePixelRatio: number;
10
+ }
11
+ /**
12
+ * Cache tuning passed through to the scheduler. Frame dimensions are filled from
13
+ * the resolved track. The budgets are optional overrides: omitted, they are
14
+ * resolved per source from device memory and frame size by resolveCacheBudgets.
15
+ */
16
+ export interface ScrubCacheConfig {
17
+ previewWidth: number;
18
+ previewCapacity?: number;
19
+ exactBudgetBytes?: number;
20
+ }
21
+ export interface CreateScrubCursorOptions {
22
+ source: VideoSource;
23
+ /**
24
+ * Decides the resolution frames are held and painted at: the display canvas
25
+ * backing store and every cache blit. Combined with the viewport and the
26
+ * track's native dimensions; defaults to native resolution when omitted.
27
+ * On the CanvasSink path it also sizes the sink's own output, but a path
28
+ * that owns its decoder decodes native and scales into these dimensions.
29
+ */
30
+ decodeStrategy?: DecodeResolutionStrategy;
31
+ /** On-screen box the decodeStrategy may scale to. Native when omitted. */
32
+ viewport?: ScrubViewport;
33
+ /** CanvasSink frame-pool size. */
34
+ poolSize?: number;
35
+ /** Cache tuning. Omit or pass null for the uncached cursor. */
36
+ cache?: ScrubCacheConfig | null;
37
+ /** Pin the 2D renderer. Mirrors the controller flag; rules out the zero-copy
38
+ * sample path so a 2D consumer keeps the byte-identical CanvasSink path. */
39
+ prefer2d?: boolean;
40
+ /**
41
+ * Called once when the decoder is judged unable to decode this source at
42
+ * all. A failure after open() cannot surface as a rejected promise, since by
43
+ * then nobody is awaiting one; this is how it reaches the transport.
44
+ */
45
+ onDecodeFailure?: (error: VideoEngineError) => void;
46
+ /** Serves the demuxer's byte reads from what this process already holds. */
47
+ sourceResidency?: SourceResidency;
48
+ /** Read tuning for a URL source, passed through to mediabunny. */
49
+ urlSource?: UrlSourceReadConfig;
50
+ signal?: AbortSignal;
51
+ }
52
+ /**
53
+ * Opens the decode source and chooses the cursor backend: the caching
54
+ * DecodeScheduler when a cache config is given, otherwise the uncached
55
+ * CanvasSinkScrubCursor. The returned cursor is already seeded with its first
56
+ * frame, so callers receive a ready cursor with track metadata resolved.
57
+ *
58
+ * This is the single place the backend is chosen, so the gate is one branch and
59
+ * both backends share the same opened source.
60
+ */
61
+ export declare const createScrubCursor: ScrubCursorFactory;
62
+ //# sourceMappingURL=create-scrub-cursor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-scrub-cursor.d.ts","sourceRoot":"","sources":["../src/create-scrub-cursor.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,OAAO,KAAK,EAAe,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACZ,MAAM,SAAS,CAAC;AAEjB,sEAAsE;AACtE,MAAM,WAAW,aAAa;IAC5B,kEAAkE;IAClE,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE,WAAW,CAAC;IACpB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE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