arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
audio_tools::ICYStream Class Reference

ICYStream for all environment except ESP32. More...

#include <ICYStream.h>

Inheritance diagram for audio_tools::ICYStream:
audio_tools::ICYStreamDefault audio_tools::AbstractURLStream audio_tools::AbstractURLStream audio_tools::AudioStream audio_tools::AudioStream audio_tools::Stream audio_tools::AudioBaseInfoDependent audio_tools::AudioBaseInfoSource audio_tools::Stream audio_tools::AudioBaseInfoDependent audio_tools::AudioBaseInfoSource audio_tools::Print audio_tools::Print

Public Member Functions

 ICYStream (Client &clientPar, int readBufferSize=DEFAULT_BUFFER_SIZE)
 
 ICYStream (Client &clientPar, int readBufferSize=DEFAULT_BUFFER_SIZE)
 
 ICYStream (const char *network, const char *password, int readBufferSize=DEFAULT_BUFFER_SIZE)
 
 ICYStream (const char *network, const char *password, int readBufferSize=DEFAULT_BUFFER_SIZE)
 
 ICYStream (int readBufferSize=DEFAULT_BUFFER_SIZE)
 
 ICYStream (int readBufferSize=DEFAULT_BUFFER_SIZE)
 
virtual int available () override
 provides the available method from the URLStreamDefault More...
 
virtual bool begin (const char *urlStr, const char *acceptMime=nullptr, MethodID action=GET, const char *reqMime="", const char *reqData="") override
 
virtual void end () override
 
virtual void flush () override
 Not implemented. More...
 
virtual HttpRequesthttpRequest () override
 provides access to the HttpRequest More...
 
virtual int peek () override
 Not Supported! More...
 
virtual int read () override
 
virtual size_t readBytes (uint8_t *buffer, size_t length) override
 reads the audio bytes More...
 
virtual bool setMetadataCallback (void(*fn)(MetaDataType info, const char *str, int len)) override
 
virtual size_t write (const uint8_t *, size_t) override
 not implemented More...
 
virtual size_t write (uint8_t c) override
 Not implemented. More...
 
- Public Member Functions inherited from audio_tools::ICYStreamDefault
 ICYStreamDefault (Client &clientPar, int readBufferSize=DEFAULT_BUFFER_SIZE)
 
 ICYStreamDefault (const char *network, const char *password, int readBufferSize=DEFAULT_BUFFER_SIZE)
 Default constructor.
 
 ICYStreamDefault (int readBufferSize=DEFAULT_BUFFER_SIZE)
 
virtual int available () override
 provides the available method from the URLStreamDefault More...
 
virtual bool begin (const char *urlStr, const char *acceptMime=nullptr, MethodID action=GET, const char *reqMime="", const char *reqData="") override
 
virtual void end () override
 Ends the processing. More...
 
virtual void flush () override
 not implemented More...
 
virtual HttpRequesthttpRequest () override
 provides access to the HttpRequest More...
 
 operator bool ()
 
virtual int peek () override
 Not Supported! More...
 
virtual int read () override
 
virtual size_t readBytes (uint8_t *buffer, size_t len) override
 reads the audio bytes More...
 
virtual bool setMetadataCallback (void(*fn)(MetaDataType info, const char *str, int len)) override
 Defines the meta data callback function. More...
 
virtual size_t write (const uint8_t *buffer, size_t size) override
 not implemented More...
 
virtual size_t write (uint8_t) override
 not implemented More...
 
- Public Member Functions inherited from audio_tools::AbstractURLStream
int availableForWrite ()
 Writes are not supported. More...
 
virtual bool begin (const char *urlStr, const char *acceptMime=nullptr, MethodID action=GET, const char *reqMime="", const char *reqData="")=0
 
virtual void end ()=0
 
virtual HttpRequesthttpRequest ()=0
 provides access to the HttpRequest More...
 
virtual bool setMetadataCallback (void(*fn)(MetaDataType info, const char *str, int len))
 
- Public Member Functions inherited from audio_tools::AudioStream
 AudioStream (AudioStream const &)=delete
 
virtual AudioBaseInfo audioInfo () override
 
virtual int availableForWrite () override
 
virtual bool begin ()
 
virtual void end ()
 
virtual void flush () override
 
 operator bool ()
 
AudioStreamoperator= (AudioStream const &)=delete
 
virtual size_t readBytes (char *buffer, size_t length)
 
virtual size_t readBytes (uint8_t *buffer, size_t length) STREAM_WRITE_OVERRIDE=0
 
virtual void setAudioInfo (AudioBaseInfo info) override
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi) override
 
