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.
46 lines
1.7 KiB
46 lines
1.7 KiB
#ifndef __VIDEO_NODE_HEADER__
|
|
#define __VIDEO_NODE_HEADER__
|
|
|
|
#include "video/videoAVLIBSource.h"
|
|
#include "video/videoAVLIBDestination.h"
|
|
#include "../../components/base/basicThread.h"
|
|
#include "../../components/base/basicMutex.h"
|
|
#include "../../components/base/basicMediaDestination.h"
|
|
#include "../../components/base/basicSettingsProvider.h"
|
|
#include "../../components/base/basicVideoAnalyzer.h"
|
|
|
|
#define DEFAULT_FRAMES_COUNT 100 // 4 sec for 25 fps
|
|
|
|
class videoNode : public basicMediaDestination, public basicThread {
|
|
private:
|
|
config_setting_t *m_pSettings;
|
|
cv::Mat *m_pCurrentMat;
|
|
bool m_bNewDataArival;
|
|
mediaDestinationsCollection m_vDestinations;
|
|
basicMutex *m_pMatProtector;
|
|
uint32_t m_nRecorderCounter;
|
|
uint32_t m_nRecordedFramesCount;
|
|
char m_sCurrentRecordPath[MAX_PATH_LEN];
|
|
char m_sCurrentRecordName[CTEXT];
|
|
bool m_bRecording;
|
|
protected:
|
|
void m_fThreadProc();
|
|
public:
|
|
explicit videoNode( config_setting_t *Settings = NULL );
|
|
~videoNode();
|
|
void stopConveyour( void);
|
|
virtual int startRecord( uint32_t RecordFrames = DEFAULT_FRAMES_COUNT );
|
|
virtual int stopRecord( void); // Forcingly Stop Record
|
|
CSTR takeSnapshot( void);
|
|
CSTR getCurrentRecordName(void) { return m_sCurrentRecordName; };
|
|
uint32_t getCurrentRecordIndex(void) { return m_nRecordedFramesCount; };
|
|
virtual void pushFrame( cv::Mat *Frame, void *src = NULL );
|
|
bool attachVideoAnalyzer( basicVideoAnalyzer *BVA );
|
|
void connect( basicMediaDestination *V);
|
|
void disconnect( basicMediaDestination *V);
|
|
bool isRecording(void) { return m_bRecording; };
|
|
};
|
|
|
|
typedef vector<videoNode *> videoNodeCollection;
|
|
|
|
#endif
|