aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJorge Maidana <jorgem.seq@gmail.com>2021-09-17 17:47:15 -0300
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2021-12-02 12:30:49 +0100
commit885804a4c67b33353ec20ed74b8db3130dea47ad (patch)
treef69bea1e1bde8dcd48d627ed6a9a08c0bc715f01
parent6a080dbc1012d56cabb9688dd3ae6a9df6281ae0 (diff)
downloadv4l-utils-885804a4c67b33353ec20ed74b8db3130dea47ad.tar.gz
qv4l2: enable the play action on non-streaming radio rx
The commit 37f42eb35d87 ("qv4l2: reorganize colorspace handling") disabled the play action on non-streaming devices. This patch enables the play action 'm_capStartAct' on non-streaming radio rx (audio-only) devices, assuming that 'isCapture' should exclude radio tx. In addition, it also disables the step-frame action 'm_capStepAct' on radio devices. Signed-off-by: Jorge Maidana <jorgem.seq@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/qv4l2/qv4l2.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/qv4l2/qv4l2.cpp b/utils/qv4l2/qv4l2.cpp
index b57178e4..d9141ad1 100644
--- a/utils/qv4l2/qv4l2.cpp
+++ b/utils/qv4l2/qv4l2.cpp
@@ -456,9 +456,9 @@ void ApplicationWindow::setDevice(const QString &device, bool rawOpen)
else
m_convertData = v4lconvert_create(g_fd());
bool canStream = has_rw() || has_streaming();
- bool isCapture = v4l_type_is_capture(g_type());
- m_capStartAct->setEnabled(canStream);
- m_capStepAct->setEnabled(canStream && isCapture);
+ bool isCapture = v4l_type_is_capture(g_type()) && !has_radio_tx();
+ m_capStartAct->setEnabled(canStream || isCapture);
+ m_capStepAct->setEnabled(canStream && isCapture && !has_radio_rx());
m_saveRawAct->setEnabled(canStream && has_vid_cap());
m_snapshotAct->setEnabled(canStream && has_vid_cap());
m_capMenu->setEnabled(canStream && isCapture && !has_radio_rx());