virtual StreamtoStreamPointer ()
 
virtual size_t write (const uint8_t *buffer, size_t size) override=0
 
- Public Member Functions inherited from audio_tools::Stream
virtual int available ()
 
virtual int peek ()
 
virtual int read ()
 
virtual size_t readBytes (uint8_t *buffer, size_t len)
 
virtual void setTimeout (size_t t)
 
- Public Member Functions inherited from audio_tools::Print
virtual int availableForWrite ()
 
virtual void flush ()
 
virtual int print (char c, PrintCharFmt spec)
 
virtual int print (const char *msg)
 
virtual int print (int number)
 
virtual int println (const char *msg="")
 
virtual size_t write (const char *buffer, size_t size)
 
virtual size_t write (const char *str)
 
virtual size_t write (const uint8_t *buffer, size_t size)
 
virtual size_t write (uint8_t ch)
 
- Public Member Functions inherited from audio_tools::AudioBaseInfoDependent
virtual AudioBaseInfo audioInfo ()=0
 
virtual void setAudioInfo (AudioBaseInfo info)=0
 
virtual bool validate (AudioBaseInfo &info)
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)=0
 

Protected Attributes

ICYStreamDefaultp_urlStream =nullptr
 
BufferedTaskStream taskStream
 
- Protected Attributes inherited from audio_tools::ICYStreamDefault
void(* callback )(MetaDataType info, const char *str, int len) =nullptr
 
MetaDataICY icy
 
URLStreamDefaulturl = nullptr
 
- Protected Attributes inherited from audio_tools::AudioStream
AudioBaseInfo info
 
AudioBaseInfoDependentp_notify =nullptr
 

Additional Inherited Members

- Protected Member Functions inherited from audio_tools::ICYStreamDefault
void checkUrl ()
 
- Protected Member Functions inherited from audio_tools::AudioStream
virtual int not_supported (int out)
 

Detailed Description

ICYStream for all environment except ESP32.

ICYStream implementation for the ESP32 based on a FreeRTOS task This is a Icecast/Shoutcast Audio Stream which splits the data into metadata and audio data. The Audio data is provided via the regular stream functions. The metadata is handled with the help of the MetaDataICY state machine and provided via a callback method.

Author
Phil Schatzmann

This is basically just a URLStream with the metadata turned on.

Author
Phil Schatzmann

Member Function Documentation

◆ available()

virtual int audio_tools::ICYStream::available ( )
inlineoverridevirtual

provides the available method from the URLStreamDefault

Reimplemented from audio_tools::ICYStreamDefault.

◆ begin()

virtual bool audio_tools::ICYStream::begin ( const char *  urlStr,
const char *  acceptMime = nullptr,
MethodID  action = GET,
const char *  reqMime = "",
const char *  reqData = "" 
)
inlineoverridevirtual

◆ end()

virtual void audio_tools::ICYStream::end ( )
inlineoverridevirtual

◆ flush()

virtual void audio_tools::ICYStream::flush ( )
inlineoverridevirtual

Not implemented.

Reimplemented from audio_tools::ICYStreamDefault.

◆ httpRequest()

virtual HttpRequest & audio_tools::ICYStream::httpRequest ( )
inlineoverridevirtual

provides access to the HttpRequest

Implements audio_tools::AbstractURLStream.

◆ peek()

virtual int audio_tools::ICYStream::peek ( )
inlineoverridevirtual

Not Supported!

Reimplemented from audio_tools::ICYStreamDefault.

◆ read()

virtual int audio_tools::ICYStream::read ( )
inlineoverridevirtual

Reimplemented from audio_tools::ICYStreamDefault.

◆ readBytes()

virtual size_t audio_tools::ICYStream::readBytes ( uint8_t *  buffer,
size_t  len 
)
inlineoverridevirtual

reads the audio bytes

Reimplemented from audio_tools::ICYStreamDefault.

◆ setMetadataCallback()

virtual bool audio_tools::ICYStream::setMetadataCallback ( void(*)(MetaDataType info, const char *str, int len)  fn)
inlineoverridevirtual

Reimplemented from audio_tools::AbstractURLStream.

◆ write() [1/2]

virtual size_t audio_tools::ICYStream::write ( const uint8_t *  buffer,
size_t  size 
)
inlineoverridevirtual

not implemented

Reimplemented from audio_tools::ICYStreamDefault.

◆ write() [2/2]

virtual size_t audio_tools::ICYStream::write ( uint8_t  c)
inlineoverridevirtual

Not implemented.

Reimplemented from audio_tools::ICYStreamDefault.


The documentation for this class was generated from the following files: