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 ()=default |
| |
| | MetaDataICY (int metaint) |
| | We just process the Metadata and ignore the audio info.
|
| |
| virtual | ~MetaDataICY () |
| |
| virtual bool | 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
|
| |
| void | setAsciiOnly (bool value) |
| | Sets whether to only accept ASCII characters in metadata (default is true)
|
| |
| 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!
|
| |
| void | setMaxMetaDataLimit (int limit) |
| | Sets the maximum allowed metadata length (default is 400)
|
| |
| 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 | isPrintable (const char *str, int l) |
| |
| 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
|
| |
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
◆ MetaDataICY() [1/2]
◆ MetaDataICY() [2/2]
We just process the Metadata and ignore the audio info.
◆ ~MetaDataICY()
◆ begin()
◆ clear()
◆ end()
◆ hasMetaData()
| virtual bool hasMetaData |
( |
| ) |
|
|
inlinevirtual |
Returns true if the ICY stream contains metadata.
◆ isData()
returns true if the actual bytes is an audio data byte (e.g.mp3)
◆ isPrintable()
| virtual bool isPrintable |
( |
const char * |
str, |
|
|
int |
l |
|
) |
| |
|
inlineprotectedvirtual |
◆ metaInt()
◆ metaSize()
| virtual int metaSize |
( |
uint8_t |
metaSize | ) |
|
|
inlineprotectedvirtual |
determines the meta data size from the size byte
◆ processChar()
| virtual void processChar |
( |
char |
ch | ) |
|
|
inlinevirtual |
character based state engine
◆ 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='';
◆ setAsciiOnly()
| void setAsciiOnly |
( |
bool |
value | ) |
|
|
inline |
Sets whether to only accept ASCII characters in metadata (default is true)
◆ setAudioDataCallback()
| virtual void setAudioDataCallback |
( |
void(*)(const uint8_t *str, int len) |
fn, |
|
|
int |
bufferLen = 1024 |
|
) |
| |
|
inlinevirtual |
Defines the audio callback function.
◆ 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.
◆ setMaxMetaDataLimit()
| void setMaxMetaDataLimit |
( |
int |
limit | ) |
|
|
inline |
Sets the maximum allowed metadata length (default is 400)
◆ setupMetaData()
| virtual void setupMetaData |
( |
int |
meta_size | ) |
|
|
inlineprotectedvirtual |
allocates the memory to store the metadata / we support changing sizes
◆ status()
| virtual Status status |
( |
| ) |
|
|
inlinevirtual |
Returns the actual status of the state engine for the current byte.
◆ 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.
◆ callback
| void(* callback) (MetaDataType info, const char *str, int len) = nullptr |
|
protected |
◆ currentStatus
| Status currentStatus = ProcessData |
|
protected |
◆ dataBuffer
| uint8_t* dataBuffer = nullptr |
|
protected |
◆ dataCallback
| void(* dataCallback) (const uint8_t *str, int len) = nullptr |
|
protected |
◆ dataLen
◆ dataPos
◆ is_ascii
◆ is_data
◆ maxLimit
◆ metaData
◆ metaDataLen
◆ metaDataMaxLen
◆ metaDataPos
◆ mp3_blocksize
◆ nextStatus
| Status nextStatus = ProcessData |
|
protected |
◆ totalData
The documentation for this class was generated from the following file: