Commit Graph
8 Commits
Author SHA1 Message Date
Earle F. Philhower, III 5a9340c452 Fix ICY decoding when apostrophes encountered
The ICYMDReader was not properly returning the unread "'" characters
and so StreamTitles were being truncated at the first apostrophe.  Fix
the unread() and read() member functions to clean up.
2017-12-15 19:49:37 -08:00
Earle F. Philhower, III 8e94702468 Replace Stream with simple string in MD callback
@armSeb found that the stream interface caused a big slowdown and
hiccups in his playback, replace the MetadataCallback's *Stream with
a simple *char for faster operation and less overhead.
2017-12-15 12:54:49 -08:00
Earle F. Philhower, III d923ebef36 Move the callback constant strings to PMEM 2017-12-15 12:03:05 -08:00
Earle F. Philhower, III 9c120a777a Add callbacks for metadata and status reports
All objects can have a metadata and/or status report callback once created.
They will call the source program with the parsed ID3 tag, ICY StreamTitle,
or text and numeric error ID of any interesting event.  It is up to the end
application to figure out what to do with this.  Normally, you'd just print
it to the LCD or Serial port.  But it is possible to detect, say, a buffer
overflow and then switch to a lower bitrate stream for example.
2017-12-06 21:11:23 -08:00
Earle F. Philhower, III 3226d6ec0a Add metadta callback for Icy streams
Allow a UI to get a notification when a StreamTitle or other metadata
comes into the stream. Callback function would normally just update a
flag and let the next global event loop handle updating the display.
2017-12-04 12:45:16 -08:00
Earle F. Philhower, III 432f892d70 Add retry logic to HTTP Streams
On a 0-byte read or a disconnect, optionally automatically reconnect
up to a user specified number of tries with a delay between each attempt.
2017-11-22 07:20:42 -08:00
Earle F. Philhower, III 2737dec473 Fix block corruption when hitting an ICY block
Wasn't incrementing the returned data pointer when we had to split the
requested read into pre- and post-ICY blocks.  This resulted in errors
in the decoded stream.
2017-11-21 20:09:37 -08:00
Earle F. Philhower, III 4b2bbe7ad5 Preliminary ICY HTTP stream support
Add a subclass of the HTTPStream that can extract the ICY metadata.
Needs to implement a callback function or parse it internally and expose
a class variable to let the UI see the current stream information.
2017-11-21 11:55:23 -08:00