Vfw_CB.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /**********
  2. <li>XX/XX/04 - LR, YHC - BCB corrections: fixed conflict between vfw.pas Unit and C++ vfw.h Header
  3. **********/
  4. //#ifndef VFW_BCBHPP
  5. //#define VFW_BCBHPP
  6. #include <vfw.h>
  7. namespace Vfw
  8. {
  9. struct TAVIStreamInfoW;
  10. typedef TAVIStreamInfoW *PAVIStreamInfoW;
  11. #pragma pack(push, 1)
  12. struct TAVIStreamInfoW
  13. {
  14. unsigned fccType;
  15. unsigned fccHandler;
  16. unsigned dwFlags;
  17. unsigned dwCaps;
  18. Word wPriority;
  19. Word wLanguage;
  20. unsigned dwScale;
  21. unsigned dwRate;
  22. unsigned dwStart;
  23. unsigned dwLength;
  24. unsigned dwInitialFrames;
  25. unsigned dwSuggestedBufferSize;
  26. unsigned dwQuality;
  27. unsigned dwSampleSize;
  28. Types::TRect rcFrame;
  29. unsigned dwEditCount;
  30. unsigned dwFormatChangeCount;
  31. wchar_t szName[64];
  32. } ;
  33. #pragma pack(pop)
  34. struct TAVIStreamInfoA;
  35. typedef TAVIStreamInfoA *PAVIStreamInfoA;
  36. #pragma pack(push, 1)
  37. struct TAVIStreamInfoA
  38. {
  39. unsigned fccType;
  40. unsigned fccHandler;
  41. unsigned dwFlags;
  42. unsigned dwCaps;
  43. Word wPriority;
  44. Word wLanguage;
  45. unsigned dwScale;
  46. unsigned dwRate;
  47. unsigned dwStart;
  48. unsigned dwLength;
  49. unsigned dwInitialFrames;
  50. unsigned dwSuggestedBufferSize;
  51. unsigned dwQuality;
  52. unsigned dwSampleSize;
  53. Types::TRect rcFrame;
  54. unsigned dwEditCount;
  55. unsigned dwFormatChangeCount;
  56. char szName[64];
  57. } ;
  58. #pragma pack(pop)
  59. __interface IAVIStream;
  60. typedef System::DelphiInterface<IAVIStream> _di_IAVIStream;
  61. __interface IAVIStream : public IInterface
  62. {
  63. public:
  64. virtual HRESULT __stdcall Create(int lParam1, int lParam2) = 0 ;
  65. virtual HRESULT __stdcall Info(TAVIStreamInfoW &psi, int lSize) = 0 ;
  66. virtual int __stdcall FindSample(int lPos, int lFlags) = 0 ;
  67. virtual HRESULT __stdcall ReadFormat(int lPos, void * lpFormat, int &lpcbFormat) = 0 ;
  68. virtual HRESULT __stdcall SetFormat(int lPos, void * lpFormat, int cbFormat) = 0 ;
  69. virtual HRESULT __stdcall Read(int lStart, int lSamples, void * lpBuffer, int cbBuffer, int &plBytes, int &plSamples) = 0 ;
  70. virtual HRESULT __stdcall Write(int lStart, int lSamples, void * lpBuffer, int cbBuffer, unsigned dwFlags, int &plSampWritten, int &plBytesWritten) = 0 ;
  71. virtual HRESULT __stdcall Delete(int lStart, int lSamples) = 0 ;
  72. virtual HRESULT __stdcall ReadData(unsigned fcc, void * lp, int &lpcb) = 0 ;
  73. virtual HRESULT __stdcall WriteData(unsigned fcc, void * lp, int cb) = 0 ;
  74. virtual HRESULT __stdcall SetInfo(TAVIStreamInfoW &lpInfo, int cbInfo) = 0 ;
  75. };
  76. struct TAVIFileInfoW;
  77. typedef TAVIFileInfoW *PAVIFileInfoW;
  78. #pragma pack(push, 1)
  79. struct TAVIFileInfoW
  80. {
  81. unsigned dwMaxBytesPerSec;
  82. unsigned dwFlags;
  83. unsigned dwCaps;
  84. unsigned dwStreams;
  85. unsigned dwSuggestedBufferSize;
  86. unsigned dwWidth;
  87. unsigned dwHeight;
  88. unsigned dwScale;
  89. unsigned dwRate;
  90. unsigned dwLength;
  91. unsigned dwEditCount;
  92. wchar_t szFileType[64];
  93. } ;
  94. #pragma pack(pop)
  95. struct TAVIFileInfoA;
  96. typedef TAVIFileInfoA *PAVIFileInfoA;
  97. #pragma pack(push, 1)
  98. struct TAVIFileInfoA
  99. {
  100. unsigned dwMaxBytesPerSec;
  101. unsigned dwFlags;
  102. unsigned dwCaps;
  103. unsigned dwStreams;
  104. unsigned dwSuggestedBufferSize;
  105. unsigned dwWidth;
  106. unsigned dwHeight;
  107. unsigned dwScale;
  108. unsigned dwRate;
  109. unsigned dwLength;
  110. unsigned dwEditCount;
  111. char szFileType[64];
  112. } ;
  113. #pragma pack(pop)
  114. __interface IAVIFile;
  115. typedef System::DelphiInterface<IAVIFile> _di_IAVIFile;
  116. __interface IAVIFile : public IInterface
  117. {
  118. public:
  119. virtual HRESULT __stdcall Info(TAVIFileInfoW &pfi, int iSize) = 0 ;
  120. virtual HRESULT __stdcall GetStream(_di_IAVIStream &ppStream, unsigned fccType, int lParam) = 0 ;
  121. virtual HRESULT __stdcall CreateStream(_di_IAVIStream &ppStream, TAVIStreamInfoW &psi) = 0 ;
  122. virtual HRESULT __stdcall WriteData(unsigned ckid, void * lpData, int cbData) = 0 ;
  123. virtual HRESULT __stdcall ReadData(unsigned ckid, void * lpData, PLONG lpcbData) = 0 ;
  124. virtual HRESULT __stdcall EndRecord(void) = 0 ;
  125. virtual HRESULT __stdcall DeleteStream(unsigned fccType, int lParam) = 0 ;
  126. };
  127. }