51 lines
1.0 KiB
C++
51 lines
1.0 KiB
C++
#ifndef STREAM_MANAGER_H
|
|
#define STREAM_MANAGER_H
|
|
|
|
#include <QObject>
|
|
#include <QDebug>
|
|
|
|
#include <PvSystem.h>
|
|
#include <PvDevice.h>
|
|
#include <PvStream.h>
|
|
#include <PvPipeline.h>
|
|
#include <PvDeviceGEV.h>
|
|
#include <PvStreamGEV.h>
|
|
#include "StreamReader.hpp"
|
|
|
|
#define BUFFER_COUNT (32)
|
|
|
|
class StreamManager : public QObject
|
|
{
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
StreamManager(QObject *parent);
|
|
virtual ~StreamManager();
|
|
|
|
bool GetReadyState();
|
|
|
|
public slots:
|
|
void SetEmissivity(double emissivity);
|
|
void SetFrameRate(int frame_rate);
|
|
void SendForProcessing(int width, int height, uint8_t *imgPointer);
|
|
|
|
private:
|
|
PvResult FindDevice();
|
|
PvResult ConnectToDevice();
|
|
PvResult OpenStream();
|
|
void ConfigureStream();
|
|
void StartStream();
|
|
void StopStream();
|
|
void CreatePipeline();
|
|
void AcquireImages();
|
|
void Disconnect();
|
|
|
|
PvString ConnectionID;
|
|
PvDevice *Device = NULL;
|
|
PvStream *Stream = NULL;
|
|
PvGenParameterArray *lDeviceParams = NULL;
|
|
PvPipeline *Pipeline = NULL;
|
|
StreamReader *ImageThread;
|
|
};
|
|
|
|
#endif |