codemirror-lang-liquidsoap 0.3.5 → 0.3.7

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 (427) hide show
  1. package/dist/cli.js +8 -8
  2. package/dist/index.js +7 -7
  3. package/package.json +1 -1
  4. package/src/liquidsoap.grammar +10 -4
  5. package/src/parser.js +6 -6
  6. package/tests/liquidsoap/.codespellignore +1 -0
  7. package/tests/liquidsoap/.github/ISSUE_TEMPLATE/bug_report.yml +16 -0
  8. package/tests/liquidsoap/.github/docker/alpine.dockerfile +20 -0
  9. package/tests/liquidsoap/.github/docker/debian.dockerfile +55 -0
  10. package/tests/liquidsoap/.github/opam/{liquidsoap-core-windows.opam → liquidsoap-windows.opam} +8 -5
  11. package/tests/liquidsoap/.github/renovate.json +23 -0
  12. package/tests/liquidsoap/.github/scripts/add-local-opam-packages.sh +5 -3
  13. package/tests/liquidsoap/.github/scripts/build-apk.sh +10 -19
  14. package/tests/liquidsoap/.github/scripts/build-deb.sh +6 -15
  15. package/tests/liquidsoap/.github/scripts/build-details.sh +15 -4
  16. package/tests/liquidsoap/.github/scripts/build-posix.sh +11 -20
  17. package/tests/liquidsoap/.github/scripts/build-website.sh +1 -1
  18. package/tests/liquidsoap/.github/scripts/build-win32.sh +6 -2
  19. package/tests/liquidsoap/.github/scripts/push-docker.sh +13 -15
  20. package/tests/liquidsoap/.github/workflows/ci.yml +291 -185
  21. package/tests/liquidsoap/.ocamlformat +1 -1
  22. package/tests/liquidsoap/.pre-commit-config.yaml +2 -2
  23. package/tests/liquidsoap/CHANGES.md +112 -3
  24. package/tests/liquidsoap/README.md +10 -9
  25. package/tests/liquidsoap/ROADMAP.md +14 -8
  26. package/tests/liquidsoap/bin/liquidsoap-macos-instruments +7 -0
  27. package/tests/liquidsoap/doc/content/build.md +0 -1
  28. package/tests/liquidsoap/doc/content/faq.md +2 -4
  29. package/tests/liquidsoap/doc/content/icy_metadata.md +2 -2
  30. package/tests/liquidsoap/doc/content/install.md +13 -2
  31. package/tests/liquidsoap/doc/content/json.md +1 -1
  32. package/tests/liquidsoap/doc/content/language.md +4 -4
  33. package/tests/liquidsoap/doc/content/liq/beets-protocol.liq +1 -1
  34. package/tests/liquidsoap/doc/content/liq/crossfade.liq +1 -1
  35. package/tests/liquidsoap/doc/content/liq/harbor-simple.liq +1 -1
  36. package/tests/liquidsoap/doc/content/liq/radiopi.liq +10 -9
  37. package/tests/liquidsoap/doc/content/liq/request.dynamic.liq +1 -1
  38. package/tests/liquidsoap/doc/content/migrating.md +25 -3
  39. package/tests/liquidsoap/doc/content/playlist_parsers.md +46 -1
  40. package/tests/liquidsoap/doc/content/script_loading.md +3 -0
  41. package/tests/liquidsoap/doc/content/xml.md +160 -0
  42. package/tests/liquidsoap/doc/dune.inc +129 -0
  43. package/tests/liquidsoap/dune-project +29 -49
  44. package/tests/liquidsoap/liquidsoap +1 -1
  45. package/tests/liquidsoap/{liquidsoap-js.opam → opam/liquidsoap-js.opam} +3 -2
  46. package/tests/liquidsoap/{liquidsoap-lang.opam → opam/liquidsoap-lang.opam} +4 -3
  47. package/tests/liquidsoap/{liquidsoap-mode.opam → opam/liquidsoap-mode.opam} +3 -2
  48. package/tests/liquidsoap/{liquidsoap-core.opam → opam/liquidsoap.opam} +46 -17
  49. package/tests/liquidsoap/{prometheus-liquidsoap.opam → opam/prometheus-liquidsoap.opam} +2 -1
  50. package/tests/liquidsoap/{sdl-liquidsoap.opam → opam/sdl-liquidsoap.opam} +2 -1
  51. package/tests/liquidsoap/{tls-liquidsoap.opam → opam/tls-liquidsoap.opam} +2 -1
  52. package/tests/liquidsoap/src/bin/dune +1 -1
  53. package/tests/liquidsoap/src/config/xmlplaylist_option.disabled.ml +2 -0
  54. package/tests/liquidsoap/src/core/builtins/builtins_ffmpeg_decoder.ml +22 -22
  55. package/tests/liquidsoap/src/core/builtins/builtins_ffmpeg_encoder.ml +4 -4
  56. package/tests/liquidsoap/src/core/builtins/builtins_ffmpeg_filters.ml +37 -41
  57. package/tests/liquidsoap/src/core/builtins/builtins_files.ml +3 -1
  58. package/tests/liquidsoap/src/core/builtins/builtins_optionals.ml +0 -1
  59. package/tests/liquidsoap/src/core/builtins/builtins_process.ml +15 -7
  60. package/tests/liquidsoap/src/core/builtins/builtins_resolvers.ml +16 -0
  61. package/tests/liquidsoap/src/core/builtins/builtins_socket.ml +7 -5
  62. package/tests/liquidsoap/src/core/builtins/builtins_source.ml +3 -3
  63. package/tests/liquidsoap/src/core/builtins/builtins_srt.ml +84 -8
  64. package/tests/liquidsoap/src/core/builtins/builtins_string_extra.ml +13 -0
  65. package/tests/liquidsoap/src/core/builtins/builtins_sys.ml +6 -6
  66. package/tests/liquidsoap/src/core/builtins/builtins_thread.ml +2 -2
  67. package/tests/liquidsoap/src/core/builtins/builtins_time.ml +5 -3
  68. package/tests/liquidsoap/src/core/builtins/builtins_tls.ml +1 -1
  69. package/tests/liquidsoap/src/core/clock.ml +105 -38
  70. package/tests/liquidsoap/src/core/clock.mli +1 -0
  71. package/tests/liquidsoap/src/core/clock_base.ml +2 -2
  72. package/tests/liquidsoap/src/core/conversions/stereo.ml +6 -8
  73. package/tests/liquidsoap/src/core/converters/audio_converter.mli +5 -5
  74. package/tests/liquidsoap/src/core/converters/video_converter.ml +2 -2
  75. package/tests/liquidsoap/src/core/converters/video_converter.mli +3 -3
  76. package/tests/liquidsoap/src/core/decoder/decoder.ml +14 -17
  77. package/tests/liquidsoap/src/core/decoder/decoder.mli +11 -11
  78. package/tests/liquidsoap/src/core/decoder/decoder_utils.ml +12 -13
  79. package/tests/liquidsoap/src/core/decoder/decoder_utils.mli +2 -3
  80. package/tests/liquidsoap/src/core/decoder/external_decoder.ml +9 -13
  81. package/tests/liquidsoap/src/core/decoder/ffmpeg_decoder.ml +57 -53
  82. package/tests/liquidsoap/src/core/decoder/ffmpeg_raw_decoder.ml +28 -9
  83. package/tests/liquidsoap/src/core/decoder/flac_metadata_plug.ml +15 -2
  84. package/tests/liquidsoap/src/core/decoder/image_decoder.ml +33 -19
  85. package/tests/liquidsoap/src/core/decoder/liq_flac_decoder.ml +22 -23
  86. package/tests/liquidsoap/src/core/decoder/liq_ogg_decoder.ml +5 -5
  87. package/tests/liquidsoap/src/core/decoder/mad_decoder.ml +2 -2
  88. package/tests/liquidsoap/src/core/decoder/midi_decoder.ml +1 -2
  89. package/tests/liquidsoap/src/core/decoder/ogg_flac_duration.ml +3 -11
  90. package/tests/liquidsoap/src/core/decoder/ogg_metadata_plug.ml +15 -2
  91. package/tests/liquidsoap/src/core/decoder/raw_audio_decoder.ml +8 -7
  92. package/tests/liquidsoap/src/core/decoder/wav_aiff_decoder.ml +3 -3
  93. package/tests/liquidsoap/src/core/dune +2 -15
  94. package/tests/liquidsoap/src/core/encoder/encoder.ml +18 -23
  95. package/tests/liquidsoap/src/core/encoder/encoder.mli +12 -17
  96. package/tests/liquidsoap/src/core/encoder/encoders/ffmpeg_encoder.ml +13 -27
  97. package/tests/liquidsoap/src/core/encoder/encoders/ffmpeg_encoder_common.ml +1 -1
  98. package/tests/liquidsoap/src/core/encoder/encoders/flac_encoder.ml +3 -4
  99. package/tests/liquidsoap/src/core/encoder/encoders/ndi_encoder.ml +2 -1
  100. package/tests/liquidsoap/src/core/encoder/encoders/ogg_encoder.ml +1 -2
  101. package/tests/liquidsoap/src/core/encoder/lang/lang_external_encoder.ml +2 -2
  102. package/tests/liquidsoap/src/core/encoder/lang/lang_fdkaac.ml +1 -1
  103. package/tests/liquidsoap/src/core/encoder/lang/lang_ffmpeg.ml +46 -39
  104. package/tests/liquidsoap/src/core/encoder/lang/lang_flac.ml +1 -1
  105. package/tests/liquidsoap/src/core/encoder/lang/lang_shine.ml +2 -2
  106. package/tests/liquidsoap/src/core/encoder/lang/lang_vorbis.ml +1 -1
  107. package/tests/liquidsoap/src/core/encoder/lang/lang_wav.ml +1 -1
  108. package/tests/liquidsoap/src/core/file_watcher.inotify.ml +8 -13
  109. package/tests/liquidsoap/src/core/harbor/harbor.ml +22 -24
  110. package/tests/liquidsoap/src/core/io/ffmpeg_filter_io.ml +4 -3
  111. package/tests/liquidsoap/src/core/io/oss_io.ml +3 -4
  112. package/tests/liquidsoap/src/core/io/portaudio_io.ml +1 -1
  113. package/tests/liquidsoap/src/core/io/pulseaudio_io.ml +3 -4
  114. package/tests/liquidsoap/src/core/io/srt_io.ml +316 -120
  115. package/tests/liquidsoap/src/core/io/udp_io.ml +14 -12
  116. package/tests/liquidsoap/src/core/lang.mli +10 -12
  117. package/tests/liquidsoap/src/core/lang_source.ml +25 -39
  118. package/tests/liquidsoap/src/core/lang_string.ml +30 -0
  119. package/tests/liquidsoap/src/core/lang_string.mli +3 -0
  120. package/tests/liquidsoap/src/core/ogg_formats/ogg_flac_encoder.ml +6 -6
  121. package/tests/liquidsoap/src/core/ogg_formats/ogg_muxer.ml +17 -27
  122. package/tests/liquidsoap/src/core/ogg_formats/ogg_muxer.mli +44 -53
  123. package/tests/liquidsoap/src/core/ogg_formats/opus_encoder.ml +1 -1
  124. package/tests/liquidsoap/src/core/ogg_formats/vorbis_encoder.ml +1 -2
  125. package/tests/liquidsoap/src/core/operators/add.ml +2 -2
  126. package/tests/liquidsoap/src/core/operators/cross.ml +2 -2
  127. package/tests/liquidsoap/src/core/operators/delay.ml +23 -6
  128. package/tests/liquidsoap/src/core/operators/dtmf.ml +3 -2
  129. package/tests/liquidsoap/src/core/operators/dyn_op.ml +2 -2
  130. package/tests/liquidsoap/src/core/operators/fir_filter.ml +2 -1
  131. package/tests/liquidsoap/src/core/operators/iir_filter.ml +1 -1
  132. package/tests/liquidsoap/src/core/operators/insert_metadata.ml +1 -1
  133. package/tests/liquidsoap/src/core/operators/lilv_op.ml +1 -1
  134. package/tests/liquidsoap/src/core/operators/lufs.ml +136 -89
  135. package/tests/liquidsoap/src/core/operators/lufs_c.c +105 -0
  136. package/tests/liquidsoap/src/core/operators/map_metadata.ml +33 -9
  137. package/tests/liquidsoap/src/core/operators/max_duration.ml +3 -4
  138. package/tests/liquidsoap/src/core/operators/muxer.ml +2 -1
  139. package/tests/liquidsoap/src/core/operators/noblank.ml +6 -6
  140. package/tests/liquidsoap/src/core/operators/sequence.ml +5 -5
  141. package/tests/liquidsoap/src/core/operators/switch.ml +10 -11
  142. package/tests/liquidsoap/src/core/operators/time_warp.ml +14 -11
  143. package/tests/liquidsoap/src/core/operators/video_fade.ml +2 -3
  144. package/tests/liquidsoap/src/core/outputs/ao_out.ml +1 -1
  145. package/tests/liquidsoap/src/core/outputs/bjack_out.ml +1 -1
  146. package/tests/liquidsoap/src/core/outputs/graphics_out.ml +6 -2
  147. package/tests/liquidsoap/src/core/outputs/harbor_output.ml +12 -10
  148. package/tests/liquidsoap/src/core/outputs/hls_output.ml +19 -14
  149. package/tests/liquidsoap/src/core/outputs/icecast2.ml +85 -52
  150. package/tests/liquidsoap/src/core/outputs/ndi_out.ml +1 -1
  151. package/tests/liquidsoap/src/core/outputs/output.ml +8 -9
  152. package/tests/liquidsoap/src/core/outputs/output.mli +61 -61
  153. package/tests/liquidsoap/src/core/outputs/pipe_output.ml +8 -6
  154. package/tests/liquidsoap/src/core/outputs/sdl_out.ml +5 -2
  155. package/tests/liquidsoap/src/core/playlist_parser.ml +6 -7
  156. package/tests/liquidsoap/src/core/playlists/playlist_basic.ml +0 -180
  157. package/tests/liquidsoap/src/core/protocols/annotate.ml +3 -3
  158. package/tests/liquidsoap/src/core/request.ml +16 -17
  159. package/tests/liquidsoap/src/core/request.mli +27 -28
  160. package/tests/liquidsoap/src/core/shebang.ml +3 -2
  161. package/tests/liquidsoap/src/core/source.ml +104 -63
  162. package/tests/liquidsoap/src/core/source.mli +249 -247
  163. package/tests/liquidsoap/src/core/sources/generated.ml +2 -2
  164. package/tests/liquidsoap/src/core/sources/request_dynamic.ml +2 -2
  165. package/tests/liquidsoap/src/core/sources/synthesized.ml +2 -2
  166. package/tests/liquidsoap/src/core/stream/aFrame.mli +7 -9
  167. package/tests/liquidsoap/src/core/stream/content.mli +4 -13
  168. package/tests/liquidsoap/src/core/stream/content_base.ml +2 -19
  169. package/tests/liquidsoap/src/core/stream/content_video.ml +9 -10
  170. package/tests/liquidsoap/src/core/stream/ffmpeg_copy_content.ml +19 -15
  171. package/tests/liquidsoap/src/core/stream/ffmpeg_raw_content.ml +26 -9
  172. package/tests/liquidsoap/src/core/stream/frame.ml +4 -4
  173. package/tests/liquidsoap/src/core/stream/frame.mli +13 -15
  174. package/tests/liquidsoap/src/core/stream/frame_base.ml +1 -2
  175. package/tests/liquidsoap/src/core/stream/frame_settings.ml +14 -14
  176. package/tests/liquidsoap/src/core/stream/generator.mli +14 -17
  177. package/tests/liquidsoap/src/core/stream/mFrame.mli +2 -2
  178. package/tests/liquidsoap/src/core/tools/charset.ml +28 -18
  179. package/tests/liquidsoap/src/core/tools/charset_base.ml +5 -0
  180. package/tests/liquidsoap/src/core/tools/child_support.ml +2 -2
  181. package/tests/liquidsoap/src/core/tools/ffmpeg_avfilter_utils.ml +139 -0
  182. package/tests/liquidsoap/src/core/tools/ffmpeg_avfilter_utils.mli +22 -0
  183. package/tests/liquidsoap/src/core/tools/ffmpeg_utils.ml +2 -1
  184. package/tests/liquidsoap/src/core/tools/lifecycle.mli +4 -4
  185. package/tests/liquidsoap/src/core/tools/liq_http.ml +44 -19
  186. package/tests/liquidsoap/src/core/tools/liq_http.mli +1 -1
  187. package/tests/liquidsoap/src/core/tools/log.ml +3 -8
  188. package/tests/liquidsoap/src/core/tools/log.mli +1 -1
  189. package/tests/liquidsoap/src/core/tools/mutex_utils.ml +1 -1
  190. package/tests/liquidsoap/src/core/tools/pool.ml +2 -2
  191. package/tests/liquidsoap/src/core/tools/process_handler.mli +30 -27
  192. package/tests/liquidsoap/src/core/tools/producer_consumer.ml +10 -9
  193. package/tests/liquidsoap/src/{lang → core/tools}/queues.ml +58 -64
  194. package/tests/liquidsoap/src/{lang → core/tools}/queues.mli +10 -0
  195. package/tests/liquidsoap/src/core/tools/sdl_utils.ml +2 -0
  196. package/tests/liquidsoap/src/core/tools/server.mli +8 -8
  197. package/tests/liquidsoap/src/core/tools/sha1.ml +2 -1
  198. package/tests/liquidsoap/src/core/tools/start_stop.ml +2 -1
  199. package/tests/liquidsoap/src/core/tools/strings.mli +5 -4
  200. package/tests/liquidsoap/src/core/tools/tutils.ml +7 -7
  201. package/tests/liquidsoap/src/core/tools/tutils.mli +14 -18
  202. package/tests/liquidsoap/src/core/tools/unix_c.c +16 -5
  203. package/tests/liquidsoap/src/core/tools/utils.ml +83 -25
  204. package/tests/liquidsoap/src/core/tools/wav_aiff.ml +3 -3
  205. package/tests/liquidsoap/src/core/tools/wav_aiff.mli +7 -7
  206. package/tests/liquidsoap/src/core/types/format_type.ml +6 -6
  207. package/tests/liquidsoap/src/js/index.html +1 -154
  208. package/tests/liquidsoap/src/js/interactive_js.ml +7 -3
  209. package/tests/liquidsoap/src/js/stdlib_js.liq +6 -0
  210. package/tests/liquidsoap/src/lang/builtins_lang.ml +8 -0
  211. package/tests/liquidsoap/src/lang/builtins_null.ml +1 -1
  212. package/tests/liquidsoap/src/lang/builtins_string.ml +2 -11
  213. package/tests/liquidsoap/src/lang/builtins_xml.ml +204 -0
  214. package/tests/liquidsoap/src/lang/cache.ml +7 -2
  215. package/tests/liquidsoap/src/lang/dune +5 -2
  216. package/tests/liquidsoap/src/lang/flags.ml +2 -2
  217. package/tests/liquidsoap/src/lang/lang.mli +10 -12
  218. package/tests/liquidsoap/src/lang/lang_core.ml +24 -24
  219. package/tests/liquidsoap/src/lang/lang_eval.ml +1 -1
  220. package/tests/liquidsoap/src/lang/lang_string.ml +7 -13
  221. package/tests/liquidsoap/src/lang/lang_string.mli +0 -1
  222. package/tests/liquidsoap/src/lang/lexer.ml +3 -0
  223. package/tests/liquidsoap/src/lang/parser.mly +7 -4
  224. package/tests/liquidsoap/src/lang/parser_helper.ml +9 -77
  225. package/tests/liquidsoap/src/lang/parser_helper.mli +1 -1
  226. package/tests/liquidsoap/src/lang/pos.ml +4 -4
  227. package/tests/liquidsoap/src/lang/pos.mli +55 -0
  228. package/tests/liquidsoap/src/lang/preprocessor.ml +12 -5
  229. package/tests/liquidsoap/src/lang/repr.ml +6 -6
  230. package/tests/liquidsoap/src/lang/runtime.ml +55 -48
  231. package/tests/liquidsoap/src/lang/runtime.mli +8 -3
  232. package/tests/liquidsoap/src/lang/term/parsed_term.ml +33 -33
  233. package/tests/liquidsoap/src/lang/term/term_base.ml +14 -10
  234. package/tests/liquidsoap/src/lang/term/term_preprocessor.ml +28 -1
  235. package/tests/liquidsoap/src/lang/term/term_reducer.ml +244 -132
  236. package/tests/liquidsoap/src/lang/term/term_reducer.mli +10 -2
  237. package/tests/liquidsoap/src/lang/term/term_stdlib.ml +14 -13
  238. package/tests/liquidsoap/src/lang/term.mli +3 -1
  239. package/tests/liquidsoap/src/lang/typechecking.ml +16 -16
  240. package/tests/liquidsoap/src/lang/typechecking.mli +5 -1
  241. package/tests/liquidsoap/src/lang/types/type_base.ml +16 -17
  242. package/tests/liquidsoap/src/lang/typing.ml +13 -12
  243. package/tests/liquidsoap/src/lang/typing.mli +2 -1
  244. package/tests/liquidsoap/src/lang/value.ml +20 -14
  245. package/tests/liquidsoap/src/libs/audio.liq +53 -18
  246. package/tests/liquidsoap/src/libs/autocue.liq +8 -8
  247. package/tests/liquidsoap/src/libs/clock.liq +3 -3
  248. package/tests/liquidsoap/src/libs/dune +2 -2
  249. package/tests/liquidsoap/src/libs/extra/audio.liq +4 -4
  250. package/tests/liquidsoap/src/libs/extra/audioscrobbler.liq +487 -0
  251. package/tests/liquidsoap/src/libs/extra/deprecations.liq +11 -11
  252. package/tests/liquidsoap/src/libs/extra/externals.liq +9 -9
  253. package/tests/liquidsoap/src/libs/extra/fades.liq +2 -2
  254. package/tests/liquidsoap/src/libs/extra/file.liq +1 -1
  255. package/tests/liquidsoap/src/libs/extra/http.liq +4 -4
  256. package/tests/liquidsoap/src/libs/extra/interactive.liq +1 -1
  257. package/tests/liquidsoap/src/libs/extra/metadata.liq +3 -3
  258. package/tests/liquidsoap/src/libs/extra/native.liq +6 -6
  259. package/tests/liquidsoap/src/libs/extra/server.liq +2 -2
  260. package/tests/liquidsoap/src/libs/extra/source.liq +10 -10
  261. package/tests/liquidsoap/src/libs/extra/spinitron.liq +11 -11
  262. package/tests/liquidsoap/src/libs/extra/telnet.liq +51 -0
  263. package/tests/liquidsoap/src/libs/extra/video.liq +2 -2
  264. package/tests/liquidsoap/src/libs/fades.liq +70 -57
  265. package/tests/liquidsoap/src/libs/ffmpeg.liq +50 -33
  266. package/tests/liquidsoap/src/libs/file.liq +8 -8
  267. package/tests/liquidsoap/src/libs/hls.liq +5 -5
  268. package/tests/liquidsoap/src/libs/http.liq +64 -37
  269. package/tests/liquidsoap/src/libs/icecast.liq +1 -1
  270. package/tests/liquidsoap/src/libs/io.liq +6 -6
  271. package/tests/liquidsoap/src/libs/medialib.liq +46 -45
  272. package/tests/liquidsoap/src/libs/metadata.liq +4 -4
  273. package/tests/liquidsoap/src/libs/null.liq +3 -3
  274. package/tests/liquidsoap/src/libs/playlist.liq +547 -22
  275. package/tests/liquidsoap/src/libs/protocols.liq +14 -14
  276. package/tests/liquidsoap/src/libs/replaygain.liq +11 -11
  277. package/tests/liquidsoap/src/libs/request.liq +27 -29
  278. package/tests/liquidsoap/src/libs/runtime.liq +2 -0
  279. package/tests/liquidsoap/src/libs/source.liq +15 -15
  280. package/tests/liquidsoap/src/libs/sqlite.liq +1 -1
  281. package/tests/liquidsoap/src/libs/stdlib.liq +1 -1
  282. package/tests/liquidsoap/src/libs/string.liq +6 -6
  283. package/tests/liquidsoap/src/libs/switches.liq +3 -3
  284. package/tests/liquidsoap/src/libs/thread.liq +3 -9
  285. package/tests/liquidsoap/src/libs/tracks.liq +23 -9
  286. package/tests/liquidsoap/src/libs/video.liq +32 -32
  287. package/tests/liquidsoap/src/modules/dtools/README.md +58 -0
  288. package/tests/liquidsoap/src/modules/dtools/dtools.ml +19 -0
  289. package/tests/liquidsoap/src/modules/dtools/dtools.mli +284 -0
  290. package/tests/liquidsoap/src/modules/dtools/dtools_impl.ml +860 -0
  291. package/tests/liquidsoap/src/modules/dtools/dtools_syslog.impl.ml +45 -0
  292. package/tests/liquidsoap/src/modules/dtools/dtools_syslog.noop.ml +1 -0
  293. package/tests/liquidsoap/src/modules/dtools/dune +12 -0
  294. package/tests/liquidsoap/src/modules/duppy/.merlin +4 -0
  295. package/tests/liquidsoap/src/modules/duppy/README.md +47 -0
  296. package/tests/liquidsoap/src/modules/duppy/dune +7 -0
  297. package/tests/liquidsoap/src/modules/duppy/duppy.ml +1097 -0
  298. package/tests/liquidsoap/src/modules/duppy/duppy.mli +494 -0
  299. package/tests/liquidsoap/src/modules/duppy/duppy_stubs.c +176 -0
  300. package/tests/liquidsoap/src/modules/duppy/examples/dune +9 -0
  301. package/tests/liquidsoap/src/modules/duppy/examples/http.ml +560 -0
  302. package/tests/liquidsoap/src/modules/duppy/examples/index.html +1 -0
  303. package/tests/liquidsoap/src/modules/duppy/examples/telnet.ml +150 -0
  304. package/tests/liquidsoap/src/modules/xmlplaylist/dune +5 -0
  305. package/tests/liquidsoap/src/modules/xmlplaylist/xmlplaylist.ml +185 -0
  306. package/tests/liquidsoap/src/modules/xmlplaylist/xmlplaylist.mli +56 -0
  307. package/tests/liquidsoap/src/ndi/ndi.mli +2 -3
  308. package/tests/liquidsoap/src/runtime/build_config.ml +0 -1
  309. package/tests/liquidsoap/src/runtime/main.ml +4 -23
  310. package/tests/liquidsoap/src/stereotool/stereotool.mli +3 -3
  311. package/tests/liquidsoap/src/tooling/parsed_json.ml +6 -4
  312. package/tests/liquidsoap/tests/core/content_test.ml +2 -39
  313. package/tests/liquidsoap/tests/core/dune +13 -0
  314. package/tests/liquidsoap/tests/core/dune.inc +1 -1
  315. package/tests/liquidsoap/tests/core/gen_dune.ml +4 -1
  316. package/tests/liquidsoap/tests/core/json_test.ml +10 -0
  317. package/tests/liquidsoap/tests/core/more_types.ml +32 -28
  318. package/tests/liquidsoap/tests/core/output_encoded_test.ml +2 -0
  319. package/tests/liquidsoap/tests/core/string_test.ml +4 -0
  320. package/tests/liquidsoap/tests/core/types.ml +1 -1
  321. package/tests/liquidsoap/tests/harbor/http.liq +1 -1
  322. package/tests/liquidsoap/tests/harbor/http2.liq +1 -1
  323. package/tests/liquidsoap/tests/language/cue_test.liq +3993 -0
  324. package/tests/liquidsoap/tests/language/dune.inc +24 -0
  325. package/tests/liquidsoap/tests/language/error.liq +1 -1
  326. package/tests/liquidsoap/tests/language/json.liq +11 -11
  327. package/tests/liquidsoap/tests/language/list.liq +1 -1
  328. package/tests/liquidsoap/tests/language/metadata.liq +1 -1
  329. package/tests/liquidsoap/tests/language/null.liq +9 -9
  330. package/tests/liquidsoap/tests/language/record.liq +23 -23
  331. package/tests/liquidsoap/tests/language/replaygain.liq +8 -8
  332. package/tests/liquidsoap/tests/language/sqlite.liq +1 -1
  333. package/tests/liquidsoap/tests/language/string.liq +1 -1
  334. package/tests/liquidsoap/tests/language/type_errors.liq +2 -2
  335. package/tests/liquidsoap/tests/language/typing.liq +2 -2
  336. package/tests/liquidsoap/tests/language/various.liq +1 -0
  337. package/tests/liquidsoap/tests/language/xml_test.liq +132 -0
  338. package/tests/liquidsoap/tests/media/dune +74 -0
  339. package/tests/liquidsoap/tests/media/dune.inc +63 -0
  340. package/tests/liquidsoap/tests/media/ffmpeg_add_text.liq +42 -56
  341. package/tests/liquidsoap/tests/media/ffmpeg_copy_concat.liq +5 -2
  342. package/tests/liquidsoap/tests/media/ffmpeg_distributed_hls.liq +2 -4
  343. package/tests/liquidsoap/tests/media/ffmpeg_filter_changing_rate.liq +1 -1
  344. package/tests/liquidsoap/tests/media/ffmpeg_inline_encode_decode_audio.liq +1 -5
  345. package/tests/liquidsoap/tests/media/ffmpeg_inline_encode_decode_video.liq +1 -3
  346. package/tests/liquidsoap/tests/media/ffmpeg_raw_and_encode_decoder.liq +1 -3
  347. package/tests/liquidsoap/tests/media/ffmpeg_raw_hls.liq +2 -4
  348. package/tests/liquidsoap/tests/media/ffmpeg_raw_implicit_conversion.liq +63 -0
  349. package/tests/liquidsoap/tests/media/gen_dune.ml +1 -0
  350. package/tests/liquidsoap/tests/media/image_decoder_duration.liq +15 -0
  351. package/tests/liquidsoap/tests/media/lufs_integrated.liq +17 -0
  352. package/tests/liquidsoap/tests/regression/AC5109.liq +2 -2
  353. package/tests/liquidsoap/tests/regression/GH1129.liq +3 -3
  354. package/tests/liquidsoap/tests/regression/GH1279.liq +2 -2
  355. package/tests/liquidsoap/tests/regression/GH1327.liq +3 -3
  356. package/tests/liquidsoap/tests/regression/GH2585.liq +0 -2
  357. package/tests/liquidsoap/tests/regression/GH2756-2.liq +3 -3
  358. package/tests/liquidsoap/tests/regression/GH2756.liq +2 -2
  359. package/tests/liquidsoap/tests/regression/GH3134.liq +2 -2
  360. package/tests/liquidsoap/tests/regression/GH3303.liq +2 -2
  361. package/tests/liquidsoap/tests/regression/GH4163.liq +14 -3
  362. package/tests/liquidsoap/tests/regression/GH4281-2.liq +29 -0
  363. package/tests/liquidsoap/tests/regression/GH4281.liq +29 -0
  364. package/tests/liquidsoap/tests/regression/GH4395.liq +27 -0
  365. package/tests/liquidsoap/tests/regression/LS354-1.liq +1 -1
  366. package/tests/liquidsoap/tests/regression/LS354-2.liq +1 -1
  367. package/tests/liquidsoap/tests/regression/append-merge.liq +3 -1
  368. package/tests/liquidsoap/tests/regression/dune.inc +64 -0
  369. package/tests/liquidsoap/tests/regression/fallible_ogg.liq +9 -0
  370. package/tests/liquidsoap/tests/regression/init-error.liq +2 -0
  371. package/tests/liquidsoap/tests/regression/seek_track_map.liq +1 -1
  372. package/tests/liquidsoap/tests/regression/source_dynamic.liq +2 -2
  373. package/tests/liquidsoap/tests/run_test.ml +53 -60
  374. package/tests/liquidsoap/tests/streams/cross-override-end.liq +9 -2
  375. package/tests/liquidsoap/tests/streams/cross-override-start.liq +9 -2
  376. package/tests/liquidsoap/tests/streams/cross-override.liq +9 -2
  377. package/tests/liquidsoap/tests/streams/cross-persist-end-override.liq +9 -2
  378. package/tests/liquidsoap/tests/streams/cross-persist-override.liq +9 -2
  379. package/tests/liquidsoap/tests/streams/cross-persist-start-override.liq +9 -2
  380. package/tests/liquidsoap/tests/streams/cross.liq +8 -2
  381. package/tests/liquidsoap/tests/streams/crossfade-plot.liq +11 -8
  382. package/tests/liquidsoap/tests/streams/crossfade-plot.new.txt +148 -248
  383. package/tests/liquidsoap/tests/streams/crossfade-plot.old.txt +50 -150
  384. package/tests/liquidsoap/tests/streams/crossfade.liq +8 -2
  385. package/tests/liquidsoap/tests/streams/ctype2.liq +1 -1
  386. package/tests/liquidsoap/tests/streams/dune.inc +31 -0
  387. package/tests/liquidsoap/tests/streams/fades-overrides.liq +9 -2
  388. package/tests/liquidsoap/tests/streams/fades-persistent-override.liq +9 -2
  389. package/tests/liquidsoap/tests/streams/harbor_metadata_3.liq +1 -1
  390. package/tests/liquidsoap/tests/streams/hls_id3v2.liq +11 -7
  391. package/tests/liquidsoap/tests/streams/icecast_last_meta.liq +47 -0
  392. package/tests/liquidsoap/tests/streams/icecast_ssl.liq +3 -0
  393. package/tests/liquidsoap/tests/streams/icecast_ssl_tls.liq +3 -3
  394. package/tests/liquidsoap/tests/streams/icecast_tls.liq +1 -0
  395. package/tests/liquidsoap/tests/streams/icecast_tls_ssl.liq +5 -0
  396. package/tests/liquidsoap/tests/streams/no-cue-cut.liq +2 -2
  397. package/tests/liquidsoap/tests/streams/random.liq +2 -2
  398. package/tests/liquidsoap/tests/streams/replaygain.liq +10 -10
  399. package/tests/liquidsoap/tests/streams/rotate.liq +6 -1
  400. package/tests/liquidsoap/tests/streams/say.liq +2 -2
  401. package/tests/liquidsoap/tests/streams/srt_listen_callback.liq +1 -0
  402. package/tests/liquidsoap/tests/streams/srt_multiple_outputs.liq +1 -0
  403. package/tests/liquidsoap/tests/streams/srt_passphrase.liq +1 -0
  404. package/tests/liquidsoap/tests/streams/srt_raw_pcm.liq +1 -0
  405. package/tests/liquidsoap/tests/test.liq +4 -5
  406. package/tests/liquidsoap/.github/docker/Dockerfile.production +0 -37
  407. package/tests/liquidsoap/.github/docker/Dockerfile.production-alpine +0 -18
  408. package/tests/liquidsoap/.github/opam/packages/metadata/metadata.0.3.0/opam +0 -33
  409. package/tests/liquidsoap/.github/scripts/build-docker-alpine.sh +0 -31
  410. package/tests/liquidsoap/.github/scripts/build-docker.sh +0 -35
  411. package/tests/liquidsoap/liquidsoap-libs-extra.opam +0 -32
  412. package/tests/liquidsoap/liquidsoap-libs.opam +0 -31
  413. package/tests/liquidsoap/liquidsoap.opam +0 -63
  414. package/tests/liquidsoap/src/core/builtins/builtins_lastfm.ml +0 -110
  415. package/tests/liquidsoap/src/core/tools/liqfm.ml +0 -244
  416. package/tests/liquidsoap/src/libs/extra/lastfm.liq +0 -185
  417. /package/tests/liquidsoap/.github/docker/{Dockerfile.website → website.dockerfile} +0 -0
  418. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-av-windows/{ffmpeg-av-windows.1.2.0 → ffmpeg-av-windows.1.2.5}/opam +0 -0
  419. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-avcodec-windows/{ffmpeg-avcodec-windows.1.2.0 → ffmpeg-avcodec-windows.1.2.5}/opam +0 -0
  420. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-avdevice-windows/{ffmpeg-avdevice-windows.1.2.0 → ffmpeg-avdevice-windows.1.2.5}/opam +0 -0
  421. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-avfilter-windows/{ffmpeg-avfilter-windows.1.2.0 → ffmpeg-avfilter-windows.1.2.5}/opam +0 -0
  422. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-avutil-windows/{ffmpeg-avutil-windows.1.2.0 → ffmpeg-avutil-windows.1.2.5}/opam +0 -0
  423. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-swresample-windows/{ffmpeg-swresample-windows.1.2.0 → ffmpeg-swresample-windows.1.2.5}/opam +0 -0
  424. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-swscale-windows/{ffmpeg-swscale-windows.1.2.0 → ffmpeg-swscale-windows.1.2.5}/opam +0 -0
  425. /package/tests/liquidsoap/.github/opam/packages/ffmpeg-windows/{ffmpeg-windows.1.2.0 → ffmpeg-windows.1.2.5}/opam +0 -0
  426. /package/tests/liquidsoap/{liquidsoap-mode.opam.template → opam/liquidsoap-mode.opam.template} +0 -0
  427. /package/tests/liquidsoap/{liquidsoap.opam.template → opam/liquidsoap.opam.template} +0 -0
