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.

119 lines
3.3 KiB

  1. /* - - - - - - - - */
  2. /*
  3. ** Copyright (C) Microsoft Corporation 1993. All rights reserved.
  4. */
  5. /* - - - - - - - - */
  6. /* - - - - - - - - */
  7. #define implement struct
  8. #define implementations private
  9. /*
  10. ** _StdClassImplementations
  11. ** Defines the standard implementations for a class object.
  12. */
  13. #define _StdClassImplementations(Impl) \
  14. STDMETHODIMP QueryInterface(const IID FAR& riid, void FAR* FAR* ppv); \
  15. STDMETHODIMP_(ULONG) AddRef(); \
  16. STDMETHODIMP_(ULONG) Release()
  17. /* - - - - - - - - */
  18. class FAR CAVIFileCF : IClassFactory {
  19. public:
  20. static HRESULT Create(const CLSID FAR& rclsid, const IID FAR& riid, void FAR* FAR* ppv);
  21. private:
  22. CAVIFileCF(const CLSID FAR& rclsid, IUnknown FAR* FAR* ppUnknown);
  23. _StdClassImplementations(CFactoryImpl);
  24. CFactoryImpl(CAVIFileCF FAR* pAVIFileCF);
  25. STDMETHODIMP CreateInstance(IUnknown FAR* pUnknownOuter, const IID FAR& riid, void FAR* FAR* ppv);
  26. STDMETHODIMP LockServer(BOOL fLock);
  27. ULONG m_refs;
  28. CLSID m_clsid;
  29. };
  30. #include "mmreg.h"
  31. #include "msacm.h"
  32. /* - - - - - - - - */
  33. class FAR CACMCmpStream : IAVIStream{
  34. public:
  35. static HRESULT MakeInst(IUnknown FAR* pUnknownOuter, const IID FAR& riid, void FAR* FAR* ppv);
  36. LONG SetUpCompression();
  37. private:
  38. CACMCmpStream(IUnknown FAR* pUnknownOuter, IUnknown FAR* FAR* ppUnknown);
  39. public:
  40. _StdClassImplementations(CAVIStreamImpl);
  41. STDMETHODIMP Create (THIS_ LPARAM lParam1, LPARAM lParam2);
  42. STDMETHODIMP Info (THIS_ AVISTREAMINFO 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, DWORD dwFlags,
  53. LONG FAR *plSampWritten,
  54. LONG FAR *plBytesWritten);
  55. STDMETHODIMP Delete (THIS_ LONG lStart, LONG lSamples);
  56. STDMETHODIMP ReadData (THIS_ DWORD fcc, LPVOID lp, LONG FAR *lpcb);
  57. STDMETHODIMP WriteData (THIS_ DWORD fcc, LPVOID lp, LONG cb);
  58. STDMETHODIMP Reserved1 (THIS);
  59. STDMETHODIMP Reserved2 (THIS);
  60. STDMETHODIMP Reserved3 (THIS);
  61. STDMETHODIMP Reserved4 (THIS);
  62. STDMETHODIMP Reserved5 (THIS);
  63. public:
  64. IUnknown FAR* m_pUnknownOuter;
  65. // Instance data
  66. ULONG m_refs;
  67. AVISTREAMINFO m_avistream; // stream info
  68. PAVISTREAM m_pavi;
  69. HACMSTREAM m_hs;
  70. LPWAVEFORMATEX m_lpFormat;
  71. LONG m_cbFormat;
  72. LPWAVEFORMATEX m_lpFormatC;
  73. LONG m_cbFormatC;
  74. };
  75. /* - - - - - - - - */
  76. /*
  77. ** The usage counter keeps track of the overall usage of objects based on
  78. ** implementations provided by the component. This allows one to determine
  79. ** when the implementation is no longer in use.
  80. */
  81. extern UINT uUseCount;
  82. extern BOOL fLocked;
  83. extern HINSTANCE ghInst;
  84. /* - - - - - - - - */
  85. DEFINE_AVIGUID(CLSID_AVIWaveFileReader, 0x00020003, 0, 0);
  86. /* resource ids */
  87. #define IDS_CNVTERR 100
  88. #define IDS_ACMERR 101
  89. /*----------------------------------------------------------------------*/