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.

35 lines
1.2 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __VIDEO_NODE_HEADER__
  2. #define __VIDEO_NODE_HEADER__
  3. #include "video/videoAVLIBSource.h"
  4. #include "video/videoAVLIBDestination.h"
  5. #include "../../components/base/basicThread.h"
  6. #include "../../components/base/basicMutex.h"
  7. #include "../../components/base/basicMediaDestination.h"
  8. #include "../../components/base/basicSettingsProvider.h"
  9. #include "../../components/base/basicVideoAnalyzer.h"
  10. class videoNode : public basicMediaDestination, public basicThread {
  11. private:
  12. config_setting_t *m_pSettings;
  13. cv::Mat *m_pCurrentMat;
  14. bool m_bNewDataArival;
  15. mediaDestinationsCollection m_vDestinations;
  16. basicMutex *m_pMatProtector;
  17. protected:
  18. void m_fThreadProc();
  19. public:
  20. explicit videoNode( config_setting_t *Settings = NULL );
  21. ~videoNode();
  22. void stopConveyour( void );
  23. void startRecord( void);
  24. void stopRecord( void);
  25. void takeSnapshot( CSTR filename );
  26. virtual void pushFrame( cv::Mat *Frame, void *src = NULL );
  27. bool attachVideoAnalyzer( basicVideoAnalyzer *BVA );
  28. void connect( basicMediaDestination *V);
  29. void disconnect( basicMediaDestination *V);
  30. };
  31. typedef vector<videoNode *> videoNodeCollection;
  32. #endif