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.

121 lines
3.6 KiB

  1. /* - - - - - - - - */
  2. /*
  3. ** Copyright (C) Microsoft Corporation 1993 - 1995. All rights reserved.
  4. */
  5. /* - - - - - - - - */
  6. #define CAVICmpStreamImpl 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. #ifdef __cplusplus
  21. class FAR CAVICmpStream {
  22. public:
  23. static HRESULT Create(IUnknown FAR* pUnknownOuter, REFIID riid, LPVOID FAR* ppv);
  24. CAVICmpStream(IUnknown FAR* pUnknownOuter, IUnknown FAR* FAR* ppUnknown);
  25. HRESULT SetUpCompression();
  26. private:
  27. implementations:
  28. implement CUnknownImpl : IUnknown {
  29. public:
  30. _StdClassImplementations(CUnknownImpl);
  31. CUnknownImpl(CAVICmpStream FAR* pAVIStream);
  32. private:
  33. CAVICmpStream FAR* m_pAVIStream;
  34. ULONG m_refs;
  35. };
  36. implement CAVICmpStreamImpl : IAVIStream {
  37. public:
  38. _StdClassImplementations(CAVICmpStreamImpl);
  39. CAVICmpStreamImpl(CAVICmpStream FAR* pAVIStream);
  40. ~CAVICmpStreamImpl();
  41. STDMETHODIMP Create (THIS_ LPARAM lParam1, LPARAM lParam2);
  42. STDMETHODIMP Info (THIS_ AVISTREAMINFOW FAR * psi, LONG lSize);
  43. STDMETHODIMP_(LONG) FindSample (THIS_ LONG lPos, LONG lFlags);
  44. STDMETHODIMP ReadFormat (THIS_ LONG lPos,
  45. LPVOID lpFormat, LONG FAR *cbFormat);
  46. STDMETHODIMP SetFormat (THIS_ LONG lPos,
  47. LPVOID lpFormat, LONG cbFormat);
  48. STDMETHODIMP Read (THIS_ LONG lStart, LONG lSamples,
  49. LPVOID lpBuffer, LONG cbBuffer,
  50. LONG FAR * plBytes, LONG FAR * plSamples);
  51. STDMETHODIMP Write (THIS_ LONG lStart, LONG lSamples,
  52. LPVOID lpBuffer, LONG cbBuffer,
  53. DWORD dwFlags,
  54. LONG FAR *plSampWritten,
  55. LONG FAR *plBytesWritten);
  56. STDMETHODIMP Delete (THIS_ LONG lStart, LONG lSamples);
  57. STDMETHODIMP ReadData (THIS_ DWORD fcc, LPVOID lp, LONG FAR *lpcb);
  58. STDMETHODIMP WriteData (THIS_ DWORD fcc, LPVOID lp, LONG cb);
  59. #ifdef _WIN32
  60. STDMETHODIMP SetInfo(AVISTREAMINFOW FAR *lpInfo, LONG cbInfo);
  61. #else
  62. STDMETHODIMP Reserved1 (THIS);
  63. STDMETHODIMP Reserved2 (THIS);
  64. STDMETHODIMP Reserved3 (THIS);
  65. STDMETHODIMP Reserved4 (THIS);
  66. STDMETHODIMP Reserved5 (THIS);
  67. #endif
  68. private:
  69. void ReadPalette(LONG lPos, LONG lPal, LPRGBQUAD prgb);
  70. // private functions here?
  71. CAVICmpStream FAR* m_pAVIStream;
  72. };
  73. public:
  74. CUnknownImpl m_Unknown;
  75. CAVICmpStreamImpl m_AVIStream;
  76. LONG ICCrunch(LPBITMAPINFOHEADER lpbi, LPVOID lp);
  77. void ResetInst(void);
  78. public:
  79. IUnknown FAR* m_pUnknownOuter;
  80. // AVIStream Instance data
  81. AVISTREAMINFOW avistream; // stream info
  82. PAVISTREAM pavi;
  83. PGETFRAME pgf;
  84. LONG lFrameCurrent;
  85. HIC hic;
  86. LPBITMAPINFOHEADER lpbiC;
  87. LPVOID lpC;
  88. LPBITMAPINFOHEADER lpbiU;
  89. LPVOID lpU;
  90. LPBITMAPINFOHEADER lpFormat;
  91. LONG cbFormat;
  92. LPBITMAPINFOHEADER lpFormatOrig;
  93. LONG cbFormatOrig;
  94. DWORD dwKeyFrameEvery;
  95. DWORD fccIC;
  96. DWORD dwICFlags;
  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);