AGX Dynamics  2.35.0.1
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);
47 
49  void setData(
51  agx::Real simulationTimestep);
52 
54  std::string getVideoOutputName();
55 
58 
61 
64  void setVideoQuality(agx::Real quality);
65 
67 
68 signals:
71 
72  protected:
73  void setOutputPath();
74  void synchLabels();
75 
76  protected slots:
77  // Tab - Video slots
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
#define AGXQT_EXPORT
agx::Real getRealTimeFactor() const
Get real time factor.
void setData(agxQt::VideoCapture *vc, agx::Real simulationTimestep)
Set initial data to the inputs in the widget.
VideoCaptureSettingsWidget(QWidget *parent=0)
std::string getVideoOutputName()
Get output name for the video.
agx::Real getVideoQuality()
Returns the quality value from the video [0-1].
agx::Real getVideoFPS() const
Get FPS from input.
void setVideoQuality(agx::Real quality)
Contains classes/utility functions for connecting AGX to QT with OSG.
double Real
Definition: Real.h:42