Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
4.0 KiB

  1. //***************************************************************************
  2. // Header file
  3. //
  4. //***************************************************************************
  5. #ifndef __DVDINIT_H__
  6. #define __DVDINIT_H__
  7. typedef enum tagStreamType {
  8. strmVideo = 0,
  9. strmAudio,
  10. strmSubpicture,
  11. strmYUVVideo,
  12. strmCCOut,
  13. STREAMNUM
  14. } STREAMTYPES;
  15. #define DMASIZE (2*1024)
  16. typedef struct _HW_DEVICE_EXTENSION {
  17. // UCHAR dmp[32*10000+4];
  18. // UCHAR dmp2[16*10000];
  19. PCI_COMMON_CONFIG PciConfigSpace;
  20. PUCHAR ioBaseLocal; // board base address
  21. ULONG Irq; // irq level
  22. ULONG RevID; // Revision ID
  23. // hardware settings
  24. ULONG StreamType; // stream type - DVD, MPEG2, ...
  25. ULONG TVType; // TV type - NTCS, PAL, ...
  26. ULONG PlayMode; // playback mode - normal, FF, ...
  27. ULONG RunMode; // 3modes; Normal, Fast, Slow
  28. BOOL VideoMute; //
  29. BOOL AudioMute; //
  30. BOOL SubpicMute; //
  31. BOOL OSDMute; //
  32. BOOL LetterBox; //
  33. BOOL PanScan; //
  34. ULONG VideoAspect; // - 4:3, 16:9
  35. ULONG AudioMode; // AC3, PCM, ...
  36. ULONG AudioType; // audio type - analog, digital, ...
  37. ULONG AudioVolume; // audio volume
  38. BOOL SubpicHilite; // subpicture hilight
  39. ULONG AudioCgms; // audio Cgms
  40. ULONG AudioFreq; // audio frequency
  41. UCHAR VideoPort; // degital video output type
  42. BOOL fTimeOut;
  43. PHW_STREAM_REQUEST_BLOCK pSrbDMA0;
  44. PHW_STREAM_REQUEST_BLOCK pSrbDMA1;
  45. BOOLEAN fSrbDMA0last;
  46. BOOLEAN fSrbDMA1last;
  47. BOOL SendFirst;
  48. BOOL DecodeStart;
  49. DWORD TimeDiscontFlagCount;
  50. DWORD DataDiscontFlagCount;
  51. DWORD SendFirstTime;
  52. ULONG XferStartCount;
  53. BOOL bKeyDataXfer;
  54. PHW_TIMER_ROUTINE pfnEndKeyData;
  55. DWORD CppFlagCount;
  56. PHW_STREAM_REQUEST_BLOCK pSrbCpp;
  57. BOOL bCppReset;
  58. LONG lCPPStrm;
  59. DWORD cOpenInputStream; // count opened input stream
  60. DeviceQueue DevQue;
  61. CCQueue CCQue;
  62. Dack DAck;
  63. VDecoder VDec;
  64. ADecoder ADec;
  65. VProcessor VPro;
  66. CGuard CPgd;
  67. Cpp CPro;
  68. PHW_STREAM_OBJECT pstroVid;
  69. PHW_STREAM_OBJECT pstroAud;
  70. PHW_STREAM_OBJECT pstroSP;
  71. PHW_STREAM_OBJECT pstroYUV;
  72. PHW_STREAM_OBJECT pstroCC;
  73. ULONG ddrawHandle;
  74. ULONG VidPortID;
  75. ULONG SurfaceHandle;
  76. DWORD dwSTCInit;
  77. DWORD dwSTCtemp;
  78. DWORD dwSTCinPause; // is used to keep STC only from Fast to Pause
  79. // because in this case STC doesn't STOP !! (why?)
  80. BOOL bSTCvalid;
  81. BOOL bDMAscheduled;
  82. UCHAR fDMA;
  83. UCHAR bDMAstop;
  84. ULONG fCauseOfStop;
  85. BOOL bVideoQueue;
  86. BOOL bAudioQueue;
  87. BOOL bSubpicQueue;
  88. REFERENCE_TIME VideoStartTime;
  89. REFERENCE_TIME VideoInterceptTime;
  90. LONG VideoRate;
  91. REFERENCE_TIME AudioStartTime;
  92. REFERENCE_TIME AudioInterceptTime;
  93. LONG AudioRate;
  94. REFERENCE_TIME SubpicStartTime;
  95. REFERENCE_TIME SubpicInterceptTime;
  96. LONG SubpicRate;
  97. REFERENCE_TIME StartTime;
  98. REFERENCE_TIME InterceptTime;
  99. LONG Rate;
  100. LONG VideoMaxFullRate;
  101. LONG AudioMaxFullRate;
  102. LONG SubpicMaxFullRate;
  103. LONG ChangeFlag;
  104. PUCHAR pDmaBuf;
  105. STREAM_PHYSICAL_ADDRESS addr;
  106. KSPROPERTY_SPHLI hli;
  107. KS_AMVPDATAINFO VPFmt;
  108. BOOL bStopCC;
  109. } HW_DEVICE_EXTENSION, *PHW_DEVICE_EXTENSION;
  110. typedef struct _STREAMEX {
  111. DWORD EventCount;
  112. KSSTATE state;
  113. } STREAMEX, *PSTREAMEX;
  114. typedef struct _SRB_EXTENSION {
  115. StreamType Type;
  116. ULONG Index;
  117. PHW_TIMER_ROUTINE pfnEndSrb;
  118. PHW_STREAM_REQUEST_BLOCK parmSrb;
  119. } SRB_EXTENSION, * PSRB_EXTENSION;
  120. /*****************************************************************************
  121. *
  122. * the following section defines prototypes for the minidriver initialization
  123. * routines
  124. *
  125. ******************************************************************************/
  126. extern "C" NTSTATUS DriverEntry( IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath );
  127. NTSTATUS HwInitialize (IN PHW_STREAM_REQUEST_BLOCK pSrb);
  128. void GetPCIConfigSpace(IN PHW_STREAM_REQUEST_BLOCK pSrb);
  129. void InitializationEntry(IN PHW_STREAM_REQUEST_BLOCK pSrb);
  130. typedef struct _MYTIME {
  131. KSEVENT_TIME_INTERVAL tim;
  132. LONGLONG LastTime;
  133. } MYTIME, *PMYTIME;
  134. typedef struct _MYAUDIOFORMAT {
  135. DWORD dwMode;
  136. DWORD dwFreq;
  137. DWORD dwQuant;
  138. } MYAUDIOFORMAT, *PMYAUDIOFORMAT;
  139. #endif //__DVDINIT_H__
  140.