-
-
Notifications
You must be signed in to change notification settings - Fork 128
/
shoutcast.liq
39 lines (36 loc) · 1 KB
/
shoutcast.liq
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
%ifdef output.icecast
# Output to shoutcast.
# @category Source / Output
# @argsof output.icecast[!headers,!description,!protocol]
# @param ~icy_reset Reset shoutcast source buffer upon connecting (necessary for NSV).
# @param ~icy_id Shoutcast source ID. Only supported by Shoutcast v2.
# @param ~dj Callback to set dj name.
# @param e Encoding format. For shoutcast, should be mp3 or AAC(+).
# @param s The source to output
def output.shoutcast(
%argsof(
output.icecast[!headers,!description,!protocol]
),
~icy_reset=true,~dj={""},
~aim="",~icq="",~irc="",
e, s) =
icy_reset = if icy_reset then "1" else "0" end
headers = [("icy-aim",aim),("icy-irc",irc),
("icy-icq",icq),("icy-reset",icy_reset)]
def map(m) =
dj = dj()
if dj != "" then
("dj",dj)::m
else
m
end
end
s = metadata.map(map,s)
output.icecast(
%argsof(
output.icecast[!headers,!description,!protocol]
),
headers=headers,description="UNUSED",protocol="icy",
e, s)
end
%endif