|
|
#ifndef __TP_I_CAMERA_H
|
|
|
#define __TP_I_CAMERA_H
|
|
|
|
|
|
#include "baseInclude.h"
|
|
|
#include "lpCameraImage.h"
|
|
|
|
|
|
class ICameraPool
|
|
|
{
|
|
|
public:
|
|
|
ICameraPool() {}
|
|
|
virtual ~ICameraPool() {}
|
|
|
public:
|
|
|
// operation for camera.json
|
|
|
virtual QList<QString> ICameraKeys() = 0;
|
|
|
virtual QList<QString> ICameraKeysOrderByIds() = 0;
|
|
|
virtual bool ICameraOption(const QString& strSerial, TP_CAMERA_OPTION& camOpt) = 0;
|
|
|
virtual bool ICameraOptionByKey(const QString& strSerial, TP_CAMERA_OPTION& camOpt) = 0;
|
|
|
virtual bool ISetCameraOption(const QString& strSerial, const TP_CAMERA_OPTION& camOpt) = 0;
|
|
|
|
|
|
// try to get available (connected to the computer) by camera type(manufacturer)
|
|
|
virtual QList<QString> IEnumAvailableCameras(emTpDeviceType camType) = 0;
|
|
|
|
|
|
virtual int ICreateCameraes() = 0;
|
|
|
virtual void IDeleteDameraes() = 0;
|
|
|
virtual bool ICreateCamera(const QString&, int nType) = 0;
|
|
|
virtual bool IOpenCamera(const QString& strSerial, bool bReopen = true) = 0;
|
|
|
virtual bool ICloseCamera(const QString& strSerial) = 0;
|
|
|
virtual bool IStartCamera(const QString& strSerial) = 0;
|
|
|
virtual bool IStopCamera(const QString& strSerial) = 0;
|
|
|
virtual bool IDeleteCamera(const QString& strSerial) = 0;
|
|
|
virtual bool IAddCamera(const QString& strName, const TP_CAMERA_OPTION& camOpt, bool bNew, bool bAutoRun = false) = 0;
|
|
|
|
|
|
virtual int IOpenDevices(bool bReopenAll = true) = 0;
|
|
|
virtual int IOpenDevicesEx(bool bReopenAll = true) = 0; //如果camera.json里面配置了auto_open 值为false,则调用该函数不会打开对应相机
|
|
|
virtual void ICloseDevices() = 0;
|
|
|
virtual bool IRunAlg(const QString& strSerial, bool bRun) = 0;
|
|
|
virtual void IStartDevices() = 0;
|
|
|
virtual void IStopDevices(const QString& sDef = NULL) = 0;
|
|
|
virtual void ISetTriggerMode(emTpDeviceTriggerMode mode, emTpTriggerDirection nDirection = TRIGGER_DIRECT_FOREWARD, long nFrameRate = 0) = 0;
|
|
|
virtual emTpDeviceTriggerMode IGetTriggerMode() = 0;
|
|
|
virtual void IManualTrigger( emTpTriggerDirection nDirection = TRIGGER_DIRECT_FOREWARD) = 0;
|
|
|
virtual void ISnapImage(const QStringList& camKeys) = 0;
|
|
|
virtual void ISendSoftTrigger(const QStringList& camKeys) = 0;
|
|
|
virtual lpCameraImage* IPopCameraImage() = 0;
|
|
|
virtual void IFreeCameraImage(lpCameraImage *pCamImg) = 0;
|
|
|
//@camera: NULL means setting every camera
|
|
|
virtual void ISetCameraProperty(const QString& camera, emTpCameraProperty property, long nValue) = 0;
|
|
|
virtual void ISetCameraProperty(const QString& camera, TP_CAMERA_PROPERTY& property) = 0;
|
|
|
virtual QMap<QString, QString> IGetCamShowNames() = 0;
|
|
|
virtual void ISetCameraEncode(INT64 code, INT64 rate) = 0;
|
|
|
virtual void ISetVirtualImages(const QString& camera, const QStringList& szImages) = 0;
|
|
|
|
|
|
virtual bool ICamsStartPush() = 0;
|
|
|
virtual bool ICamsPausePush() = 0;
|
|
|
};
|
|
|
|
|
|
#endif |