diff --git a/plugins/channeltx/modatv/atvmod.cpp b/plugins/channeltx/modatv/atvmod.cpp index fd3e358c1..8958575b8 100644 --- a/plugins/channeltx/modatv/atvmod.cpp +++ b/plugins/channeltx/modatv/atvmod.cpp @@ -391,6 +391,8 @@ void ATVMod::pullVideo(Real& sample) report = MsgReportCameraData::create( camera.m_cameraNumber, 0.0f, + camera.m_videoFPSManual, + camera.m_videoFPSManualEnable, camera.m_videoWidth, camera.m_videoHeight, 1); // open splash screen on GUI side @@ -417,6 +419,8 @@ void ATVMod::pullVideo(Real& sample) report = MsgReportCameraData::create( camera.m_cameraNumber, camera.m_videoFPS, + camera.m_videoFPSManual, + camera.m_videoFPSManualEnable, camera.m_videoWidth, camera.m_videoHeight, 2); // close splash screen on GUI side @@ -433,6 +437,8 @@ void ATVMod::pullVideo(Real& sample) report = MsgReportCameraData::create( camera.m_cameraNumber, camera.m_videoFPS, + camera.m_videoFPSManual, + camera.m_videoFPSManualEnable, camera.m_videoWidth, camera.m_videoHeight, 0); @@ -615,6 +621,8 @@ bool ATVMod::handleMessage(const Message& cmd) report = MsgReportCameraData::create( m_cameras[m_cameraIndex].m_cameraNumber, m_cameras[m_cameraIndex].m_videoFPS, + m_cameras[m_cameraIndex].m_videoFPSManual, + m_cameras[m_cameraIndex].m_videoFPSManualEnable, m_cameras[m_cameraIndex].m_videoWidth, m_cameras[m_cameraIndex].m_videoHeight, 0); @@ -1020,6 +1028,8 @@ void ATVMod::getCameraNumbers(std::vector& numbers) report = MsgReportCameraData::create( m_cameras[0].m_cameraNumber, m_cameras[0].m_videoFPS, + m_cameras[0].m_videoFPSManual, + m_cameras[0].m_videoFPSManualEnable, m_cameras[0].m_videoWidth, m_cameras[0].m_videoHeight, 0); diff --git a/plugins/channeltx/modatv/atvmod.h b/plugins/channeltx/modatv/atvmod.h index 4edc477da..9d9fc9943 100644 --- a/plugins/channeltx/modatv/atvmod.h +++ b/plugins/channeltx/modatv/atvmod.h @@ -222,6 +222,8 @@ public: public: int getdeviceNumber() const { return m_deviceNumber; } float getFPS() const { return m_fps; } + float getFPSManual() const { return m_fpsManual; } + bool getFPSManualEnable() const { return m_fpsManualEnable; } int getWidth() const { return m_width; } int getHeight() const { return m_height; } int getStatus() const { return m_status; } @@ -229,6 +231,8 @@ public: static MsgReportCameraData* create( int deviceNumber, float fps, + float fpsManual, + bool fpsManualEnable, int width, int height, int status) @@ -236,6 +240,8 @@ public: return new MsgReportCameraData( deviceNumber, fps, + fpsManual, + fpsManualEnable, width, height, status); @@ -244,6 +250,8 @@ public: protected: int m_deviceNumber; float m_fps; + float m_fpsManual; + bool m_fpsManualEnable; int m_width; int m_height; int m_status; @@ -251,12 +259,16 @@ public: MsgReportCameraData( int deviceNumber, float fps, + float fpsManual, + bool fpsManualEnable, int width, int height, int status) : Message(), m_deviceNumber(deviceNumber), m_fps(fps), + m_fpsManual(fpsManual), + m_fpsManualEnable(fpsManualEnable), m_width(width), m_height(height), m_status(status) @@ -496,22 +508,28 @@ private: cv::Mat m_videoFrame; //!< displayable camera frame int m_cameraNumber; //!< camera device number float m_videoFPS; //!< camera FPS rate + float m_videoFPSManual; //!< camera FPS rate manually set + bool m_videoFPSManualEnable; //!< Enable camera FPS rate manual set value int m_videoWidth; //!< camera frame width int m_videoHeight; //!< camera frame height float m_videoFx; //!< camera horizontal scaling factor float m_videoFy; //!< camera vertictal scaling factor float m_videoFPSq; //!< camera FPS sacaling factor + float m_videoFPSqManual; //!< camera FPS sacaling factor manually set float m_videoFPSCount; //!< camera FPS fractional counter int m_videoPrevFPSCount; //!< camera FPS previous integer counter ATVCamera() : m_cameraNumber(-1), m_videoFPS(25.0f), + m_videoFPSManual(20.0f), + m_videoFPSManualEnable(false), m_videoWidth(1), m_videoHeight(1), m_videoFx(1.0f), m_videoFy(1.0f), m_videoFPSq(1.0f), + m_videoFPSqManual(1.0f), m_videoFPSCount(0.0f), m_videoPrevFPSCount(0) {} diff --git a/plugins/channeltx/modatv/atvmodgui.ui b/plugins/channeltx/modatv/atvmodgui.ui index 09d1f1c10..211b1c92e 100644 --- a/plugins/channeltx/modatv/atvmodgui.ui +++ b/plugins/channeltx/modatv/atvmodgui.ui @@ -1097,23 +1097,7 @@ camera device number - -- - - - - - - - - 66 - 0 - - - - camera FPS - - - -- + #0 @@ -1129,7 +1113,77 @@ camera image size - -- + 640x320 + + + + + + + + 66 + 0 + + + + Auto camera FPS + + + -1 FPS + + + + + + + Use manual FPS setting + + + M + + + + + + + + 24 + 24 + + + + Manual FPS setting + + + 20 + + + 300 + + + 1 + + + 200 + + + + + + + + 50 + 0 + + + + Manual FPS + + + 20.0 FPS + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter