player_bg.h 665 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef __PLAYER_BG_H__
  2. #define __PLAYER_BG_H__
  3. #include <rtthread.h>
  4. enum PLAYER_REQUEST_TYPE
  5. {
  6. PLAYER_REQUEST_PLAY_SINGLE_FILE,
  7. PLAYER_REQUEST_PLAY_LIST,
  8. PLAYER_REQUEST_STOP,
  9. PLAYER_REQUEST_FREEZE,
  10. PLAYER_REQUEST_UPDATE_RADIO_LIST,
  11. };
  12. struct player_request
  13. {
  14. enum PLAYER_REQUEST_TYPE type;
  15. char fn[64];
  16. };
  17. /* get player background status */
  18. rt_bool_t player_is_playing(void);
  19. /* player background thread init */
  20. void player_init(void);
  21. /* send a stop request to player background thread */
  22. void player_stop_req(void);
  23. /* send a play request to player background thread */
  24. void player_play_req(const char* fn);
  25. #endif