AGXDynamics  2.35.0.3
VideoCaptureSettingsWidget.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXQT_VIDEOCAPTURESETTINGSWIDGET_H
18 #define AGXQT_VIDEOCAPTURESETTINGSWIDGET_H
19 
20 #include <agx/PushDisableWarnings.h> // Disabling warnings. Include agx/PopDisableWarnings.h below!
21 #include <QWidget>
22 #include <QProcess>
23 #include <osgViewer/ViewerEventHandlers>
24 #include <osgViewer/Renderer>
25 #include <agxQt/ui_VideoCaptureSettingsWidget.h>
26 #include <agx/PopDisableWarnings.h> // End of disabled warnings.
27 
28 #include <agxQt/export.h>
29 #include <agxQt/VideoCapture.h>
30 #include <agx/Referenced.h>
31 
32 #define DEFAULT_VIDEO_FPS 30
33 #define DEFAULT_CAPTURE_FPS 30
34 
35 #define QUALITY_INTERVAL 20
36 #define DEFAULT_QUALITY_TICK 17
37 
38 namespace agxQt
39 {
41  {
42  Q_OBJECT
43 
44  public:
45  explicit VideoCaptureSettingsWidget(QWidget *parent = 0);
46  virtual ~VideoCaptureSettingsWidget();
47 
49  void setData(
51  agx::Real simulationTimestep);
52 
54  std::string getVideoOutputName();
55 
57  agx::Real getVideoFPS() const;
58 
60  agx::Real getRealTimeFactor() const;
61 
63  agx::Real getVideoQuality();
64  void setVideoQuality(agx::Real quality);
65 
66  void updateVideoCapture();
67 
68 signals:
69  void signalGenerateMovie();
70  void signalSynchMediaSettingsWithWrapper();
71 
72  protected:
73  void setOutputPath();
74  void synchLabels();
75 
76  protected slots:
77  // Tab - Video slots
78  void slotFPSEditFinished();
79  void slotEditRealTimeFactor();
80  void slotSetOupoutPathButtonPressed();
81  void slotFinalizePressed();
82  void slotCloseWidget();
83  void slotQualitySliderChanged();
84 
86  // Variables
88  private:
89  agx::Real m_videoFPS;
90  agx::Real m_videoQuality;
91  QString m_videoOutputPath;
92  agx::Real m_realTimeFactor;
93  agx::Real m_timeStep;
94  agxQt::VideoCapture* m_videoCapture;
95  Ui::VideoCaptureSettingsWidget* m_ui;
96  };
97 }
98 
99 #endif // QT_VIDEOSETTINGS_WIDGET
Referenced.h
agx::Real
double Real
Definition: Real.h:42
AGXQT_EXPORT
#define AGXQT_EXPORT
agxQt
Contains classes/utility functions for connecting AGX to QT with OSG.
Definition: AnalysisBoundWidget.h:33
VideoCapture.h
export.h
PushDisableWarnings.h
agxQt::VideoCaptureSettingsWidget
Definition: VideoCaptureSettingsWidget.h:40
agxQt::VideoCapture
Definition: agxQt/VideoCapture.h:41
PopDisableWarnings.h