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.

84 lines
2.4 KiB

7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __FULL_SCREEN_VIDEO_WIDGET_HEADER__
  2. #define __FULL_SCREEN_VIDEO_WIDGET_HEADER__
  3. #include <vector>
  4. #include "../guiClass.h"
  5. #include <opencv2/opencv.hpp>
  6. #include "../../components/base/basicLIBAV.h"
  7. #include "../../components/base/basicMediaDestination.h"
  8. #include "../../components/base/basicMutex.h"
  9. #include "../../components/base/basicCamera.h"
  10. #include "../../components/base/basicCameraPTZ.h"
  11. #include "../../components/base/basicStatus.h"
  12. class FSVideoWidget : public QWidget, public basicMediaDestination {
  13. private:
  14. U8 m_bStatus;
  15. int m_nMouseX;
  16. int m_nMouseY;
  17. U32 m_nKeyCode;
  18. U32 m_nOldKeyCode;
  19. basicLogCollection * m_pLog;
  20. ControlDirection m_nManualControlMode;
  21. //bool m_bMouseActive;
  22. int m_nMenuActivityCounter;
  23. bool m_bGrayScale;
  24. bool m_bEnhanced;
  25. bool m_bDirectDrawing;
  26. FrameAspectRatio m_eWidgetAspectRatio;
  27. FrameAspectRatio m_eStreamAspectRatio;
  28. IplImage *m_pGraber;
  29. cv::Mat *m_mFrame;
  30. cv::Mat *m_mOutput;
  31. objectCaps m_nCameraCaps;
  32. basicCamera *m_pCamera;
  33. basicMediaDestination *m_pParentViewer;
  34. basicMutex *m_pPropertiesProtectorMutex;
  35. basicMutex *m_pWidgetProtectorMutex;
  36. void m_fThreadProc(void);
  37. protected:
  38. QPixmap *m_pPixmap;
  39. //QPixmap *m_pOverlayPixmap;
  40. QPixmap *m_pManualMode;
  41. QPixmap *m_pPixUp;
  42. QPixmap *m_pPixDown;
  43. QPixmap *m_pPixLeft;
  44. QPixmap *m_pPixRight;
  45. QPixmap *m_pPixWide;
  46. QPixmap *m_pPixTele;
  47. public:
  48. explicit FSVideoWidget(QWidget *parent = NULL);
  49. ~FSVideoWidget();
  50. virtual void render(QPainter *painter);
  51. void setCameraControl(basicCamera *C, objectCaps CC);
  52. bool init( void );
  53. virtual void pushFrame(cv::Mat *Frame, void *src = NULL);
  54. void showSettingsWindow( bool doModal );
  55. void setGrayScale( bool AAA );
  56. void setEnhanced( bool AAA );
  57. void setSoutceType( int Type );
  58. void setBindingSize( basicMediaDestination *P, int x, int y);
  59. //public slots:
  60. void renderLater();
  61. void renderNow();
  62. protected:
  63. bool event(QEvent *event);
  64. //void resizeEvent(QResizeEvent *event);
  65. void exposeEvent(QExposeEvent *event);
  66. void paintEvent(QPaintEvent *event);
  67. //void drawContents(QPainter * p, const QRectF & rect = QRectF());
  68. private:
  69. bool m_bUpdateIsPending;
  70. QTimer *m_pTimer;
  71. };
  72. #endif