Skip to contentSkip to conversation

qv4l2: enable the play action on non-streaming radio rx

PATCH New Jorge Maidana 1 participant 1 message Sep 17, 2021 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 utils/qv4l2/qv4l2.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
utils/qv4l2/qv4l2.cpp +3 -3
index b57178e4..d9141ad1 100644
@@ -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());
Signature · 1 line
2.30.2