Google

libshout documentation

libshout version 1.0.4 - 20000824

shout_send_data

declared in <shout/shout.h>

The shout_send_data function sends a block of data to the icecast server. It parses out MP3 frames in order to get timing information, and make sure that it's always sending a valid bitstream. Any data that is in the block that is not valid MP3 data is skipped and ignored.

Even though, shout_send_data tries it's best to send only valid data, do not rely on it to do your work for you. Please strip ID3 tags and other non-MP3 data from the stream before sending it to this function.

int shout_send_data(
    shout_conn_t *self,    /* pointer to the connection structure */
    unsigned char *buff,   /* data buffer to send */
    unsigned long len      /* length of data buffer */
);

Parameters

self
pointer to the connection structure
buff
data buffer to send to the icecast server
len
the length of the data buffer in bytes

Return Values

Returns true (1) on success or false (0) on failure. If the function fails, self->error will contain the error code.

error code reason
SHOUTERR_INSANE Function failed the sanity check. A connection is not currently established.
SHOUTERR_MALLOC There was not enough free memory for malloc().
SHOUTERR_SOCKET A socket error occured sending data to the server. The server may have close the connection or gone offline.



copyright © 2000 icecast team

www.icecast.com
team@icecast.org

libshout documentation

libshout version 1.0.4 - 20000824