icecast_client.c
error_t socketSend(Socket *socket, const void *data, size_t length, size_t *written, uint_t flags)
Send data to a connected socket.
Definition: socket.c:1486
OsTaskId osCreateTask(const char_t *name, OsTaskCode taskCode, void *arg, const OsTaskParameters *params)
Create a task.
Definition: os_port_chibios.c:80
String manipulation helper functions.
error_t icecastClientStart(IcecastClientContext *context)
Start Icecast client.
Definition: icecast_client.c:169
char_t * strTrimWhitespace(char_t *s)
Removes all leading and trailing whitespace from a string.
Definition: str.c:78
error_t icecastClientProcessMetadata(IcecastClientContext *context)
Decode metadata block.
Definition: icecast_client.c:605
error_t icecastClientInit(IcecastClientContext *context, const IcecastClientSettings *settings)
Icecast client initialization.
Definition: icecast_client.c:78
error_t icecastClientReadMetadata(IcecastClientContext *context, char_t *metadata, size_t size, size_t *length)
Copy metadata from input stream.
Definition: icecast_client.c:270
error_t socketReceive(Socket *socket, void *data, size_t size, size_t *received, uint_t flags)
Receive data from a connected socket.
Definition: socket.c:1692
__weak_func void osFreeMem(void *p)
Release a previously allocated memory block.
Definition: os_port_chibios.c:464
char_t buffer[ICECAST_CLIENT_METADATA_MAX_SIZE]
Memory buffer for input/output operations.
Definition: icecast_client.h:133
error_t getHostByName(NetInterface *interface, const char_t *name, IpAddr *ipAddr, uint_t flags)
Resolve a host name into an IP address.
Definition: socket.c:2274
error_t socketConnect(Socket *socket, const IpAddr *remoteIpAddr, uint16_t remotePort)
Establish a connection to a specified socket.
Definition: socket.c:1349
Socket * socketOpen(uint_t type, uint_t protocol)
Create a socket (UDP or TCP)
Definition: socket.c:125
char_t metadata[ICECAST_CLIENT_METADATA_MAX_SIZE]
Metadata information.
Definition: icecast_client.h:134
void icecastClientGetDefaultSettings(IcecastClientSettings *settings)
Initialize settings with default values.
Definition: icecast_client.c:49
bool_t osWaitForEvent(OsEvent *event, systime_t timeout)
Wait until the specified event is in the signaled state.
Definition: os_port_chibios.c:229
void osAcquireMutex(OsMutex *mutex)
Acquire ownership of the specified mutex object.
Definition: os_port_chibios.c:396
void osReleaseMutex(OsMutex *mutex)
Release ownership of the specified mutex object.
Definition: os_port_chibios.c:408
error_t icecastClientReadStream(IcecastClientContext *context, uint8_t *data, size_t size, size_t *length, systime_t timeout)
Copy data from input stream.
Definition: icecast_client.c:197
Icecast client.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
size_t blockSize
Number of data bytes between subsequent metadata blocks.
Definition: icecast_client.h:126
error_t socketSetTimeout(Socket *socket, systime_t timeout)
Set timeout value for blocking operations.
Definition: socket.c:148
#define ICECAST_CLIENT_METADATA_MAX_SIZE
Definition: icecast_client.h:87
Debugging facilities.
error_t icecastClientConnect(IcecastClientContext *context)
Connect to the specified Icecast server.
Definition: icecast_client.c:439