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.

145 lines
8.0 KiB

  1. //**************************************************************************
  2. //
  3. // Title : DVDWdm.h
  4. //
  5. // Date : 1997.11.28 1st making
  6. //
  7. // Author : Toshiba [PCS](PSY) Hideki Yagi
  8. //
  9. // Copyright 1997 Toshiba Corporation. All Rights Reserved.
  10. //
  11. // -------------------------------------------------------------------------
  12. //
  13. // Change log :
  14. //
  15. // Date Revision Description
  16. // ------------ ---------- -----------------------------------------------
  17. // 1997.11.28 000.0000 1st making.
  18. //
  19. //**************************************************************************
  20. extern "C" VOID STREAMAPI AdapterReceivePacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  21. extern "C" VOID STREAMAPI AdapterCancelPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  22. extern "C" VOID STREAMAPI AdapterTimeoutPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  23. extern "C" BOOLEAN STREAMAPI HwInterrupt( IN PHW_DEVICE_EXTENSION pHwDevExt );
  24. extern "C" VOID STREAMAPI VideoReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  25. extern "C" VOID STREAMAPI VideoReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  26. extern "C" VOID STREAMAPI AudioReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  27. extern "C" VOID STREAMAPI AudioReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  28. extern "C" VOID STREAMAPI SubpicReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  29. extern "C" VOID STREAMAPI SubpicReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  30. extern "C" VOID STREAMAPI NtscReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  31. extern "C" VOID STREAMAPI NtscReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  32. extern "C" VOID STREAMAPI VpeReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  33. extern "C" VOID STREAMAPI VpeReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  34. extern "C" VOID STREAMAPI CcReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  35. extern "C" VOID STREAMAPI CcReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  36. extern "C" VOID STREAMAPI SSReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  37. extern "C" VOID STREAMAPI SSReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  38. NTSTATUS STREAMAPI AudioEvent( IN PHW_EVENT_DESCRIPTOR pEvent );
  39. VOID STREAMAPI StreamClockRtn( IN PHW_TIME_CONTEXT TimeContext );
  40. /// Low Priority Routine.
  41. VOID LowAdapterReceivePacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  42. VOID LowAdapterCancelPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  43. VOID LowAdapterTimeoutPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  44. VOID LowVideoReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  45. VOID LowVideoReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  46. VOID LowAudioReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  47. VOID LowAudioReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  48. VOID LowSubpicReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  49. VOID LowSubpicReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  50. VOID LowNtscReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  51. VOID LowNtscReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  52. VOID LowVpeReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  53. VOID LowVpeReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  54. VOID LowCcReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  55. VOID LowCcReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  56. VOID LowSSReceiveDataPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  57. VOID LowSSReceiveCtrlPacket( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  58. /// StreamAPI event
  59. NTSTATUS STREAMAPI AudioEvent( PHW_EVENT_DESCRIPTOR pEvent );
  60. NTSTATUS STREAMAPI CycEvent( PHW_EVENT_DESCRIPTOR pEvent );
  61. /// private functions
  62. void ErrorStreamNotification( PHW_STREAM_REQUEST_BLOCK pSrb, NTSTATUS );
  63. BOOL GetStreamInfo( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  64. BOOL OpenStream( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  65. BOOL CloseStream( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  66. NTSTATUS DataIntersection( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  67. VOID VideoQueryAccept( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  68. VOID AudioQueryAccept( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  69. VOID GetVpeProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  70. VOID SetVpeProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  71. VOID GetVpeProperty2( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  72. VOID SetVpeProperty2( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  73. VOID GetVideoProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  74. VOID SetVideoProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  75. VOID GetAudioProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  76. VOID SetAudioProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  77. VOID GetSubpicProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  78. VOID SetSubpicProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  79. VOID GetNtscProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  80. VOID SetNtscProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  81. VOID GetVpeProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  82. VOID SetVpeProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  83. VOID GetCCProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  84. VOID SetCCProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  85. //VOID ProcessVideoFormat( PKSDATAFORMAT pfmt, PHW_DEVICE_EXTENSION pHwDevExt );
  86. VOID ProcessVideoFormat( PHW_STREAM_REQUEST_BLOCK pSrb, PKSDATAFORMAT pfmt, PHW_DEVICE_EXTENSION pHwDevExt );
  87. VOID ProcessAudioFormat( PKSDATAFORMAT pfmt, PHW_DEVICE_EXTENSION pHwDevExt );
  88. VOID GetCppProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb, LONG strm );
  89. VOID SetCppProperty( IN PHW_STREAM_REQUEST_BLOCK pSrb );
  90. VOID SetAudioID( IN PHW_DEVICE_EXTENSION pHwDevExt, PKSSTREAM_HEADER pStruc );
  91. VOID SetSubpicID( IN PHW_DEVICE_EXTENSION pHwDevExt, PKSSTREAM_HEADER pStruc );
  92. DWORD GetStreamID( void *pBuff );
  93. VOID GetVideoRateChange( PHW_STREAM_REQUEST_BLOCK pSrb );
  94. VOID SetVideoRateChange( PHW_STREAM_REQUEST_BLOCK pSrb );
  95. VOID GetAudioRateChange( PHW_STREAM_REQUEST_BLOCK pSrb );
  96. VOID SetAudioRateChange( PHW_STREAM_REQUEST_BLOCK pSrb );
  97. VOID GetSubpicRateChange( PHW_STREAM_REQUEST_BLOCK pSrb );
  98. VOID SetSubpicRateChange( PHW_STREAM_REQUEST_BLOCK pSrb );
  99. VOID SetRateChange( PHW_DEVICE_EXTENSION pHwDevExt, LONG PrevRate );
  100. VOID SetVideoRateDefault( PHW_DEVICE_EXTENSION pHwDevExt );
  101. VOID SetAudioRateDefault( PHW_DEVICE_EXTENSION pHwDevExt );
  102. VOID SetSubpicRateDefault( PHW_DEVICE_EXTENSION pHwDevExt );
  103. ULONGLONG ConvertPTStoStrm( ULONG pts );
  104. ULONG ConvertStrmtoPTS( ULONGLONG strm );
  105. VOID USCC_Discontinuity( PHW_DEVICE_EXTENSION pHwDevExt );
  106. BOOL ToshibaNotePC( PHW_STREAM_REQUEST_BLOCK pSrb );
  107. void OpenTVControl( PHW_STREAM_REQUEST_BLOCK pSrb, OsdDataStruc dOsd );
  108. void CloseTVControl( PHW_STREAM_REQUEST_BLOCK pSrb );
  109. BOOL VGADVDTVControl( PHW_STREAM_REQUEST_BLOCK pSrb, DWORD stat, OsdDataStruc dOsd );
  110. BOOL MacroVisionTVControl( PHW_STREAM_REQUEST_BLOCK pSrb, DWORD stat, OsdDataStruc dOsd );
  111. void CallAtDeviceNextDeviceNotify( PHW_STREAM_REQUEST_BLOCK pSrb, NTSTATUS stat );
  112. void CallAtDeviceCompleteNotify( PHW_STREAM_REQUEST_BLOCK pSrb, NTSTATUS stat );
  113. void CallAtStreamNextDataNotify( PHW_STREAM_REQUEST_BLOCK pSrb, NTSTATUS stat );
  114. void CallAtStreamNextCtrlNotify( PHW_STREAM_REQUEST_BLOCK pSrb, NTSTATUS stat );
  115. void CallAtStreamCompleteNotify( PHW_STREAM_REQUEST_BLOCK pSrb, NTSTATUS stat );
  116. //void CallAtStreamSignalMultipleNotify( PHW_DEVICE_EXTENSION pHwDevExt );
  117. void CallAtStreamSignalMultipleNotify( PHW_STREAM_REQUEST_BLOCK pSrb );
  118. void DeviceNextDeviceNotify( PHW_STREAM_REQUEST_BLOCK pSrb );
  119. void DeviceCompleteNotify( PHW_STREAM_REQUEST_BLOCK pSrb );
  120. void StreamNextDataNotify( PHW_STREAM_REQUEST_BLOCK pSrb );
  121. void StreamNextCtrlNotify( PHW_STREAM_REQUEST_BLOCK pSrb );
  122. void StreamCompleteNotify( PHW_STREAM_REQUEST_BLOCK pSrb );
  123. void StreamSignalMultipleNotify( PHW_DEVICE_EXTENSION pHwDevExt );
  124. void LowTimerCppReset( PHW_STREAM_REQUEST_BLOCK pSrb );
  125. void DumpPTSValue( PHW_STREAM_REQUEST_BLOCK pSrb );
  126. #ifndef REARRANGEMENT
  127. void FlushQueue( PHW_DEVICE_EXTENSION pHwDevExt);
  128. #endif REARRANGEMENT
  129. // define
  130. #define IsEqualGUID2(guid1, guid2) (!memcmp((guid1), (guid2), sizeof(GUID)))