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

DVD

开发平台:

C/C++

  1. #ifndef __MACRO_H
  2. #define __MACRO_H
  3. #include "sig.h"
  4. #include "avd.h"
  5. void    MacroSaveHeader(void);
  6. void  MacroRestoreHeader();
  7. void MacroSync(void);
  8. void MacroAbort(void);
  9. void MacroContinue(void);
  10. void MacroPause(void);
  11. void MacroPlay(void);
  12. void MacroPlayLBA(void);
  13. //void MacroPlayOneSlide(void);
  14. void MacroPlayRomSlide(void);
  15. //void MacroPlaySector(void);
  16. void MacroPlayMP3(void);
  17. void MacroPlayTrack();
  18. void MacroPlayEntry();
  19. void MacroPlaySegment();
  20. void MacroSelectStream(void);
  21. #define Save_header() MacroSaveHeader()
  22. #define Restore_header() MacroRestoreHeader()
  23. #define Abort() MacroAbort()
  24. #define Sync() MacroSync()
  25. #define Continue() MacroContinue()
  26. #define Pause() MacroPause()
  27. #define Play() MacroPlay()
  28. #define PlayLBA(a,b) do {
  29. MacroParam.PlayLBA.lba=(a);
  30. MacroParam.PlayLBA.len=(b);
  31. MacroPlayLBA();
  32. } while (0)
  33. #define FindFirstNav(a,b) do {
  34. MacroParam.FindFirstNav.lba=(a);
  35. MacroParam.FindFirstNav.len=(b);
  36. MacroFindFirstNav();
  37. } while (0)
  38. #define PlayTrack(trk) do {
  39. MacroParam.PlayTrack.track=(trk);
  40. MacroPlayTrack();
  41. } while (0)
  42. #define PlayEntry(ent) do {
  43. MacroParam.PlayEntry.entry=(ent);
  44. MacroPlayEntry();
  45. } while (0)
  46. #define PlaySegment(seg) do {
  47. MacroParam.PlaySegment.segment=(seg);
  48. MacroPlaySegment();
  49. } while (0)
  50. #define PlayMP3(msf,len) do {
  51. MacroParam.PlayMP3.address_msf=(msf);
  52. MacroParam.PlayMP3.length=(len);
  53. MacroPlayMP3();
  54. } while (0)
  55. #define PlayRomSlide(RomAddr) do { 
  56. MacroParam.PlayRomSlide.rom_addr=(RomAddr); 
  57. MacroPlayRomSlide(); 
  58. } while (0)
  59. #define SelectStream(A,V) do { 
  60. MacroParam.SelectStream.audio = (A); 
  61. MacroParam.SelectStream.video = (V); 
  62. MacroSelectStream();
  63. } while (0)
  64. //Maoyong 2004.05.19 move from mainproc.c to here
  65. #if defined(SETUP_DONT_PAUSE)&&!defined(PROG_DONT_PAUSE)
  66. #define is_setup_prog_menu() (full_scrn&PROGRAM)
  67. #elif defined(PROG_DONT_PAUSE)&&!defined(SETUP_DONT_PAUSE)
  68. #define is_setup_prog_menu() (full_scrn&SETUP)
  69. #elif (defined(SETUP_DONT_PAUSE)&&defined(PROG_DONT_PAUSE))||defined(SDRAM_16Mb_Mode)||defined(NEW_STYLE_SETUP)
  70. #define is_setup_prog_menu() (0)
  71. #else
  72. #define is_setup_prog_menu() (full_scrn&(SETUP|PROGRAM))
  73. #endif
  74. typedef struct
  75. {
  76. BYTE video;
  77. BYTE audio;
  78. } t_SelectStream;
  79. typedef struct
  80. {
  81. BYTE *rom_addr;
  82. } t_PlayRomSlide;
  83. typedef struct
  84. {
  85. UINT32 lba;
  86. UINT32 len;
  87. } t_PlayLBA;
  88. typedef struct
  89. {
  90. UINT32 lba;
  91. UINT32 len;
  92. } t_FindFirstNav;
  93. typedef struct
  94. {
  95. BYTE track;
  96. } t_PlayTrack;
  97. typedef struct
  98. {
  99. UINT16 entry;
  100. } t_PlayEntry;
  101. typedef struct
  102. {
  103. UINT16 segment;
  104. } t_PlaySegment;
  105. typedef struct
  106. {
  107. UINT32 address_msf;
  108. UINT32 length;
  109. } t_PlayMP3;
  110. EXTERN union
  111. {
  112. //t_ReadCD ReadCD;
  113. //t_SetOsdColor SetOsdColor;
  114. //t_OSD_OnOff OSD_OnOff;
  115. //t_SetVideoFormat SetVideoFormat;
  116. t_SelectStream SelectStream;
  117. t_PlayRomSlide PlayRomSlide;
  118. t_PlayTrack PlayTrack;
  119. t_PlayLBA PlayLBA;
  120. t_PlayEntry PlayEntry;
  121. t_PlaySegment PlaySegment;
  122. t_PlayMP3 PlayMP3;
  123. //t_SetVolume SetVolume;
  124. t_FindFirstNav FindFirstNav;
  125. } MacroParam;
  126. #endif/*__MACRO_H*/