summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-12-04 14:20:44 (GMT)
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-12-05 11:35:40 (GMT)
commit0e7fb980e37e73748c7bdb0dbf17950c8afafc79 (patch)
tree81297a2fa19e3dcb29c06059d3b01572bff90ac2
parentf089c870c73999b767400fcb8c315e678b38bf2e (diff)
downloadqtmultimedia-0e7fb980e37e73748c7bdb0dbf17950c8afafc79.tar.gz
GStreamer: Always notify CameraBinSession if a device has been selected
CameraBinSession is never notified if a device has been unplugged and replaced by new one with the same index. Since QGstreamerVideoInputDeviceControl is for internal usage and dependent classes already check against the device name, we don't need to check it here. Task-number: QTBUG-64080 Change-Id: I064289335642d5d673f9db1ea206850968002d2e Reviewed-by: Christian Stromme <christian.stromme@qt.io>
-rw-r--r--src/gsttools/qgstreamervideoinputdevicecontrol.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gsttools/qgstreamervideoinputdevicecontrol.cpp b/src/gsttools/qgstreamervideoinputdevicecontrol.cpp
index 2f08575..86e6772 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));
}