#include <sys/socket.h>
#include <hxmp3/mp3dec.h>
#include <hxmp3/hermite.h>
#include "receiver.h"
Include dependency graph for player.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | _PLAYERPLUGIN |
Player plug-in reference structure. More... | |
struct | _PLAYERINFO |
Player information structure. More... | |
Player Types | |
#define | PLAYER_TYPE_MP3 1 |
Player accepts MP3 encoded audio data. | |
Defines | |
#define | PSTAT_IDLE 0 |
#define | PSTAT_START 1 |
#define | PSTAT_RUNNING 2 |
#define | PSTAT_STOP 3 |
Typedefs | |
typedef _PLAYERINFO | PLAYERINFO |
Player information structure type. | |
typedef _PLAYERPLUGIN | PLAYERPLUGIN |
Player plug-in reference structure. | |
Functions | |
__BEGIN_DECLS PLAYERINFO * | PlayerCreate (PLAYERPLUGIN *ppp) |
Create a player instance. | |
int | PlayerStart (PLAYERINFO *pip, RECEIVERINFO *rip) |
Start playing a specified receiver. | |
int | PlayerStop (PLAYERINFO *pip) |
Stop player. | |
u_int | PlayerStatus (PLAYERINFO *pip) |
Retrieve the current player status. |
|
|
|
|
|
|
|
|
|
Player accepts MP3 encoded audio data.
|
|
Player information structure type.
|
|
Player plug-in reference structure. A variable with this structure is provided by the plug-in. |
|
Create a player instance.
Definition at line 66 of file player.c. 00068 { 00069 PLAYERINFO *pip; 00070 00071 /* Allocate and initialize the player info structure. */ 00072 if ((pip = malloc(sizeof(PLAYERINFO))) != NULL) { 00073 memset(pip, 0, sizeof(PLAYERINFO)); 00074 /* Associate a new player plug-in instance. */ 00075 if ((*plugin->pp_create) (pip)) { 00076 free(pip); 00077 pip = NULL; 00078 } 00079 } 00080 return pip;
|
|
Start playing a specified receiver.
Definition at line 146 of file player.c. 00148 { 00149 if (PlayerStop(pip)) { 00150 return -1; 00151 } 00152 printf("[PSTART]"); 00153 pip->pi_rcvr = rip; 00154 00155 return PlayerPlugInControl(pip, PSTAT_START, PSTAT_RUNNING);
|
|
Stop player.
Definition at line 131 of file player.c. Referenced by CgiControl(). 00133 { 00134 printf("[PSTOP]"); 00135 return PlayerPlugInControl(pip, PSTAT_STOP, PSTAT_IDLE);
|
|
Retrieve the current player status.
Definition at line 118 of file player.c. 00120 { 00121 return pip->pi_status;
|