mainwindow.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3. #include <QMainWindow>
  4. #include "rtspclientdown.h"
  5. #include "ivh264framedecode.h"
  6. #include "myview.h"
  7. #include <thread>
  8. #include <QMutex>
  9. namespace Ui {
  10. class MainWindow;
  11. }
  12. class MainWindow : public QMainWindow
  13. {
  14. Q_OBJECT
  15. public:
  16. explicit MainWindow(QWidget *parent = 0);
  17. ~MainWindow();
  18. private slots:
  19. void on_actionSet_URL_triggered();
  20. void onCamUpdate();
  21. virtual void paintEvent(QPaintEvent *);
  22. signals:
  23. void CamUpdate();
  24. private:
  25. Ui::MainWindow *ui;
  26. rtspclientdown * mprtspdown;
  27. ivh264framedecode * mph264decode;
  28. std::string mstrrtspurl = "rtsp://111.33.136.149:9554/AAAAAAAAAAAAAAAAA-front-hello";
  29. int mnframewidth = 1920;
  30. int mnframeheight = 1080;
  31. private:
  32. void threadframe();
  33. void threadpic();
  34. bool mbthreadrun = true;
  35. std::thread * mpthreadframe, * mpthreadpic;
  36. MyView * mmyview;
  37. QGraphicsScene * mpsceneImg;
  38. QImage * mpImageCam;
  39. bool mbCamUpdate;
  40. QMutex mMutexCam;
  41. public:
  42. void resizeEvent(QResizeEvent *event);
  43. };
  44. #endif // MAINWINDOW_H