-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplayer_bg.h
38 lines (31 loc) · 850 Bytes
/
player_bg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#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,
PLAYER_REQUEST_FREEZE,
PLAYER_REQUEST_UPDATE_RADIO_LIST,
PLAYER_REQUEST_UPDATE_INFO,
PLAYER_REQUEST_FUNCTION_VIEW,
PLAYER_REQUEST_REMOTE,
};
struct player_request
{
enum PLAYER_REQUEST_TYPE type;
char fn[64];
char station[32];
};
/* get player background status */
int player_is_playing(void);
/* player background thread init */
void player_init(void);
/* 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);
/* send a play radio request to player background thread */
void player_radio_req(const char* fn, const char* station);
#endif