Icecast/Shoutcast Metadata Handling. Metadata class which splits the data into audio and metadata. The result is provided via callback methods. see https://www.codeproject.com/Articles/11308/SHOUTcast-Stream-Ripper.
More...
#include <MetaDataICY.h>
|
| MetaDataICY (int metaint) |
| We just process the Metadata and ignore the audio info.
|
|
virtual void | begin () override |
| Resets all counters and restarts the prcessing.
|
|
virtual void | end () override |
| Resets all counters and restarts the prcessing.
|
|
virtual bool | hasMetaData () |
| Returns true if the ICY stream contains metadata.
|
|
virtual bool | isData () |
| returns true if the actual bytes is an audio data byte (e.g.mp3)
|
|
virtual int | metaInt () |
| provides the metaint
|
|
virtual void | processChar (char ch) |
| character based state engine
|
|
virtual void | setAudioDataCallback (void(*fn)(const uint8_t *str, int len), int bufferLen=1024) |
| Defines the audio callback function.
|
|
virtual void | setCallback (void(*fn)(MetaDataType info, const char *str, int len)) override |
| Defines the metadata callback function.
|
|
virtual void | setIcyMetaInt (int value) override |
| Defines the ICE metaint value which is provided by the web call!
|
|
virtual Status | status () |
| Returns the actual status of the state engine for the current byte.
|
|
virtual size_t | write (const uint8_t *data, size_t len) override |
|
|
virtual void | clear () |
|
virtual bool | isAscii (char *result, int l) |
| Make sure that the result is a valid ASCII string.
|
|
bool | isAscii (uint8_t ch) |
|
virtual int | metaSize (uint8_t metaSize) |
| determines the meta data size from the size byte
|
|
virtual void | processData (char ch) |
|
virtual void | processMetaData (char *metaData, int len) |
|
virtual void | setupMetaData (int meta_size) |
| allocates the memory to store the metadata / we support changing sizes
|
|
|
void(* | callback )(MetaDataType info, const char *str, int len) = nullptr |
|
Status | currentStatus = ProcessData |
|
uint8_t * | dataBuffer = nullptr |
|
void(* | dataCallback )(const uint8_t *str, int len) = nullptr |
|
int | dataLen = 0 |
|
int | dataPos = 0 |
|
bool | is_data |
|
Vector< char > | metaData {0} |
|
int | metaDataLen = 0 |
|
int | metaDataMaxLen = 0 |
|
int | metaDataPos = 0 |
|
int | mp3_blocksize = 0 |
|
Status | nextStatus = ProcessData |
|
int | totalData = 0 |
|
Icecast/Shoutcast Metadata Handling. Metadata class which splits the data into audio and metadata. The result is provided via callback methods. see https://www.codeproject.com/Articles/11308/SHOUTcast-Stream-Ripper.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ begin()
◆ end()
◆ processData()
virtual void processData |
( |
char |
ch | ) |
|
|
inlineprotectedvirtual |
Collects the data in a buffer and executes the callback when the buffer is full
◆ processMetaData()
virtual void processMetaData |
( |
char * |
metaData, |
|
|
int |
len |
|
) |
| |
|
inlineprotectedvirtual |
e.g. StreamTitle=' House Bulldogs - But your love (Radio Edit)';StreamUrl='';
◆ setCallback()
virtual void setCallback |
( |
void(*)(MetaDataType info, const char *str, int len) |
fn | ) |
|
|
inlineoverridevirtual |
◆ setIcyMetaInt()
virtual void setIcyMetaInt |
( |
int |
value | ) |
|
|
inlineoverridevirtual |
Defines the ICE metaint value which is provided by the web call!
Reimplemented from AbstractMetaData.
◆ write()
virtual size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
Writes the data in order to retrieve the metadata and perform the corresponding callbacks
Implements AbstractMetaData.
The documentation for this class was generated from the following file: