Skip to content

Commit

Permalink
Move cue-cut to requests. (#3617)
Browse files Browse the repository at this point in the history
  • Loading branch information
toots authored Jan 9, 2024
1 parent 10d8cfa commit 3a76048
Show file tree
Hide file tree
Showing 16 changed files with 259 additions and 277 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ New:
Changed:

- Disable safety type checks when displaying `-h` help documentation to speed it up. Similar to passing `--unsafe`. Suggested by @gilou!
- `cue_cut` operator has been removed. Cueing mechanisms have been moved to underlying file-based sources. See migration notes for more details.

Fixed:

Expand Down
6 changes: 6 additions & 0 deletions doc/content/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ Starting with version `2.2.1`, on HLS outputs, `on_file_change` events are now `
was required to reflect the fact that file changes are now atomic. See [this issue](https://github.com/savonet/liquidsoap/issues/3284)
for more details.

### `cue_cut`

Starting with version `2.2.4`, the `cue_cut` operator has been removed. Requests cue-in and cue-out processing has been integrated
directly into requests resolution. In most cases, you simply can remove the operator from your script. In some cases, you might
need to disable `cue_in_metadata` and `cue_out_metadat` either when creating new requests or when creating `playlist` sources.

### Harbor HTTP server and SSL support

The API for registering HTTP server endpoint and using SSL was completely rewritten. It should be more flexible and
Expand Down
17 changes: 16 additions & 1 deletion src/core/builtins/builtins_request.ml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ let _ =
~descr:"Create a request from an URI."
[
("indicators", Lang.list_t Lang.string_t, Some (Lang.list []), None);
( "cue_in_metadata",
Lang.nullable_t Lang.string_t,
Some (Lang.string "liq_cue_in"),
Some "Metadata for cue in points. Disabled if `null`." );
( "cue_out_metadata",
Lang.nullable_t Lang.string_t,
Some (Lang.string "liq_cue_out"),
Some "Metadata for cue out points. Disabled if `null`." );
( "persistent",
Lang.bool_t,
Some (Lang.bool false),
Expand All @@ -50,6 +58,12 @@ let _ =
let indicators = List.assoc "indicators" p in
let persistent = Lang.to_bool (List.assoc "persistent" p) in
let resolve_metadata = Lang.to_bool (List.assoc "resolve_metadata" p) in
let cue_in_metadata =
Lang.to_valued_option Lang.to_string (List.assoc "cue_in_metadata" p)
in
let cue_out_metadata =
Lang.to_valued_option Lang.to_string (List.assoc "cue_out_metadata" p)
in
let initial = Lang.to_string (List.assoc "" p) in
let l = String.length initial in
let initial =
Expand All @@ -66,7 +80,8 @@ let _ =
else indicators
in
Request.Value.to_value
(Request.create ~resolve_metadata ~persistent ~indicators initial))
(Request.create ~resolve_metadata ~persistent ~indicators
~cue_in_metadata ~cue_out_metadata initial))

let _ =
Lang.add_builtin ~base:request "resolve" ~category:`Liquidsoap
Expand Down
1 change: 0 additions & 1 deletion src/core/dune
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
conversion
configure
cross
cuepoint
debug_sources
decoder
decoder_utils
Expand Down
216 changes: 0 additions & 216 deletions src/core/operators/cuepoint.ml

This file was deleted.

Loading

0 comments on commit 3a76048

Please sign in to comment.