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.

113 lines
4.1 KiB

  1. DEFINE_AVIGUID(CLSID_EditStream, 0x0002000A, 0, 0);
  2. ///////////////////////////////////////////////////////////////////////////
  3. ///////////////////////////////////////////////////////////////////////////
  4. ///////////////////////////////////////////////////////////////////////////
  5. typedef struct {
  6. PAVISTREAM pavi;
  7. LONG lStart;
  8. LONG lLength;
  9. LONG unused; // pad to power of two in size....
  10. RECT rcSource;
  11. RECT rcDest;
  12. } EDIT, FAR * LPEDIT;
  13. class FAR CEditStream : public virtual IAVIStream,
  14. public virtual IAVIEditStream,
  15. public virtual IMarshal {
  16. public:
  17. static CEditStream FAR * NewEditStream(PAVISTREAM psSource);
  18. STDMETHODIMP QueryInterface(const IID FAR& riid, void FAR* FAR* ppv); \
  19. STDMETHODIMP_(ULONG) AddRef(); \
  20. STDMETHODIMP_(ULONG) Release();
  21. STDMETHODIMP Create (THIS_ LPARAM lParam1, LPARAM lParam2);
  22. STDMETHODIMP Info (THIS_ AVISTREAMINFO FAR * psi, LONG lSize);
  23. STDMETHODIMP_(LONG) FindSample (THIS_ LONG lPos, LONG lFlags);
  24. STDMETHODIMP ReadFormat (THIS_ LONG lPos,
  25. LPVOID lpFormat, LONG FAR *cbFormat);
  26. STDMETHODIMP SetFormat (THIS_ LONG lPos,
  27. LPVOID lpFormat, LONG cbFormat);
  28. STDMETHODIMP Read (THIS_ LONG lStart, LONG lSamples,
  29. LPVOID lpBuffer, LONG cbBuffer,
  30. LONG FAR * plBytes, LONG FAR * plSamples);
  31. STDMETHODIMP Write (THIS_ LONG lStart, LONG lSamples,
  32. LPVOID lpBuffer, LONG cbBuffer,
  33. DWORD dwFlags,
  34. LONG FAR *plSampWritten,
  35. LONG FAR *plBytesWritten);
  36. STDMETHODIMP Delete (THIS_ LONG lStart, LONG lSamples);
  37. STDMETHODIMP ReadData (THIS_ DWORD fcc, LPVOID lp, LONG FAR *lpcb);
  38. STDMETHODIMP WriteData (THIS_ DWORD fcc, LPVOID lp, LONG cb);
  39. STDMETHODIMP Reserved1 (THIS);
  40. STDMETHODIMP Reserved2 (THIS);
  41. STDMETHODIMP Reserved3 (THIS);
  42. STDMETHODIMP Reserved4 (THIS);
  43. STDMETHODIMP Reserved5 (THIS);
  44. STDMETHODIMP Cut(LONG FAR *plStart, LONG FAR *plLength, PAVISTREAM FAR * ppResult);
  45. STDMETHODIMP Copy(LONG FAR *plStart, LONG FAR *plLength, PAVISTREAM FAR * ppResult);
  46. STDMETHODIMP Paste(LONG FAR *plPos, LONG FAR *plLength, PAVISTREAM pstream, LONG lStart, LONG lLength);
  47. STDMETHODIMP Clone(PAVISTREAM FAR *ppResult);
  48. STDMETHODIMP SetInfo(AVISTREAMINFO FAR *lpInfo, LONG cbInfo);
  49. // *** IMarshal methods ***
  50. static HRESULT NewInstance(IUnknown FAR* pUnknownOuter,
  51. REFIID riid,
  52. LPVOID FAR* ppv);
  53. BOOL CanMarshalSimply();
  54. STDMETHODIMP GetUnmarshalClass (THIS_ REFIID riid, LPVOID pv,
  55. DWORD dwDestContext, LPVOID pvDestContext,
  56. DWORD mshlflags, LPCLSID pCid);
  57. STDMETHODIMP GetMarshalSizeMax (THIS_ REFIID riid, LPVOID pv,
  58. DWORD dwDestContext, LPVOID pvDestContext,
  59. DWORD mshlflags, LPDWORD pSize);
  60. STDMETHODIMP MarshalInterface (THIS_ LPSTREAM pStm, REFIID riid,
  61. LPVOID pv, DWORD dwDestContext, LPVOID pvDestContext,
  62. DWORD mshlflags);
  63. STDMETHODIMP UnmarshalInterface (THIS_ LPSTREAM pStm, REFIID riid,
  64. LPVOID FAR* ppv);
  65. STDMETHODIMP ReleaseMarshalData (THIS_ LPSTREAM pStm);
  66. STDMETHODIMP DisconnectObject (THIS_ DWORD dwReserved);
  67. private:
  68. CEditStream() {
  69. cedits = 0;
  70. maxedits = 0;
  71. edits = NULL;
  72. pgf = NULL;
  73. psgf = NULL;
  74. fFullFrames = FALSE;
  75. };
  76. HRESULT ResolveEdits(LONG lPos,
  77. PAVISTREAM FAR *ppavi, LONG FAR *plPos,
  78. LONG FAR *pl, BOOL fAllowEnd);
  79. HRESULT PossiblyRemoveEdit(LONG l);
  80. HRESULT AllocEditSpace(LONG l, LONG cNew);
  81. LPBITMAPINFOHEADER NEAR PASCAL CEditStream::CallGetFrame(
  82. PAVISTREAM p,
  83. LONG l);
  84. void CheckEditList();
  85. public:
  86. ULONG ulRefCount;
  87. //
  88. // instance data
  89. //
  90. AVISTREAMINFO sinfo;
  91. LONG cedits;
  92. LONG maxedits;
  93. BOOL fFullFrames;
  94. EDIT _huge * edits;
  95. //
  96. // cached PGETFRAME
  97. PGETFRAME pgf;
  98. PAVISTREAM psgf;
  99. LPBITMAPINFOHEADER lpbiLast;
  100. };