@automovie/render 0.0.0-stage → 0.0.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 (503) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -2
  3. package/lib/AUTOMOVIE_GUIDE_PASSES.d.ts +11 -0
  4. package/lib/AUTOMOVIE_GUIDE_PASSES.js +21 -0
  5. package/lib/AUTOMOVIE_GUIDE_PASSES.js.map +1 -0
  6. package/lib/IAutoMovieCaptionEntry.d.ts +28 -0
  7. package/lib/IAutoMovieCaptionEntry.js +3 -0
  8. package/lib/IAutoMovieCaptionEntry.js.map +1 -0
  9. package/lib/IAutoMovieCaptionSidecar.d.ts +25 -0
  10. package/lib/IAutoMovieCaptionSidecar.js +3 -0
  11. package/lib/IAutoMovieCaptionSidecar.js.map +1 -0
  12. package/lib/IAutoMovieCapturedFrame.d.ts +22 -0
  13. package/lib/IAutoMovieCapturedFrame.js +3 -0
  14. package/lib/IAutoMovieCapturedFrame.js.map +1 -0
  15. package/lib/IAutoMovieGuidePassOutput.d.ts +23 -0
  16. package/lib/IAutoMovieGuidePassOutput.js +3 -0
  17. package/lib/IAutoMovieGuidePassOutput.js.map +1 -0
  18. package/lib/IAutoMoviePoseKeypointActor.d.ts +36 -0
  19. package/lib/IAutoMoviePoseKeypointActor.js +3 -0
  20. package/lib/IAutoMoviePoseKeypointActor.js.map +1 -0
  21. package/lib/IAutoMoviePoseKeypointFrame.d.ts +25 -0
  22. package/lib/IAutoMoviePoseKeypointFrame.js +3 -0
  23. package/lib/IAutoMoviePoseKeypointFrame.js.map +1 -0
  24. package/lib/IAutoMoviePoseKeypointSidecar.d.ts +21 -0
  25. package/lib/IAutoMoviePoseKeypointSidecar.js +3 -0
  26. package/lib/IAutoMoviePoseKeypointSidecar.js.map +1 -0
  27. package/lib/IAutoMovieRenderAdapters.d.ts +34 -0
  28. package/lib/IAutoMovieRenderAdapters.js +3 -0
  29. package/lib/IAutoMovieRenderAdapters.js.map +1 -0
  30. package/lib/IAutoMovieRenderAndSeeRequest.d.ts +32 -0
  31. package/lib/IAutoMovieRenderAndSeeRequest.js +3 -0
  32. package/lib/IAutoMovieRenderAndSeeRequest.js.map +1 -0
  33. package/lib/IAutoMovieRenderAndSeeResult.d.ts +20 -0
  34. package/lib/IAutoMovieRenderAndSeeResult.js +3 -0
  35. package/lib/IAutoMovieRenderAndSeeResult.js.map +1 -0
  36. package/lib/IAutoMovieRenderChunk.d.ts +48 -0
  37. package/lib/IAutoMovieRenderChunk.js +3 -0
  38. package/lib/IAutoMovieRenderChunk.js.map +1 -0
  39. package/lib/IAutoMovieRenderChunkPlan.d.ts +32 -0
  40. package/lib/IAutoMovieRenderChunkPlan.js +3 -0
  41. package/lib/IAutoMovieRenderChunkPlan.js.map +1 -0
  42. package/lib/IAutoMovieRenderPassManifest.d.ts +21 -0
  43. package/lib/IAutoMovieRenderPassManifest.js +3 -0
  44. package/lib/IAutoMovieRenderPassManifest.js.map +1 -0
  45. package/lib/IAutoMovieRenderReassembly.d.ts +24 -0
  46. package/lib/IAutoMovieRenderReassembly.js +3 -0
  47. package/lib/IAutoMovieRenderReassembly.js.map +1 -0
  48. package/lib/IAutoMovieRenderResult.d.ts +39 -0
  49. package/lib/IAutoMovieRenderResult.js +3 -0
  50. package/lib/IAutoMovieRenderResult.js.map +1 -0
  51. package/lib/IAutoMovieSequenceRenderAdapters.d.ts +36 -0
  52. package/lib/IAutoMovieSequenceRenderAdapters.js +3 -0
  53. package/lib/IAutoMovieSequenceRenderAdapters.js.map +1 -0
  54. package/lib/IAutoMovieSequenceRenderAndSeeRequest.d.ts +36 -0
  55. package/lib/IAutoMovieSequenceRenderAndSeeRequest.js +3 -0
  56. package/lib/IAutoMovieSequenceRenderAndSeeRequest.js.map +1 -0
  57. package/lib/IAutoMovieSequenceRenderAndSeeResult.d.ts +23 -0
  58. package/lib/IAutoMovieSequenceRenderAndSeeResult.js +3 -0
  59. package/lib/IAutoMovieSequenceRenderAndSeeResult.js.map +1 -0
  60. package/lib/IAutoMovieSequenceRenderFrame.d.ts +41 -0
  61. package/lib/IAutoMovieSequenceRenderFrame.js +3 -0
  62. package/lib/IAutoMovieSequenceRenderFrame.js.map +1 -0
  63. package/lib/IAutoMovieSequenceRenderPlan.d.ts +76 -0
  64. package/lib/IAutoMovieSequenceRenderPlan.js +3 -0
  65. package/lib/IAutoMovieSequenceRenderPlan.js.map +1 -0
  66. package/lib/IAutoMovieSequenceRenderResult.d.ts +44 -0
  67. package/lib/IAutoMovieSequenceRenderResult.js +3 -0
  68. package/lib/IAutoMovieSequenceRenderResult.js.map +1 -0
  69. package/lib/IAutoMovieSequenceRenderShotSpan.d.ts +39 -0
  70. package/lib/IAutoMovieSequenceRenderShotSpan.js +3 -0
  71. package/lib/IAutoMovieSequenceRenderShotSpan.js.map +1 -0
  72. package/lib/IAutoMovieSequenceRenderTransitionSpan.d.ts +39 -0
  73. package/lib/IAutoMovieSequenceRenderTransitionSpan.js +3 -0
  74. package/lib/IAutoMovieSequenceRenderTransitionSpan.js.map +1 -0
  75. package/lib/audio/encodeAutoMovieWavPcm16.d.ts +21 -0
  76. package/lib/audio/encodeAutoMovieWavPcm16.js +59 -0
  77. package/lib/audio/encodeAutoMovieWavPcm16.js.map +1 -0
  78. package/lib/audio/index.d.ts +2 -0
  79. package/lib/audio/index.js +19 -0
  80. package/lib/audio/index.js.map +1 -0
  81. package/lib/audio/mixAutoMovieAudioPcm.d.ts +64 -0
  82. package/lib/audio/mixAutoMovieAudioPcm.js +86 -0
  83. package/lib/audio/mixAutoMovieAudioPcm.js.map +1 -0
  84. package/lib/auditAutoMovieRenderObservation.d.ts +31 -0
  85. package/lib/auditAutoMovieRenderObservation.js +63 -0
  86. package/lib/auditAutoMovieRenderObservation.js.map +1 -0
  87. package/lib/cache/createAutoMovieHttpArtifactStore.d.ts +28 -0
  88. package/lib/cache/createAutoMovieHttpArtifactStore.js +66 -0
  89. package/lib/cache/createAutoMovieHttpArtifactStore.js.map +1 -0
  90. package/lib/caption/IAutoMovieBeatCaption.d.ts +22 -0
  91. package/lib/caption/IAutoMovieBeatCaption.js +3 -0
  92. package/lib/caption/IAutoMovieBeatCaption.js.map +1 -0
  93. package/lib/caption/autoMovieCaptionLanguageComparisonKey.d.ts +18 -0
  94. package/lib/caption/autoMovieCaptionLanguageComparisonKey.js +24 -0
  95. package/lib/caption/autoMovieCaptionLanguageComparisonKey.js.map +1 -0
  96. package/lib/caption/beatCaptions.d.ts +22 -0
  97. package/lib/caption/beatCaptions.js +50 -0
  98. package/lib/caption/beatCaptions.js.map +1 -0
  99. package/lib/caption/canonicalProductionWebVtt.d.ts +23 -0
  100. package/lib/caption/canonicalProductionWebVtt.js +60 -0
  101. package/lib/caption/canonicalProductionWebVtt.js.map +1 -0
  102. package/lib/caption/canonicalizeAutoMovieCaptionText.d.ts +18 -0
  103. package/lib/caption/canonicalizeAutoMovieCaptionText.js +24 -0
  104. package/lib/caption/canonicalizeAutoMovieCaptionText.js.map +1 -0
  105. package/lib/caption/escapeWebVttText.d.ts +17 -0
  106. package/lib/caption/escapeWebVttText.js +25 -0
  107. package/lib/caption/escapeWebVttText.js.map +1 -0
  108. package/lib/caption/index.d.ts +11 -0
  109. package/lib/caption/index.js +28 -0
  110. package/lib/caption/index.js.map +1 -0
  111. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.d.ts +37 -0
  112. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js +129 -0
  113. package/lib/caption/inspectAutoMovieCaptionReadabilityWithRuntime.js.map +1 -0
  114. package/lib/caption/isAutoMovieWebVttIdentifier.d.ts +21 -0
  115. package/lib/caption/isAutoMovieWebVttIdentifier.js +28 -0
  116. package/lib/caption/isAutoMovieWebVttIdentifier.js.map +1 -0
  117. package/lib/caption/parseAutoMovieCaptionLanguage.d.ts +34 -0
  118. package/lib/caption/parseAutoMovieCaptionLanguage.js +121 -0
  119. package/lib/caption/parseAutoMovieCaptionLanguage.js.map +1 -0
  120. package/lib/caption/serializeAutoMovieWebVttCueText.d.ts +17 -0
  121. package/lib/caption/serializeAutoMovieWebVttCueText.js +27 -0
  122. package/lib/caption/serializeAutoMovieWebVttCueText.js.map +1 -0
  123. package/lib/caption/serializeAutoMovieWebVttIdentifier.d.ts +17 -0
  124. package/lib/caption/serializeAutoMovieWebVttIdentifier.js +27 -0
  125. package/lib/caption/serializeAutoMovieWebVttIdentifier.js.map +1 -0
  126. package/lib/caption/serializeAutoMovieWebVttSingleLineText.d.ts +19 -0
  127. package/lib/caption/serializeAutoMovieWebVttSingleLineText.js +26 -0
  128. package/lib/caption/serializeAutoMovieWebVttSingleLineText.js.map +1 -0
  129. package/lib/caption/webVttCaptionLanguage.d.ts +18 -0
  130. package/lib/caption/webVttCaptionLanguage.js +29 -0
  131. package/lib/caption/webVttCaptionLanguage.js.map +1 -0
  132. package/lib/caption/webVttTime.d.ts +19 -0
  133. package/lib/caption/webVttTime.js +30 -0
  134. package/lib/caption/webVttTime.js.map +1 -0
  135. package/lib/captionPlan.d.ts +1 -0
  136. package/lib/captionPlan.js +18 -0
  137. package/lib/captionPlan.js.map +1 -0
  138. package/lib/captionSidecar.d.ts +3 -0
  139. package/lib/captionSidecar.js +20 -0
  140. package/lib/captionSidecar.js.map +1 -0
  141. package/lib/captionSlice.d.ts +1 -0
  142. package/lib/captionSlice.js +18 -0
  143. package/lib/captionSlice.js.map +1 -0
  144. package/lib/chunkSequenceRender.d.ts +5 -0
  145. package/lib/chunkSequenceRender.js +22 -0
  146. package/lib/chunkSequenceRender.js.map +1 -0
  147. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.d.ts +16 -0
  148. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js +20 -0
  149. package/lib/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.js.map +1 -0
  150. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.d.ts +11 -0
  151. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js +14 -0
  152. package/lib/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.js.map +1 -0
  153. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.d.ts +15 -0
  154. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js +19 -0
  155. package/lib/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.js.map +1 -0
  156. package/lib/delivery/AutoMovieProductionPngRole.d.ts +14 -0
  157. package/lib/delivery/AutoMovieProductionPngRole.js +3 -0
  158. package/lib/delivery/AutoMovieProductionPngRole.js.map +1 -0
  159. package/lib/delivery/IAutoMovieProductionPngProfile.d.ts +41 -0
  160. package/lib/delivery/IAutoMovieProductionPngProfile.js +3 -0
  161. package/lib/delivery/IAutoMovieProductionPngProfile.js.map +1 -0
  162. package/lib/delivery/IAutoMovieProductionVideoProfile.d.ts +46 -0
  163. package/lib/delivery/IAutoMovieProductionVideoProfile.js +3 -0
  164. package/lib/delivery/IAutoMovieProductionVideoProfile.js.map +1 -0
  165. package/lib/delivery/assertAutoMovieCaptureClock.d.ts +26 -0
  166. package/lib/delivery/assertAutoMovieCaptureClock.js +29 -0
  167. package/lib/delivery/assertAutoMovieCaptureClock.js.map +1 -0
  168. package/lib/delivery/assertProductionOpusProfile.d.ts +23 -0
  169. package/lib/delivery/assertProductionOpusProfile.js +160 -0
  170. package/lib/delivery/assertProductionOpusProfile.js.map +1 -0
  171. package/lib/delivery/assertProductionPngPicture.d.ts +24 -0
  172. package/lib/delivery/assertProductionPngPicture.js +47 -0
  173. package/lib/delivery/assertProductionPngPicture.js.map +1 -0
  174. package/lib/delivery/assertProductionVideoProfile.d.ts +30 -0
  175. package/lib/delivery/assertProductionVideoProfile.js +150 -0
  176. package/lib/delivery/assertProductionVideoProfile.js.map +1 -0
  177. package/lib/delivery/auditAutoMovieDecodedFrames.d.ts +56 -0
  178. package/lib/delivery/auditAutoMovieDecodedFrames.js +92 -0
  179. package/lib/delivery/auditAutoMovieDecodedFrames.js.map +1 -0
  180. package/lib/delivery/auditAutoMovieEncodedPresentation.d.ts +27 -0
  181. package/lib/delivery/auditAutoMovieEncodedPresentation.js +62 -0
  182. package/lib/delivery/auditAutoMovieEncodedPresentation.js.map +1 -0
  183. package/lib/delivery/index.d.ts +14 -0
  184. package/lib/delivery/index.js +31 -0
  185. package/lib/delivery/index.js.map +1 -0
  186. package/lib/delivery/planAutoMovieCaptureUrl.d.ts +18 -0
  187. package/lib/delivery/planAutoMovieCaptureUrl.js +31 -0
  188. package/lib/delivery/planAutoMovieCaptureUrl.js.map +1 -0
  189. package/lib/delivery/productionOpusDescription.d.ts +41 -0
  190. package/lib/delivery/productionOpusDescription.js +125 -0
  191. package/lib/delivery/productionOpusDescription.js.map +1 -0
  192. package/lib/delivery/resolveProductionPngProfile.d.ts +27 -0
  193. package/lib/delivery/resolveProductionPngProfile.js +53 -0
  194. package/lib/delivery/resolveProductionPngProfile.js.map +1 -0
  195. package/lib/delivery/resolveProductionVideoProfile.d.ts +27 -0
  196. package/lib/delivery/resolveProductionVideoProfile.js +36 -0
  197. package/lib/delivery/resolveProductionVideoProfile.js.map +1 -0
  198. package/lib/ffmpegArgs.d.ts +33 -0
  199. package/lib/ffmpegArgs.js +56 -0
  200. package/lib/ffmpegArgs.js.map +1 -0
  201. package/lib/film/AutoMovieOrderedScalar.d.ts +15 -0
  202. package/lib/film/AutoMovieOrderedScalar.js +3 -0
  203. package/lib/film/AutoMovieOrderedScalar.js.map +1 -0
  204. package/lib/film/IAutoMovieProductionAudioAssetIdentity.d.ts +28 -0
  205. package/lib/film/IAutoMovieProductionAudioAssetIdentity.js +3 -0
  206. package/lib/film/IAutoMovieProductionAudioAssetIdentity.js.map +1 -0
  207. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.d.ts +29 -0
  208. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js +3 -0
  209. package/lib/film/IAutoMovieProductionAudioAssetIdentityBase.js.map +1 -0
  210. package/lib/film/IAutoMovieProductionEncoderIdentity.d.ts +36 -0
  211. package/lib/film/IAutoMovieProductionEncoderIdentity.js +3 -0
  212. package/lib/film/IAutoMovieProductionEncoderIdentity.js.map +1 -0
  213. package/lib/film/IAutoMovieProductionRenderChunk.d.ts +39 -0
  214. package/lib/film/IAutoMovieProductionRenderChunk.js +3 -0
  215. package/lib/film/IAutoMovieProductionRenderChunk.js.map +1 -0
  216. package/lib/film/IAutoMovieProductionRenderJobPlan.d.ts +53 -0
  217. package/lib/film/IAutoMovieProductionRenderJobPlan.js +3 -0
  218. package/lib/film/IAutoMovieProductionRenderJobPlan.js.map +1 -0
  219. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.d.ts +31 -0
  220. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js +3 -0
  221. package/lib/film/IAutoMovieProductionRenderRuntimeIdentity.js.map +1 -0
  222. package/lib/film/IAutoMovieProductionRenderTier.d.ts +25 -0
  223. package/lib/film/IAutoMovieProductionRenderTier.js +3 -0
  224. package/lib/film/IAutoMovieProductionRenderTier.js.map +1 -0
  225. package/lib/film/assertSingleGuidePass.d.ts +19 -0
  226. package/lib/film/assertSingleGuidePass.js +35 -0
  227. package/lib/film/assertSingleGuidePass.js.map +1 -0
  228. package/lib/film/equalOrderedScalars.d.ts +27 -0
  229. package/lib/film/equalOrderedScalars.js +52 -0
  230. package/lib/film/equalOrderedScalars.js.map +1 -0
  231. package/lib/film/index.d.ts +9 -0
  232. package/lib/film/index.js +26 -0
  233. package/lib/film/index.js.map +1 -0
  234. package/lib/film/normalizeAudioAssets.d.ts +21 -0
  235. package/lib/film/normalizeAudioAssets.js +56 -0
  236. package/lib/film/normalizeAudioAssets.js.map +1 -0
  237. package/lib/film/normalizeRenderTier.d.ts +19 -0
  238. package/lib/film/normalizeRenderTier.js +45 -0
  239. package/lib/film/normalizeRenderTier.js.map +1 -0
  240. package/lib/film/planProductionRenderJob.d.ts +48 -0
  241. package/lib/film/planProductionRenderJob.js +196 -0
  242. package/lib/film/planProductionRenderJob.js.map +1 -0
  243. package/lib/film/productionVisualDeliveryOccurrence.d.ts +20 -0
  244. package/lib/film/productionVisualDeliveryOccurrence.js +24 -0
  245. package/lib/film/productionVisualDeliveryOccurrence.js.map +1 -0
  246. package/lib/film/resolveProductionRenderTierFrameFormat.d.ts +21 -0
  247. package/lib/film/resolveProductionRenderTierFrameFormat.js +46 -0
  248. package/lib/film/resolveProductionRenderTierFrameFormat.js.map +1 -0
  249. package/lib/film/validDigest.d.ts +18 -0
  250. package/lib/film/validDigest.js +25 -0
  251. package/lib/film/validDigest.js.map +1 -0
  252. package/lib/film/validWaveAudioIdentity.d.ts +25 -0
  253. package/lib/film/validWaveAudioIdentity.js +76 -0
  254. package/lib/film/validWaveAudioIdentity.js.map +1 -0
  255. package/lib/frameName.d.ts +19 -0
  256. package/lib/frameName.js +24 -0
  257. package/lib/frameName.js.map +1 -0
  258. package/lib/framePattern.d.ts +16 -0
  259. package/lib/framePattern.js +21 -0
  260. package/lib/framePattern.js.map +1 -0
  261. package/lib/frameTimes.d.ts +20 -0
  262. package/lib/frameTimes.js +33 -0
  263. package/lib/frameTimes.js.map +1 -0
  264. package/lib/guidePassFrameName.d.ts +15 -0
  265. package/lib/guidePassFrameName.js +21 -0
  266. package/lib/guidePassFrameName.js.map +1 -0
  267. package/lib/guidePassFramePattern.d.ts +15 -0
  268. package/lib/guidePassFramePattern.js +21 -0
  269. package/lib/guidePassFramePattern.js.map +1 -0
  270. package/lib/guidePasses.d.ts +7 -0
  271. package/lib/guidePasses.js +24 -0
  272. package/lib/guidePasses.js.map +1 -0
  273. package/lib/guidePassesInternal/passExtension.d.ts +14 -0
  274. package/lib/guidePassesInternal/passExtension.js +18 -0
  275. package/lib/guidePassesInternal/passExtension.js.map +1 -0
  276. package/lib/index.d.ts +69 -0
  277. package/lib/index.js +86 -0
  278. package/lib/index.js.map +1 -0
  279. package/lib/isGuidePass.d.ts +15 -0
  280. package/lib/isGuidePass.js +20 -0
  281. package/lib/isGuidePass.js.map +1 -0
  282. package/lib/normalizeGuidePasses.d.ts +15 -0
  283. package/lib/normalizeGuidePasses.js +32 -0
  284. package/lib/normalizeGuidePasses.js.map +1 -0
  285. package/lib/planCaptionSidecar.d.ts +23 -0
  286. package/lib/planCaptionSidecar.js +56 -0
  287. package/lib/planCaptionSidecar.js.map +1 -0
  288. package/lib/planChunkedSequenceRender.d.ts +26 -0
  289. package/lib/planChunkedSequenceRender.js +132 -0
  290. package/lib/planChunkedSequenceRender.js.map +1 -0
  291. package/lib/planGuidePassOutputs.d.ts +19 -0
  292. package/lib/planGuidePassOutputs.js +31 -0
  293. package/lib/planGuidePassOutputs.js.map +1 -0
  294. package/lib/planPoseKeypointSidecar.d.ts +27 -0
  295. package/lib/planPoseKeypointSidecar.js +141 -0
  296. package/lib/planPoseKeypointSidecar.js.map +1 -0
  297. package/lib/planSequenceRender.d.ts +20 -0
  298. package/lib/planSequenceRender.js +99 -0
  299. package/lib/planSequenceRender.js.map +1 -0
  300. package/lib/planViewerFrameTimes.d.ts +33 -0
  301. package/lib/planViewerFrameTimes.js +74 -0
  302. package/lib/planViewerFrameTimes.js.map +1 -0
  303. package/lib/renderAndSee.d.ts +14 -0
  304. package/lib/renderAndSee.js +22 -0
  305. package/lib/renderAndSee.js.map +1 -0
  306. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.d.ts +41 -0
  307. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js +3 -0
  308. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.js.map +1 -0
  309. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.d.ts +53 -0
  310. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js +3 -0
  311. package/lib/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.js.map +1 -0
  312. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.d.ts +27 -0
  313. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js +3 -0
  314. package/lib/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.js.map +1 -0
  315. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.d.ts +28 -0
  316. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js +77 -0
  317. package/lib/renderBudgetPreflight/assessAutoMovieRenderBudget.js.map +1 -0
  318. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.d.ts +23 -0
  319. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js +55 -0
  320. package/lib/renderBudgetPreflight/autoMovieRenderBudgetEvidence.js.map +1 -0
  321. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.d.ts +17 -0
  322. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js +51 -0
  323. package/lib/renderBudgetPreflight/autoMovieRenderBudgetRefusal.js.map +1 -0
  324. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.d.ts +22 -0
  325. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js +32 -0
  326. package/lib/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.js.map +1 -0
  327. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.d.ts +23 -0
  328. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js +35 -0
  329. package/lib/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.js.map +1 -0
  330. package/lib/renderBudgetPreflight/index.d.ts +9 -0
  331. package/lib/renderBudgetPreflight/index.js +26 -0
  332. package/lib/renderBudgetPreflight/index.js.map +1 -0
  333. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.d.ts +18 -0
  334. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js +22 -0
  335. package/lib/renderBudgetPreflight/selectAutoMovieRenderBudget.js.map +1 -0
  336. package/lib/renderCaptionSidecar.d.ts +13 -0
  337. package/lib/renderCaptionSidecar.js +17 -0
  338. package/lib/renderCaptionSidecar.js.map +1 -0
  339. package/lib/renderObservationAudit.d.ts +1 -0
  340. package/lib/renderObservationAudit.js +18 -0
  341. package/lib/renderObservationAudit.js.map +1 -0
  342. package/lib/renderPathStem.d.ts +22 -0
  343. package/lib/renderPathStem.js +64 -0
  344. package/lib/renderPathStem.js.map +1 -0
  345. package/lib/renderPoseKeypointSidecar.d.ts +15 -0
  346. package/lib/renderPoseKeypointSidecar.js +19 -0
  347. package/lib/renderPoseKeypointSidecar.js.map +1 -0
  348. package/lib/renderSequenceAndSee.d.ts +14 -0
  349. package/lib/renderSequenceAndSee.js +32 -0
  350. package/lib/renderSequenceAndSee.js.map +1 -0
  351. package/lib/renderSequenceVideo.d.ts +15 -0
  352. package/lib/renderSequenceVideo.js +35 -0
  353. package/lib/renderSequenceVideo.js.map +1 -0
  354. package/lib/renderVideo.d.ts +17 -0
  355. package/lib/renderVideo.js +45 -0
  356. package/lib/renderVideo.js.map +1 -0
  357. package/lib/screenplay/index.d.ts +1 -0
  358. package/lib/screenplay/index.js +18 -0
  359. package/lib/screenplay/index.js.map +1 -0
  360. package/lib/screenplay/renderScreenplay.d.ts +25 -0
  361. package/lib/screenplay/renderScreenplay.js +101 -0
  362. package/lib/screenplay/renderScreenplay.js.map +1 -0
  363. package/lib/screenplay/screenplaySceneSlug.d.ts +17 -0
  364. package/lib/screenplay/screenplaySceneSlug.js +21 -0
  365. package/lib/screenplay/screenplaySceneSlug.js.map +1 -0
  366. package/lib/sequenceRenderPlan.d.ts +5 -0
  367. package/lib/sequenceRenderPlan.js +22 -0
  368. package/lib/sequenceRenderPlan.js.map +1 -0
  369. package/lib/sequenceRenderVideo.d.ts +6 -0
  370. package/lib/sequenceRenderVideo.js +23 -0
  371. package/lib/sequenceRenderVideo.js.map +1 -0
  372. package/lib/shotBeat.d.ts +18 -0
  373. package/lib/shotBeat.js +23 -0
  374. package/lib/shotBeat.js.map +1 -0
  375. package/lib/sliceCaptionSidecar.d.ts +15 -0
  376. package/lib/sliceCaptionSidecar.js +57 -0
  377. package/lib/sliceCaptionSidecar.js.map +1 -0
  378. package/package.json +46 -3
  379. package/src/AUTOMOVIE_GUIDE_PASSES.ts +19 -0
  380. package/src/IAutoMovieCaptionEntry.ts +32 -0
  381. package/src/IAutoMovieCaptionSidecar.ts +29 -0
  382. package/src/IAutoMovieCapturedFrame.ts +24 -0
  383. package/src/IAutoMovieGuidePassOutput.ts +27 -0
  384. package/src/IAutoMoviePoseKeypointActor.ts +39 -0
  385. package/src/IAutoMoviePoseKeypointFrame.ts +28 -0
  386. package/src/IAutoMoviePoseKeypointSidecar.ts +25 -0
  387. package/src/IAutoMovieRenderAdapters.ts +39 -0
  388. package/src/IAutoMovieRenderAndSeeRequest.ts +38 -0
  389. package/src/IAutoMovieRenderAndSeeResult.ts +23 -0
  390. package/src/IAutoMovieRenderChunk.ts +62 -0
  391. package/src/IAutoMovieRenderChunkPlan.ts +40 -0
  392. package/src/IAutoMovieRenderPassManifest.ts +25 -0
  393. package/src/IAutoMovieRenderReassembly.ts +28 -0
  394. package/src/IAutoMovieRenderResult.ts +46 -0
  395. package/src/IAutoMovieSequenceRenderAdapters.ts +41 -0
  396. package/src/IAutoMovieSequenceRenderAndSeeRequest.ts +47 -0
  397. package/src/IAutoMovieSequenceRenderAndSeeResult.ts +23 -0
  398. package/src/IAutoMovieSequenceRenderFrame.ts +48 -0
  399. package/src/IAutoMovieSequenceRenderPlan.ts +88 -0
  400. package/src/IAutoMovieSequenceRenderResult.ts +52 -0
  401. package/src/IAutoMovieSequenceRenderShotSpan.ts +46 -0
  402. package/src/IAutoMovieSequenceRenderTransitionSpan.ts +46 -0
  403. package/src/audio/encodeAutoMovieWavPcm16.ts +65 -0
  404. package/src/audio/index.ts +2 -0
  405. package/src/audio/mixAutoMovieAudioPcm.ts +137 -0
  406. package/src/auditAutoMovieRenderObservation.ts +79 -0
  407. package/src/cache/createAutoMovieHttpArtifactStore.ts +84 -0
  408. package/src/caption/IAutoMovieBeatCaption.ts +23 -0
  409. package/src/caption/autoMovieCaptionLanguageComparisonKey.ts +23 -0
  410. package/src/caption/beatCaptions.ts +59 -0
  411. package/src/caption/canonicalProductionWebVtt.ts +76 -0
  412. package/src/caption/canonicalizeAutoMovieCaptionText.ts +24 -0
  413. package/src/caption/escapeWebVttText.ts +23 -0
  414. package/src/caption/index.ts +11 -0
  415. package/src/caption/inspectAutoMovieCaptionReadabilityWithRuntime.ts +231 -0
  416. package/src/caption/isAutoMovieWebVttIdentifier.ts +26 -0
  417. package/src/caption/parseAutoMovieCaptionLanguage.ts +160 -0
  418. package/src/caption/serializeAutoMovieWebVttCueText.ts +28 -0
  419. package/src/caption/serializeAutoMovieWebVttIdentifier.ts +27 -0
  420. package/src/caption/serializeAutoMovieWebVttSingleLineText.ts +26 -0
  421. package/src/caption/webVttCaptionLanguage.ts +30 -0
  422. package/src/caption/webVttTime.ts +30 -0
  423. package/src/captionPlan.ts +1 -0
  424. package/src/captionSidecar.ts +3 -0
  425. package/src/captionSlice.ts +1 -0
  426. package/src/chunkSequenceRender.ts +5 -0
  427. package/src/delivery/AUTOMOVIE_MP4_SRGB_COLOUR.ts +21 -0
  428. package/src/delivery/AUTOMOVIE_MP4_UNITY_MATRIX.ts +14 -0
  429. package/src/delivery/AUTOMOVIE_PRODUCTION_OPUS_PROFILE.ts +28 -0
  430. package/src/delivery/AutoMovieProductionPngRole.ts +18 -0
  431. package/src/delivery/IAutoMovieProductionPngProfile.ts +52 -0
  432. package/src/delivery/IAutoMovieProductionVideoProfile.ts +48 -0
  433. package/src/delivery/assertAutoMovieCaptureClock.ts +37 -0
  434. package/src/delivery/assertProductionOpusProfile.ts +179 -0
  435. package/src/delivery/assertProductionPngPicture.ts +62 -0
  436. package/src/delivery/assertProductionVideoProfile.ts +180 -0
  437. package/src/delivery/auditAutoMovieDecodedFrames.ts +157 -0
  438. package/src/delivery/auditAutoMovieEncodedPresentation.ts +86 -0
  439. package/src/delivery/index.ts +14 -0
  440. package/src/delivery/planAutoMovieCaptureUrl.ts +32 -0
  441. package/src/delivery/productionOpusDescription.ts +173 -0
  442. package/src/delivery/resolveProductionPngProfile.ts +70 -0
  443. package/src/delivery/resolveProductionVideoProfile.ts +48 -0
  444. package/src/ffmpegArgs.ts +61 -0
  445. package/src/film/AutoMovieOrderedScalar.ts +15 -0
  446. package/src/film/IAutoMovieProductionAudioAssetIdentity.ts +40 -0
  447. package/src/film/IAutoMovieProductionAudioAssetIdentityBase.ts +34 -0
  448. package/src/film/IAutoMovieProductionEncoderIdentity.ts +42 -0
  449. package/src/film/IAutoMovieProductionRenderChunk.ts +47 -0
  450. package/src/film/IAutoMovieProductionRenderJobPlan.ts +73 -0
  451. package/src/film/IAutoMovieProductionRenderRuntimeIdentity.ts +37 -0
  452. package/src/film/IAutoMovieProductionRenderTier.ts +27 -0
  453. package/src/film/assertSingleGuidePass.ts +38 -0
  454. package/src/film/equalOrderedScalars.ts +56 -0
  455. package/src/film/index.ts +9 -0
  456. package/src/film/normalizeAudioAssets.ts +74 -0
  457. package/src/film/normalizeRenderTier.ts +51 -0
  458. package/src/film/planProductionRenderJob.ts +353 -0
  459. package/src/film/productionVisualDeliveryOccurrence.ts +28 -0
  460. package/src/film/resolveProductionRenderTierFrameFormat.ts +60 -0
  461. package/src/film/validDigest.ts +23 -0
  462. package/src/film/validWaveAudioIdentity.ts +88 -0
  463. package/src/frameName.ts +24 -0
  464. package/src/framePattern.ts +19 -0
  465. package/src/frameTimes.ts +36 -0
  466. package/src/guidePassFrameName.ts +29 -0
  467. package/src/guidePassFramePattern.ts +27 -0
  468. package/src/guidePasses.ts +7 -0
  469. package/src/guidePassesInternal/passExtension.ts +19 -0
  470. package/src/index.ts +69 -0
  471. package/src/isGuidePass.ts +21 -0
  472. package/src/normalizeGuidePasses.ts +33 -0
  473. package/src/planCaptionSidecar.ts +98 -0
  474. package/src/planChunkedSequenceRender.ts +200 -0
  475. package/src/planGuidePassOutputs.ts +47 -0
  476. package/src/planPoseKeypointSidecar.ts +289 -0
  477. package/src/planSequenceRender.ts +175 -0
  478. package/src/planViewerFrameTimes.ts +98 -0
  479. package/src/renderAndSee.ts +30 -0
  480. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetAssessment.ts +53 -0
  481. package/src/renderBudgetPreflight/IAutoMovieRenderBudgetEvidence.ts +61 -0
  482. package/src/renderBudgetPreflight/IAutoMovieRenderGraphicsIdentity.ts +29 -0
  483. package/src/renderBudgetPreflight/assessAutoMovieRenderBudget.ts +137 -0
  484. package/src/renderBudgetPreflight/autoMovieRenderBudgetEvidence.ts +100 -0
  485. package/src/renderBudgetPreflight/autoMovieRenderBudgetRefusal.ts +82 -0
  486. package/src/renderBudgetPreflight/autoMovieRenderTargetRendererOfGraphics.ts +40 -0
  487. package/src/renderBudgetPreflight/autoMovieRenderTargetSettingsOfShot.ts +59 -0
  488. package/src/renderBudgetPreflight/index.ts +9 -0
  489. package/src/renderBudgetPreflight/selectAutoMovieRenderBudget.ts +28 -0
  490. package/src/renderCaptionSidecar.ts +17 -0
  491. package/src/renderObservationAudit.ts +1 -0
  492. package/src/renderPathStem.ts +61 -0
  493. package/src/renderPoseKeypointSidecar.ts +19 -0
  494. package/src/renderSequenceAndSee.ts +34 -0
  495. package/src/renderSequenceVideo.ts +44 -0
  496. package/src/renderVideo.ts +65 -0
  497. package/src/screenplay/index.ts +1 -0
  498. package/src/screenplay/renderScreenplay.ts +128 -0
  499. package/src/screenplay/screenplaySceneSlug.ts +29 -0
  500. package/src/sequenceRenderPlan.ts +5 -0
  501. package/src/sequenceRenderVideo.ts +6 -0
  502. package/src/shotBeat.ts +19 -0
  503. package/src/sliceCaptionSidecar.ts +85 -0
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Admit a decoder's framemd5 listing against a commissioned half-open frame
3
+ * clock: exactly one stream-zero time base, exactly `expectedFrames` video
4
+ * rows, and frame `i` presenting precisely `[i / fps, (i + 1) / fps)` in that
5
+ * time base, checked by exact BigInt cross products. Adjacent identical
6
+ * images are reported as holds, never rejected. Malformed rows, gaps,
7
+ * overlaps, reordering, excess frames and a nonzero start are refused. This
8
+ * proves presentation continuity of decoded bytes, not motion or quality.
9
+ *
10
+ * @param text Complete FFmpeg framemd5 output.
11
+ * @param expectedFrames Commissioned frame count, a positive safe integer.
12
+ * @param fps Commissioned frames per second, a positive safe integer.
13
+ * @returns The admitted frames and holds.
14
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Admit a decoder's framemd5 listing against a commissioned half-open frame clock: exactly one stream-zero time base, exactly `expectedFrames` video rows, and frame `i` presenting precisely `[i / fps, (i + 1) / fps)` in that time base, checked by exact BigInt cross products) and documents parameters `text`, `expectedFrames`, `fps`, the returned value as stated in this comment.
15
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Admit a decoder's framemd5 listing against a commissioned half-open frame clock: exactly one stream-zero time base, exactly `expectedFrames` video rows, and frame `i` presenting precisely `[i / fps, (i + 1) / fps)` in that time base, checked by exact BigInt cross products) directly over its typed inputs (`text`, `expectedFrames`, `fps`) as nested iteration of depth 2 (for-of over text.split(/\r?\n/u); every over [numerator, denominator]; map over trimmed .split(",")), delegating to `Number.isSafeInteger`, `text.split`, `line.trim`, `trimmed.startsWith`, `Number`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (8 throw sites). Beyond structural 0, 1 and 2 the body uses the literals 6, 5, whose basis this answer does not independently establish and a reviewer must confirm.
16
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 90 lines and 9 top-level statements that reuses `Number.isSafeInteger`, `text.split`, `line.trim`, `trimmed.startsWith`, `Number` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
17
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The body contains 0 `any`, 0 type assertion(s), 10 non-null assertion(s); these are the remaining shortcuts and are not justified here.
18
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `text`, `expectedFrames`, `fps`; the dominant cost is nested iteration of depth 2 (for-of over text.split(/\r?\n/u); every over [numerator, denominator]; map over trimmed .split(",")), performed once per call with 15 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
19
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
20
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 15 allocation sites become the returned value or die with the call, so nothing grows.
21
+ */
22
+ export declare function auditAutoMovieDecodedFrames(text: string, expectedFrames: number, fps: number): auditAutoMovieDecodedFrames.IResult;
23
+ /**
24
+ * Companion types of {@link auditAutoMovieDecodedFrames}.
25
+ *
26
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Companion types of ) and documents 2 documented members as stated in this comment.
27
+ * @evidence contracts/development/design.md#principled-representation Represents Companion types of : companion namespace of 2 members (`IFrame`, `IResult`); units and frames named in its text: frame, bytes, seconds, frames. It has no optional member, so no absent-value state combines with another.
28
+ * @evidence contracts/development/design.md#minimal-and-owned-surface Owned by the module that declares `auditAutoMovieDecodedFrames` in packages/render/src/delivery/auditAutoMovieDecodedFrames.ts; its surface is the 2 members listed and the text shows 3 other files naming it, mostly packages/render (2), test (1), so no member is declared for a presumed future need.
29
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts Scanning the declaration finds no `any`, no `unknown`, no index signature and no cast; it duplicates no type that another owner declares as far as a name search shows.
30
+ */
31
+ export declare namespace auditAutoMovieDecodedFrames {
32
+ /** One decoded frame. */
33
+ interface IFrame {
34
+ /** Decoder stream index. */
35
+ stream: number;
36
+ /** Presentation timestamp, time-base ticks. */
37
+ pts: number;
38
+ /** Presentation duration, time-base ticks. */
39
+ duration: number;
40
+ /** Lowercase MD5 of the decoded image bytes. */
41
+ md5: string;
42
+ }
43
+ /** An admitted decoded stream. */
44
+ interface IResult {
45
+ /** Decoded images. */
46
+ frameCount: number;
47
+ /** Commissioned duration, seconds. */
48
+ durationSeconds: number;
49
+ /** Decoder time base. */
50
+ timeBase: readonly [number, number];
51
+ /** Every frame in output order. */
52
+ frames: IFrame[];
53
+ /** Indices of frames identical to their predecessor. */
54
+ repeatedImages: number[];
55
+ }
56
+ }
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.auditAutoMovieDecodedFrames = auditAutoMovieDecodedFrames;
4
+ /**
5
+ * Admit a decoder's framemd5 listing against a commissioned half-open frame
6
+ * clock: exactly one stream-zero time base, exactly `expectedFrames` video
7
+ * rows, and frame `i` presenting precisely `[i / fps, (i + 1) / fps)` in that
8
+ * time base, checked by exact BigInt cross products. Adjacent identical
9
+ * images are reported as holds, never rejected. Malformed rows, gaps,
10
+ * overlaps, reordering, excess frames and a nonzero start are refused. This
11
+ * proves presentation continuity of decoded bytes, not motion or quality.
12
+ *
13
+ * @param text Complete FFmpeg framemd5 output.
14
+ * @param expectedFrames Commissioned frame count, a positive safe integer.
15
+ * @param fps Commissioned frames per second, a positive safe integer.
16
+ * @returns The admitted frames and holds.
17
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Admit a decoder's framemd5 listing against a commissioned half-open frame clock: exactly one stream-zero time base, exactly `expectedFrames` video rows, and frame `i` presenting precisely `[i / fps, (i + 1) / fps)` in that time base, checked by exact BigInt cross products) and documents parameters `text`, `expectedFrames`, `fps`, the returned value as stated in this comment.
18
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Admit a decoder's framemd5 listing against a commissioned half-open frame clock: exactly one stream-zero time base, exactly `expectedFrames` video rows, and frame `i` presenting precisely `[i / fps, (i + 1) / fps)` in that time base, checked by exact BigInt cross products) directly over its typed inputs (`text`, `expectedFrames`, `fps`) as nested iteration of depth 2 (for-of over text.split(/\r?\n/u); every over [numerator, denominator]; map over trimmed .split(",")), delegating to `Number.isSafeInteger`, `text.split`, `line.trim`, `trimmed.startsWith`, `Number`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (8 throw sites). Beyond structural 0, 1 and 2 the body uses the literals 6, 5, whose basis this answer does not independently establish and a reviewer must confirm.
19
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 90 lines and 9 top-level statements that reuses `Number.isSafeInteger`, `text.split`, `line.trim`, `trimmed.startsWith`, `Number` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
20
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The body contains 0 `any`, 0 type assertion(s), 10 non-null assertion(s); these are the remaining shortcuts and are not justified here.
21
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `text`, `expectedFrames`, `fps`; the dominant cost is nested iteration of depth 2 (for-of over text.split(/\r?\n/u); every over [numerator, denominator]; map over trimmed .split(",")), performed once per call with 15 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
22
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
23
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 15 allocation sites become the returned value or die with the call, so nothing grows.
24
+ */
25
+ function auditAutoMovieDecodedFrames(text, expectedFrames, fps) {
26
+ if (!Number.isSafeInteger(expectedFrames) ||
27
+ expectedFrames < 1 ||
28
+ !Number.isSafeInteger(fps) ||
29
+ fps < 1)
30
+ throw new Error("A decoded audit requires a positive integral frame count and rate");
31
+ const frames = [];
32
+ const repeatedImages = [];
33
+ let timeBase;
34
+ for (const line of text.split(/\r?\n/u)) {
35
+ const trimmed = line.trim();
36
+ if (trimmed.length === 0)
37
+ continue;
38
+ if (trimmed.startsWith("#")) {
39
+ const match = /^#tb 0:\s*(\d+)\/(\d+)$/u.exec(trimmed);
40
+ if (match !== null) {
41
+ if (timeBase !== undefined)
42
+ throw new Error("Duplicate decoded time base");
43
+ const numerator = Number(match[1]);
44
+ const denominator = Number(match[2]);
45
+ if (![numerator, denominator].every((v) => Number.isSafeInteger(v) && v > 0))
46
+ throw new Error("Invalid decoded time base");
47
+ timeBase = [numerator, denominator];
48
+ }
49
+ continue;
50
+ }
51
+ const fields = trimmed
52
+ .split(",")
53
+ .map((f) => f.trim());
54
+ if (fields.length !== 6 ||
55
+ !fields.slice(0, 5).every((f) => /^-?\d+$/u.test(f)) ||
56
+ !/^[a-f\d]{32}$/iu.test(fields[5]))
57
+ throw new Error("Malformed decoded video row");
58
+ const [stream, dts, pts, duration, bytes] = fields
59
+ .slice(0, 5)
60
+ .map(Number);
61
+ if (![stream, dts, pts, duration, bytes].every((v) => v !== undefined && Number.isSafeInteger(v)) ||
62
+ stream !== 0 ||
63
+ dts !== pts ||
64
+ pts < 0 ||
65
+ duration <= 0 ||
66
+ bytes <= 0)
67
+ throw new Error("Invalid decoded video timing or raster extent");
68
+ if (frames.length >= expectedFrames)
69
+ throw new Error("Decoded video contains excess frames");
70
+ const md5 = fields[5].toLowerCase();
71
+ if (frames.at(-1)?.md5 === md5)
72
+ repeatedImages.push(frames.length);
73
+ frames.push({ stream: stream, pts: pts, duration: duration, md5 });
74
+ }
75
+ if (timeBase === undefined || frames.length !== expectedFrames)
76
+ throw new Error("Decoded video is missing its time base or commissioned frames");
77
+ const scale = BigInt(timeBase[0]) * BigInt(fps);
78
+ frames.forEach((frame, index) => {
79
+ if (BigInt(frame.pts) * scale !== BigInt(index) * BigInt(timeBase[1]) ||
80
+ (BigInt(frame.pts) + BigInt(frame.duration)) * scale !==
81
+ BigInt(index + 1) * BigInt(timeBase[1]))
82
+ throw new Error(`Decoded frame ${index} does not cover its exact presentation interval`);
83
+ });
84
+ return {
85
+ frameCount: frames.length,
86
+ durationSeconds: expectedFrames / fps,
87
+ timeBase,
88
+ frames,
89
+ repeatedImages,
90
+ };
91
+ }
92
+ //# sourceMappingURL=auditAutoMovieDecodedFrames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit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ivery's probe against its commissioned profile: exactly
3
+ * one H.264 video stream of the raster and integer frame rate and one AAC
4
+ * audio stream of the sample rate and channel count, each starting at zero
5
+ * and presenting exactly the commissioned whole seconds in its own rational
6
+ * time base, so AAC end padding never passes for film duration. Refuses
7
+ * missing or extra streams, wrong codecs, rasters or rates, and truncated or
8
+ * extended presentations. It cannot establish listening or picture quality.
9
+ *
10
+ * @param probe Unmodified FFprobe `-show_streams -of json` output, parsed.
11
+ * @param expected The commissioned profile.
12
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Check an encoded delivery's probe against its commissioned profile: exactly one H.264 video stream of the raster and integer frame rate and one AAC audio stream of the sample rate and channel count, each starting at zero and presenting exactly the commissioned whole seconds in its own rational time base, so AAC end padding never passes for film duration) and documents parameters `probe`, `expected` as stated in this comment.
13
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Check an encoded delivery's probe against its commissioned profile: exactly one H.264 video stream of the raster and integer frame rate and one AAC audio stream of the sample rate and channel count, each starting at zero and presenting exactly the commissioned whole seconds in its own rational time base, so AAC end padding never passes for film duration) directly over its typed inputs (`probe`, `expected`) as 4 sequential passes (map over streams; find over records; find over records), delegating to `Number.isSafeInteger`, `Array.isArray`, `streams.map`, `records.find`, `String`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (5 throw sites). Beyond structural 0, 1 and 2 the body uses the literal 48000, whose basis this answer does not independently establish and a reviewer must confirm.
14
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 57 lines and 8 top-level statements that reuses `Number.isSafeInteger`, `Array.isArray`, `streams.map`, `records.find`, `String` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
15
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The body contains 0 `any`, 2 type assertion(s), 4 non-null assertion(s); these are the remaining shortcuts and are not justified here.
16
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `probe`, `expected`; the dominant cost is 4 sequential passes (map over streams; find over records; find over records), performed once per call with 5 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
17
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
18
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 5 allocation sites become the returned value or die with the call, so nothing grows.
19
+ */
20
+ export declare function auditAutoMovieEncodedPresentation(probe: unknown, expected: {
21
+ /** Whole seconds, positive. */ durationSeconds: number;
22
+ /** Raster width, pixels. */ width: number;
23
+ /** Raster height, pixels. */ height: number;
24
+ /** Frames per second, an integer. */ fps: number;
25
+ /** Audio samples per second; 48000 by default. */ sampleRate?: number;
26
+ /** Audio channels; 2 by default. */ channels?: number;
27
+ }): void;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.auditAutoMovieEncodedPresentation = auditAutoMovieEncodedPresentation;
4
+ /**
5
+ * Check an encoded delivery's probe against its commissioned profile: exactly
6
+ * one H.264 video stream of the raster and integer frame rate and one AAC
7
+ * audio stream of the sample rate and channel count, each starting at zero
8
+ * and presenting exactly the commissioned whole seconds in its own rational
9
+ * time base, so AAC end padding never passes for film duration. Refuses
10
+ * missing or extra streams, wrong codecs, rasters or rates, and truncated or
11
+ * extended presentations. It cannot establish listening or picture quality.
12
+ *
13
+ * @param probe Unmodified FFprobe `-show_streams -of json` output, parsed.
14
+ * @param expected The commissioned profile.
15
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (Check an encoded delivery's probe against its commissioned profile: exactly one H.264 video stream of the raster and integer frame rate and one AAC audio stream of the sample rate and channel count, each starting at zero and presenting exactly the commissioned whole seconds in its own rational time base, so AAC end padding never passes for film duration) and documents parameters `probe`, `expected` as stated in this comment.
16
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (Check an encoded delivery's probe against its commissioned profile: exactly one H.264 video stream of the raster and integer frame rate and one AAC audio stream of the sample rate and channel count, each starting at zero and presenting exactly the commissioned whole seconds in its own rational time base, so AAC end padding never passes for film duration) directly over its typed inputs (`probe`, `expected`) as 4 sequential passes (map over streams; find over records; find over records), delegating to `Number.isSafeInteger`, `Array.isArray`, `streams.map`, `records.find`, `String`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (5 throw sites). Beyond structural 0, 1 and 2 the body uses the literal 48000, whose basis this answer does not independently establish and a reviewer must confirm.
17
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 57 lines and 8 top-level statements that reuses `Number.isSafeInteger`, `Array.isArray`, `streams.map`, `records.find`, `String` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
18
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The body contains 0 `any`, 2 type assertion(s), 4 non-null assertion(s); these are the remaining shortcuts and are not justified here.
19
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `probe`, `expected`; the dominant cost is 4 sequential passes (map over streams; find over records; find over records), performed once per call with 5 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
20
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
21
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 5 allocation sites become the returned value or die with the call, so nothing grows.
22
+ */
23
+ function auditAutoMovieEncodedPresentation(probe, expected) {
24
+ if (probe === null ||
25
+ typeof probe !== "object" ||
26
+ !Number.isSafeInteger(expected.durationSeconds) ||
27
+ expected.durationSeconds < 1)
28
+ throw new Error("Invalid encoded presentation audit input");
29
+ const streams = probe.streams;
30
+ if (!Array.isArray(streams) || streams.length !== 2)
31
+ throw new Error("Delivery requires exactly a video and an audio stream");
32
+ const records = streams.map((stream) => {
33
+ if (stream === null || typeof stream !== "object")
34
+ throw new Error("Invalid encoded stream");
35
+ return stream;
36
+ });
37
+ const video = records.find((s) => s.codec_type === "video");
38
+ const audio = records.find((s) => s.codec_type === "audio");
39
+ if (!video ||
40
+ !audio ||
41
+ video.codec_name !== "h264" ||
42
+ video.width !== expected.width ||
43
+ video.height !== expected.height ||
44
+ video.avg_frame_rate !== `${expected.fps}/1` ||
45
+ audio.codec_name !== "aac" ||
46
+ audio.sample_rate !== String(expected.sampleRate ?? 48000) ||
47
+ audio.channels !== (expected.channels ?? 2))
48
+ throw new Error("Encoded presentation differs from the commissioned media profile");
49
+ for (const stream of records) {
50
+ const base = /^(\d+)\/(\d+)$/u.exec(String(stream.time_base));
51
+ const duration = String(stream.duration_ts);
52
+ if (base === null ||
53
+ !/^\d+$/u.test(duration) ||
54
+ Number(stream.start_time) !== 0 ||
55
+ BigInt(base[1]) < 1n ||
56
+ BigInt(base[2]) < 1n ||
57
+ BigInt(duration) * BigInt(base[1]) !==
58
+ BigInt(expected.durationSeconds) * BigInt(base[2]))
59
+ throw new Error("Encoded stream has a nonzero start or an inexact commissioned duration");
60
+ }
61
+ }
62
+ //# sourceMappingURL=auditAutoMovieEncodedPresentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auditAutoMovieEncodedPresentation.js","sourceRoot":"","sources":["../../src/delivery/auditAutoMovieEncodedPresentation.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,2CACE,KAAc,EACd,QAOC;IAED,IACE,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,MAAM,CAAC,aAAa,CAAC,QAAQ,CAAC,eAAe,CAAC;QAC/C,QAAQ,CAAC,eAAe,GAAG,CAAC;QAE5B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAa,KAAiC,CAAC,OAAO,CAAC;IACpE,IAAI,CAAC,KAAK,CAAC,OAAO,CAA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Q,GAAW,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QACpD,IACE,IAAI,KAAK,IAAI;YACb,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;YACxB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC;YAC/B,MAAM,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,GAAG,EAAE;YACrB,MAAM,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,GAAG,EAAE;YACrB,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC;gBACjC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC;YAErD,MAAM,IAAI,KAAK,CACb,wEAAwE,CACzE,CAAC;IACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ export * from "./assertProductionOpusProfile";
2
+ export * from "./assertProductionPngPicture";
3
+ export * from "./assertProductionVideoProfile";
4
+ export * from "./AUTOMOVIE_PRODUCTION_OPUS_PROFILE";
5
+ export * from "./AutoMovieProductionPngRole";
6
+ export * from "./IAutoMovieProductionPngProfile";
7
+ export * from "./IAutoMovieProductionVideoProfile";
8
+ export * from "./productionOpusDescription";
9
+ export * from "./resolveProductionPngProfile";
10
+ export * from "./resolveProductionVideoProfile";
11
+ export * from "./assertAutoMovieCaptureClock";
12
+ export * from "./auditAutoMovieDecodedFrames";
13
+ export * from "./auditAutoMovieEncodedPresentation";
14
+ export * from "./planAutoMovieCaptureUrl";
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./assertProductionOpusProfile"), exports);
18
+ __exportStar(require("./assertProductionPngPicture"), exports);
19
+ __exportStar(require("./assertProductionVideoProfile"), exports);
20
+ __exportStar(require("./AUTOMOVIE_PRODUCTION_OPUS_PROFILE"), exports);
21
+ __exportStar(require("./AutoMovieProductionPngRole"), exports);
22
+ __exportStar(require("./IAutoMovieProductionPngProfile"), exports);
23
+ __exportStar(require("./IAutoMovieProductionVideoProfile"), exports);
24
+ __exportStar(require("./productionOpusDescription"), exports);
25
+ __exportStar(require("./resolveProductionPngProfile"), exports);
26
+ __exportStar(require("./resolveProductionVideoProfile"), exports);
27
+ __exportStar(require("./assertAutoMovieCaptureClock"), exports);
28
+ __exportStar(require("./auditAutoMovieDecodedFrames"), exports);
29
+ __exportStar(require("./auditAutoMovieEncodedPresentation"), exports);
30
+ __exportStar(require("./planAutoMovieCaptureUrl"), exports);
31
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/delivery/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gEAA8C;AAC9C,+DAA6C;AAC7C,iEAA+C;AAC/C,sEAAoD;AACpD,+DAA6C;AAC7C,mEAAiD;AACjD,qEAAmD;AACnD,8DAA4C;AAC5C,gEAA8C;AAC9C,kEAAgD;AAChD,gEAA8C;AAC9C,gEAA8C;AAC9C,sEAAoD;AACpD,4DAA0C"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * The capture URL of a local review page: the requested URL with its path
3
+ * and unrelated options kept, the given capture parameters set, and
4
+ * autoplay (`play`) removed because capture seeks each frame. Only an HTTP
5
+ * loopback host is admitted, so capture never drives a remote page.
6
+ *
7
+ * @param requested The review page URL.
8
+ * @param parameters Capture parameters to set, such as raster and range.
9
+ * @returns The capture URL.
10
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (The capture URL of a local review page: the requested URL with its path and unrelated options kept, the given capture parameters set, and autoplay (`play`) removed because capture seeks each frame) and documents parameters `requested`, `parameters`, the returned value as stated in this comment.
11
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (The capture URL of a local review page: the requested URL with its path and unrelated options kept, the given capture parameters set, and autoplay (`play`) removed because capture seeks each frame) directly over its typed inputs (`requested`, `parameters`) as a single pass (for-of over Object.entries(parameters)), delegating to `Object.entries`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (1 throw site). Apart from structural 0, 1 and 2 the body uses no numeric literal.
12
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 12 lines and 5 top-level statements that reuses `Object.entries` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
13
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Scanning the body finds no `any`, type assertion, non-null assertion, suppression directive or TODO, and no branch keyed on a consumer, fixture or expected answer; values come from its parameters.
14
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `requested`, `parameters`; the dominant cost is a single pass (for-of over Object.entries(parameters)), performed once per call with 3 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
15
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
16
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 3 allocation sites become the returned value or die with the call, so nothing grows.
17
+ */
18
+ export declare function planAutoMovieCaptureUrl(requested: string, parameters: Readonly<Record<string, string>>): string;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.planAutoMovieCaptureUrl = planAutoMovieCaptureUrl;
4
+ /**
5
+ * The capture URL of a local review page: the requested URL with its path
6
+ * and unrelated options kept, the given capture parameters set, and
7
+ * autoplay (`play`) removed because capture seeks each frame. Only an HTTP
8
+ * loopback host is admitted, so capture never drives a remote page.
9
+ *
10
+ * @param requested The review page URL.
11
+ * @param parameters Capture parameters to set, such as raster and range.
12
+ * @returns The capture URL.
13
+ * @evidence contracts/development/common.md#meaningful-documentation Gives the purpose (The capture URL of a local review page: the requested URL with its path and unrelated options kept, the given capture parameters set, and autoplay (`play`) removed because capture seeks each frame) and documents parameters `requested`, `parameters`, the returned value as stated in this comment.
14
+ * @evidence contracts/development/implementation.md#principled-implementation Implements the documented behavior (The capture URL of a local review page: the requested URL with its path and unrelated options kept, the given capture parameters set, and autoplay (`play`) removed because capture seeks each frame) directly over its typed inputs (`requested`, `parameters`) as a single pass (for-of over Object.entries(parameters)), delegating to `Object.entries`; the premises are the units, frames and ranges stated in its parameter documentation, enforced only where the body throws (1 throw site). Apart from structural 0, 1 and 2 the body uses no numeric literal.
15
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One operation of 12 lines and 5 top-level statements that reuses `Object.entries` from their owners instead of copying them; it adds no option, layer or abstraction beyond its documented parameters.
16
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Scanning the body finds no `any`, type assertion, non-null assertion, suppression directive or TODO, and no branch keyed on a consumer, fixture or expected answer; values come from its parameters.
17
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is driven by the sizes of `requested`, `parameters`; the dominant cost is a single pass (for-of over Object.entries(parameters)), performed once per call with 3 allocation sites (literals and constructed values). No speedup is claimed and none is measured.
18
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The operation coordinates no requests, phases or consumers and holds no cache: each call recomputes from its arguments and shares nothing, which is correct because its result depends only on them.
19
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle, timer, listener or task and keeps no state between calls; its 3 allocation sites become the returned value or die with the call, so nothing grows.
20
+ */
21
+ function planAutoMovieCaptureUrl(requested, parameters) {
22
+ const result = new URL(requested);
23
+ if (result.protocol !== "http:" ||
24
+ !["127.0.0.1", "localhost", "[::1]"].includes(result.hostname))
25
+ throw new Error("Capture requires a local HTTP review page");
26
+ for (const [key, value] of Object.entries(parameters))
27
+ result.searchParams.set(key, value);
28
+ result.searchParams.delete("play");
29
+ return result.href;
30
+ }
31
+ //# sourceMappingURL=planAutoMovieCaptureUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planAutoMovieCaptureUrl.js","sourceRoot":"","sources":["../../src/delivery/planAutoMovieCaptureUrl.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,iCACE,SAAiB,EACjB,UAA4C;IAE5C,MAAM,MAAM,GAAQ,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;IACvC,IACE,MAAM,CAAC,QAAQ,KAAK,OAAO;QAC3B,CAAC,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC;QAE9D,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;QACnD,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACtC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { IAutoMovieProductionOpusDescription } from "@automovie/interface";
2
+ /**
3
+ * Parse and structurally validate the one Opus `dOps` box of an MP4 audio
4
+ * sample entry.
5
+ *
6
+ * `boxes` is the sample entry's child-box list as mp4box parses it, `codec` its
7
+ * four-character code, and `trackChannels` the `AudioSampleEntry` channel
8
+ * count. The result reports the box as
9
+ * observed; whether it matches the delivery profile is
10
+ * `assertProductionOpusProfile`'s question.
11
+ *
12
+ * Family 0 serializes no stream counts or mapping table and supports mono or
13
+ * stereo, so it reports null counts, an empty mapping and the implied channel
14
+ * order. Families 1 and 255 report their stream counts and ordered mapping
15
+ * with a null channel order, because family 255 defines no speaker meaning and
16
+ * this parser does not expand the family 1 order. `InputSampleRate` is
17
+ * reported but not compared with any track rate, because RFC 7845 makes it the
18
+ * informational rate of the original input.
19
+ *
20
+ * Throws `unsupported-audio-profile.sampleEntry` for a non-Opus code and
21
+ * `malformed-dOps` for anything else RFC 7845 section 5.1 or its MP4
22
+ * encapsulation forbids: not exactly one `dOps` box, a field outside its bit
23
+ * width, an output channel count that differs from the track's, a reserved
24
+ * family, a family 0 box with a mapping or more than two channels, a family 1
25
+ * box with more than eight channels, zero streams, more coupled than total
26
+ * streams, more than 255 decoded channels, or a mapping table that is not one
27
+ * entry per output channel each naming a decoded channel or 255 for silence.
28
+ *
29
+ * @evidence contracts/development/implementation.md#principled-implementation Each field is checked against its RFC 7845 section 5.1 bit width, and the relations are the ones that section and the Opus-in-ISOBMFF encapsulation state: family channel limits, N greater than zero, M at most N, M plus N at most 255, one mapping entry per output channel with each entry below M plus N or 255, and `OutputChannelCount` equal to the sample entry's channel count; the informational input rate and an output count below the decoded count are legal and admitted.
30
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One function reads the box and returns the interface record, with a local integer reader so every field refusal names its key; comparison with the delivery profile stays in `assertProductionOpusProfile`, so this parser reports what the file says and refuses only what no Opus file may say.
31
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The numeric limits are RFC 7845 field widths and family rules rather than fixture values, no file or encoder is special-cased, and a malformed box throws instead of being repaired or defaulted.
32
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names each argument's source, the split from the profile check, what each family reports and why the channel order is null for nonzero families, why the input rate is not compared, and every refusal with its error prefix.
33
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is linear in the child-box count B plus the mapping length C, at most 255: one filter over the boxes and two passes over the mapping, with no allocation beyond the filtered list and the copied mapping.
34
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call parses one track's sample entry for one probe and coordinates no phases or requests whose result could be shared.
35
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function keeps no reference to the parsed boxes after returning, its result copies the mapping into a new array its caller owns, and it opens no handle or task.
36
+ */
37
+ export declare const productionOpusDescription: (props: {
38
+ boxes: readonly unknown[] | undefined;
39
+ codec: string;
40
+ trackChannels: number;
41
+ }) => IAutoMovieProductionOpusDescription;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.productionOpusDescription = void 0;
4
+ /**
5
+ * Parse and structurally validate the one Opus `dOps` box of an MP4 audio
6
+ * sample entry.
7
+ *
8
+ * `boxes` is the sample entry's child-box list as mp4box parses it, `codec` its
9
+ * four-character code, and `trackChannels` the `AudioSampleEntry` channel
10
+ * count. The result reports the box as
11
+ * observed; whether it matches the delivery profile is
12
+ * `assertProductionOpusProfile`'s question.
13
+ *
14
+ * Family 0 serializes no stream counts or mapping table and supports mono or
15
+ * stereo, so it reports null counts, an empty mapping and the implied channel
16
+ * order. Families 1 and 255 report their stream counts and ordered mapping
17
+ * with a null channel order, because family 255 defines no speaker meaning and
18
+ * this parser does not expand the family 1 order. `InputSampleRate` is
19
+ * reported but not compared with any track rate, because RFC 7845 makes it the
20
+ * informational rate of the original input.
21
+ *
22
+ * Throws `unsupported-audio-profile.sampleEntry` for a non-Opus code and
23
+ * `malformed-dOps` for anything else RFC 7845 section 5.1 or its MP4
24
+ * encapsulation forbids: not exactly one `dOps` box, a field outside its bit
25
+ * width, an output channel count that differs from the track's, a reserved
26
+ * family, a family 0 box with a mapping or more than two channels, a family 1
27
+ * box with more than eight channels, zero streams, more coupled than total
28
+ * streams, more than 255 decoded channels, or a mapping table that is not one
29
+ * entry per output channel each naming a decoded channel or 255 for silence.
30
+ *
31
+ * @evidence contracts/development/implementation.md#principled-implementation Each field is checked against its RFC 7845 section 5.1 bit width, and the relations are the ones that section and the Opus-in-ISOBMFF encapsulation state: family channel limits, N greater than zero, M at most N, M plus N at most 255, one mapping entry per output channel with each entry below M plus N or 255, and `OutputChannelCount` equal to the sample entry's channel count; the informational input rate and an output count below the decoded count are legal and admitted.
32
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One function reads the box and returns the interface record, with a local integer reader so every field refusal names its key; comparison with the delivery profile stays in `assertProductionOpusProfile`, so this parser reports what the file says and refuses only what no Opus file may say.
33
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The numeric limits are RFC 7845 field widths and family rules rather than fixture values, no file or encoder is special-cased, and a malformed box throws instead of being repaired or defaulted.
34
+ * @evidence contracts/development/common.md#meaningful-documentation The doc names each argument's source, the split from the profile check, what each family reports and why the channel order is null for nonzero families, why the input rate is not compared, and every refusal with its error prefix.
35
+ * @evidence contracts/development/implementation.md#efficient-algorithms Cost is linear in the child-box count B plus the mapping length C, at most 255: one filter over the boxes and two passes over the mapping, with no allocation beyond the filtered list and the copied mapping.
36
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call parses one track's sample entry for one probe and coordinates no phases or requests whose result could be shared.
37
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function keeps no reference to the parsed boxes after returning, its result copies the mapping into a new array its caller owns, and it opens no handle or task.
38
+ */
39
+ const productionOpusDescription = (props) => {
40
+ if (/^opus(?:\.|$)/i.test(props.codec) === false)
41
+ throw new Error(`unsupported-audio-profile.sampleEntry: expected Opus, observed "${props.codec}".`);
42
+ const boxes = (props.boxes ?? []).filter((box) => box !== null &&
43
+ typeof box === "object" &&
44
+ box.type === "dOps");
45
+ if (boxes.length !== 1)
46
+ throw new Error(`malformed-dOps: expected one Opus description, observed ${boxes.length}.`);
47
+ const box = boxes[0];
48
+ const integer = (key, minimum, maximum) => {
49
+ const value = box[key];
50
+ if (typeof value !== "number" ||
51
+ Number.isSafeInteger(value) === false ||
52
+ value < minimum ||
53
+ value > maximum)
54
+ throw new Error(`malformed-dOps.${key}: observed ${String(value)}.`);
55
+ return value;
56
+ };
57
+ const version = integer("Version", 0, 255);
58
+ const outputChannelCount = integer("OutputChannelCount", 1, 255);
59
+ const preSkip = integer("PreSkip", 0, 65_535);
60
+ const inputSampleRate = integer("InputSampleRate", 1, 0xffff_ffff);
61
+ const outputGainQ7_8 = integer("OutputGain", -32_768, 32_767);
62
+ const family = integer("ChannelMappingFamily", 0, 255);
63
+ const rawMapping = box.ChannelMapping;
64
+ if ((rawMapping !== undefined || family !== 0) &&
65
+ Array.isArray(rawMapping) === false)
66
+ throw new Error("malformed-dOps.ChannelMapping: expected an ordered array.");
67
+ const mapping = (Array.isArray(rawMapping) ? rawMapping : []).map((value, index) => {
68
+ if (typeof value !== "number" ||
69
+ Number.isSafeInteger(value) === false ||
70
+ value < 0 ||
71
+ value > 255)
72
+ throw new Error(`malformed-dOps.ChannelMapping[${index}]: observed ${String(value)}.`);
73
+ return value;
74
+ });
75
+ if (outputChannelCount !== props.trackChannels)
76
+ throw new Error("malformed-dOps: sample description and track channel counts disagree.");
77
+ if (family === 0) {
78
+ if (outputChannelCount > 2 || mapping.length !== 0)
79
+ throw new Error("malformed-dOps.ChannelMappingFamily: family 0 supports mono or stereo and serializes no mapping table.");
80
+ return {
81
+ kind: "opus",
82
+ version,
83
+ outputChannelCount,
84
+ preSkip,
85
+ inputSampleRate,
86
+ outputGainQ7_8,
87
+ channelMapping: {
88
+ family,
89
+ streamCount: null,
90
+ coupledCount: null,
91
+ mapping: [],
92
+ channelOrder: outputChannelCount === 2 ? ["front-left", "front-right"] : ["mono"],
93
+ },
94
+ };
95
+ }
96
+ if (family !== 1 && family !== 255)
97
+ throw new Error(`malformed-dOps.ChannelMappingFamily: reserved family ${family} is unsupported.`);
98
+ if (family === 1 && outputChannelCount > 8)
99
+ throw new Error(`malformed-dOps.ChannelMappingFamily: family 1 supports at most 8 channels, observed ${outputChannelCount}.`);
100
+ const streamCount = integer("StreamCount", 1, 255);
101
+ const coupledCount = integer("CoupledCount", 0, 255);
102
+ const decodedChannels = streamCount + coupledCount;
103
+ if (coupledCount > streamCount ||
104
+ decodedChannels > 255 ||
105
+ mapping.length !== outputChannelCount ||
106
+ mapping.some((value) => value !== 255 && value >= decodedChannels))
107
+ throw new Error("malformed-dOps.ChannelMapping: stream, coupled, channel, and mapping counts disagree.");
108
+ return {
109
+ kind: "opus",
110
+ version,
111
+ outputChannelCount,
112
+ preSkip,
113
+ inputSampleRate,
114
+ outputGainQ7_8,
115
+ channelMapping: {
116
+ family,
117
+ streamCount,
118
+ coupledCount,
119
+ mapping,
120
+ channelOrder: null,
121
+ },
122
+ };
123
+ };
124
+ exports.productionOpusDescription = productionOpusDescription;
125
+ //# sourceMappingURL=productionOpusDescription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"productionOpusDescription.js","sourceRoot":"","sources":["../../src/delivery/productionOpusDescription.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACI,MAAM,yBAAyB,GAIM,CAAC,KAS5C,EAAuC,EAAE;IACxC,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,KAAK;QAC9C,MAAM,IAAI,KAAK,CACb,mEAAmE,KAAK,CAAC,KAAK,IAAI,CACnF,CAAC;IACJ,MAAM,KAAK,GAA8B,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,CACjE,CAAC,GAAY,EAAkC,EAAE,CAC/C,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACtB,GAA0B,CAAC,IAAI,KAAK,MAAM,CAC9C,CAAC;IACF,IAAI,KA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AI,kBAAkB,GAAG,CAAC;QACxC,MAAM,IAAI,KAAK,CACb,uFAAuF,kBAAkB,GAAG,CAC7G,CAAC;IACJ,MAAM,WAAW,GAAW,OAAO,CAAC,aAAa,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAW,OAAO,CAAC,cAAc,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7D,MAAM,eAAe,GAAW,WAAW,GAAG,YAAY,CAAC;IAC3D,IACE,YAAY,GAAG,WAAW;QAC1B,eAAe,GAAG,GAAG;QACrB,OAAO,CAAC,MAAM,KAAK,kBAAkB;QACrC,OAAO,CAAC,IAAI,CACV,CAAC,KAAa,EAAW,EAAE,CAAC,KAAK,KAAK,GAAG,IAAI,KAAK,IAAI,eAAe,CACtE;QAED,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;IACJ,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,OAAO;QACP,kBAAkB;QAClB,OAAO;QACP,eAAe;QACf,cAAc;QACd,cAAc,EAAE;YACd,MAAM;YACN,WAAW;YACX,YAAY;YACZ,OAAO;YACP,YAAY,EAAE,IAAI;SACnB;KACF,CAAC;AACJ,CAAC,CAAC;AAvIW,QAAA,yBAAyB,GAAzB,yBAAyB,CAuIpC"}
@@ -0,0 +1,27 @@
1
+ import type { AutoMovieProductionPngRole } from "./AutoMovieProductionPngRole";
2
+ import type { IAutoMovieProductionPngProfile } from "./IAutoMovieProductionPngProfile";
3
+ /**
4
+ * Resolve one output role to the exact PNG profile its writer must emit.
5
+ *
6
+ * A `waveform` or `spectrogram` picture takes the fixed size the engine's
7
+ * sound-evidence writers draw, and `width` and `height` are ignored for it. A
8
+ * `preview` or `guide-frame` picture takes the authored raster passed in
9
+ * `width` and `height`, in pixels. Every other profile field is the one
10
+ * literal the writers support: 8-bit straight-alpha RGBA, sRGB, square,
11
+ * upright and not interlaced. Throws when the resolved raster is not a
12
+ * positive safe-integer size, which includes a preview or guide frame called
13
+ * without one.
14
+ *
15
+ * @evidence contracts/development/implementation.md#principled-implementation Fixed sound-evidence sizes come from the engine writers' raster constants; other roles require positive safe-integer dimensions. This admits numeric profile records rather than encoded images and imposes no PNG field-width or decoder allocation limit; those remain serialization and probing concerns.
16
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One role switch picks the raster and one object literal spells the single supported format, so the profile shape stays in `IAutoMovieProductionPngProfile` and the comparison stays in `assertProductionPngPicture`.
17
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No caller or file is special-cased: the two fixed sizes are the engine writers' own defaults imported rather than restated, and a missing authored raster throws instead of falling back to a guessed size.
18
+ * @evidence contracts/development/common.md#meaningful-documentation The doc says which roles take a fixed size and which take the passed raster, that the size arguments are pixels and ignored for fixed roles, which literals every profile carries, and when the call throws.
19
+ * @evidence contracts/development/implementation.md#efficient-algorithms The call does constant work: one role comparison, four integer checks and one eleven-field object, independent of image size.
20
+ * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call builds one small profile from its arguments and coordinates no phases or requests whose work could be shared.
21
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The PNG profile is a fresh eleven-field record handed to the validator that requested it; the engine raster constant is read, never retained, and no file handle or task is opened.
22
+ */
23
+ export declare const resolveProductionPngProfile: (props: {
24
+ role: AutoMovieProductionPngRole;
25
+ width?: number;
26
+ height?: number;
27
+ }) => IAutoMovieProductionPngProfile;