| | 1118 | add_builtin "source.is_ready" ~cat:Liq |
| | 1119 | ~descr:"Indicate if a source is ready to stream, or currently streaming." |
| | 1120 | [ "", Lang.source_t (Lang.univ_t 1), None, None ] Lang.bool_t |
| | 1121 | (fun p -> Lang.bool (Lang.to_source (List.assoc "" p))#is_ready) |
| | 1122 | |
| | 1123 | let () = |
| | 1124 | add_builtin "source.remaining" ~cat:Liq |
| | 1125 | ~descr:"Estimation of remaining time in the current track." |
| | 1126 | [ "", Lang.source_t (Lang.univ_t 1), None, None ] Lang.float_t |
| | 1127 | (fun p -> |
| | 1128 | let r = (Lang.to_source (List.assoc "" p))#remaining in |
| | 1129 | let f = if r = -1 then infinity else Frame.seconds_of_master r in |
| | 1130 | Lang.float f) |
| | 1131 | |
| | 1132 | let () = |