cd.h
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:1k
源码类别:

DVD

开发平台:

C/C++

  1. #ifndef __CD_H
  2. #define __CD_H
  3. #define CDST_OPEN       (1<<0)
  4. #define CDST_STOP       (1<<1)
  5. #define CDST_PLAY       (1<<2)
  6. #define CDST_PAUSE      (1<<3)
  7. #define CDST_CHKCRC     (1<<4)
  8. //#define CDSTATE_START (CDST_STOP)
  9. //#define CDSTATE_STOP (CDST_STOP)
  10. //#define CDSTATE_OPEN (CDST_OPEN)
  11. //#define CDSTATE_TRACK (0)
  12. //#define CDSTATE_SEGMENT (CDST_CHKCRC)
  13. //#define CDSTATE_CDROM (CDST_CHKCRC)
  14. #define CDChkCRC() (cd_state & CDST_CHKCRC)
  15. #define CDOpened() (cd_state & CDST_OPEN)
  16. #define CDStopped() (cd_state & CDST_STOP)
  17. #define CDPaused() (cd_state & CDST_PAUSE)
  18. #define CDActive() (cd_state & CDST_PLAY)
  19. #define CDSetOpen() (cd_state = CDST_OPEN)
  20. #define CDSetStop() (cd_state = CDST_STOP)
  21. #define CDSetPause() (cd_state |= CDST_PAUSE)
  22. #define CDSetPauseRelease() (cd_state &= ~CDST_PAUSE)
  23. #define CDSetPlay() (cd_state = CDST_PLAY)
  24. #define CDSetPlayCRC() (cd_state = CDST_PLAY | CDST_CHKCRC)
  25. //
  26. // MSF 
  27. #define IsValidMSF(msf) (((UINT32)(msf)>>24)!=0x00ff)
  28. void restart_cdlayer(void);
  29. int is_cd_eof(void);
  30. #endif/*__CD_H*/