@@ -23,22 +23,24 @@
23
23
  open Mm
24
24
 
25
25
  (** In [`CPU] mode, synchronization is governed by the CPU clock.
26
- * In [`None] mode, there is no synchronization control. Latency in
27
- * is governed by the time it takes for the sources to produce and
28
- * output data.
29
- * In [`Auto] mode, synchronization is governed by the CPU unless at
30
- * least one active source is declared [self_sync] in which case latency
31
- * is delegated to this source. A typical example being a source linked
32
- * to a sound card, in which case the source latency is governed
33
- * by the sound card's clock. Another case is synchronous network
34
- * protocol such as [input.srt]. *)
26
+
27
+ In [`None] mode, there is no synchronization control. Latency in is governed
28
+ by the time it takes for the sources to produce and output data.
29
+
30
+ In [`Auto] mode, synchronization is governed by the CPU unless at least one
31
+ active source is declared [self_sync] in which case latency is delegated to
32
+ this source. A typical example being a source linked to a sound card, in
33
+ which case the source latency is governed by the sound card's clock.
34
+
35
+ Another case is synchronous network protocol such as [input.srt]. *)
35
36
  type sync = [ `Auto | `CPU | `None ]
36
37
 
37
38
  (** A source can be: passive, active or output. Active sources and outputs are
38
39
  animated on each clock cycle. Output are kept around until they are manually
39
- shutdown. Active and passive sources can be garbage collected if they are not connected to
40
- any output. The [output] method is called on each clock cycle on active sources and outputs.
41
- The [reset] method is called when there is too much latency. *)
40
+ shutdown. Active and passive sources can be garbage collected if they are
41
+ not connected to any output. The [output] method is called on each clock
42
+ cycle on active sources and outputs. The [reset] method is called when there
43
+ is too much latency. *)
42
44
  type active = < reset : unit ; output : unit >
