Leaked source code of windows server 2003
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.

71 lines
1.8 KiB

  1. #pragma once
  2. //==========================================================================;
  3. //
  4. // CDecoderVideoPort - Video Port interface definitions
  5. //
  6. // $Date: 14 Oct 1998 15:11:14 $
  7. // $Revision: 1.1 $
  8. // $Author: Tashjian $
  9. //
  10. // $Copyright: (c) 1997 - 1998 ATI Technologies Inc. All Rights Reserved. $
  11. //
  12. //==========================================================================;
  13. #include "i2script.h"
  14. #include "aticonfg.h"
  15. #define DD_OK 0
  16. class CWDMVideoPortStream;
  17. class CDecoderVideoPort
  18. {
  19. public:
  20. CDecoderVideoPort(PDEVICE_OBJECT pDeviceObject);
  21. // Attributes
  22. private:
  23. PDEVICE_OBJECT m_pDeviceObject;
  24. CATIHwConfiguration * m_pCATIConfig;
  25. ULONG m_ring3VideoPortHandle;
  26. ULONG_PTR m_ring3DirectDrawHandle;
  27. HANDLE m_ring0VideoPortHandle;
  28. HANDLE m_ring0DirectDrawHandle;
  29. BOOL GetRing0VideoPortHandle();
  30. BOOL GetRing0DirectDrawHandle();
  31. // Implementation
  32. public:
  33. void Open();
  34. void Close();
  35. BOOL RegisterForDirectDrawEvents( CWDMVideoPortStream* pStream);
  36. BOOL UnregisterForDirectDrawEvents( CWDMVideoPortStream* pStream);
  37. BOOL ReleaseRing0VideoPortHandle();
  38. BOOL ReleaseRing0DirectDrawHandle();
  39. BOOL ConfigVideoPortHandle(ULONG info);
  40. BOOL ConfigDirectDrawHandle(ULONG_PTR info);
  41. HANDLE GetVideoPortHandle() { return m_ring0VideoPortHandle; }
  42. HANDLE GetDirectDrawHandle() { return m_ring0DirectDrawHandle; }
  43. void CloseDirectDraw() {
  44. m_ring0DirectDrawHandle = 0;
  45. m_ring3DirectDrawHandle = 0;
  46. }
  47. void CloseVideoPort() {
  48. m_ring0VideoPortHandle = 0;
  49. m_ring3VideoPortHandle = -1;
  50. }
  51. };