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

DVD

开发平台:

C/C++

  1. #ifndef __SIG_H
  2. /*
  3. ** FILE 
  4. ** sig.h
  5. **
  6. ** DESCRIPTION
  7. ** we will implement a reliable signaling scheme here.
  8. **
  9. ** NOTE:
  10. **
  11. ** a typical system should be like this..
  12. **
  13. ** do 
  14. ** {
  15. **   srv_...
  16. **   if (soft_intr_flag)
  17. **   {
  18. *8     interrupt-handler();
  19. **   }
  20. ** } while (!finished);
  21. **
  22. **
  23. */
  24. /*
  25. ** SIGNALs
  26. **
  27. ** INTR_SEQ_HEADER: sequence header found
  28. ** INTR_SEQ_END: sequence end found
  29. ** INTR_GOP: gop header found
  30. ** INTR_I_PIC: I-picture found
  31. ** INTR_A_PIC: any picture found
  32. ** INTR_AUTOPAUSE: auto pausing found
  33. ** INTR_EOF: END-OF-FILE found (CD-XA flag)
  34. ** INTR_VFD: VFD input
  35. ** INTR_IRKEY: IR input
  36. ** INTR_TRAYIN: IR input
  37. */
  38. #define INTR_SKIP_INTRO (1<<17)
  39. #define INTR_PROG_END (1<<16)
  40. #define INTR_SEQ_HEADER (1<<15)
  41. #define INTR_SEQ_END (1<<14)
  42. #define INTR_GOP (1<<13)
  43. #define INTR_I_PIC (1<<12)
  44. #define INTR_A_PIC (1<<11)
  45. #define INTR_CD_FAILURE (1<<9)
  46. #define INTR_AUTOPAUSE (1<<8)
  47. #define INTR_EOF (1<<7)
  48. #define INTR_TIMEOUT (1<<6)
  49. #define INTR_TRACK_CHANGE (1<<5)
  50. #define INTR_FOUND (1<<4)
  51. #define INTR_VFD (1<<3)
  52. #define INTR_IRKEY (1<<2)
  53. #define INTR_TRAYIN (1<<1)
  54. #define INTR_TRAYOUT (1<<0)
  55. EXTERN UINT32 softintr_mask;
  56. //EXTERN UINT32 softintr_flag;
  57. #define SetIntrMask(x) (softintr_mask = (x))
  58. #define GetIntrMask() (softintr_mask)
  59. //#define SetIntrFlag(x) (softintr_flag = (x))
  60. //#define GetIntrFlag() (softintr_flag)
  61. #define INTR_MASK_CDROM
  62. ( INTR_TIMEOUT 
  63. | INTR_TRAYOUT | INTR_TRAYOUT)
  64. #define INTR_MASK_NORMAL
  65. ( INTR_TIMEOUT 
  66. | INTR_PROG_END 
  67. | INTR_TRACK_CHANGE 
  68. | INTR_AUTOPAUSE 
  69. | INTR_VFD 
  70. | INTR_IRKEY 
  71. | INTR_TRAYOUT | INTR_TRAYOUT)
  72. #define INTR_MASK_NORMAL_LINEAR
  73. ( INTR_TIMEOUT 
  74. | INTR_PROG_END 
  75. | INTR_TRACK_CHANGE)
  76. #define INTR_MASK_NORMAL_CDDA ( INTR_TIMEOUT 
  77. | INTR_TRACK_CHANGE 
  78. | INTR_VFD 
  79. | INTR_IRKEY 
  80. | INTR_TRAYOUT | INTR_TRAYOUT)
  81. #define INTR_MASK_NORMAL_MP3 ( INTR_TIMEOUT 
  82. | INTR_TRACK_CHANGE 
  83. | INTR_EOF 
  84. | INTR_VFD 
  85. | INTR_IRKEY 
  86. | INTR_TRAYOUT | INTR_TRAYOUT)
  87. #define INTR_MASK_READTOC ( INTR_TIMEOUT 
  88. | INTR_VFD 
  89. | INTR_PROG_END 
  90. | INTR_IRKEY 
  91. | INTR_TRAYOUT | INTR_TRAYOUT)
  92. #define INTR_MASK_IDLE ( INTR_TIMEOUT 
  93. | INTR_PROG_END 
  94. | INTR_VFD 
  95. | INTR_IRKEY 
  96. | INTR_TRAYOUT | INTR_TRAYOUT)
  97. #define INTR_MASK_NORMAL_ROM ( INTR_EOF
  98. | INTR_PROG_END 
  99. | INTR_SEQ_END
  100. | INTR_TIMEOUT
  101. | INTR_VFD
  102. | INTR_IRKEY )
  103. #endif/*__SIG_H*/