summaryrefslogtreecommitdiff
path: root/src/gsttools/qgstreamervideoinputdevicecontrol.cpp
diff options
context:
space:
mode:
authorVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-12-04 15:20:44 +0100
committerVaL Doroshchuk <valentyn.doroshchuk@qt.io>2017-12-05 11:35:40 +0000
commit0e7fb980e37e73748c7bdb0dbf17950c8afafc79 (patch)
tree81297a2fa19e3dcb29c06059d3b01572bff90ac2 /src/gsttools/qgstreamervideoinputdevicecontrol.cpp
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>
Diffstat (limited to 'src/gsttools/qgstreamervideoinputdevicecontrol.cpp')
-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 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));
}