2009-12-01 23:31:48 +08:00
|
|
|
#ifndef __PLAYER_BG_H__
|
|
|
|
#define __PLAYER_BG_H__
|
|
|
|
|
|
|
|
#include <rtthread.h>
|
|
|
|
|
|
|
|
enum PLAYER_REQUEST_TYPE
|
|
|
|
{
|
|
|
|
PLAYER_REQUEST_PLAY_SINGLE_FILE,
|
|
|
|
PLAYER_REQUEST_PLAY_LIST,
|
|
|
|
PLAYER_REQUEST_STOP,
|
2010-02-25 00:05:37 +08:00
|
|
|
PLAYER_REQUEST_FREEZE,
|
2009-12-01 23:31:48 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct player_request
|
|
|
|
{
|
|
|
|
enum PLAYER_REQUEST_TYPE type;
|
|
|
|
char fn[64];
|
|
|
|
};
|
|
|
|
|
2010-02-18 07:56:49 +08:00
|
|
|
/* get player background status */
|
2009-12-01 23:31:48 +08:00
|
|
|
rt_bool_t player_is_playing(void);
|
2010-02-18 07:56:49 +08:00
|
|
|
/* player background thread init */
|
|
|
|
void player_init(void);
|
2009-12-01 23:31:48 +08:00
|
|
|
|
2010-02-18 07:56:49 +08:00
|
|
|
/* send a stop request to player background thread */
|
|
|
|
void player_stop_req(void);
|
|
|
|
/* send a play request to player background thread */
|
|
|
|
void player_play_req(const char* fn);
|
2009-12-01 23:31:48 +08:00
|
|
|
|
|
|
|
#endif
|
2010-02-18 07:56:49 +08:00
|
|
|
|