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.

101 lines
2.8 KiB

  1. #pragma once
  2. //==========================================================================;
  3. //
  4. // CWDMVideoStream - WDM Video Stream base class definition
  5. //
  6. // $Date: 22 Feb 1999 15:48:34 $
  7. // $Revision: 1.2 $
  8. // $Author: KLEBANOV $
  9. //
  10. // $Copyright: (c) 1997 - 1999 ATI Technologies Inc. All Rights Reserved. $
  11. //
  12. //==========================================================================;
  13. #include "i2script.h"
  14. #include "aticonfg.h"
  15. #include "decdev.h"
  16. #include "decvport.h"
  17. typedef enum {
  18. STREAM_VideoCapture,
  19. STREAM_VPVideo,
  20. STREAM_VBICapture,
  21. STREAM_VPVBI,
  22. STREAM_AnalogVideoInput
  23. };
  24. class CWDMVideoDecoder;
  25. class CWDMVideoStream
  26. {
  27. public:
  28. CWDMVideoStream(PHW_STREAM_OBJECT pStreamObject,
  29. CWDMVideoDecoder * pCWDMVideoDecoder,
  30. PUINT puiError);
  31. virtual ~CWDMVideoStream();
  32. void * operator new(size_t size, void * pAllocation) { return(pAllocation);}
  33. void operator delete(void * pAllocation) {}
  34. virtual VOID STREAMAPI VideoReceiveDataPacket(IN PHW_STREAM_REQUEST_BLOCK pSrb);
  35. VOID STREAMAPI VideoReceiveCtrlPacket(IN PHW_STREAM_REQUEST_BLOCK pSrb);
  36. virtual void TimeoutPacket(IN OUT PHW_STREAM_REQUEST_BLOCK pSrb);
  37. VOID VideoGetState(PHW_STREAM_REQUEST_BLOCK);
  38. virtual VOID VideoSetState(PHW_STREAM_REQUEST_BLOCK, BOOL bVPConnected, BOOL bVPVBIConnected);
  39. virtual VOID VideoGetProperty(PHW_STREAM_REQUEST_BLOCK);
  40. virtual VOID VideoSetProperty(PHW_STREAM_REQUEST_BLOCK);
  41. VOID VideoStreamGetConnectionProperty (PHW_STREAM_REQUEST_BLOCK);
  42. VOID VideoIndicateMasterClock (PHW_STREAM_REQUEST_BLOCK);
  43. virtual void CancelPacket( PHW_STREAM_REQUEST_BLOCK)
  44. {
  45. };
  46. protected:
  47. PHW_STREAM_OBJECT m_pStreamObject;
  48. // General purpose lock. We could use a separate one
  49. // for each queue, but this keeps things a little
  50. // more simple. Since it is never held for very long,
  51. // this shouldn't be a big performance hit.
  52. KSSTATE m_KSState; // Run, Stop, Pause
  53. HANDLE m_hMasterClock; //
  54. // -------------------
  55. CWDMVideoDecoder * m_pVideoDecoder;
  56. CDecoderVideoPort * m_pVideoPort;
  57. CVideoDecoderDevice * m_pDevice;
  58. private:
  59. // Control SRBs go here
  60. LIST_ENTRY m_ctrlSrbQueue;
  61. KSPIN_LOCK m_ctrlSrbLock;
  62. // Flag to indicate whether or not we are currently
  63. // busy processing a control SRB
  64. BOOL m_processingCtrlSrb;
  65. };
  66. //
  67. // prototypes for data handling routines
  68. //
  69. VOID STREAMAPI VideoReceiveDataPacket(IN PHW_STREAM_REQUEST_BLOCK);
  70. VOID STREAMAPI VideoReceiveCtrlPacket(IN PHW_STREAM_REQUEST_BLOCK);
  71. DWORD FAR PASCAL DirectDrawEventCallback(DWORD dwEvent, PVOID pContext, DWORD dwParam1, DWORD dwParam2);