* * $Log$ * *
Definition in file receiver.h.
#include <sys/socket.h>
#include "config.h"
#include "station.h"
Include dependency graph for receiver.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _RECEIVERPLUGIN |
Receiver plug-in reference structure. More... | |
struct | _RECEIVERINFO |
Receiver information structure. More... | |
Receiver Status | |
#define | RSTAT_IDLE 0 |
Receiver is idle. | |
#define | RSTAT_START 1 |
Request to start receiver. | |
#define | RSTAT_RUNNING 2 |
Receiver is running. | |
#define | RSTAT_STOP 3 |
Request to stop receiver. | |
Receiver Protocol Types | |
#define | RECEIVER_TYPE_SHOUTCAST 1 |
Receiver is connected to a SHOUTcast server. | |
Typedefs | |
typedef _RECEIVERINFO | RECEIVERINFO |
Receiver information structure type. | |
typedef _RECEIVERPLUGIN | RECEIVERPLUGIN |
Receiver plug-in reference structure. | |
Functions | |
__BEGIN_DECLS RECEIVERINFO * | ReceiverCreate (RECEIVERPLUGIN *plugin) |
Create stream receiver instance with the specified plug-in. | |
int | ReceiverStart (RECEIVERINFO *rip, STATIONINFO *sip) |
Start receiving a specified station. | |
int | ReceiverStop (RECEIVERINFO *rip) |
Stop receiver. | |
u_int | ReceiverStatus (RECEIVERINFO *rip) |
Retrieve the current receiver status. |
|
Receiver is idle.
Definition at line 53 of file receiver.h. |
|
Request to start receiver.
Definition at line 55 of file receiver.h. |
|
Receiver is running.
Definition at line 57 of file receiver.h. |
|
Request to stop receiver.
Definition at line 59 of file receiver.h. |
|
Receiver is connected to a SHOUTcast server.
Definition at line 65 of file receiver.h. |
|
Receiver information structure type.
Definition at line 71 of file receiver.h. |
|
Receiver plug-in reference structure. A variable with this structure is provided by the plug-in. |
|
Create stream receiver instance with the specified plug-in.
Definition at line 82 of file receiver.c. 00084 { 00085 RECEIVERINFO *rip; 00086 00087 /* Allocate and initialize the receiver info structure. */ 00088 if ((rip = malloc(sizeof(RECEIVERINFO))) != NULL) { 00089 memset(rip, 0, sizeof(RECEIVERINFO)); 00090 rip->ri_rpp = plugin; 00091 /* Associate a new player plug-in instance. */ 00092 if ((*plugin->rp_create) (rip)) { 00093 free(rip); 00094 rip = NULL; 00095 } 00096 } 00097 return rip;
|
|
Start receiving a specified station.
Definition at line 157 of file receiver.c. 00159 { 00160 /* Make sure that the receiver is not running. */ 00161 if (ReceiverStop(rip)) { 00162 return -1; 00163 } 00164 printf("[RSTART]"); 00165 rip->ri_sip = sip; 00166 rip->ri_wpos = 0; 00167 rip->ri_rpos = 0; 00168 rip->ri_avail = 0; 00169 00170 if ((*rip->ri_rpp->rp_setup)(rip)) { 00171 return -1; 00172 } 00173 return ReceiverPlugInControl(rip, RSTAT_START, RSTAT_RUNNING);
|
|
Stop receiver.
Definition at line 143 of file receiver.c. Referenced by CgiControl(). 00145 { 00146 printf("[RSTOP]"); 00147 return ReceiverPlugInControl(rip, RSTAT_STOP, RSTAT_IDLE);
|
|
Retrieve the current receiver status.
Definition at line 131 of file receiver.c. 00133 { 00134 return rip->ri_status;
|