diff options
-rw-r--r-- | src/gsttools/qgstreamervideoinputdevicecontrol.cpp | 9 | ||||
-rw-r--r-- | src/plugins/alsa/qalsaaudiooutput.cpp | 3 | ||||
-rw-r--r-- | src/plugins/gstreamer/camerabin/camerabinsession.cpp | 5 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp b/src/gsttools/qgstreamervideoinputdevicecontrol.cpp index 2f08575aa..86e6772b7 100644 --- a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp +++ b/src/gsttools/qgstreamervideoinputdevicecontrol.cpp @@ -90,9 +90,8 @@ int QGstreamerVideoInputDeviceControl::selectedDevice() const void QGstreamerVideoInputDeviceControl::setSelectedDevice(int index) { - if (index != m_selectedDevice) { - m_selectedDevice = index; - emit selectedDeviceChanged(index); - emit selectedDeviceChanged(deviceName(index)); - } + // Always update selected device and proxy it to clients + m_selectedDevice = index; + emit selectedDeviceChanged(index); + emit selectedDeviceChanged(deviceName(index)); } diff --git a/src/plugins/alsa/qalsaaudiooutput.cpp b/src/plugins/alsa/qalsaaudiooutput.cpp index cd97ae85b..ddbe04de9 100644 --- a/src/plugins/alsa/qalsaaudiooutput.cpp +++ b/src/plugins/alsa/qalsaaudiooutput.cpp @@ -316,9 +316,6 @@ bool QAlsaAudioOutput::open() return false; } - if (!QAlsaAudioDeviceInfo::availableDevices(QAudio::AudioOutput).contains(m_device)) - return false; - QString dev; #if SND_LIB_VERSION < 0x1000e // 1.0.14 if (m_device != "default") diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp index 4941c6ef6..823cfe408 100644 --- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp @@ -466,6 +466,9 @@ GstElement *CameraBinSession::buildCameraSource() #if CAMERABIN_DEBUG qDebug() << Q_FUNC_INFO; #endif + if (m_inputDevice.isEmpty()) + return nullptr; + if (!m_inputDeviceHasChanged) return m_cameraSrc; @@ -482,7 +485,7 @@ GstElement *CameraBinSession::buildCameraSource() if (!m_cameraSrc) m_cameraSrc = camSrc; - if (m_cameraSrc && !m_inputDevice.isEmpty()) { + if (m_cameraSrc) { #if CAMERABIN_DEBUG qDebug() << "set camera device" << m_inputDevice; #endif |