icecast_client.c File Reference

Icecast client. More...

#include <stdlib.h>
#include "icecast/icecast_client.h"
#include "str.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   ICECAST_TRACE_LEVEL
 

Functions

void icecastClientGetDefaultSettings (IcecastClientSettings *settings)
 Initialize settings with default values. More...
 
error_t icecastClientInit (IcecastClientContext *context, const IcecastClientSettings *settings)
 Icecast client initialization. More...
 
error_t icecastClientStart (IcecastClientContext *context)
 Start Icecast client. More...
 
error_t icecastClientReadStream (IcecastClientContext *context, uint8_t *data, size_t size, size_t *length, systime_t timeout)
 Copy data from input stream. More...
 
error_t icecastClientReadMetadata (IcecastClientContext *context, char_t *metadata, size_t size, size_t *length)
 Copy metadata from input stream. More...
 
void icecastClientTask (void *param)
 Icecast client task. More...
 
error_t icecastClientConnect (IcecastClientContext *context)
 Connect to the specified Icecast server. More...
 
error_t icecastClientProcessMetadata (IcecastClientContext *context)
 Decode metadata block. More...
 

Detailed Description

Icecast client.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneTCP Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file icecast_client.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   ICECAST_TRACE_LEVEL

Definition at line 32 of file icecast_client.c.

Function Documentation

◆ icecastClientConnect()

error_t icecastClientConnect ( IcecastClientContext context)

Connect to the specified Icecast server.

Parameters
[in]contextPointer to the Icecast client context

Definition at line 439 of file icecast_client.c.

◆ icecastClientGetDefaultSettings()

void icecastClientGetDefaultSettings ( IcecastClientSettings settings)

Initialize settings with default values.

Parameters
[out]settingsStructure that contains Icecast client settings

Definition at line 49 of file icecast_client.c.

◆ icecastClientInit()

error_t icecastClientInit ( IcecastClientContext context,
const IcecastClientSettings settings 
)

Icecast client initialization.

Parameters
[in]contextPointer to the Icecast client context
[in]settingsIcecast client specific settings
Returns
Error code

Definition at line 78 of file icecast_client.c.

◆ icecastClientProcessMetadata()

error_t icecastClientProcessMetadata ( IcecastClientContext context)

Decode metadata block.

Parameters
[in]contextPointer to the Icecast client context

Definition at line 605 of file icecast_client.c.

◆ icecastClientReadMetadata()

error_t icecastClientReadMetadata ( IcecastClientContext context,
char_t metadata,
size_t  size,
size_t *  length 
)

Copy metadata from input stream.

Parameters
[in]contextPointer to the Icecast client context
[out]metadataPointer to the user buffer
[in]sizeMaximum number of bytes that can be read
[out]lengthNumber of bytes that have been read
Returns
Error code

Definition at line 270 of file icecast_client.c.

◆ icecastClientReadStream()

error_t icecastClientReadStream ( IcecastClientContext context,
uint8_t *  data,
size_t  size,
size_t *  length,
systime_t  timeout 
)

Copy data from input stream.

Parameters
[in]contextPointer to the Icecast client context
[out]dataPointer to the user buffer
[in]sizeMaximum number of bytes that can be read
[out]lengthNumber of bytes that have been read
[in]timeoutMaximum time to wait before returning
Returns
Error code

Definition at line 197 of file icecast_client.c.

◆ icecastClientStart()

error_t icecastClientStart ( IcecastClientContext context)

Start Icecast client.

Parameters
[in]contextPointer to the Icecast client context
Returns
Error code

Definition at line 169 of file icecast_client.c.

◆ icecastClientTask()

void icecastClientTask ( void *  param)

Icecast client task.

Parameters
[in]paramPointer to the Icecast client context

Definition at line 298 of file icecast_client.c.