Expand description
§Icecast Server Status
Decode server status from an icecast server.
§Usage example
use icecast_stats::fetch;
let url_str = "https://stream.example.com:8000/somestream";
let stats = fetch(url_str).unwrap();
println!("{:#?}", stats);
§Example for a full icecast stats json file
{
"icestats": {
"admin": "icemaster@localhost",
"host": "localhost",
"location": "Earth",
"server_id": "Icecast 2.4.4",
"server_start": "Fri, 09 Apr 2021 21:49:50 +0200",
"server_start_iso8601": "2021-04-09T21:49:50+0200",
"source": {
"audio_bitrate": 128000,
"audio_channels": 1,
"audio_samplerate": 48000,
"bitrate": 128,
"genre": "various",
"ice-bitrate": 128,
"listener_peak": 1,
"listeners": 0,
"listenurl": "http://localhost:8000/test2",
"server_description": "Unspecified description",
"server_name": "Unspecified name",
"server_type": "application/ogg",
"stream_start": "Fri, 09 Apr 2021 21:49:52 +0200",
"stream_start_iso8601": "2021-04-09T21:49:52+0200",
"subtype": "Vorbis",
"dummy": null
}
}
}
Structs§
- Icecast
Stats - Basic server information
- Icecast
Stats Root - Root element of the icecast information
- Icecast
Stats Source - A streaming source
- Url
- A parsed URL record.
Functions§
- fetch
- Fetch icecast status information from server
- generate_
icecast_ stats_ url - Try to generate an icecast status url from any url to the same server