46 lines
1.1 KiB
C
46 lines
1.1 KiB
C
|
#pragma once
|
|||
|
#include <boost\thread\win32\mfc_thread_init.hpp>
|
|||
|
#include <boost\thread\thread.hpp>
|
|||
|
#include <boost\thread\mutex.hpp>
|
|||
|
#include <opencv2\opencv.hpp>
|
|||
|
#include "JpegBuffer.h"
|
|||
|
#include <queue>
|
|||
|
#include "ImageApply.h"
|
|||
|
#include "PublicFunc.h"
|
|||
|
#include "BlockingQueue.h"
|
|||
|
|
|||
|
class ImageMatQueue
|
|||
|
{
|
|||
|
public:
|
|||
|
ImageMatQueue(void);
|
|||
|
virtual ~ImageMatQueue(void);
|
|||
|
void pushMat(JpegBuffer& data);
|
|||
|
cv::Mat popMat();
|
|||
|
bool empty();
|
|||
|
bool valid();
|
|||
|
void clear();
|
|||
|
void setlist(std::vector<std::shared_ptr<CImageApply>> list);
|
|||
|
void setscanflag(bool isscan);
|
|||
|
void setduplexflag(BOOL value);
|
|||
|
void run();
|
|||
|
public:
|
|||
|
int pixType;
|
|||
|
OutHole outHole;
|
|||
|
void setmultioutputR(bool canoutput=false);
|
|||
|
private:
|
|||
|
void proc();
|
|||
|
cv::Mat _popMat();
|
|||
|
boost::locking_queue<cv::Mat> m_images; //!< <20>Ѵ<EFBFBD><D1B4><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
boost::locking_queue<JpegBuffer> m_pImages;
|
|||
|
boost::mutex m_Locker;
|
|||
|
boost::mutex m_mtxJB;
|
|||
|
boost::thread m_threadProc;
|
|||
|
volatile bool bRun;
|
|||
|
volatile int origin_images_remain;
|
|||
|
bool can_multi_outputR;
|
|||
|
volatile bool scanFlag;
|
|||
|
volatile BOOL duplexFlag;
|
|||
|
std::vector<std::shared_ptr<CImageApply>> m_iaList;
|
|||
|
};
|
|||
|
|