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.
 
 
 
 
 
 

53 lines
1.2 KiB

#ifndef __DATA_MEDIA_IMAGE_SEQUENCE_HEADER__
#define __DATA_MEDIA_IMAGE_SEQUENCE_HEADER__
#include <vector>
#include <stdio.h>
#include <opencv2/opencv.hpp>
#include "dataMediaImage.h"
//#include "../../basic/basicTimeStamp.h"
#include "../../globals/globalToolKit.h"
#define IMAGE_SEQ_DEFAULT_LENGTH 30
#define IMAGE_SEQ_SAVE_IMAGE 1
#define IMAGE_SEQ_SAVE_VIDEO 2
#define IMAGE_SEQ_SAVE_STREAM 3
#define IMAGE_SEQ_SAVE_STORAGE "/tmp"
typedef struct imageSequenceNode{
basicMediaImage *frame;
imageSequenceNode *next;
} imageSequenceNode;
class imageSequence{
private:
imageSequenceNode *head;
imageSequenceNode *tail;
int currentCount;
int maxCount;
bool saveMode;
//basicTimeStamp *TS;
int TS;
int saveCount;
CSTR savePath;
int saveMethod;
void saveImage( basicMediaImage *Img );
cv::Size frameSize;
double framePerSecond;
cv::VideoWriter *videoWriter;
public:
imageSequence();
imageSequence( int frameCount );
~imageSequence();
bool pushImage( basicMediaImage *Img );
bool alarm( void );
void setSaveMethod( U8 Method, CSTR Destination );
bool flush( void );
};
#endif