43
45
 
44
46
  type source_type = [ `Passive | `Active of active | `Output of active ]
@@ -74,192 +76,187 @@ type watcher = {
74
76
 
75
77
  (** The [source] use is to send data frames through the [get] method. *)
76
78
  class virtual source :
77
- ?stack:Pos.t list
78
- -> ?clock:Clock.t
79
- -> ?name:string
80
- -> unit
81
- -> object
82
- method private mutexify : 'a 'b. ('a -> 'b) -> 'a -> 'b
79
+ ?stack:Pos.t list ->
80
+ ?clock:Clock.t ->
81
+ name:string ->
82
+ unit ->
83
+ object
84
+ method private mutexify : 'a 'b. ('a -> 'b) -> 'a -> 'b
83
85
 
84
- (** {1 Naming} *)
86
+ (** {1 Naming} *)
85
87
 
86
- (** Identifier of the source. *)
87
- method id : string
88
+ (** Identifier of the source. *)
89
+ method id : string
88
90
 
89
- method set_name : string -> unit
90
- method set_id : ?definitive:bool -> string -> unit
91
+ method set_id : ?force:bool -> string -> unit
91
92
 
92
- (** Position in script *)
93
- method pos : Pos.Option.t
93
+ (** Position in script *)
94
+ method pos : Pos.Option.t
94
95
 
95
- method stack : Pos.t list
96
- method set_stack : Pos.t list -> unit
97
- method stack_unifier : Pos.t list Unifier.t
96
+ method stack : Pos.t list
97
+ method set_stack : Pos.t list -> unit
98
+ method stack_unifier : Pos.t list Unifier.t
98
99
 
99
- (** {1 Source characteristics} *)
100
+ (** {1 Source characteristics} *)
100
101
 
101
- (** If [false], [is_ready] should always return [true]. *)
102
- method virtual fallible : bool
102
+ (** If [false], [is_ready] should always return [true]. *)
103
+ method virtual fallible : bool
103
104
 
104
- (** The source type. Defaults to [`Passive] *)
105
- method source_type : source_type
105
+ (** The source type. Defaults to [`Passive] *)
106
+ method source_type : source_type
106
107
 
107
- (** [true] if the source needs to be animated on each clock tick. *)
108
- method active : bool
108
+ (** [true] if the source needs to be animated on each clock tick. *)
109
+ method active : bool
109
110
 
110
- (** {1 Init/shutdown} *)
111
+ (** {1 Init/shutdown} *)
111
112
 
112
- (** Register a callback, to be executed when source shuts down. *)
113
- method on_sleep : (unit -> unit) -> unit
113
+ (** Register a callback, to be executed when source shuts down. *)
114
+ method on_sleep : (unit -> unit) -> unit
114
115
 
115
- (** The clock under which the source will run. *)
116
- method clock : Clock.t
116
+ (** The clock under which the source will run. *)
117
+ method clock : Clock.t
117
118
 
118
- (** Does the source provide its own synchronization?
119
- Examples: Alsa, AO, SRT I/O, etc.. This information
120
- is used at the clock level to decide whether or not
121
- we should synchronize with the CPU clock after producing
122
- a frame (for [`Auto] clocks). Please note that in the case
123
- of multiple sources filling the frame with different notion
124
- notion of synchronization, there is no consistent notion
125
- of time or synchronization. In this case (and with a [`Auto]
126
- clock), we simply decide based on whether there is one [self_sync]
127
- source or not. This logic should dictate how the method is
128
- implemented by the various operators. *)
129
- method virtual self_sync : Clock.self_sync
119
+ (** Does the source provide its own synchronization? Examples: Alsa, AO, SRT
120
+ I/O, etc.. This information is used at the clock level to decide whether
121
+ or not we should synchronize with the CPU clock after producing a frame
122
+ (for [`Auto] clocks). Please note that in the case of multiple sources
123
+ filling the frame with different notion notion of synchronization, there
124
+ is no consistent notion of time or synchronization. In this case (and with
125
+ a [`Auto] clock), we simply decide based on whether there is one
126
+ [self_sync] source or not. This logic should dictate how the method is
127
+ implemented by the various operators. *)
128
+ method virtual self_sync : Clock.self_sync
130
129
 
131
- method source_sync : bool -> Clock.sync_source option
130
+ method source_sync : bool -> Clock.sync_source option
132
131
 
133
- (** Register a callback when wake_up is called. *)
134
- method on_wake_up : (unit -> unit) -> unit
132
+ (** Register a callback when wake_up is called. *)
133
+ method on_wake_up : (unit -> unit) -> unit
135
134
 
136
- (** Called when the source must be ready. Can be called multiple times *)
137
- method wake_up : unit
135
+ (** Called when the source must be ready. Can be called multiple times *)
136
+ method wake_up : unit
138
137
 
139
- (** Register a callback when sleep is called. *)
140
- method on_sleep : (unit -> unit) -> unit
138
+ (** Register a callback when sleep is called. *)
139
+ method on_sleep : (unit -> unit) -> unit
141
140
 
142
- (** Called when the source can release all its resources. Can be called concurrently and multiple times. *)
143
- method sleep : unit
141
+ (** Called when the source can release all its resources. Can be called
142
+ concurrently and multiple times. *)
143
+ method sleep : unit
144
144
 
145
- (** Force the source to sleep. Should be called by the clocks only. *)
146
- method force_sleep : unit
145
+ (** Force the source to sleep. Should be called by the clocks only. *)
146
+ method force_sleep : unit
147
147
 
148
- (** Check if a source is up or not. *)
149
- method is_up : bool
148
+ (** Check if a source is up or not. *)
149
+ method is_up : bool
150
150
 
151
- (** {1 Streaming} *)
151
+ (** {1 Streaming} *)
152
152
 
153
- method frame_type : Type.t
153
+ method frame_type : Type.t
154
154
 
155
- (** This is called when content-type can be computed,
156
- i.e. either after frame type has been passed from
157
- the typing system during `check_eval` or at `wake_up` *)
158
- method content_type_computation_allowed : unit
155
+ (** This is called when content-type can be computed, i.e. either after frame
156
+ type has been passed from the typing system during `check_eval` or at
157
+ `wake_up` *)
158
+ method content_type_computation_allowed : unit
159
159
 
160
- method has_content_type : bool
160
+ method has_content_type : bool
161
161
 
162
- (** What type of content does this source produce. *)
163
- method content_type : Frame.content_type
162
+ (** What type of content does this source produce. *)
163
+ method content_type : Frame.content_type
164
164
 
165
- (** This method fails when content is not PCM. *)
166
- method private audio_channels : int
165
+ (** This method fails when content is not PCM. *)
166
+ method private audio_channels : int
167
167
 
168
- method private video_dimensions : int * int
168
+ method private samplerate : float
169
+ method private video_dimensions : int * int
169
170
 
170
- (** A buffer that can be used by the source. *)
171
- method buffer : Generator.t
171
+ (** A buffer that can be used by the source. *)
172
+ method buffer : Generator.t
172
173
 
173
- method private generate_video :
174
- ?create:
175
- (pos:int -> width:int -> height:int -> unit -> Video.Canvas.image) ->
176
- field:Frame.Fields.field ->
177
- int ->
178
- Content.Video.data
174
+ method private generate_video :
175
+ ?create:(pos:int -> width:int -> height:int -> unit -> Video.Canvas.image) ->
176
+ field:Frame.Fields.field ->
177
+ int ->
178
+ Content.Video.data
179
179
 
180
- method last_image : Frame.Fields.field -> Video.Canvas.image
180
+ method last_image : Frame.Fields.field -> Video.Canvas.image
181
181
 
182
- method private nearest_image :
183
- pos:int ->
184
- last_image:Video.Canvas.image ->
185
- Content.Video.data ->
186
- Video.Canvas.image
182
+ method private nearest_image :
183
+ pos:int ->
184
+ last_image:Video.Canvas.image ->
185
+ Content.Video.data ->
186
+ Video.Canvas.image
187
187
 
188
- (** An empty frame that can be used by the source. *)
189
- method empty_frame : Frame.t
188
+ (** An empty frame that can be used by the source. *)
189
+ method empty_frame : Frame.t
190
190
 
191
- (** An empty frame with a track mark. *)
192
- method end_of_track : Frame.t
191
+ (** An empty frame with a track mark. *)
192
+ method end_of_track : Frame.t
193
193
 
194
- (** Number of main ticks left in the current track. Defaults to -1=unknown. *)
195
- method virtual remaining : int
194
+ (** Number of main ticks left in the current track. Defaults to -1=unknown. *)
195
+ method virtual remaining : int
196
196
 
197
- (* Elapsed time since the last track mark. *)
198
- method elapsed : int
197
+ (* Elapsed time since the last track mark. *)
198
+ method elapsed : int
199
199
 
200
- (* Estimated total duration of the current track. -1=unknown. *)
201
- method duration : int
200
+ (* Estimated total duration of the current track. -1=unknown. *)
201
+ method duration : int
202
202
 
203
- (** Return the source effectively used to seek. Used
204
- by the muxer to determine if there is a unique seeking
205
- source. Should return [self] if there isn't such a unique
206
- source. *)
207
- method virtual seek_source : source
203
+ (** Return the source effectively used to seek. Used by the muxer to determine
204
+ if there is a unique seeking source. Should return [self] if there isn't
205
+ such a unique source. *)
206
+ method virtual seek_source : source
208
207
 
209
- (** [self#seek_ticks x] skips [x] main ticks.
210
- returns the number of ticks actually skipped.
211
- By default it always returns 0, refusing to seek at all.
212
- That method may be called from any thread, concurrently
213
- with [#get_frame], so they should not interfere. *)
214
- method seek : int -> int
208
+ (** [self#seek_ticks x] skips [x] main ticks. returns the number of ticks
209
+ actually skipped. By default it always returns 0, refusing to seek at all.
210
+ That method may be called from any thread, concurrently with [#get_frame],
211
+ so they should not interfere. *)
212
+ method seek : int -> int
215
213
 
216
- (** The source's last metadata. *)
217
- method last_metadata : Frame.metadata option
214
+ (** The source's last metadata. *)
215
+ method last_metadata : Frame.metadata option
218
216
 
219
- method reset_last_metadata_on_track : bool
220
- method set_reset_last_metadata_on_track : bool -> unit
217
+ method reset_last_metadata_on_track : bool
218
+ method set_reset_last_metadata_on_track : bool -> unit
221
219
 
222
- (** Register a server command. The command is registered when the source
223
- wakes up under its own id as namespace and deregistered when it goes down. *)
224
- method register_command :
225
- ?usage:string -> descr:string -> string -> (string -> string) -> unit
220
+ (** Register a server command. The command is registered when the source wakes
221
+ up under its own id as namespace and deregistered when it goes down. *)
222
+ method register_command :
223
+ ?usage:string -> descr:string -> string -> (string -> string) -> unit
226
224
 
227
- (** Register a callback to be called on new metadata *)
228
- method on_metadata : (Frame.metadata -> unit) -> unit
225
+ (** Register a callback to be called on new metadata *)
226
+ method on_metadata : (Frame.metadata -> unit) -> unit
229
227
 
230
- (** Register a callback to be called on new track. Callback
231
- is called with the most recent metadata before a given
232
- track mark. *)
233
- method on_track : (Frame.metadata -> unit) -> unit
228
+ (** Register a callback to be called on new track. Callback is called with the
229
+ most recent metadata before a given track mark. *)
230
+ method on_track : (Frame.metadata -> unit) -> unit
234
231
 
235
- (** These two are used by [generate_from_multiple_sources] and should not
236
- be used otherwise. *)
237
- method private execute_on_track : Frame.t -> unit
232
+ (** These two are used by [generate_from_multiple_sources] and should not be
233
+ used otherwise. *)
234
+ method private execute_on_track : Frame.t -> unit
238
235
 
239
- method private set_last_metadata : Frame.t -> unit
236
+ method private set_last_metadata : Frame.t -> unit
240
237
 
241
- (** Sources must implement this method. It should return [true] when
242
- the source can produce data during the current streaming cycle. *)
243
- method virtual private can_generate_frame : bool
238
+ (** Sources must implement this method. It should return [true] when the
239
+ source can produce data during the current streaming cycle. *)
240
+ method virtual private can_generate_frame : bool
244
241
 
245
- method on_before_streaming_cycle : (unit -> unit) -> unit
246
- method on_after_streaming_cycle : (unit -> unit) -> unit
242
+ method on_before_streaming_cycle : (unit -> unit) -> unit
243
+ method on_after_streaming_cycle : (unit -> unit) -> unit
247
244
 
248
- (** Sources must implement this method. It should return the data
249
- produced during the current streaming cycle. Sources are responsible
250
- for producing as much data as possible, up-to the frame size setting. *)
251
- method virtual private generate_frame : Frame.t
245
+ (** Sources must implement this method. It should return the data produced
246
+ during the current streaming cycle. Sources are responsible for producing
247
+ as much data as possible, up-to the frame size setting. *)
248
+ method virtual private generate_frame : Frame.t
252
249
 
253
- (** This method is based on [can_generate_frame] and has the same value through
254
- the whole streaming cycle. *)
255
- method is_ready : bool
250
+ (** This method is based on [can_generate_frame] and has the same value
251
+ through the whole streaming cycle. *)
252
+ method is_ready : bool
256
253
 
257
- (** If the source is ready, this method computes the frame generated by the
258
- source during the current streaming cycle. Returned value is cached and should
259
- be the same throughout the whole streaming cycle. *)
260
- method get_frame : Frame.t
254
+ (** If the source is ready, this method computes the frame generated by the
255
+ source during the current streaming cycle. Returned value is cached and
256
+ should be the same throughout the whole streaming cycle. *)
257
+ method get_frame : Frame.t
261
258
 
262
- (** This method passes the frame returned by [#get_frame] to the given callback.
259
+ (** This method passes the frame returned by [#get_frame] to the given callback.
263
260
  The callback should return the portion of the frame (of the form: [start, end))
264
261
  that was effectively used. This method is used when a consumer of the source's data
265
262
  only uses an initial chunk of the frame. In this case, the remaining data is cached
@@ -271,107 +268,111 @@ class virtual source :
271
268
  source#consumed (Frame.position frame);
272
269
  frame
273
270
  ]} *)
274
- method get_partial_frame : (Frame.t -> Frame.t) -> Frame.t
275
-
276
- (** Check a frame without consuming any of its data. *)
277
- method peek_frame : Frame.t
278
-
279
- (** Manually mark amount of consumed data from the source. *)
280
- method consumed : int -> unit
281
-
282
- (** This method requests a specific field of the frame that can be mutated. It is used
283
- by a consumer of the source that will modify the source's data (e.g. [amplify]). The
284
- source will do its best to minimize data copy according to the streaming context. Typically,
285
- if there is only one consumer of the source's data, it should be safe to pass its
286
- data without copying it. *)
287
- method get_mutable_content : Frame.field -> Content.data
288
-
289
- (** This method is the same as [#get_mutable_content] but returns a full frame with the requested
290
- mutable field included. *)
291
- method get_mutable_frame : Frame.field -> Frame.t
292
-
293
- (** By convention, frames produced during the streaming cycle can only have at most one
294
- track mark. In case of multiple track marks (which most likely indicate a programming
295
- problem), all subsequent track marks past the first one are dropped.
296
-
297
- This function returns a pair: [(initial_frame, new_track option)] of an initial frame
298
- and, if a track mark is present in the frame, the optional portion of the frame contained
299
- after this track mark.
300
-
301
- This method can be used to implement operations that should be aware of new tracks. *)
302
- method private split_frame : Frame.t -> Frame.t * Frame.t option
303
-
304
- (** This method is a convenience function to set some data. It returns the frame produced by the
305
- source during the current streaming cycle with the given field data replaced by the data
306
- passed to the function with length set as the frame's length. *)
307
- method set_frame_data :
308
- Frame.field ->
309
- (?offset:int -> ?length:int -> 'a -> Content.data) ->
310
- 'a ->
311
- Frame.t
312
-
313
- (** Various information related to the current frame. *)
314
-
315
- method frame_position : int
316
- method frame_audio_position : int
317
- method frame_has_track_mark : bool
318
- method frame_track_mark : int option
319
- method frame_metadata : (int * Frame.Metadata.t) list
320
-
321
- (** Tells the source to end its current track. *)
322
- method virtual abort_track : unit
323
-
324
- (** {1 Utilities} *)
325
-
326
- method log : Log.t
327
- method add_watcher : watcher -> unit
328
- end
271
+ method get_partial_frame : (Frame.t -> Frame.t) -> Frame.t
272
+
273
+ (** Check a frame without consuming any of its data. *)
274
+ method peek_frame : Frame.t
275
+
276
+ (** Manually mark amount of consumed data from the source. *)
277
+ method consumed : int -> unit
278
+
279
+ (** This method requests a specific field of the frame that can be mutated. It
280
+ is used by a consumer of the source that will modify the source's data
281
+ (e.g. [amplify]). The source will do its best to minimize data copy
282
+ according to the streaming context. Typically, if there is only one
283
+ consumer of the source's data, it should be safe to pass its data without
284
+ copying it. *)
285
+ method get_mutable_content : Frame.field -> Content.data
286
+
287
+ (** This method is the same as [#get_mutable_content] but returns a full frame
288
+ with the requested mutable field included. *)
289
+ method get_mutable_frame : Frame.field -> Frame.t
290
+
291
+ (** By convention, frames produced during the streaming cycle can only have at
292
+ most one track mark. In case of multiple track marks (which most likely
293
+ indicate a programming problem), all subsequent track marks past the first
294
+ one are dropped.
295
+
296
+ This function returns a pair: [(initial_frame, new_track option)] of an
297
+ initial frame and, if a track mark is present in the frame, the optional
298
+ portion of the frame contained after this track mark.
299
+
300
+ This method can be used to implement operations that should be aware of
301
+ new tracks. *)
302
+ method private split_frame : Frame.t -> Frame.t * Frame.t option
303
+
304
+ (** This method is a convenience function to set some data. It returns the
305
+ frame produced by the source during the current streaming cycle with the
306
+ given field data replaced by the data passed to the function with length
307
+ set as the frame's length. *)
308
+ method set_frame_data :
309
+ Frame.field ->
310
+ (?offset:int -> ?length:int -> 'a -> Content.data) ->
311
+ 'a ->
312
+ Frame.t
313
+
314
+ (** Various information related to the current frame. *)
315
+
316
+ method frame_position : int
317
+ method frame_audio_position : int
318
+ method frame_has_track_mark : bool
319
+ method frame_track_mark : int option
320
+ method frame_metadata : (int * Frame.Metadata.t) list
321
+
322
+ (** Tells the source to end its current track. *)
323
+ method virtual abort_track : unit
324
+
325
+ (** {1 Utilities} *)
326
+
327
+ method log : Log.t
328
+ method add_watcher : watcher -> unit
329
+ end
329
330
 
330
331
  (* Entry-points sources, which need to actively perform some task. *)
331
332
  and virtual active_source :
332
- ?stack:Pos.t list
333
- -> ?clock:Clock.t
334
- -> ?name:string
335
- -> unit
336
- -> object
337
- inherit source
333
+ ?stack:Pos.t list ->
334
+ ?clock:Clock.t ->
335
+ name:string ->
336
+ unit ->
337
+ object
338
+ inherit source
338
339
 
339
- (** Do whatever needed when the latency gets too big and is reset. *)
340
- method virtual reset : unit
340
+ (** Do whatever needed when the latency gets too big and is reset. *)
341
+ method virtual reset : unit
341
342
 
342
- method virtual output : unit
343
- end
343
+ method virtual output : unit
344
+ end
344
345
 
345
346
  (* This is for defining a source which has children *)
346
347
  class virtual operator :
347
- ?stack:Pos.t list
348
- -> ?clock:Clock.t
349
- -> ?name:string
350
- -> source list
351
- -> object
352
- inherit source
353
- end
348
+ ?stack:Pos.t list ->
349
+ ?clock:Clock.t ->
350
+ name:string ->
351
+ source list ->
352
+ object
353
+ inherit source
354
+ end
354
355
 
355
356
  (* Most usual active source: the active_operator, pulling one source's data
356
- * and outputting it. *)
357
+ and outputting it. *)
357
358
  class virtual active_operator :
358
- ?stack:Pos.t list
359
- -> ?clock:Clock.t
360
- -> ?name:string
361
- -> source list
362
- -> object
363
- inherit active_source
364
- end
359
+ ?stack:Pos.t list ->
360
+ ?clock:Clock.t ->
361
+ name:string ->
362
+ source list ->
363
+ object
364
+ inherit active_source
365
+ end
365
366
 
366
367
  (** Type governing whether or not the same source should be re-selected.
367
368
  - [`Force] means that the operator should at least try to see if a new
368
369
  source should be selected.
369
- - [`Ok] means that the operator should re-select the current source
370
- whenever possible.
371
- - [`After_position p] means that the operator should re-select the
372
- current source only if it can produce data past the given position
373
- The [generate_from_multiple_sources] implements a [can_reselect] that
374
- can be called with the currently selected source to validate this logic. *)
370
+ - [`Ok] means that the operator should re-select the current source whenever
371
+ possible.
372
+ - [`After_position p] means that the operator should re-select the current
373
+ source only if it can produce data past the given position The
374
+ [generate_from_multiple_sources] implements a [can_reselect] that can be
375
+ called with the currently selected source to validate this logic. *)
375
376
  type reselect = [ `Ok | `Force | `After_position of int ]
376
377
 
377
378
  (* Helper to generate data from a sequence of source.
@@ -379,17 +380,18 @@ type reselect = [ `Ok | `Force | `After_position of int ]
379
380
  When frame is partial, a track mark is added unless [merge] is
