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.
86 lines
2.5 KiB
86 lines
2.5 KiB
#ifndef __VIDEO_THUMB_WIDGET_HEADER__
|
|
#define __VIDEO_THUMB_WIDGET_HEADER__
|
|
|
|
#ifndef __linux__
|
|
#include <winsock2.h>
|
|
#include <ws2tcpip.h>
|
|
#endif
|
|
#include <vector>
|
|
#include <opencv2/opencv.hpp>
|
|
#include "../../components/base/basicLIBAV.h"
|
|
#include "../../components/base/basicMediaDestination.h"
|
|
//#include "../../components/base/basicMediaViewer.h"
|
|
#include "../../components/base/basicMutex.h"
|
|
#include "../guiClass.h"
|
|
|
|
class DialogSettingsCamera;
|
|
class VideoSourceChooser;
|
|
class basicCamera;
|
|
|
|
class VideoThumbWidget : public QWidget, public basicMediaDestination {
|
|
//class VideoThumbWidget : public QWidget, public basicMediaViewer{
|
|
private:
|
|
U8 m_bStatus;
|
|
int m_nMouseX;
|
|
int m_nMouseY;
|
|
bool m_bMouseActive;
|
|
bool m_bSelected;
|
|
int m_nMenuActivityCounter;
|
|
bool m_bGrayScale;
|
|
bool m_bEnhanced;
|
|
bool m_bErrorMode;
|
|
CSTR m_pErrorMsg;
|
|
bool m_bDirectDrawing;
|
|
basicCamera *m_pSignalParameter;
|
|
VideoSourceChooser *m_pParent;
|
|
DialogSettingsCamera *m_pSettingsDialog;
|
|
FrameAspectRatio m_eWidgetAspectRatio;
|
|
FrameAspectRatio m_eStreamAspectRatio;
|
|
basicLogCollection *m_pLog;
|
|
IplImage *m_pGraber;
|
|
cv::Mat *m_mFrame;
|
|
cv::Mat *m_mOutput;
|
|
|
|
//basicVideoSource *m_pCapture;
|
|
basicMutex *m_pPropertiesProtectorMutex;
|
|
basicMutex *m_pWidgetProtectorMutex;
|
|
void m_fThreadProc(void);
|
|
|
|
protected:
|
|
QPixmap *m_pPixmap;
|
|
QPixmap *m_pOverlayPixmap;
|
|
public:
|
|
explicit VideoThumbWidget(QWidget *parent = NULL);
|
|
~VideoThumbWidget();
|
|
|
|
virtual void render(QPainter *painter);
|
|
|
|
bool init( void );
|
|
virtual void pushFrame(cv::Mat *Frame, void *src = NULL);
|
|
void setSignalParameter(VideoSourceChooser *P, basicCamera *A){ m_pParent = P; m_pSignalParameter = A; };
|
|
void showSettingsWindow( bool doModal );
|
|
void setSourceType(int Type);
|
|
void setError( bool AAA, CSTR Message = NULL );
|
|
signals:
|
|
void selected(void *P);
|
|
public slots:
|
|
void setGrayScale();
|
|
void setEnhanced();
|
|
void showCameraSettings();
|
|
void removeThisCamera();
|
|
void renderLater();
|
|
void renderNow();
|
|
void ShowContextMenu(const QPoint &pos);
|
|
protected:
|
|
bool event(QEvent *event);
|
|
|
|
//void resizeEvent(QResizeEvent *event);
|
|
void exposeEvent(QExposeEvent *event);
|
|
void paintEvent(QPaintEvent *event);
|
|
//void drawContents(QPainter * p, const QRectF & rect = QRectF());
|
|
private:
|
|
bool m_bUpdateIsPending;
|
|
QTimer *m_pTimer;
|
|
};
|
|
|
|
#endif
|