@norskvideo/norsk-studio-built-ins 1.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 (332) hide show
  1. package/client/info.js +17990 -0
  2. package/client/output.preview/styles.css +128 -0
  3. package/client/processor.audioLevel/styles.css +164 -0
  4. package/client/processor.audioMixer/styles.css +249 -0
  5. package/client/processor.cascadingSwitch/extra.css +0 -0
  6. package/lib/index.d.ts +3 -0
  7. package/lib/index.js +15 -0
  8. package/lib/index.js.map +1 -0
  9. package/lib/info.d.ts +3 -0
  10. package/lib/info.js +74 -0
  11. package/lib/info.js.map +1 -0
  12. package/lib/input.mediaconnect/flow-selection.d.ts +9 -0
  13. package/lib/input.mediaconnect/flow-selection.js +40 -0
  14. package/lib/input.mediaconnect/flow-selection.js.map +1 -0
  15. package/lib/input.mediaconnect/info.d.ts +3 -0
  16. package/lib/input.mediaconnect/info.js +70 -0
  17. package/lib/input.mediaconnect/info.js.map +1 -0
  18. package/lib/input.mediaconnect/node-view.d.ts +6 -0
  19. package/lib/input.mediaconnect/node-view.js +38 -0
  20. package/lib/input.mediaconnect/node-view.js.map +1 -0
  21. package/lib/input.mediaconnect/output-selection.d.ts +9 -0
  22. package/lib/input.mediaconnect/output-selection.js +55 -0
  23. package/lib/input.mediaconnect/output-selection.js.map +1 -0
  24. package/lib/input.mediaconnect/runtime.d.ts +23 -0
  25. package/lib/input.mediaconnect/runtime.js +133 -0
  26. package/lib/input.mediaconnect/runtime.js.map +1 -0
  27. package/lib/input.rtmp/info.d.ts +3 -0
  28. package/lib/input.rtmp/info.js +101 -0
  29. package/lib/input.rtmp/info.js.map +1 -0
  30. package/lib/input.rtmp/inline-view.d.ts +6 -0
  31. package/lib/input.rtmp/inline-view.js +16 -0
  32. package/lib/input.rtmp/inline-view.js.map +1 -0
  33. package/lib/input.rtmp/runtime.d.ts +19 -0
  34. package/lib/input.rtmp/runtime.js +75 -0
  35. package/lib/input.rtmp/runtime.js.map +1 -0
  36. package/lib/input.rtmp/summary-view.d.ts +6 -0
  37. package/lib/input.rtmp/summary-view.js +22 -0
  38. package/lib/input.rtmp/summary-view.js.map +1 -0
  39. package/lib/input.silence/info.d.ts +3 -0
  40. package/lib/input.silence/info.js +47 -0
  41. package/lib/input.silence/info.js.map +1 -0
  42. package/lib/input.silence/runtime.d.ts +22 -0
  43. package/lib/input.silence/runtime.js +52 -0
  44. package/lib/input.silence/runtime.js.map +1 -0
  45. package/lib/input.srt-caller/info.d.ts +3 -0
  46. package/lib/input.srt-caller/info.js +74 -0
  47. package/lib/input.srt-caller/info.js.map +1 -0
  48. package/lib/input.srt-caller/runtime.d.ts +12 -0
  49. package/lib/input.srt-caller/runtime.js +14 -0
  50. package/lib/input.srt-caller/runtime.js.map +1 -0
  51. package/lib/input.srt-listener/info.d.ts +3 -0
  52. package/lib/input.srt-listener/info.js +125 -0
  53. package/lib/input.srt-listener/info.js.map +1 -0
  54. package/lib/input.srt-listener/inline-view.d.ts +6 -0
  55. package/lib/input.srt-listener/inline-view.js +16 -0
  56. package/lib/input.srt-listener/inline-view.js.map +1 -0
  57. package/lib/input.srt-listener/runtime.d.ts +24 -0
  58. package/lib/input.srt-listener/runtime.js +75 -0
  59. package/lib/input.srt-listener/runtime.js.map +1 -0
  60. package/lib/input.srt-listener/summary-view.d.ts +6 -0
  61. package/lib/input.srt-listener/summary-view.js +22 -0
  62. package/lib/input.srt-listener/summary-view.js.map +1 -0
  63. package/lib/input.udp-ts/info.d.ts +3 -0
  64. package/lib/input.udp-ts/info.js +34 -0
  65. package/lib/input.udp-ts/info.js.map +1 -0
  66. package/lib/input.udp-ts/runtime.d.ts +10 -0
  67. package/lib/input.udp-ts/runtime.js +24 -0
  68. package/lib/input.udp-ts/runtime.js.map +1 -0
  69. package/lib/input.videoTestCard/info.d.ts +3 -0
  70. package/lib/input.videoTestCard/info.js +42 -0
  71. package/lib/input.videoTestCard/info.js.map +1 -0
  72. package/lib/input.videoTestCard/runtime.d.ts +10 -0
  73. package/lib/input.videoTestCard/runtime.js +14 -0
  74. package/lib/input.videoTestCard/runtime.js.map +1 -0
  75. package/lib/output.autoCmaf/form-views.d.ts +3 -0
  76. package/lib/output.autoCmaf/form-views.js +13 -0
  77. package/lib/output.autoCmaf/form-views.js.map +1 -0
  78. package/lib/output.autoCmaf/fullscreen.d.ts +6 -0
  79. package/lib/output.autoCmaf/fullscreen.js +31 -0
  80. package/lib/output.autoCmaf/fullscreen.js.map +1 -0
  81. package/lib/output.autoCmaf/info.d.ts +3 -0
  82. package/lib/output.autoCmaf/info.js +197 -0
  83. package/lib/output.autoCmaf/info.js.map +1 -0
  84. package/lib/output.autoCmaf/runtime.d.ts +66 -0
  85. package/lib/output.autoCmaf/runtime.js +285 -0
  86. package/lib/output.autoCmaf/runtime.js.map +1 -0
  87. package/lib/output.autoCmaf/summary.d.ts +6 -0
  88. package/lib/output.autoCmaf/summary.js +32 -0
  89. package/lib/output.autoCmaf/summary.js.map +1 -0
  90. package/lib/output.medialive/channel-selection.d.ts +9 -0
  91. package/lib/output.medialive/channel-selection.js +40 -0
  92. package/lib/output.medialive/channel-selection.js.map +1 -0
  93. package/lib/output.medialive/fullscreen.d.ts +6 -0
  94. package/lib/output.medialive/fullscreen.js +31 -0
  95. package/lib/output.medialive/fullscreen.js.map +1 -0
  96. package/lib/output.medialive/info.d.ts +3 -0
  97. package/lib/output.medialive/info.js +111 -0
  98. package/lib/output.medialive/info.js.map +1 -0
  99. package/lib/output.medialive/inline.d.ts +6 -0
  100. package/lib/output.medialive/inline.js +30 -0
  101. package/lib/output.medialive/inline.js.map +1 -0
  102. package/lib/output.medialive/input-selection.d.ts +9 -0
  103. package/lib/output.medialive/input-selection.js +58 -0
  104. package/lib/output.medialive/input-selection.js.map +1 -0
  105. package/lib/output.medialive/node-view.d.ts +6 -0
  106. package/lib/output.medialive/node-view.js +36 -0
  107. package/lib/output.medialive/node-view.js.map +1 -0
  108. package/lib/output.medialive/runtime.d.ts +34 -0
  109. package/lib/output.medialive/runtime.js +142 -0
  110. package/lib/output.medialive/runtime.js.map +1 -0
  111. package/lib/output.medialive/url-selection.d.ts +9 -0
  112. package/lib/output.medialive/url-selection.js +45 -0
  113. package/lib/output.medialive/url-selection.js.map +1 -0
  114. package/lib/output.preview/info.d.ts +5 -0
  115. package/lib/output.preview/info.js +103 -0
  116. package/lib/output.preview/info.js.map +1 -0
  117. package/lib/output.preview/inline-view.d.ts +6 -0
  118. package/lib/output.preview/inline-view.js +29 -0
  119. package/lib/output.preview/inline-view.js.map +1 -0
  120. package/lib/output.preview/runtime.d.ts +34 -0
  121. package/lib/output.preview/runtime.js +86 -0
  122. package/lib/output.preview/runtime.js.map +1 -0
  123. package/lib/output.rtmp/info.d.ts +3 -0
  124. package/lib/output.rtmp/info.js +76 -0
  125. package/lib/output.rtmp/info.js.map +1 -0
  126. package/lib/output.rtmp/inline-view.d.ts +6 -0
  127. package/lib/output.rtmp/inline-view.js +10 -0
  128. package/lib/output.rtmp/inline-view.js.map +1 -0
  129. package/lib/output.rtmp/runtime.d.ts +23 -0
  130. package/lib/output.rtmp/runtime.js +51 -0
  131. package/lib/output.rtmp/runtime.js.map +1 -0
  132. package/lib/output.srt/info.d.ts +3 -0
  133. package/lib/output.srt/info.js +102 -0
  134. package/lib/output.srt/info.js.map +1 -0
  135. package/lib/output.srt/runtime.d.ts +12 -0
  136. package/lib/output.srt/runtime.js +14 -0
  137. package/lib/output.srt/runtime.js.map +1 -0
  138. package/lib/output.statistics/info.d.ts +4 -0
  139. package/lib/output.statistics/info.js +69 -0
  140. package/lib/output.statistics/info.js.map +1 -0
  141. package/lib/output.statistics/inline-view.d.ts +6 -0
  142. package/lib/output.statistics/inline-view.js +32 -0
  143. package/lib/output.statistics/inline-view.js.map +1 -0
  144. package/lib/output.statistics/runtime.d.ts +18 -0
  145. package/lib/output.statistics/runtime.js +36 -0
  146. package/lib/output.statistics/runtime.js.map +1 -0
  147. package/lib/output.udpTs/info.d.ts +3 -0
  148. package/lib/output.udpTs/info.js +33 -0
  149. package/lib/output.udpTs/info.js.map +1 -0
  150. package/lib/output.udpTs/runtime.d.ts +10 -0
  151. package/lib/output.udpTs/runtime.js +14 -0
  152. package/lib/output.udpTs/runtime.js.map +1 -0
  153. package/lib/output.whep/info.d.ts +3 -0
  154. package/lib/output.whep/info.js +28 -0
  155. package/lib/output.whep/info.js.map +1 -0
  156. package/lib/output.whep/runtime.d.ts +14 -0
  157. package/lib/output.whep/runtime.js +21 -0
  158. package/lib/output.whep/runtime.js.map +1 -0
  159. package/lib/processor.actionReplay/info.d.ts +5 -0
  160. package/lib/processor.actionReplay/info.js +100 -0
  161. package/lib/processor.actionReplay/info.js.map +1 -0
  162. package/lib/processor.actionReplay/runtime.d.ts +59 -0
  163. package/lib/processor.actionReplay/runtime.js +224 -0
  164. package/lib/processor.actionReplay/runtime.js.map +1 -0
  165. package/lib/processor.actionReplay/summary.d.ts +7 -0
  166. package/lib/processor.actionReplay/summary.js +76 -0
  167. package/lib/processor.actionReplay/summary.js.map +1 -0
  168. package/lib/processor.audioLevel/info.d.ts +3 -0
  169. package/lib/processor.audioLevel/info.js +83 -0
  170. package/lib/processor.audioLevel/info.js.map +1 -0
  171. package/lib/processor.audioLevel/inline-view.d.ts +6 -0
  172. package/lib/processor.audioLevel/inline-view.js +23 -0
  173. package/lib/processor.audioLevel/inline-view.js.map +1 -0
  174. package/lib/processor.audioLevel/runtime.d.ts +49 -0
  175. package/lib/processor.audioLevel/runtime.js +82 -0
  176. package/lib/processor.audioLevel/runtime.js.map +1 -0
  177. package/lib/processor.audioLevel/summary-view.d.ts +7 -0
  178. package/lib/processor.audioLevel/summary-view.js +36 -0
  179. package/lib/processor.audioLevel/summary-view.js.map +1 -0
  180. package/lib/processor.audioMixer/fullscreen-view.d.ts +8 -0
  181. package/lib/processor.audioMixer/fullscreen-view.js +121 -0
  182. package/lib/processor.audioMixer/fullscreen-view.js.map +1 -0
  183. package/lib/processor.audioMixer/info.d.ts +4 -0
  184. package/lib/processor.audioMixer/info.js +148 -0
  185. package/lib/processor.audioMixer/info.js.map +1 -0
  186. package/lib/processor.audioMixer/inline-view.d.ts +7 -0
  187. package/lib/processor.audioMixer/inline-view.js +43 -0
  188. package/lib/processor.audioMixer/inline-view.js.map +1 -0
  189. package/lib/processor.audioMixer/runtime.d.ts +119 -0
  190. package/lib/processor.audioMixer/runtime.js +142 -0
  191. package/lib/processor.audioMixer/runtime.js.map +1 -0
  192. package/lib/processor.audioMixer/summary-view.d.ts +7 -0
  193. package/lib/processor.audioMixer/summary-view.js +11 -0
  194. package/lib/processor.audioMixer/summary-view.js.map +1 -0
  195. package/lib/processor.aws-transcribe/info.d.ts +3 -0
  196. package/lib/processor.aws-transcribe/info.js +81 -0
  197. package/lib/processor.aws-transcribe/info.js.map +1 -0
  198. package/lib/processor.aws-transcribe/runtime.d.ts +39 -0
  199. package/lib/processor.aws-transcribe/runtime.js +164 -0
  200. package/lib/processor.aws-transcribe/runtime.js.map +1 -0
  201. package/lib/processor.aws-transcribe/transcribe-language-selection.d.ts +9 -0
  202. package/lib/processor.aws-transcribe/transcribe-language-selection.js +40 -0
  203. package/lib/processor.aws-transcribe/transcribe-language-selection.js.map +1 -0
  204. package/lib/processor.aws-transcribe/translate-language-selection.d.ts +9 -0
  205. package/lib/processor.aws-transcribe/translate-language-selection.js +40 -0
  206. package/lib/processor.aws-transcribe/translate-language-selection.js.map +1 -0
  207. package/lib/processor.browserOverlay/info.d.ts +3 -0
  208. package/lib/processor.browserOverlay/info.js +38 -0
  209. package/lib/processor.browserOverlay/info.js.map +1 -0
  210. package/lib/processor.browserOverlay/runtime.d.ts +29 -0
  211. package/lib/processor.browserOverlay/runtime.js +121 -0
  212. package/lib/processor.browserOverlay/runtime.js.map +1 -0
  213. package/lib/processor.cascadingSwitch/info.d.ts +3 -0
  214. package/lib/processor.cascadingSwitch/info.js +155 -0
  215. package/lib/processor.cascadingSwitch/info.js.map +1 -0
  216. package/lib/processor.cascadingSwitch/inline-view.d.ts +6 -0
  217. package/lib/processor.cascadingSwitch/inline-view.js +15 -0
  218. package/lib/processor.cascadingSwitch/inline-view.js.map +1 -0
  219. package/lib/processor.cascadingSwitch/runtime.d.ts +59 -0
  220. package/lib/processor.cascadingSwitch/runtime.js +117 -0
  221. package/lib/processor.cascadingSwitch/runtime.js.map +1 -0
  222. package/lib/processor.cascadingSwitch/source-selection.d.ts +7 -0
  223. package/lib/processor.cascadingSwitch/source-selection.js +36 -0
  224. package/lib/processor.cascadingSwitch/source-selection.js.map +1 -0
  225. package/lib/processor.fixedLadder/info.d.ts +8 -0
  226. package/lib/processor.fixedLadder/info.js +71 -0
  227. package/lib/processor.fixedLadder/info.js.map +1 -0
  228. package/lib/processor.fixedLadder/runtime.d.ts +16 -0
  229. package/lib/processor.fixedLadder/runtime.js +165 -0
  230. package/lib/processor.fixedLadder/runtime.js.map +1 -0
  231. package/lib/processor.monetise/info.d.ts +3 -0
  232. package/lib/processor.monetise/info.js +90 -0
  233. package/lib/processor.monetise/info.js.map +1 -0
  234. package/lib/processor.monetise/runtime.d.ts +57 -0
  235. package/lib/processor.monetise/runtime.js +141 -0
  236. package/lib/processor.monetise/runtime.js.map +1 -0
  237. package/lib/processor.monetise/summary.d.ts +7 -0
  238. package/lib/processor.monetise/summary.js +39 -0
  239. package/lib/processor.monetise/summary.js.map +1 -0
  240. package/lib/processor.whisper-transcribe/info.d.ts +3 -0
  241. package/lib/processor.whisper-transcribe/info.js +43 -0
  242. package/lib/processor.whisper-transcribe/info.js.map +1 -0
  243. package/lib/processor.whisper-transcribe/runtime.d.ts +29 -0
  244. package/lib/processor.whisper-transcribe/runtime.js +83 -0
  245. package/lib/processor.whisper-transcribe/runtime.js.map +1 -0
  246. package/lib/shared/srt-form-views.d.ts +2 -0
  247. package/lib/shared/srt-form-views.js +10 -0
  248. package/lib/shared/srt-form-views.js.map +1 -0
  249. package/lib/shared/srt-socket-options.d.ts +4 -0
  250. package/lib/shared/srt-socket-options.js +36 -0
  251. package/lib/shared/srt-socket-options.js.map +1 -0
  252. package/lib/shared/srt-types.d.ts +2 -0
  253. package/lib/shared/srt-types.js +3 -0
  254. package/lib/shared/srt-types.js.map +1 -0
  255. package/lib/test/audio-mixer.d.ts +0 -0
  256. package/lib/test/audio-mixer.js +2 -0
  257. package/lib/test/audio-mixer.js.map +1 -0
  258. package/lib/test/auto-cmaf.d.ts +1 -0
  259. package/lib/test/auto-cmaf.js +142 -0
  260. package/lib/test/auto-cmaf.js.map +1 -0
  261. package/lib/test/browser-overlay.d.ts +1 -0
  262. package/lib/test/browser-overlay.js +79 -0
  263. package/lib/test/browser-overlay.js.map +1 -0
  264. package/lib/test/cascading-switch.d.ts +1 -0
  265. package/lib/test/cascading-switch.js +286 -0
  266. package/lib/test/cascading-switch.js.map +1 -0
  267. package/lib/test/fixed-ladder.d.ts +1 -0
  268. package/lib/test/fixed-ladder.js +100 -0
  269. package/lib/test/fixed-ladder.js.map +1 -0
  270. package/lib/test/rtmp-input.d.ts +1 -0
  271. package/lib/test/rtmp-input.js +182 -0
  272. package/lib/test/rtmp-input.js.map +1 -0
  273. package/lib/test/rtmp-output.d.ts +1 -0
  274. package/lib/test/rtmp-output.js +74 -0
  275. package/lib/test/rtmp-output.js.map +1 -0
  276. package/lib/test/silence-generator.d.ts +1 -0
  277. package/lib/test/silence-generator.js +65 -0
  278. package/lib/test/silence-generator.js.map +1 -0
  279. package/lib/test/srt-input-caller.d.ts +1 -0
  280. package/lib/test/srt-input-caller.js +79 -0
  281. package/lib/test/srt-input-caller.js.map +1 -0
  282. package/lib/test/srt-input-listener.d.ts +1 -0
  283. package/lib/test/srt-input-listener.js +382 -0
  284. package/lib/test/srt-input-listener.js.map +1 -0
  285. package/lib/test/srt-output.d.ts +1 -0
  286. package/lib/test/srt-output.js +78 -0
  287. package/lib/test/srt-output.js.map +1 -0
  288. package/lib/test/udp-output.d.ts +1 -0
  289. package/lib/test/udp-output.js +76 -0
  290. package/lib/test/udp-output.js.map +1 -0
  291. package/lib/test/udp-ts-input.d.ts +1 -0
  292. package/lib/test/udp-ts-input.js +78 -0
  293. package/lib/test/udp-ts-input.js.map +1 -0
  294. package/lib/test/video-card.d.ts +1 -0
  295. package/lib/test/video-card.js +68 -0
  296. package/lib/test/video-card.js.map +1 -0
  297. package/lib/test/whep-output.d.ts +1 -0
  298. package/lib/test/whep-output.js +92 -0
  299. package/lib/test/whep-output.js.map +1 -0
  300. package/lib/util.latency/info.d.ts +3 -0
  301. package/lib/util.latency/info.js +116 -0
  302. package/lib/util.latency/info.js.map +1 -0
  303. package/lib/util.latency/inline-view.d.ts +6 -0
  304. package/lib/util.latency/inline-view.js +74 -0
  305. package/lib/util.latency/inline-view.js.map +1 -0
  306. package/lib/util.latency/runtime.d.ts +19 -0
  307. package/lib/util.latency/runtime.js +87 -0
  308. package/lib/util.latency/runtime.js.map +1 -0
  309. package/lib/util.latency/source-node-selection.d.ts +9 -0
  310. package/lib/util.latency/source-node-selection.js +17 -0
  311. package/lib/util.latency/source-node-selection.js.map +1 -0
  312. package/lib/util.ma35d/info.d.ts +3 -0
  313. package/lib/util.ma35d/info.js +78 -0
  314. package/lib/util.ma35d/info.js.map +1 -0
  315. package/lib/util.ma35d/inline-view.d.ts +6 -0
  316. package/lib/util.ma35d/inline-view.js +76 -0
  317. package/lib/util.ma35d/inline-view.js.map +1 -0
  318. package/lib/util.ma35d/runtime.d.ts +21 -0
  319. package/lib/util.ma35d/runtime.js +49 -0
  320. package/lib/util.ma35d/runtime.js.map +1 -0
  321. package/lib/util.timestamps/info.d.ts +5 -0
  322. package/lib/util.timestamps/info.js +86 -0
  323. package/lib/util.timestamps/info.js.map +1 -0
  324. package/lib/util.timestamps/inline-view.d.ts +6 -0
  325. package/lib/util.timestamps/inline-view.js +94 -0
  326. package/lib/util.timestamps/inline-view.js.map +1 -0
  327. package/lib/util.timestamps/runtime.d.ts +29 -0
  328. package/lib/util.timestamps/runtime.js +40 -0
  329. package/lib/util.timestamps/runtime.js.map +1 -0
  330. package/package.json +61 -0
  331. package/shared/style.css +1617 -0
  332. package/shared/tailwind.css +31 -0