380
381
  set to [true]. *)
381
382
  class virtual generate_from_multiple_sources :
382
- merge:(unit -> bool)
383
- -> track_sensitive:(unit -> bool)
384
- -> unit
385
- -> object
386
- method virtual get_source : reselect:reselect -> unit -> source option
387
- method virtual split_frame : Frame.t -> Frame.t * Frame.t option
388
- method virtual empty_frame : Frame.t
389
- method virtual private execute_on_track : Frame.t -> unit
390
- method virtual private set_last_metadata : Frame.t -> unit
391
- method virtual log : Log.t
392
- method private can_reselect : reselect:reselect -> source -> bool
393
- method private can_generate_frame : bool
394
- method private generate_frame : Frame.t
395
- end
383
+ merge:(unit -> bool) ->
384
+ track_sensitive:(unit -> bool) ->
385
+ unit ->
386
+ object
387
+ method virtual get_source : reselect:reselect -> unit -> source option
388
+ method virtual split_frame : Frame.t -> Frame.t * Frame.t option
389
+ method virtual empty_frame : Frame.t
390
+ method virtual private execute_on_track : Frame.t -> unit
391
+ method virtual private set_last_metadata : Frame.t -> unit
392
+ method virtual log : Log.t
393
+ method virtual id : string
394
+ method private can_reselect : reselect:reselect -> source -> bool
395
+ method private can_generate_frame : bool
396
+ method private generate_frame : Frame.t
397
+ end
@@ -21,8 +21,8 @@
21
21
  *****************************************************************************)
