mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-23 00:18:37 -05:00
ATV Modulator: camera manual FPS setting: UI and reporting
This commit is contained in:
parent
d292e2a040
commit
b82cb1791d
@ -391,6 +391,8 @@ void ATVMod::pullVideo(Real& sample)
|
|||||||
report = MsgReportCameraData::create(
|
report = MsgReportCameraData::create(
|
||||||
camera.m_cameraNumber,
|
camera.m_cameraNumber,
|
||||||
0.0f,
|
0.0f,
|
||||||
|
camera.m_videoFPSManual,
|
||||||
|
camera.m_videoFPSManualEnable,
|
||||||
camera.m_videoWidth,
|
camera.m_videoWidth,
|
||||||
camera.m_videoHeight,
|
camera.m_videoHeight,
|
||||||
1); // open splash screen on GUI side
|
1); // open splash screen on GUI side
|
||||||
@ -417,6 +419,8 @@ void ATVMod::pullVideo(Real& sample)
|
|||||||
report = MsgReportCameraData::create(
|
report = MsgReportCameraData::create(
|
||||||
camera.m_cameraNumber,
|
camera.m_cameraNumber,
|
||||||
camera.m_videoFPS,
|
camera.m_videoFPS,
|
||||||
|
camera.m_videoFPSManual,
|
||||||
|
camera.m_videoFPSManualEnable,
|
||||||
camera.m_videoWidth,
|
camera.m_videoWidth,
|
||||||
camera.m_videoHeight,
|
camera.m_videoHeight,
|
||||||
2); // close splash screen on GUI side
|
2); // close splash screen on GUI side
|
||||||
@ -433,6 +437,8 @@ void ATVMod::pullVideo(Real& sample)
|
|||||||
report = MsgReportCameraData::create(
|
report = MsgReportCameraData::create(
|
||||||
camera.m_cameraNumber,
|
camera.m_cameraNumber,
|
||||||
camera.m_videoFPS,
|
camera.m_videoFPS,
|
||||||
|
camera.m_videoFPSManual,
|
||||||
|
camera.m_videoFPSManualEnable,
|
||||||
camera.m_videoWidth,
|
camera.m_videoWidth,
|
||||||
camera.m_videoHeight,
|
camera.m_videoHeight,
|
||||||
0);
|
0);
|
||||||
@ -615,6 +621,8 @@ bool ATVMod::handleMessage(const Message& cmd)
|
|||||||
report = MsgReportCameraData::create(
|
report = MsgReportCameraData::create(
|
||||||
m_cameras[m_cameraIndex].m_cameraNumber,
|
m_cameras[m_cameraIndex].m_cameraNumber,
|
||||||
m_cameras[m_cameraIndex].m_videoFPS,
|
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_videoWidth,
|
||||||
m_cameras[m_cameraIndex].m_videoHeight,
|
m_cameras[m_cameraIndex].m_videoHeight,
|
||||||
0);
|
0);
|
||||||
@ -1020,6 +1028,8 @@ void ATVMod::getCameraNumbers(std::vector<int>& numbers)
|
|||||||
report = MsgReportCameraData::create(
|
report = MsgReportCameraData::create(
|
||||||
m_cameras[0].m_cameraNumber,
|
m_cameras[0].m_cameraNumber,
|
||||||
m_cameras[0].m_videoFPS,
|
m_cameras[0].m_videoFPS,
|
||||||
|
m_cameras[0].m_videoFPSManual,
|
||||||
|
m_cameras[0].m_videoFPSManualEnable,
|
||||||
m_cameras[0].m_videoWidth,
|
m_cameras[0].m_videoWidth,
|
||||||
m_cameras[0].m_videoHeight,
|
m_cameras[0].m_videoHeight,
|
||||||
0);
|
0);
|
||||||
|
@ -222,6 +222,8 @@ public:
|
|||||||
public:
|
public:
|
||||||
int getdeviceNumber() const { return m_deviceNumber; }
|
int getdeviceNumber() const { return m_deviceNumber; }
|
||||||
float getFPS() const { return m_fps; }
|
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 getWidth() const { return m_width; }
|
||||||
int getHeight() const { return m_height; }
|
int getHeight() const { return m_height; }
|
||||||
int getStatus() const { return m_status; }
|
int getStatus() const { return m_status; }
|
||||||
@ -229,6 +231,8 @@ public:
|
|||||||
static MsgReportCameraData* create(
|
static MsgReportCameraData* create(
|
||||||
int deviceNumber,
|
int deviceNumber,
|
||||||
float fps,
|
float fps,
|
||||||
|
float fpsManual,
|
||||||
|
bool fpsManualEnable,
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int status)
|
int status)
|
||||||
@ -236,6 +240,8 @@ public:
|
|||||||
return new MsgReportCameraData(
|
return new MsgReportCameraData(
|
||||||
deviceNumber,
|
deviceNumber,
|
||||||
fps,
|
fps,
|
||||||
|
fpsManual,
|
||||||
|
fpsManualEnable,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
status);
|
status);
|
||||||
@ -244,6 +250,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
int m_deviceNumber;
|
int m_deviceNumber;
|
||||||
float m_fps;
|
float m_fps;
|
||||||
|
float m_fpsManual;
|
||||||
|
bool m_fpsManualEnable;
|
||||||
int m_width;
|
int m_width;
|
||||||
int m_height;
|
int m_height;
|
||||||
int m_status;
|
int m_status;
|
||||||
@ -251,12 +259,16 @@ public:
|
|||||||
MsgReportCameraData(
|
MsgReportCameraData(
|
||||||
int deviceNumber,
|
int deviceNumber,
|
||||||
float fps,
|
float fps,
|
||||||
|
float fpsManual,
|
||||||
|
bool fpsManualEnable,
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
int status) :
|
int status) :
|
||||||
Message(),
|
Message(),
|
||||||
m_deviceNumber(deviceNumber),
|
m_deviceNumber(deviceNumber),
|
||||||
m_fps(fps),
|
m_fps(fps),
|
||||||
|
m_fpsManual(fpsManual),
|
||||||
|
m_fpsManualEnable(fpsManualEnable),
|
||||||
m_width(width),
|
m_width(width),
|
||||||
m_height(height),
|
m_height(height),
|
||||||
m_status(status)
|
m_status(status)
|
||||||
@ -496,22 +508,28 @@ private:
|
|||||||
cv::Mat m_videoFrame; //!< displayable camera frame
|
cv::Mat m_videoFrame; //!< displayable camera frame
|
||||||
int m_cameraNumber; //!< camera device number
|
int m_cameraNumber; //!< camera device number
|
||||||
float m_videoFPS; //!< camera FPS rate
|
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_videoWidth; //!< camera frame width
|
||||||
int m_videoHeight; //!< camera frame height
|
int m_videoHeight; //!< camera frame height
|
||||||
float m_videoFx; //!< camera horizontal scaling factor
|
float m_videoFx; //!< camera horizontal scaling factor
|
||||||
float m_videoFy; //!< camera vertictal scaling factor
|
float m_videoFy; //!< camera vertictal scaling factor
|
||||||
float m_videoFPSq; //!< camera FPS sacaling factor
|
float m_videoFPSq; //!< camera FPS sacaling factor
|
||||||
|
float m_videoFPSqManual; //!< camera FPS sacaling factor manually set
|
||||||
float m_videoFPSCount; //!< camera FPS fractional counter
|
float m_videoFPSCount; //!< camera FPS fractional counter
|
||||||
int m_videoPrevFPSCount; //!< camera FPS previous integer counter
|
int m_videoPrevFPSCount; //!< camera FPS previous integer counter
|
||||||
|
|
||||||
ATVCamera() :
|
ATVCamera() :
|
||||||
m_cameraNumber(-1),
|
m_cameraNumber(-1),
|
||||||
m_videoFPS(25.0f),
|
m_videoFPS(25.0f),
|
||||||
|
m_videoFPSManual(20.0f),
|
||||||
|
m_videoFPSManualEnable(false),
|
||||||
m_videoWidth(1),
|
m_videoWidth(1),
|
||||||
m_videoHeight(1),
|
m_videoHeight(1),
|
||||||
m_videoFx(1.0f),
|
m_videoFx(1.0f),
|
||||||
m_videoFy(1.0f),
|
m_videoFy(1.0f),
|
||||||
m_videoFPSq(1.0f),
|
m_videoFPSq(1.0f),
|
||||||
|
m_videoFPSqManual(1.0f),
|
||||||
m_videoFPSCount(0.0f),
|
m_videoFPSCount(0.0f),
|
||||||
m_videoPrevFPSCount(0)
|
m_videoPrevFPSCount(0)
|
||||||
{}
|
{}
|
||||||
|
@ -1097,23 +1097,7 @@
|
|||||||
<string>camera device number</string>
|
<string>camera device number</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>--</string>
|
<string>#0</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="camerFPS">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>66</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>camera FPS</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>--</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -1129,7 +1113,77 @@
|
|||||||
<string>camera image size</string>
|
<string>camera image size</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>--</string>
|
<string>640x320</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="camerFPS">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>66</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Auto camera FPS</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>-1 FPS</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="ButtonSwitch" name="manualFPSEnable">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Use manual FPS setting</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>M</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDial" name="manualFPS">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>24</width>
|
||||||
|
<height>24</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Manual FPS setting</string>
|
||||||
|
</property>
|
||||||
|
<property name="minimum">
|
||||||
|
<number>20</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>300</number>
|
||||||
|
</property>
|
||||||
|
<property name="pageStep">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>200</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="manualFPSText">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Manual FPS</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>20.0 FPS</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user