@@ -0,0 +1,74 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
30
+ const __1 = require("../");
31
+ const builder_1 = require("@norskvideo/norsk-studio/lib/test/_util/builder");
32
+ const document = __importStar(require("@norskvideo/norsk-studio/lib/runtime/document"));
33
+ const yaml_1 = __importDefault(require("yaml"));
34
+ const execution_1 = __importDefault(require("@norskvideo/norsk-studio/lib/runtime/execution"));
35
+ const sources_1 = require("@norskvideo/norsk-studio/lib/test/_util/sources");
36
+ const info_1 = __importDefault(require("../output.rtmp/info"));
37
+ const client_types_1 = require("@norskvideo/norsk-studio/lib/extension/client-types");
38
+ const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
39
+ const sinks_1 = require("@norskvideo/norsk-studio/lib/test/_util/sinks");
40
+ const chai_1 = require("chai");
41
+ async function defaultRuntime() {
42
+ const runtime = (0, builder_1.emptyRuntime)();
43
+ await (0, __1.registerAll)(runtime);
44
+ return runtime;
45
+ }
46
+ describe("RTMP Output", () => {
47
+ async function testDocument() {
48
+ const runtime = await defaultRuntime();
49
+ const yaml = new builder_1.YamlBuilder()
50
+ .addNode(new builder_1.YamlNodeBuilder('rtmp', (0, info_1.default)(client_types_1.RegistrationConsts), { url: "rtmp://127.0.0.1:5001/norsk/output" }).reify())
51
+ .reify();
52
+ const compiled = document.load(__filename, runtime, yaml_1.default.stringify(yaml));
53
+ return compiled;
54
+ }
55
+ let norsk = undefined;
56
+ let ffprobe = undefined;
57
+ after(async () => {
58
+ await norsk?.close();
59
+ });
60
+ before(async () => {
61
+ ffprobe = (0, sinks_1.getStreams)('rtmp://127.0.0.1:5001/norsk/output');
62
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
63
+ const compiled = await testDocument();
64
+ const result = await (0, execution_1.default)(norsk, compiled);
65
+ const rtmp = result.nodes["rtmp"];
66
+ const source = await (0, sources_1.videoAndAudio)(norsk, 'source');
67
+ rtmp.subscribe([new runtime_types_1.StudioNodeSubscriptionSource(source, (0, sources_1.testSourceDescription)(), { type: "take-first-stream", select: client_types_1.Av })], { requireOneOfEverything: true });
68
+ });
69
+ it("Should be running an RTMP output", async () => {
70
+ const streams = await ffprobe;
71
+ (0, chai_1.expect)(streams ?? []).lengthOf(2);
72
+ });
73
+ });
74
+ //# sourceMappingURL=rtmp-output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rtmp-output.js","sourceRoot":"","sources":["../../src/test/rtmp-output.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA8C;AAC9C,2BAAkC;AAElC,6EAA4G;AAC5G,wFAA0E;AAC1E,gDAAwB;AACxB,+FAAgE;AAEhE,6EAAuG;AACvG,+DAA2C;AAC3C,sFAA6F;AAE7F,wFAAoG;AACpG,yEAA0F;AAC1F,+BAA8B;AAE9B,KAAK,UAAU,cAAc;IAC3B,MAAM,OAAO,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC/B,MAAM,IAAA,eAAW,EAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAKD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,KAAK,UAAU,YAAY;QACzB,MAAM,OAAO,GAAG,MAAM,cAAc,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,qBAAW,EAAE;aAC3B,OAAO,CACN,IAAI,yBAAe,CAChB,MAAM,EACL,IAAA,cAAQ,EAAC,iCAAkB,CAAC,EAC5B,EAAE,GAAG,EAAE,oCAAoC,EAAE,CAC9C,CAAC,KAAK,EAAE,CAAC;aACb,KAAK,EAAE,CAAC;QAEX,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,cAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,KAAK,GAAsB,SAAS,CAAC;IACzC,IAAI,OAAO,GAA6B,SAAU,CAAC;IAEnD,KAAK,CAAC,KAAK,IAAI,EAAE;QACf,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;IACvB,CAAC,CAAC,CAAA;IAEF,MAAM,CAAC,KAAK,IAAI,EAAE;QAChB,OAAO,GAAG,IAAA,kBAAU,EAAC,oCAAoC,CAAC,CAAC;QAC3D,KAAK,GAAG,MAAM,iBAAK,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;QACtC,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAE,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACzC,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAsB,CAAC;QACvD,MAAM,MAAM,GAAG,MAAM,IAAA,uBAAa,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACpD,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,4CAA4B,CAC9C,MAAM,EACN,IAAA,+BAAqB,GAAE,EACvB,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,iBAAE,EAAE,CAC1C,CAAC,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC,CAAA;IACvC,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC;QAC9B,IAAA,aAAM,EAAC,OAAO,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,65 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
30
+ const __1 = require("../");
31
+ const builder_1 = require("@norskvideo/norsk-studio/lib/test/_util/builder");
32
+ const document = __importStar(require("@norskvideo/norsk-studio/lib/runtime/document"));
33
+ const yaml_1 = __importDefault(require("yaml"));
34
+ const execution_1 = __importDefault(require("@norskvideo/norsk-studio/lib/runtime/execution"));
35
+ const sinks_1 = require("@norskvideo/norsk-studio/lib/test/_util/sinks");
36
+ const info_1 = __importDefault(require("../input.silence/info"));
37
+ const client_types_1 = require("@norskvideo/norsk-studio/lib/extension/client-types");
38
+ async function defaultRuntime() {
39
+ const runtime = (0, builder_1.emptyRuntime)();
40
+ await (0, __1.registerAll)(runtime);
41
+ return runtime;
42
+ }
43
+ describe("Silence Generator", () => {
44
+ async function testDocument() {
45
+ const runtime = await defaultRuntime();
46
+ const yaml = new builder_1.YamlBuilder()
47
+ .addNode(new builder_1.YamlNodeBuilder('silence', (0, info_1.default)(client_types_1.RegistrationConsts), {
48
+ sampleRate: 48000, channelLayout: 'stereo'
49
+ }).reify())
50
+ .reify();
51
+ const compiled = document.load(__filename, runtime, yaml_1.default.stringify(yaml));
52
+ return compiled;
53
+ }
54
+ let norsk = undefined;
55
+ after(async () => {
56
+ await norsk?.close();
57
+ });
58
+ it("Should output some frames", async () => {
59
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
60
+ const compiled = await testDocument();
61
+ const nodes = await (0, execution_1.default)(norsk, compiled);
62
+ await (0, sinks_1.assertNodeOutputsAudioFrames)(norsk, nodes, 'silence');
63
+ });
64
+ });
65
+ //# sourceMappingURL=silence-generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"silence-generator.js","sourceRoot":"","sources":["../../src/test/silence-generator.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA8C;AAC9C,2BAAkC;AAElC,6EAA4G;AAC5G,wFAA0E;AAC1E,gDAAwB;AACxB,+FAAgE;AAChE,yEAA6F;AAE7F,iEAAgD;AAChD,sFAAyF;AAEzF,KAAK,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC/B,MAAM,IAAA,eAAW,EAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IAClC,KAAK,UAAU,YAAY;QAC1B,MAAM,OAAO,GAAG,MAAM,cAAc,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,qBAAW,EAAE;aAC5B,OAAO,CACP,IAAI,yBAAe,CACjB,SAAS,EACT,IAAA,cAAW,EAAC,iCAAkB,CAAC,EAC/B;YACC,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ;SAC1C,CACD,CAAC,KAAK,EAAE,CAAC;aACX,KAAK,EAAE,CAAC;QAEV,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,cAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC;IACjB,CAAC;IACD,IAAI,KAAK,GAAsB,SAAS,CAAC;IAEzC,KAAK,CAAC,KAAK,IAAI,EAAE;QAChB,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;IACtB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;QAC1C,KAAK,GAAG,MAAM,iBAAK,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAE,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,MAAM,IAAA,oCAA4B,EAAC,KAAK,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7D,CAAC,CAAC,CAAA;AAMH,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,79 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
30
+ const __1 = require("../");
31
+ const builder_1 = require("@norskvideo/norsk-studio/lib/test/_util/builder");
32
+ const document = __importStar(require("@norskvideo/norsk-studio/lib/runtime/document"));
33
+ const yaml_1 = __importDefault(require("yaml"));
34
+ const execution_1 = __importDefault(require("@norskvideo/norsk-studio/lib/runtime/execution"));
35
+ const sinks_1 = require("@norskvideo/norsk-studio/lib/test/_util/sinks");
36
+ const ffmpeg_1 = require("@norskvideo/norsk-studio/lib/test/_util/ffmpeg");
37
+ const info_1 = __importDefault(require("../input.srt-caller/info"));
38
+ const client_types_1 = require("@norskvideo/norsk-studio/lib/extension/client-types");
39
+ async function defaultRuntime() {
40
+ const runtime = (0, builder_1.emptyRuntime)();
41
+ await (0, __1.registerAll)(runtime);
42
+ return runtime;
43
+ }
44
+ describe("SRT Caller Input", () => {
45
+ async function testDocument() {
46
+ const runtime = await defaultRuntime();
47
+ const yaml = new builder_1.YamlBuilder()
48
+ .addNode(new builder_1.YamlNodeBuilder('srt', (0, info_1.default)(client_types_1.RegistrationConsts), {
49
+ sourceName: 'foo',
50
+ port: 5001,
51
+ ip: '127.0.0.1',
52
+ socketOptions: {}
53
+ }).reify())
54
+ .reify();
55
+ const compiled = document.load(__filename, runtime, yaml_1.default.stringify(yaml));
56
+ return compiled;
57
+ }
58
+ let norsk = undefined;
59
+ let ffmpeg = undefined;
60
+ before(async () => {
61
+ ffmpeg = await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
62
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'listener' })
63
+ }));
64
+ });
65
+ after(async () => {
66
+ await norsk?.close();
67
+ await ffmpeg?.stop();
68
+ });
69
+ it("Should output some frames", async () => {
70
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
71
+ const compiled = await testDocument();
72
+ const nodes = await (0, execution_1.default)(norsk, compiled);
73
+ await Promise.all([
74
+ await (0, sinks_1.assertNodeOutputsAudioFrames)(norsk, nodes, 'srt'),
75
+ await (0, sinks_1.assertNodeOutputsVideoFrames)(norsk, nodes, 'srt')
76
+ ]);
77
+ });
78
+ });
79
+ //# sourceMappingURL=srt-input-caller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"srt-input-caller.js","sourceRoot":"","sources":["../../src/test/srt-input-caller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA8C;AAC9C,2BAAkC;AAElC,6EAA4G;AAC5G,wFAA0E;AAC1E,gDAAwB;AACxB,+FAAgE;AAChE,yEAA2H;AAE3H,2EAAkG;AAElG,oEAA+C;AAC/C,sFAAyF;AAEzF,KAAK,UAAU,cAAc;IAC3B,MAAM,OAAO,GAAG,IAAA,sBAAY,GAAE,CAAC;IAC/B,MAAM,IAAA,eAAW,EAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,KAAK,UAAU,YAAY;QACzB,MAAM,OAAO,GAAG,MAAM,cAAc,EAAE,CAAC;QACvC,MAAM,IAAI,GAAG,IAAI,qBAAW,EAAE;aAC3B,OAAO,CACN,IAAI,yBAAe,CAChB,KAAK,EACJ,IAAA,cAAO,EAAC,iCAAkB,CAAC,EAC3B;YACE,UAAU,EAAE,KAAK;YACjB,IAAI,EAAE,IAAI;YACV,EAAE,EAAE,WAAW;YACf,aAAa,EAAE,EAAE;SAClB,CACF,CAAC,KAAK,EAAE,CAAC;aACb,KAAK,EAAE,CAAC;QAEX,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,cAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1E,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,KAAK,GAAsB,SAAS,CAAC;IACzC,IAAI,MAAM,GAAuB,SAAS,CAAC;IAE3C,MAAM,CAAC,KAAK,IAAI,EAAE;QAEhB,MAAM,GAAG,MAAM,eAAM,CAAC,MAAM,CAAC,IAAA,sBAAa,EAAC;YACzC,SAAS,EAAE,IAAA,kBAAS,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;SACvD,CAAC,CAAC,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,KAAK,CAAC,KAAK,IAAI,EAAE;QACf,MAAM,KAAK,EAAE,KAAK,EAAE,CAAC;QACrB,MAAM,MAAM,EAAE,IAAI,EAAE,CAAC;IACvB,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;QACzC,KAAK,GAAG,MAAM,iBAAK,CAAC,OAAO,CAAC,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACvD,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,MAAM,IAAA,mBAAE,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACxC,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,MAAM,IAAA,oCAA4B,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;YACvD,MAAM,IAAA,oCAA4B,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;SACxD,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,382 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ const norsk_sdk_1 = require("@norskvideo/norsk-sdk");
30
+ const __1 = require("../");
31
+ const builder_1 = require("@norskvideo/norsk-studio/lib/test/_util/builder");
32
+ const document = __importStar(require("@norskvideo/norsk-studio/lib/runtime/document"));
33
+ const yaml_1 = __importDefault(require("yaml"));
34
+ const execution_1 = __importDefault(require("@norskvideo/norsk-studio/lib/runtime/execution"));
35
+ const sinks_1 = require("@norskvideo/norsk-studio/lib/test/_util/sinks");
36
+ const ffmpeg_1 = require("@norskvideo/norsk-studio/lib/test/_util/ffmpeg");
37
+ const info_1 = __importDefault(require("../input.srt-listener/info"));
38
+ const client_types_1 = require("@norskvideo/norsk-studio/lib/extension/client-types");
39
+ const runtime_types_1 = require("@norskvideo/norsk-studio/lib/extension/runtime-types");
40
+ const chai_1 = require("chai");
41
+ const util_1 = require("@norskvideo/norsk-studio/lib/shared/util");
42
+ async function defaultRuntime() {
43
+ const runtime = (0, builder_1.emptyRuntime)();
44
+ await (0, __1.registerAll)(runtime);
45
+ return runtime;
46
+ }
47
+ describe("SRT Listener Input", () => {
48
+ function impl(desc, cfg, cb) {
49
+ async function testDocument() {
50
+ const runtime = await defaultRuntime();
51
+ const yaml = new builder_1.YamlBuilder()
52
+ .addNode(new builder_1.YamlNodeBuilder('srt', (0, info_1.default)(client_types_1.RegistrationConsts), cfg).reify())
53
+ .reify();
54
+ const compiled = document.load(__filename, runtime, yaml_1.default.stringify(yaml));
55
+ return compiled;
56
+ }
57
+ describe(desc, () => {
58
+ cb(testDocument, cfg);
59
+ });
60
+ }
61
+ impl("Permissive SRT Listener with one stream", {
62
+ id: 'srt',
63
+ displayName: 'srt',
64
+ port: 5001,
65
+ ip: '0.0.0.0',
66
+ sourceNames: 'permissive',
67
+ streamIds: ['first'],
68
+ socketOptions: {}
69
+ }, (testDocument, _cfg) => {
70
+ let norsk = undefined;
71
+ let ffmpeg = [];
72
+ afterEach(async () => {
73
+ await norsk?.close();
74
+ await Promise.all(ffmpeg.map(async (f) => f.stop()));
75
+ });
76
+ describe("A single source connects", () => {
77
+ before(async () => {
78
+ ffmpeg = [await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
79
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
80
+ }))
81
+ ];
82
+ });
83
+ it("Should output frames with that source name", async () => {
84
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
85
+ const compiled = await testDocument();
86
+ const result = await (0, execution_1.default)(norsk, compiled);
87
+ const source = result.nodes['srt'];
88
+ const sink = new sinks_1.TraceSink(norsk, "sink");
89
+ await sink.initialised;
90
+ sink.subscribe([
91
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
92
+ ]);
93
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 2 && sink.totalMessages() > 25, () => {
94
+ (0, chai_1.expect)(sink.streamCount()).equals(2);
95
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
96
+ }, 10000.0, 10.0);
97
+ });
98
+ });
99
+ describe("A single source connects, disconnects and connects again", () => {
100
+ before(async () => {
101
+ ffmpeg = [await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
102
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
103
+ }))
104
+ ];
105
+ });
106
+ it("Should still output frames with that source name", async () => {
107
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
108
+ const compiled = await testDocument();
109
+ const result = await (0, execution_1.default)(norsk, compiled);
110
+ const source = result.nodes['srt'];
111
+ const sink = new sinks_1.TraceSink(norsk, "sink");
112
+ await sink.initialised;
113
+ sink.subscribe([
114
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
115
+ ]);
116
+ await (0, util_1.waitForCondition)(() => sink.streamCount() == 2 && sink.totalMessages() > 25, 10000.0);
117
+ await ffmpeg[0].stop();
118
+ ffmpeg = [await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
119
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
120
+ }))];
121
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 2 && sink.totalMessages() > 50, async () => {
122
+ await (0, sinks_1.assertNodeOutputsAudioFrames)(norsk, result, "srt");
123
+ await (0, sinks_1.assertNodeOutputsVideoFrames)(norsk, result, "srt");
124
+ (0, chai_1.expect)(sink.streamCount()).equals(2);
125
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
126
+ }, 10000.0, 10.0);
127
+ });
128
+ });
129
+ describe("A second source connects", () => {
130
+ before(async () => {
131
+ ffmpeg = [
132
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
133
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
134
+ })),
135
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
136
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
137
+ })),
138
+ ];
139
+ });
140
+ it("Should only output frames with the first source name", async () => {
141
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
142
+ const compiled = await testDocument();
143
+ const result = await (0, execution_1.default)(norsk, compiled);
144
+ const source = result.nodes['srt'];
145
+ const sink = new sinks_1.TraceSink(norsk, "sink");
146
+ await sink.initialised;
147
+ sink.subscribe([
148
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
149
+ ]);
150
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 2 && sink.totalMessages() > 25, () => {
151
+ (0, chai_1.expect)(sink.streamCount()).equals(2);
152
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
153
+ }, 10000.0, 10.0);
154
+ });
155
+ });
156
+ });
157
+ impl("Permissive SRT Listener with two streams", {
158
+ id: 'srt',
159
+ displayName: 'srt',
160
+ port: 5001,
161
+ ip: '0.0.0.0',
162
+ sourceNames: 'permissive',
163
+ streamIds: ['first', 'second'],
164
+ socketOptions: {}
165
+ }, (testDocument, _cfg) => {
166
+ let norsk = undefined;
167
+ let ffmpeg = [];
168
+ afterEach(async () => {
169
+ await norsk?.close();
170
+ await Promise.all(ffmpeg.map(async (f) => f.stop()));
171
+ });
172
+ describe("A single source connects", () => {
173
+ before(async () => {
174
+ ffmpeg = [await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
175
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
176
+ }))
177
+ ];
178
+ });
179
+ it("Should output frames with the first source name", async () => {
180
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
181
+ const compiled = await testDocument();
182
+ const result = await (0, execution_1.default)(norsk, compiled);
183
+ const source = result.nodes['srt'];
184
+ const sink = new sinks_1.TraceSink(norsk, "sink");
185
+ await sink.initialised;
186
+ sink.subscribe([
187
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
188
+ ]);
189
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 2 && sink.totalMessages() > 25, () => {
190
+ (0, chai_1.expect)(sink.streamCount()).equals(2);
191
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
192
+ }, 10000.0, 10.0);
193
+ });
194
+ });
195
+ describe("A single source connects with explicit source name", () => {
196
+ before(async () => {
197
+ ffmpeg = [await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
198
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller', streamId: 'second' })
199
+ }))
200
+ ];
201
+ });
202
+ it("Should output frames with the explicit source name", async () => {
203
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
204
+ const compiled = await testDocument();
205
+ const result = await (0, execution_1.default)(norsk, compiled);
206
+ const source = result.nodes['srt'];
207
+ const sink = new sinks_1.TraceSink(norsk, "sink");
208
+ await sink.initialised;
209
+ sink.subscribe([
210
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
211
+ ]);
212
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 2 && sink.totalMessages() > 25, () => {
213
+ (0, chai_1.expect)(sink.streamCount()).equals(2);
214
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'second')).exist;
215
+ }, 10000.0, 10.0);
216
+ });
217
+ });
218
+ describe("A second source connects", () => {
219
+ before(async () => {
220
+ ffmpeg = [
221
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
222
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
223
+ })),
224
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
225
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
226
+ })),
227
+ ];
228
+ });
229
+ it("Should output frames with both source names", async () => {
230
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
231
+ const compiled = await testDocument();
232
+ const result = await (0, execution_1.default)(norsk, compiled);
233
+ const source = result.nodes['srt'];
234
+ const sink = new sinks_1.TraceSink(norsk, "sink");
235
+ await sink.initialised;
236
+ sink.subscribe([
237
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
238
+ ]);
239
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 4 && sink.totalMessages() > 25, () => {
240
+ (0, chai_1.expect)(sink.streamCount()).equals(4);
241
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
242
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'second')).exist;
243
+ }, 10000.0, 10.0);
244
+ });
245
+ });
246
+ });
247
+ impl("Restrictive SRT Listener with one streamid", {
248
+ id: 'srt',
249
+ displayName: 'srt',
250
+ port: 5001,
251
+ ip: '0.0.0.0',
252
+ sourceNames: 'strict',
253
+ streamIds: ['first'],
254
+ socketOptions: {}
255
+ }, (testDocument, _cfg) => {
256
+ let norsk = undefined;
257
+ let ffmpeg = [];
258
+ afterEach(async () => {
259
+ await norsk?.close();
260
+ await Promise.all(ffmpeg.map(async (f) => f.stop()));
261
+ });
262
+ describe("A single source connects with no stream id", () => {
263
+ before(async () => {
264
+ ffmpeg = [await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
265
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller' })
266
+ }))
267
+ ];
268
+ });
269
+ it("Should output no streams", async () => {
270
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
271
+ const compiled = await testDocument();
272
+ const result = await (0, execution_1.default)(norsk, compiled);
273
+ const source = result.nodes['srt'];
274
+ const sink = new sinks_1.TraceSink(norsk, "sink");
275
+ await sink.initialised;
276
+ sink.subscribe([
277
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
278
+ ]);
279
+ await (0, sinks_1.waitForAssert)(() => false, () => {
280
+ (0, chai_1.expect)(sink.streamCount()).equals(0);
281
+ }, 5000.0, 10.0);
282
+ });
283
+ });
284
+ describe("a single source connects with the wrong stream id", () => {
285
+ before(async () => {
286
+ ffmpeg = [
287
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
288
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller', streamId: 'wrong' })
289
+ })),
290
+ ];
291
+ });
292
+ it("Should output no streams", async () => {
293
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
294
+ const compiled = await testDocument();
295
+ const result = await (0, execution_1.default)(norsk, compiled);
296
+ const source = result.nodes['srt'];
297
+ const sink = new sinks_1.TraceSink(norsk, "sink");
298
+ await sink.initialised;
299
+ sink.subscribe([
300
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
301
+ ]);
302
+ await (0, sinks_1.waitForAssert)(() => false, () => {
303
+ (0, chai_1.expect)(sink.streamCount()).equals(0);
304
+ }, 5000.0, 10.0);
305
+ });
306
+ });
307
+ describe("a single source connects with the right stream id", () => {
308
+ before(async () => {
309
+ ffmpeg = [
310
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
311
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller', streamId: 'first' })
312
+ })),
313
+ ];
314
+ });
315
+ it("Should output the stream with the right id", async () => {
316
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
317
+ const compiled = await testDocument();
318
+ const result = await (0, execution_1.default)(norsk, compiled);
319
+ const source = result.nodes['srt'];
320
+ const sink = new sinks_1.TraceSink(norsk, "sink");
321
+ await sink.initialised;
322
+ sink.subscribe([
323
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-all-streams', select: ["audio", "video"] }, (0, info_1.default)(client_types_1.RegistrationConsts))
324
+ ]);
325
+ await (0, sinks_1.waitForAssert)(() => sink.streamCount() == 2 && sink.totalMessages() > 25, () => {
326
+ (0, chai_1.expect)(sink.streamCount()).equals(2);
327
+ (0, chai_1.expect)(sink.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
328
+ }, 10000.0, 10.0);
329
+ });
330
+ });
331
+ });
332
+ impl("Restrictive SRT Listener with two streamids", {
333
+ id: 'srt',
334
+ displayName: 'srt',
335
+ port: 5001,
336
+ ip: '0.0.0.0',
337
+ sourceNames: 'strict',
338
+ streamIds: ['first', 'second'],
339
+ socketOptions: {}
340
+ }, (testDocument, _cfg) => {
341
+ let norsk = undefined;
342
+ let ffmpeg = [];
343
+ afterEach(async () => {
344
+ await norsk?.close();
345
+ await Promise.all(ffmpeg.map(async (f) => f.stop()));
346
+ });
347
+ describe("Both sources connect", () => {
348
+ before(async () => {
349
+ ffmpeg = [
350
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
351
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller', streamId: 'first' })
352
+ })),
353
+ await ffmpeg_1.Ffmpeg.create((0, ffmpeg_1.ffmpegCommand)({
354
+ transport: (0, ffmpeg_1.srtOutput)({ port: 5001, mode: 'caller', streamId: 'second' })
355
+ }))
356
+ ];
357
+ });
358
+ it("should be able to select those streams", async () => {
359
+ norsk = await norsk_sdk_1.Norsk.connect({ onShutdown: () => { } });
360
+ const compiled = await testDocument();
361
+ const result = await (0, execution_1.default)(norsk, compiled);
362
+ const source = result.nodes['srt'];
363
+ const sink1 = new sinks_1.TraceSink(norsk, "sink-1");
364
+ const sink2 = new sinks_1.TraceSink(norsk, "sink-2");
365
+ await Promise.all([sink1.initialised, sink2.initialised]);
366
+ sink1.subscribe([
367
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-specific-stream', select: ["audio", "video"], filter: 'first' }, (0, info_1.default)(client_types_1.RegistrationConsts))
368
+ ]);
369
+ sink2.subscribe([
370
+ new runtime_types_1.StudioNodeSubscriptionSource(source, compiled.nodes['srt'].yaml, { type: 'take-specific-stream', select: ["audio", "video"], filter: 'second' }, (0, info_1.default)(client_types_1.RegistrationConsts))
371
+ ]);
372
+ await (0, sinks_1.waitForAssert)(() => sink1.streamCount() == 2 && sink1.totalMessages() > 25 && sink2.streamCount() == 2 && sink2.totalMessages() > 25, () => {
373
+ (0, chai_1.expect)(sink1.streamCount()).equal(2);
374
+ (0, chai_1.expect)(sink2.streamCount()).equal(2);
375
+ (0, chai_1.expect)(sink1.messages.find((m) => m.streamKey.sourceName == 'first')).exist;
376
+ (0, chai_1.expect)(sink2.messages.find((m) => m.streamKey.sourceName == 'second')).exist;
377
+ }, 10000.0, 10.0);
378
+ });
379
+ });
380
+ });
381
+ });
382
+ //# sourceMappingURL=srt-input-listener.js.map