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.

122 lines
3.6 KiB

  1. /* - - - - - - - - */
  2. /*
  3. ** Copyright (C) Microsoft Corporation 1993. All rights reserved.
  4. */
  5. /* - - - - - - - - */
  6. #define CAVIStreamImpl CS // Can't handle long exported names
  7. /* Remove warning of using object during initialization. */
  8. #pragma warning(disable:4355)
  9. /* - - - - - - - - */
  10. #define implement struct
  11. #define implementations private
  12. /*
  13. ** _StdClassImplementations
  14. ** Defines the standard implementations for a class object.
  15. */
  16. #define _StdClassImplementations(Impl) \
  17. STDMETHODIMP QueryInterface(REFIID riid, LPVOID FAR* ppv); \
  18. STDMETHODIMP_(ULONG) AddRef(); \
  19. STDMETHODIMP_(ULONG) Release()
  20. #ifndef _INC_COMPMAN
  21. typedef HANDLE HIC; /* Handle to a Insatlable Compressor */
  22. #endif
  23. #ifdef __cplusplus
  24. class FAR CAVICmpStream {
  25. public:
  26. static HRESULT Create(IUnknown FAR* pUnknownOuter, REFIID riid, LPVOID FAR* ppv);
  27. CAVICmpStream(IUnknown FAR* pUnknownOuter, IUnknown FAR* FAR* ppUnknown);
  28. HRESULT SetUpCompression();
  29. private:
  30. implementations:
  31. implement CUnknownImpl : IUnknown {
  32. public:
  33. _StdClassImplementations(CUnknownImpl);
  34. CUnknownImpl(CAVICmpStream FAR* pAVIStream);
  35. private:
  36. CAVICmpStream FAR* m_pAVIStream;
  37. ULONG m_refs;
  38. };
  39. implement CAVICmpStreamImpl : IAVIStream {
  40. public:
  41. _StdClassImplementations(CAVICmpStreamImpl);
  42. CAVICmpStreamImpl(CAVICmpStream FAR* pAVIStream);
  43. ~CAVICmpStreamImpl();
  44. STDMETHODIMP Create (THIS_ LPARAM lParam1, LPARAM lParam2);
  45. STDMETHODIMP Info (THIS_ AVISTREAMINFO FAR * psi, LONG lSize);
  46. STDMETHODIMP_(LONG) FindSample (THIS_ LONG lPos, LONG lFlags);
  47. STDMETHODIMP ReadFormat (THIS_ LONG lPos,
  48. LPVOID lpFormat, LONG FAR *cbFormat);
  49. STDMETHODIMP SetFormat (THIS_ LONG lPos,
  50. LPVOID lpFormat, LONG cbFormat);
  51. STDMETHODIMP Read (THIS_ LONG lStart, LONG lSamples,
  52. LPVOID lpBuffer, LONG cbBuffer,
  53. LONG FAR * plBytes, LONG FAR * plSamples);
  54. STDMETHODIMP Write (THIS_ LONG lStart, LONG lSamples,
  55. LPVOID lpBuffer, LONG cbBuffer,
  56. DWORD dwFlags,
  57. LONG FAR *plSampWritten,
  58. LONG FAR *plBytesWritten);
  59. STDMETHODIMP Delete (THIS_ LONG lStart, LONG lSamples);
  60. STDMETHODIMP ReadData (THIS_ DWORD fcc, LPVOID lp, LONG FAR *lpcb);
  61. STDMETHODIMP WriteData (THIS_ DWORD fcc, LPVOID lp, LONG cb);
  62. STDMETHODIMP Reserved1 (THIS);
  63. STDMETHODIMP Reserved2 (THIS);
  64. STDMETHODIMP Reserved3 (THIS);
  65. STDMETHODIMP Reserved4 (THIS);
  66. STDMETHODIMP Reserved5 (THIS);
  67. private:
  68. void ReadPalette(LONG lPos, LONG lPal, LPRGBQUAD prgb);
  69. // private functions here?
  70. CAVICmpStream FAR* m_pAVIStream;
  71. };
  72. public:
  73. CUnknownImpl m_Unknown;
  74. CAVICmpStreamImpl m_AVIStream;
  75. LONG ICCrunch(LPBITMAPINFOHEADER lpbi, LPVOID lp);
  76. void ResetInst(void);
  77. public:
  78. IUnknown FAR* m_pUnknownOuter;
  79. // AVIStream Instance data
  80. AVISTREAMINFO avistream; // stream info
  81. PAVISTREAM pavi;
  82. PGETFRAME pgf;
  83. LONG lFrameCurrent;
  84. HIC hic;
  85. LPBITMAPINFOHEADER lpbiC;
  86. LPVOID lpC;
  87. LPBITMAPINFOHEADER lpbiU;
  88. LPVOID lpU;
  89. LPBITMAPINFOHEADER lpFormat;
  90. LONG cbFormat;
  91. LPBITMAPINFOHEADER lpFormatOrig;
  92. LONG cbFormatOrig;
  93. DWORD dwKeyFrameEvery;
  94. DWORD fccIC;
  95. DWORD dwICFlags;
  96. BOOL fPad;
  97. LPVOID lpHandler;
  98. LONG cbHandler;
  99. DWORD dwMaxSize;
  100. DWORD dwQualityLast;
  101. LONG lLastKeyFrame;
  102. DWORD dwSaved;
  103. DWORD m_ckid;
  104. DWORD m_dwFlags;
  105. };
  106. #endif
  107. DEFINE_AVIGUID(CLSID_AVICmprsStream, 0x00020001, 0, 0);