CaptureWriterInterface.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #pragma once
  2. #include <string>
  3. #ifdef _CAPTUREWRITER_CLASSINDLL
  4. #define CAPTUREWRITER_CLASS_DECL _declspec(dllexport)
  5. #else
  6. #define CAPTUREWRITER_CLASS_DECL _declspec(dllimport)
  7. #endif
  8. #ifndef _CAPTUREWRITER_CLASSINDLL
  9. #ifdef X64
  10. #ifdef _DEBUG
  11. #pragma comment(lib, "CaptureWriterX64D.lib")
  12. #else
  13. #pragma comment(lib, "CaptureWriterX64.lib")
  14. #endif
  15. #else
  16. #ifdef _DEBUG
  17. #pragma comment(lib, "CaptureWriterD.lib")
  18. #else
  19. #pragma comment(lib, "CaptureWriter.lib")
  20. #endif
  21. #endif
  22. #endif
  23. namespace DIOS_DataElement
  24. {
  25. class CDataMgr;
  26. }
  27. namespace DIOS_Kernel
  28. {
  29. class CLoopShareMemMgr;
  30. class CAPTUREWRITER_CLASS_DECL CCaptureWriter
  31. {
  32. public:
  33. CCaptureWriter(const wchar_t* wstrName);
  34. virtual ~CCaptureWriter();
  35. const wchar_t* GetName();
  36. bool Init(bool bMemOverlapped);
  37. bool SetPerBlockLen(size_t nPerBlockLen);
  38. bool BeginWriteSequence(const wchar_t* wszNotify);
  39. bool WriteGrayDataForFPD(int nWidth, int nHeight, int nBits, int nFrameId, void* pData, int nDataLen);
  40. bool WriteData(void* pData, int nDataLen);
  41. bool EndWriteSequence(const wchar_t* wszNotify);
  42. private:
  43. CLoopShareMemMgr * m_pShareMemMgr;
  44. std::wstring* m_pwstrName;
  45. DIOS_DataElement::CDataMgr* m_pDataMgr;
  46. bool m_bInit;
  47. };
  48. }