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,316 @@
1
+ import type { FrameCacheStats } from "./frame-cache";
2
+ import type { FrameId } from "./frame-timeline";
3
+ import type { GopStats } from "./keyframe-index";
4
+ import type { FrameQuality, SchedulerStats } from "./scrub-cursor";
5
+ import type { PresentationMode } from "./types";
6
+ /** Which render backend is painting the display canvas. */
7
+ export type RendererName = "2d" | "webgpu";
8
+ /** Resolved track facts worth surfacing for diagnostics. decodeWidth/Height
9
+ * explain cache slot counts: the exact tier is RAM-budgeted, so large frames
10
+ * mean few slots. */
11
+ export interface DiagnosticsTrack {
12
+ readonly decodeWidth: number;
13
+ readonly decodeHeight: number;
14
+ readonly nativeFps: number | null;
15
+ readonly durationS: number;
16
+ }
17
+ /**
18
+ * Engine-level diagnostics snapshot the worker assembles on demand. Combines the
19
+ * renderer (controller-owned), track facts, and the scheduler stats (cursor-
20
+ * owned, null on the uncached cursor). All plain data, so it crosses the worker
21
+ * boundary by structured clone.
22
+ *
23
+ * This is the legacy getStats shape, kept as a back-compat subset of the richer
24
+ * DiagnosticsSnapshot the broadcast plane carries. Existing getStats consumers
25
+ * read these three fields; the diagnostics instrument reads the superset.
26
+ */
27
+ export interface EngineDiagnostics {
28
+ readonly renderer: RendererName | null;
29
+ readonly track: DiagnosticsTrack | null;
30
+ readonly scheduler: SchedulerStats | null;
31
+ }
32
+ /** Per-paint realtime needles. effectivePaintFps is the painted rate over a
33
+ * trailing window of broadcast intervals (see PaintRateMeter), null unless
34
+ * playback was up across the whole window, so every snapshot in a series
35
+ * carries its own reading. ticks and paints reset at each play start, so they
36
+ * count the current play session rather than the source's lifetime.
37
+ * catchUpMs is how far the clock ran past the last painted frame.
38
+ * playQueueDepth is the decode-ahead buffer's current length: 0 while playing is
39
+ * the imminent-stall tell. */
40
+ export interface RealtimeDiagnostics {
41
+ readonly effectivePaintFps: number | null;
42
+ readonly catchUpMs: number;
43
+ readonly lateFrames: number;
44
+ readonly stalls: number;
45
+ readonly ticks: number;
46
+ readonly paints: number;
47
+ readonly playQueueDepth: number;
48
+ /** Decoded frames thrown away before reaching the canvas: ones that arrived
49
+ * for a position playback had left, buffered ones overtaken by the clock
50
+ * moving backwards, and the ones the present cadence declines once the rate
51
+ * asks for more frames a second than it. The first two are decode bandwidth
52
+ * spent on frames nobody ever saw; the third is the cadence doing its job,
53
+ * and at a high rate it dominates the count. */
54
+ readonly droppedFrames: number;
55
+ }
56
+ /**
57
+ * Lifetime frame ledger across the decode-to-screen pipe: what the decoder
58
+ * produced, what reached the canvas, what was discarded on the way. These three
59
+ * are only meaningful read together; the ratio between decoded and painted is
60
+ * the cost of every frame nobody saw. Monotonic from load, never reset by a
61
+ * play session. decodedFrames is null when the decode path cannot report it
62
+ * (the uncached cursor).
63
+ */
64
+ export interface PipelineDiagnostics {
65
+ readonly decodedFrames: number | null;
66
+ readonly paintedFrames: number;
67
+ readonly droppedFrames: number;
68
+ }
69
+ /** Last painted frame and its quality; see DiagnosticsSnapshot.screen. */
70
+ export interface ScreenDiagnostics {
71
+ /** Which frame of the source is up, by the engine's own frame table. */
72
+ readonly frameId: FrameId;
73
+ readonly mediaTimeMs: number;
74
+ readonly quality: FrameQuality;
75
+ }
76
+ /** Cache occupancy in bytes, derived from resident slot counts and frame dims.
77
+ * exactBytesPct is the exact tier's fill against its RAM ceiling; a high value
78
+ * with a low hit rate is the starved-cache tell. */
79
+ export interface CacheBytesDiagnostics {
80
+ readonly exactBytes: number;
81
+ readonly previewBytes: number;
82
+ readonly exactBudgetBytes: number;
83
+ readonly exactBytesPct: number;
84
+ }
85
+ /** Track geometry that explains decode cost. nativeWidth/Height come from the
86
+ * source track (omitted when the track exposes no native dims). downscaleRatio
87
+ * is decodeWidth/nativeWidth; decodeVsDisplayAreaRatio compares the decoded
88
+ * frame area to the bound canvas area (>1 means decoding larger than painted). */
89
+ export interface TrackGeometryDiagnostics {
90
+ readonly nativeWidth: number | null;
91
+ readonly nativeHeight: number | null;
92
+ readonly decodeWidth: number;
93
+ readonly decodeHeight: number;
94
+ readonly downscaleRatio: number | null;
95
+ readonly decodeVsDisplayAreaRatio: number | null;
96
+ readonly boundCanvasWidth: number | null;
97
+ readonly boundCanvasHeight: number | null;
98
+ }
99
+ /** GOP distribution plus the labelled estimates. estimatedGopWalkDepthFrames is
100
+ * an ESTIMATE: frames a worst-case off-anchor scrub would decode, derived from
101
+ * avg GOP and native fps, never measured inside the decode loop. */
102
+ export interface GopDiagnostics extends GopStats {
103
+ /** Media seconds from the playhead to the closest anchor the keyframe index
104
+ * has discovered so far. The index fills lazily, so this reads null until it
105
+ * holds one and tightens as it walks further. */
106
+ readonly distanceToNearestKeyframeS: number | null;
107
+ readonly estimatedGopWalkDepthFrames: number;
108
+ }
109
+ /** Scrub responsiveness aggregates lifted from the scheduler. cacheHitRatePct
110
+ * reads 0 when nothing has looked the cache up yet, which is indistinguishable
111
+ * from every lookup missing; cacheLookups() is the denominator that tells the
112
+ * two apart. */
113
+ export interface ScrubDiagnostics {
114
+ readonly samples: number;
115
+ readonly avgMs: number;
116
+ readonly maxMs: number;
117
+ readonly p50Ms: number;
118
+ readonly p95Ms: number;
119
+ readonly targetVsLandedMs: number;
120
+ readonly timeToCrispMs: number;
121
+ readonly cacheHitRatePct: number;
122
+ }
123
+ /**
124
+ * Seeks served by re-anchoring the running playback walk, the path a seek
125
+ * issued while playing takes, with the wall time each waited for its crisp
126
+ * frame. They never reach the cursor, so nothing in ScrubDiagnostics and no
127
+ * cache lookup counts them. samples is the denominator of avgMs and maxMs: it
128
+ * trails seeks whenever one is superseded, or the transport stopped under it,
129
+ * before its crisp frame arrived.
130
+ */
131
+ export interface PlaySeekDiagnostics {
132
+ readonly seeks: number;
133
+ readonly samples: number;
134
+ readonly avgMs: number;
135
+ readonly maxMs: number;
136
+ }
137
+ /** Decode/seek/prefetch counters lifted from the scheduler. */
138
+ export interface CounterDiagnostics {
139
+ readonly foregroundDecodes: number;
140
+ readonly prefetchExact: number;
141
+ readonly prefetchPreview: number;
142
+ readonly keyframeAnchored: number;
143
+ readonly exactSeeks: number;
144
+ readonly keySeeks: number;
145
+ readonly seekCoalesceDepth: number;
146
+ readonly probeRoundTrips: number;
147
+ readonly prefetchInFlight: boolean;
148
+ /**
149
+ * Background sweeps cancelled since the source opened, as a running total, so
150
+ * a rate is only ever the delta between two snapshots. Playback schedules no
151
+ * sweeps, so a clip that only plays never moves this.
152
+ */
153
+ readonly prefetchGeneration: number;
154
+ readonly nextPending: number;
155
+ /** How long the cursor has been draining a seek uninterrupted, in ms; 0 when
156
+ * none is in flight. Every play pull is refused for the whole of it. */
157
+ readonly seekDrainingForMs: number;
158
+ }
159
+ /**
160
+ * The page's JS heap in use. Blink exposes performance.memory on Window only,
161
+ * never in a worker scope, so the worker cannot read this at all: it leaves the
162
+ * field null and the main thread fills it on receipt, as it does
163
+ * webgpuAvailable. Null off Blink, and null in a trace, which is assembled
164
+ * inside the worker.
165
+ */
166
+ export interface MemoryDiagnostics {
167
+ readonly jsHeapUsedBytes: number | null;
168
+ }
169
+ /** Severity of a diagnosis, ordered info < warn < critical for sorting. */
170
+ export type WarningSeverity = "info" | "warn" | "critical";
171
+ /**
172
+ * One self-explaining diagnosis. id is the stable rule key; scenario names what
173
+ * the runtime is doing wrong in plain language; advice is the fix; evidence is
174
+ * the human-readable metric values that tripped the rule, so a trace explains
175
+ * itself to a human or an agent without re-deriving the thresholds.
176
+ */
177
+ export interface Warning {
178
+ readonly id: string;
179
+ readonly severity: WarningSeverity;
180
+ readonly title: string;
181
+ readonly scenario: string;
182
+ readonly advice: string;
183
+ readonly evidence: string;
184
+ }
185
+ /**
186
+ * The clone-safe wire snapshot the worker broadcasts at BROADCAST_HZ. A superset
187
+ * of EngineDiagnostics: it keeps renderer/track/scheduler verbatim so legacy
188
+ * readers still resolve, and adds the realtime needles, the pipeline ledger,
189
+ * derived cache bytes, track geometry, GOP block, scrub aggregates, the
190
+ * play-time seek block, counters, memory, the clock/screen pair, and the
191
+ * worker-evaluated warnings. Only plain data crosses the boundary.
192
+ *
193
+ * webgpuAvailable and memory.jsHeapUsedBytes are the fields the worker leaves at
194
+ * their empty value for the main thread to fill after the broadcast, so a rule
195
+ * in evaluateWarnings (which runs in the worker) can never read them, and an
196
+ * exported trace, assembled worker-side, carries the unfilled value. Warnings
197
+ * are evaluated once, worker-side, so the HUD and an exported trace always show
198
+ * the same diagnoses.
199
+ */
200
+ /**
201
+ * Source bytes this process holds, for a host that wants to show a viewer how
202
+ * much of the clip is local. Null unless the engine was loaded with
203
+ * `sourceResidency`; nothing else in the runtime can answer it, because the
204
+ * demuxer's own reads and the browser cache are both opaque from here.
205
+ */
206
+ export interface SourceResidencyDiagnostics {
207
+ readonly ranges: readonly {
208
+ readonly start: number;
209
+ readonly end: number;
210
+ }[];
211
+ readonly residentBytes: number;
212
+ readonly totalBytes: number | null;
213
+ readonly prefetchedBytes: number;
214
+ readonly warming: boolean;
215
+ }
216
+ export interface DiagnosticsSnapshot {
217
+ /**
218
+ * Which presentation the engine was loaded for. `renderer` and the geometry
219
+ * fields that need a bound canvas are null for the whole life of a "frames"
220
+ * engine, which holds none by design; without this a reader cannot tell that
221
+ * from a "canvas" engine whose renderer has not resolved yet.
222
+ */
223
+ readonly presentation: PresentationMode;
224
+ readonly renderer: RendererName | null;
225
+ readonly track: DiagnosticsTrack | null;
226
+ readonly scheduler: SchedulerStats | null;
227
+ readonly realtime: RealtimeDiagnostics;
228
+ readonly pipeline: PipelineDiagnostics;
229
+ readonly cacheBytes: CacheBytesDiagnostics;
230
+ readonly geometry: TrackGeometryDiagnostics;
231
+ readonly gop: GopDiagnostics;
232
+ readonly scrub: ScrubDiagnostics;
233
+ readonly playSeek: PlaySeekDiagnostics;
234
+ readonly counters: CounterDiagnostics;
235
+ readonly memory: MemoryDiagnostics;
236
+ readonly sourceResidency: SourceResidencyDiagnostics | null;
237
+ readonly nativeFps: number | null;
238
+ /** Media seconds per wall second the transport was told to run at. */
239
+ readonly rate: number;
240
+ /**
241
+ * The same figure measured off the canvas: media seconds of picture actually
242
+ * presented per wall second, over a trailing window; null unless playback was
243
+ * up across the whole of it. Read against `rate` it answers the one question
244
+ * a commanded rate cannot, which is whether the picture is really moving that
245
+ * fast. Falling short means frames are arriving slower than the clock wants
246
+ * them, so the picture lags further behind the playhead every second.
247
+ *
248
+ * It is a window over whole paints, so it quantises when paints are sparse: a
249
+ * slow rate on a low-fps source reads low from a healthy pipeline. Read it
250
+ * against catchUpMs before concluding anything from a shortfall.
251
+ */
252
+ readonly presentedRate: number | null;
253
+ /** The engine clock at assembly, ms; null before load. Paused, it holds the
254
+ * last commanded target; playing, it advances at rate. The one value the
255
+ * instruments draw the playhead from, so the playhead and the coverage
256
+ * lanes cannot disagree about where "now" is. */
257
+ readonly playheadMs: number | null;
258
+ /** What is actually on the canvas: last painted position and its quality;
259
+ * null before the first paint. Its distance from playheadMs is the live
260
+ * landing error (paused) or catch-up depth (playing). A sampled
261
+ * observation for instruments; frame identity for consumers still travels
262
+ * only on the paint event. */
263
+ readonly screen: ScreenDiagnostics | null;
264
+ readonly status: string;
265
+ readonly webgpuAvailable: boolean;
266
+ readonly warnings: Warning[];
267
+ }
268
+ /**
269
+ * Painted-frame rate over a trailing window of broadcast intervals, fed once
270
+ * per snapshot. A single interval can only hold whole paints, so its rate
271
+ * quantises hard; the trailing window smooths that without collapsing the
272
+ * series into a whole-capture average, which could confirm "playback is slow"
273
+ * but never locate it in time.
274
+ */
275
+ export declare class PaintRateMeter {
276
+ private readonly windowSize;
277
+ private readonly samples;
278
+ constructor(windowSize?: number);
279
+ /** Rate in paints/second, or null unless playback was up across the whole
280
+ * window. A pause or a paints reset (each play session restarts the
281
+ * counter) invalidates the window, not just the sample. */
282
+ sample(atMs: number, paints: number, playing: boolean): number | null;
283
+ }
284
+ /**
285
+ * Playback speed measured off what reached the canvas: media seconds presented
286
+ * per wall second, over the same trailing window PaintRateMeter uses. Fed the
287
+ * last painted media position once per snapshot.
288
+ *
289
+ * It reads painted positions, not paint counts: a source can paint at a healthy
290
+ * 30fps while the clock runs at 4x, and only the distance the picture travelled
291
+ * shows that the two disagree.
292
+ */
293
+ export declare class PresentedRateMeter {
294
+ private readonly windowSize;
295
+ private readonly samples;
296
+ constructor(windowSize?: number);
297
+ /** Rate in media seconds per wall second, or null unless playback was up
298
+ * across the whole window with the picture moving forward through it. */
299
+ sample(atMs: number, paintedMs: number | null, playing: boolean): number | null;
300
+ /** Drops the window, so a rate change is not measured across its own edge. */
301
+ reset(): void;
302
+ }
303
+ /**
304
+ * Cache lookups across every tier. Only an exact seek looks the cache up, so
305
+ * playback and key seeks never move this and a play-only session sits at zero.
306
+ * A rule or readout that reads the hit rate without this denominator reports a
307
+ * cold cache as a failing one.
308
+ */
309
+ export declare function cacheLookups(cache: FrameCacheStats | null | undefined): number;
310
+ /**
311
+ * Pure threshold evaluator. Reads a snapshot and returns the active diagnoses,
312
+ * critical first. Used both in the worker (so the broadcast carries warnings the
313
+ * UI and the trace share) and in tests. No I/O, no side effects.
314
+ */
315
+ export declare function evaluateWarnings(snapshot: DiagnosticsSnapshot): Warning[];
316
+ //# sourceMappingURL=diagnostics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,2DAA2D;AAC3D,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,QAAQ,CAAC;AAE3C;;sBAEsB;AACtB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI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0 +1,2 @@
1
+ export declare const EMBEDDED_ENGINE_WORKER_SOURCE = "__SUPERVISION_JS_EMBEDDED_ENGINE_WORKER_SOURCE__";
2
+ //# sourceMappingURL=embedded-engine-worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embedded-engine-worker.d.ts","sourceRoot":"","sources":["../src/embedded-engine-worker.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,qDACU,CAAC"}
@@ -0,0 +1,258 @@
1
+ import { type MediaClock } from "./clock";
2
+ import type { FrameLanding } from "./frame-timeline";
3
+ import { type EngineDiagnostics } from "./diagnostics";
4
+ import { type SeekIntent } from "./scrub-cursor";
5
+ import { type EngineTrace } from "./trace-recorder";
6
+ import { type EngineReadySnapshot } from "./types";
7
+ import { type DiagnosticsEvent, type EngineLoadConfig, type MirrorEvent, type PresentedFrameEvent, type SerializedViewport } from "./worker-protocol";
8
+ export interface EngineCoreOptions {
9
+ /** Sink for broadcast state. The worker host serializes each event onto
10
+ * the state plane; tests collect them to assert transitions. */
11
+ emit: (event: MirrorEvent) => void;
12
+ /** Sink for the diagnostics broadcast (the non-mirror 'diag' arm). Optional:
13
+ * when absent the broadcaster has nowhere to post, so a consumer that never
14
+ * wires it pays nothing. The worker host wires it to the same postMessage. */
15
+ emitDiagnostics?: (event: DiagnosticsEvent) => void;
16
+ /** Sink for the pixel plane, which carries frames only in "frames"
17
+ * presentation mode. The VideoFrame is handed over on the transfer list, so
18
+ * a host wiring this to postMessage detaches the worker's reference by
19
+ * posting it. Unwired there is no receiver, so the core closes each frame
20
+ * instead of leaking it. */
21
+ emitPresentedFrame?: (event: PresentedFrameEvent, transfer: Transferable[]) => void;
22
+ /** Clock seam. Defaults to the wall-clock PerformanceMediaClock; tests
23
+ * inject a fake so they can drive media time deterministically. */
24
+ clock?: MediaClock;
25
+ }
26
+ /**
27
+ * The engine, with every main-thread concern removed. Owns the clock, cursor,
28
+ * and render controller; runs entirely inside the worker. It never touches the
29
+ * DOM, a React store, the playhead, or the imperative handle.
30
+ *
31
+ * It speaks two languages. Broadcast state (time, frame index, status,
32
+ * duration, seeking) leaves through the `emit` callback. Command results that
33
+ * the main thread cannot predict (load metadata, the frame a step lands on)
34
+ * are method return values the worker host correlates back to the caller.
35
+ *
36
+ * Time is emitted only while playing. Paused positions are owned by the main
37
+ * thread (written optimistically on scrub, or applied from step's return), so
38
+ * the core never emits a competing time that would yank a settled playhead.
39
+ */
40
+ export declare class EngineCore {
41
+ private readonly emit;
42
+ private readonly emitDiagnostics;
43
+ private readonly emitPresentedFrame;
44
+ private readonly clock;
45
+ private cursor;
46
+ private residency;
47
+ private controller;
48
+ private canvas;
49
+ private viewport;
50
+ /** The box the host said it paints these frames into, kept from the load
51
+ * command. Under "frames" presentation nothing ever measures a canvas here,
52
+ * so this is the only display geometry the engine is ever given. */
53
+ private displayBox;
54
+ private metadata;
55
+ /**
56
+ * The decoder failure the runtime has given up on, latched. Nothing the
57
+ * transport is asked to do afterwards can decode a frame, so nothing it is
58
+ * asked to do may report otherwise: a play() that answered "playing" over a
59
+ * decoder that had already been condemned is how a source with one unusable
60
+ * entry point read as healthy for the rest of the session.
61
+ */
62
+ private decodeFailure;
63
+ private presentation;
64
+ private durationMs;
65
+ private paintSeq;
66
+ private playing;
67
+ /** The frame the last step landed on. A serialized burst resolves each
68
+ * step before its rAF paints, so getLastPaintedMs lags by one or more
69
+ * steps; basing the next step on the actual landing keeps every step in a
70
+ * burst advancing exactly one frame instead of re-stepping a stale base. */
71
+ private lastStepLanded;
72
+ /** Where the current seek's walk actually landed, known once a crisp frame
73
+ * for it has painted. A requested time is not a frame time: it comes from a
74
+ * marker rail or a pointer, so it usually sits between two samples. Walking
75
+ * backward from it reaches the sample already on screen and the press reads
76
+ * as dead. Null until that crisp paint arrives, so a step pressed before it
77
+ * still falls back to the clock. */
78
+ private seekLanded;
79
+ /** The seek still waiting on that paint, or null when none is. Every paint
80
+ * the engine makes runs through this latch, and the render loop paints one
81
+ * frame per animation frame from a stash a previous seek may have filled,
82
+ * so without the target on it any leftover frame answers for the seek in
83
+ * flight and publishes itself as the playhead. */
84
+ private awaitedSeek;
85
+ /** Wall stamp of a seek being served by re-anchoring the playback walk, or
86
+ * null when no such seek is waiting on its crisp frame. */
87
+ private playSeekStartedAtMs;
88
+ private playSeeks;
89
+ private playSeekSamples;
90
+ private playSeekSumMs;
91
+ private playSeekMaxMs;
92
+ /** The frame the last paint put up, for the diagnostics screen readout. */
93
+ private lastPaintedId;
94
+ /** Mirrors VideoEngine's interactive-seek latch: true when a drag paused a
95
+ * playing engine, so endInteractiveSeek knows to resume. */
96
+ private resumeAfterInteractiveSeek;
97
+ /** Worker-realm broadcast timer handle, or null when diagnostics are off. */
98
+ private diagnosticsTimer;
99
+ /** Wall time the cursor was first seen draining a seek, or null while it is
100
+ * not. How long a state has lasted is a diagnostics question, so it is
101
+ * timed here rather than on the scheduler, whose clock is the seam tests
102
+ * drive latency measurements through. */
103
+ private drainingSinceMs;
104
+ private readonly paintRateMeter;
105
+ private readonly presentedRateMeter;
106
+ /** Lazily allocated on traceArm, freed on disarm; zero memory off. */
107
+ private traceRecorder;
108
+ /** The last assembled trace, kept after disarm so a stopped capture stays
109
+ * downloadable until the next arm. Null while armed or never captured. */
110
+ private stoppedTrace;
111
+ constructor(options: EngineCoreOptions);
112
+ /**
113
+ * Receives the transferred display canvas and its measured box. Stored
114
+ * even when the controller does not exist yet (bindCanvas can arrive
115
+ * before load) and bound as soon as load builds the controller. Passing
116
+ * null tears the binding down and stops the render loop.
117
+ */
118
+ setCanvas(canvas: OffscreenCanvas | null, viewport?: SerializedViewport): void;
119
+ load(config: EngineLoadConfig): Promise<EngineReadySnapshot>;
120
+ play(): void;
121
+ pause(): void;
122
+ togglePlayback(): void;
123
+ /**
124
+ * Sets how fast media time runs against wall time. The clock re-anchors, so
125
+ * a change mid-playback bends the slope without moving the playhead, and the
126
+ * decode-ahead buffer keeps its frames: they are positions in media time,
127
+ * which a rate change does not touch. Applied while paused it simply waits,
128
+ * since a paused clock advances at no rate at all.
129
+ *
130
+ * Throws on a rate outside the supported forward range.
131
+ */
132
+ setPlaybackRate(rate: number): void;
133
+ getPlaybackRate(): number;
134
+ /** Fire-and-forget seek onto a named frame. Emits no playhead: the main
135
+ * thread snapped the gesture and wrote it. Paints a cache preview, then
136
+ * walks the cursor. */
137
+ scrub(frameIndex: number, intent?: SeekIntent): void;
138
+ /** Moves a running playback walk to `tSec`. The clock is already there. */
139
+ private reanchorPlayback;
140
+ /** Closes the wait of a seek served by re-anchoring, at the crisp paint that
141
+ * ends it. A seek that walked the cursor leaves no stamp; the scheduler
142
+ * times those. Stopping the transport abandons the wait: its frame can
143
+ * still paint minutes later, and the idle time between is not a wait
144
+ * anyone had, so the seek keeps its count and loses its sample. */
145
+ private closePlaySeekWait;
146
+ commit(frameIndex: number): Promise<FrameLanding | null>;
147
+ seekToKey(timeMs: number): Promise<FrameLanding | null>;
148
+ /**
149
+ * Moves one frame along the source in presentation order and returns where
150
+ * it landed, or null at either end. Only the worker knows which frame a
151
+ * decode produced, so the landing is the command's return value. The stepped
152
+ * frame paints worker-side via the controller and emits a paint like any
153
+ * other.
154
+ */
155
+ step(direction: 1 | -1): Promise<FrameLanding | null>;
156
+ /** Append a runtime event to the trace ring, stamped with worker-clock time
157
+ * since arm. Predicted-false and free when no trace is armed. */
158
+ private pushTraceEvent;
159
+ /** Broadcast a status transition and record it on the trace ring, so an
160
+ * exported trace shows the playback-state timeline alongside paints/seeks. */
161
+ private emitStatus;
162
+ /**
163
+ * The decoder cannot decode this source, and nothing else was going to say
164
+ * so: a stalled decoder keeps accepting commands and the clock keeps
165
+ * running, so playback reads as healthy over a canvas that will never change
166
+ * again. Stop the transport first, then report, so the status a consumer
167
+ * sees and what the engine is doing agree.
168
+ */
169
+ private handleDecodeFailure;
170
+ /** Says the failure again for whoever just asked the transport to move. A
171
+ * consumer that only listens for changes has already been told; one that
172
+ * reads the status after its own command has to find the same answer. */
173
+ private republishFailure;
174
+ beginInteractiveSeek(): void;
175
+ endInteractiveSeek(): void;
176
+ dispose(): Promise<void>;
177
+ /** True only when the cursor exists and reports settled. Mirrors
178
+ * VideoEngine.isIdle for tests; the facade derives its own from state. */
179
+ isIdle(): boolean;
180
+ /** Engine diagnostics snapshot (renderer, track facts, scheduler stats), or
181
+ * null before load. The scheduler field is null on the uncached cursor. */
182
+ getStats(): EngineDiagnostics | null;
183
+ private observeSeekIdle;
184
+ private handleEnded;
185
+ private awaitSeekLanding;
186
+ private forgetSeekLanding;
187
+ /** Releases the latch of a seek that has already answered its caller. The
188
+ * landing rode back on the return value, so a paint arriving after it would
189
+ * move the playhead to somewhere the caller was never told about. */
190
+ private closeSeekLanding;
191
+ /**
192
+ * Whether this paint is the landing of the seek waiting on one.
193
+ *
194
+ * An exact walk answers at or before the frame it aimed at, and no further
195
+ * back than the sample next to it, so the target falls inside the answering
196
+ * frame's own span. That span is the whole test: a frame decoded for some
197
+ * earlier position sits outside it however recently it was painted.
198
+ */
199
+ private answersAwaitedSeek;
200
+ /** The frame table of the loaded source. Reached only from paths that have
201
+ * already established a cursor, which is what carries it. */
202
+ private timeline;
203
+ private landingOf;
204
+ /**
205
+ * Points the background walk at where the viewer is, as a byte offset. The
206
+ * file's own byte layout is not exposed, so this reads position as a share of
207
+ * duration: enough to order the walk outward from the playhead, and wrong by
208
+ * at most the amount the bitrate varies.
209
+ */
210
+ private aimResidency;
211
+ private onPaint;
212
+ /**
213
+ * Posts one frame with the identity of the paint it came from, in the same
214
+ * message. With no sink wired there is no receiver, so the frame is closed
215
+ * here: the controller has already let go of it, and a frame left open pins
216
+ * a decoder buffer.
217
+ */
218
+ private present;
219
+ /**
220
+ * Starts the worker-realm broadcast timer at hz (default BROADCAST_HZ) and
221
+ * flips the controller's per-rAF counter gate on. Decode-independent: the
222
+ * timer callback does synchronous reads plus one post, never an await and
223
+ * never the sink, so it runs between event-loop tasks, not inside a decode.
224
+ */
225
+ diagnosticsStart(hz?: number): void;
226
+ diagnosticsStop(): void;
227
+ /** Lazily allocate the trace rings and begin capturing. windowMs sizes the
228
+ * snapshot ring alone: the event ring is fed by paints and gestures at no
229
+ * fixed rate, so wall clock cannot size it. */
230
+ traceArm(windowMs: number): void;
231
+ /** Stop capturing and free the rings, but keep the assembled trace so it can
232
+ * still be exported. A record-then-stop-then-download flow would otherwise
233
+ * lose the capture, since stop used to null the recorder outright. */
234
+ traceDisarm(): void;
235
+ /** The current capture if still armed, else the last stopped capture. Non
236
+ * destructive so a download can be retried; a new arm clears the stopped one. */
237
+ traceExport(): EngineTrace | null;
238
+ /**
239
+ * Assembles ONE snapshot and posts it as the 'diag' event. When a trace is
240
+ * armed, the SAME reference is ring-appended, so there is no second
241
+ * serialization. Synchronous: reads current stats, never awaits, never paints.
242
+ */
243
+ private broadcastDiagnostics;
244
+ private assembleSnapshot;
245
+ private statusString;
246
+ /**
247
+ * CSS width the picture occupies inside the box the host declared, native
248
+ * aspect fitted into it, or null when no box was declared. A portrait source
249
+ * in a landscape box paints far narrower than the box, so the fit is what the
250
+ * ratio has to be measured against.
251
+ */
252
+ private paintedBoxCssWidth;
253
+ /** The ratio whichever side measured one reported, or null when neither did.
254
+ * The engine has no window of its own to read it off. */
255
+ private devicePixelRatio;
256
+ private traceEnvironment;
257
+ }
258
+ //# sourceMappingURL=engine-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-core.d.ts","sourceRoot":"","sources":["../src/engine-core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAyB,MAAM,SAAS,CAAC;AAKjE,OAAO,KAAK,EAAW,YAAY,EAAiB,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAEL,KAAK,iBAAiB,EAKvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAGL,KAAK,mBAAmB,EA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G;IACH,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,gBAAgB;IAkMxB,OAAO,CAAC,YAAY;IAMpB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAa1B;8DAC0D;IAC1D,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,gBAAgB;CAezB"}
@@ -0,0 +1,26 @@
1
+ export { VideoEngine } from "./video-engine";
2
+ export type { VideoEngineHandle, VideoEngineOptions } from "./video-engine";
3
+ export { SourceKind } from "./types";
4
+ export type { BlobVideoSource, StreamVideoSource, UrlSourceReadConfig, UrlVideoSource, VideoMetadata, VideoSource, } from "./types";
5
+ export { PlaybackStatus } from "./types";
6
+ export type { EngineChannel, EngineReadySnapshot, PaintSeq, PlaybackState, } from "./types";
7
+ export type { PresentationMode } from "./types";
8
+ export type { PresentedFrame } from "./worker-protocol";
9
+ export type { PresentedFrameHandler } from "./video-engine";
10
+ export type { FrameQuality } from "./scrub-cursor";
11
+ export type { Rotation } from "./rotation";
12
+ export { FrameTimeline } from "./frame-timeline";
13
+ export type { FrameId, FrameLanding, FrameTimelineData, TickRate, } from "./frame-timeline";
14
+ export type { SeekIntent } from "./scrub-cursor";
15
+ export type { SeekTarget } from "./video-engine";
16
+ export { PLAYBACK_RATE } from "./constants";
17
+ export { asFps, asPaintSeq, asSec } from "./types";
18
+ export type { Fps, Sec } from "./types";
19
+ export { cappedResolution, displayBoxResolution, nativeResolution, viewportResolution, } from "./decode-resolution";
20
+ export type { DecodeResolutionStrategy, DisplayBoxResolutionOptions, ViewportResolutionOptions, } from "./decode-resolution";
21
+ export { VideoEngineError, VideoEngineErrorCode } from "./types";
22
+ export type { Warning, WarningSeverity } from "./diagnostics";
23
+ export type { DiagnosticsSnapshot, SourceResidencyDiagnostics, } from "./diagnostics";
24
+ export type { SourceResidencyConfig } from "./worker-protocol";
25
+ export { DIAGNOSTICS, TRACE_RING_BOUNDS } from "./constants";
26
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1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