webradio/receiver.c File Reference


Detailed Description

Receiver.

 *
 * $Log$
 *
 * 

Definition in file receiver.c.

Go to the source code of this file.

Functions

RECEIVERINFOReceiverCreate (RECEIVERPLUGIN *plugin)
 Create stream receiver instance with the specified plug-in.
static int ReceiverPlugInControl (RECEIVERINFO *rip, u_int sst, u_int xst)
 Change receiver plug-in status.
u_int ReceiverStatus (RECEIVERINFO *rip)
 Retrieve the current receiver status.
int ReceiverStop (RECEIVERINFO *rip)
 Stop receiver.
RECEIVERINFOReceiverStart (RECEIVERINFO *ritab[], STATIONINFO *sip)
 Start receiver for the connected stream.


Function Documentation

RECEIVERINFO* ReceiverCreate ( RECEIVERPLUGIN plugin  ) 

Create stream receiver instance with the specified plug-in.

Parameters:
plugin Pointer to a receiver plug-in.
Returns:
Pointer to the receiver info structure or NULL, if the creation failed.

Definition at line 86 of file receiver.c.

Referenced by main().

static int ReceiverPlugInControl ( RECEIVERINFO rip,
u_int  sst,
u_int  xst 
) [static]

Change receiver plug-in status.

Parameters:
rip Points to the receiver information structure.
sst Command status to set, either RSTAT_STOP or RSTAT_START.
xst Expected final status, RSTAT_IDLE, RSTAT_BUFFERING or RSTAT_RUNNING. The last two may be or'ed together.
Returns:
0 on success, -1 otherwise.

Definition at line 113 of file receiver.c.

References LOG_ERROR, LogMsg(), RECEIVERINFO::ri_cmdevt, RECEIVERINFO::ri_status, and RECEIVERINFO::ri_stsevt.

Referenced by ReceiverStart(), and ReceiverStop().

Here is the call graph for this function:

LogMsg

u_int ReceiverStatus ( RECEIVERINFO rip  ) 

Retrieve the current receiver status.

Parameters:
rip Pointer to the receiver information structure.
Returns:
Receiver status.

Definition at line 136 of file receiver.c.

Referenced by main().

int ReceiverStop ( RECEIVERINFO rip  ) 

Stop receiver.

Parameters:
rip Receiver to stop.
Returns:
0 on success, -1 otherwise.

Definition at line 148 of file receiver.c.

Referenced by main(), and ReceiverStart().

RECEIVERINFO* ReceiverStart ( RECEIVERINFO ritab[],
STATIONINFO sip 
)

Start receiver for the connected stream.

Parameters:
ritab Table of available receivers.
sip Information structure of the connected station .
Returns:
Pointer to the receiver entry that had been started. NULL is returned in case any error.

Definition at line 162 of file receiver.c.

Referenced by main().


© 2008 by egnite GmbH - visit www.ethernut.de