22
22
 
23
23
  (* Reads data from an audio buffer generator.
24
- * A thread safe generator should be used if it has to be fed concurrently.
25
- * Store [bufferize] seconds before declaring itself as ready. *)
24
+ A thread safe generator should be used if it has to be fed concurrently.
25
+ Store [bufferize] seconds before declaring itself as ready. *)
26
26
  class virtual source ?(seek = false) ?(replay_meta = false) ~bufferize
27
27
  ~empty_on_abort () =
28
28
  let bufferize = Frame.main_of_seconds bufferize in
@@ -21,7 +21,7 @@
21
21
  *****************************************************************************)
22
22
 
23
23
  open Source
24
- module Queue = Liquidsoap_lang.Queues.Queue
24
+ module Queue = Queues.Queue
25
25
 
26
26
  let conf_prefetch =
27
27
  Dtools.Conf.int ~p:(Request.conf#plug "prefetch") ~d:1 "Default prefetch"
@@ -258,7 +258,7 @@ class dynamic ?(name = "request.dynamic") ~retry_delay ~available ~prefetch
258
258
  | _ -> assert false)
259
259
 
260
260
  (** This method should be called whenever the feeding task has a new
261
- opportunity to feed the queue, in case it is sleeping. *)
261
+ opportunity to feed the queue, in case it is sleeping. *)
262
262
  method private notify_new_request =
263
263
  match Atomic.get state with
264
264
  | `Started (d, { notify }) when d <= Unix.gettimeofday () -> notify ()
@@ -24,10 +24,10 @@
24
24
  support seek by doing nothing. However, for other, seek should be
25
25
  disabled. Thus, if [seek] is [true], the seek function is [fun x -> x]
26
26
  otherwise it is [fun _ -> 0] *)
27
- class virtual source ?name ~seek duration =
27
+ class virtual source ~name ~seek duration =
28
28
  let track_size = Option.map Frame.main_of_seconds duration in
29
29
  object (self)
30
- inherit Source.source ?name ()
30
+ inherit Source.source ~name ()
31
31
  method fallible = track_size <> None
32
32
  val mutable remaining = track_size
33
33
  method private can_generate_frame = remaining <> Some 0