-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSpyder3ImageWriter.hpp
45 lines (33 loc) · 1.23 KB
/
Spyder3ImageWriter.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef SPYDER3IMAGEWRITER_HPP
#define SPYDER3IMAGEWRITER_HPP
#include <string>
#include <vector>
#include <boost/thread.hpp>
#include "ISpyder3Listener.hpp"
#include "ISpyder3ImageWriterListener.hpp"
using namespace std;
class Spyder3ImageWriter : public ISpyder3Listener{
private:
string outputFolderPath;
boost::mutex idMutex;
unsigned long folderID;
unsigned long frameID;
string nextImagePath;
unsigned long numImagesPerFolder;
bool setNextFolderPath();
boost::mutex listenerMutex;
vector<ISpyder3ImageWriterListener*> statsListeners;
protected:
string getNextImagePath(const string extension);
void updateStatsListeners(unsigned long cameraID, unsigned long bytesWritten);
public:
Spyder3ImageWriter(string outputFolder, unsigned long numImagesPerFolder);
~Spyder3ImageWriter();
unsigned long getFolderID();
unsigned long getFrameID();
virtual void processFrame(unsigned long cameraID, PvUInt32 lWidth, PvUInt32 lHeight, const PvBuffer *lBuffer);
void changeFolder(string folderPath);
void addStatsListener(ISpyder3ImageWriterListener* l);
void clearStatsListeners();
};
#endif