arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
URLLoaderHLS< URLStream > Class Template Reference

We feed the URLLoaderHLS with some url strings. The data of the related segments are provided via the readBytes() method. More...

#include <HLSStream.h>

Public Member Functions

 URLLoaderHLS ()=default
 
 ~URLLoaderHLS ()
 
void addUrl (const char *url)
 Adds the next url to be played in sequence.
 
int available ()
 Available bytes of the audio stream.
 
bool begin ()
 
int contentLength ()
 
const char * contentType ()
 
void end ()
 
size_t readBytes (uint8_t *data, size_t len)
 Provides data from the audio stream.
 
void setBufferSize (int size, int count)
 
void setCACert (const char *cert)
 
int urlCount ()
 

Protected Member Functions

void bufferRefill ()
 try to keep the buffer filled
 

Protected Attributes

bool active = false
 
RingBuffer< uint8_t > buffer {0}
 
int buffer_count = 2
 
int buffer_size = DEFAULT_BUFFER_SIZE
 
URLStream url_stream
 
const char * url_to_play = nullptr
 
Vector< const char * > urls {10}
 

Detailed Description

template<typename URLStream>
class audio_tools_hls::URLLoaderHLS< URLStream >

We feed the URLLoaderHLS with some url strings. The data of the related segments are provided via the readBytes() method.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ URLLoaderHLS()

template<typename URLStream >
URLLoaderHLS ( )
default

◆ ~URLLoaderHLS()

template<typename URLStream >
~URLLoaderHLS ( )
inline

Member Function Documentation

◆ addUrl()

template<typename URLStream >
void addUrl ( const char *  url)
inline

Adds the next url to be played in sequence.

◆ available()

template<typename URLStream >
int available ( )
inline

Available bytes of the audio stream.

◆ begin()

template<typename URLStream >
bool begin ( )
inline

◆ bufferRefill()

template<typename URLStream >
void bufferRefill ( )
inlineprotected

try to keep the buffer filled

◆ contentLength()

template<typename URLStream >
int contentLength ( )
inline

◆ contentType()

template<typename URLStream >
const char * contentType ( )
inline

◆ end()

template<typename URLStream >
void end ( )
inline

◆ readBytes()

template<typename URLStream >
size_t readBytes ( uint8_t *  data,
size_t  len 
)
inline

Provides data from the audio stream.

◆ setBufferSize()

template<typename URLStream >
void setBufferSize ( int  size,
int  count 
)
inline

◆ setCACert()

template<typename URLStream >
void setCACert ( const char *  cert)
inline

◆ urlCount()

template<typename URLStream >
int urlCount ( )
inline

Provides the number of open urls which can be played. Refills them, when min limit is reached.

Member Data Documentation

◆ active

template<typename URLStream >
bool active = false
protected

◆ buffer

template<typename URLStream >
RingBuffer<uint8_t> buffer {0}
protected

◆ buffer_count

template<typename URLStream >
int buffer_count = 2
protected

◆ buffer_size

template<typename URLStream >
int buffer_size = DEFAULT_BUFFER_SIZE
protected

◆ url_stream

template<typename URLStream >
URLStream url_stream
protected

◆ url_to_play

template<typename URLStream >
const char* url_to_play = nullptr
protected

◆ urls

template<typename URLStream >
Vector<const char *> urls {10}
protected

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