From cf8a47503f8f74a04bf0bb95b95ca189a6c6a19c Mon Sep 17 00:00:00 2001 From: trilene Date: Thu, 7 Jan 2021 09:48:25 -0500 Subject: [PATCH] Fix device discovery under GStreamer 1.16 --- resources/qml/MessageInput.qml | 1 + resources/qml/voip/CallInviteBar.qml | 1 + src/CallManager.h | 1 + src/WebRTCSession.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/resources/qml/MessageInput.qml b/resources/qml/MessageInput.qml index 71c61697..00edb7e5 100644 --- a/resources/qml/MessageInput.qml +++ b/resources/qml/MessageInput.qml @@ -46,6 +46,7 @@ Rectangle { CallManager.hangUp(); } else { + CallManager.refreshDevices(); var dialog = placeCallDialog.createObject(timelineRoot); dialog.open(); } diff --git a/resources/qml/voip/CallInviteBar.qml b/resources/qml/voip/CallInviteBar.qml index 58b89ed3..5021949a 100644 --- a/resources/qml/voip/CallInviteBar.qml +++ b/resources/qml/voip/CallInviteBar.qml @@ -71,6 +71,7 @@ Rectangle { ToolTip.visible: hovered ToolTip.text: qsTr("Devices") onClicked: { + CallManager.refreshDevices(); var dialog = devicesDialog.createObject(timelineRoot); dialog.open(); } diff --git a/src/CallManager.h b/src/CallManager.h index 75768ee1..7d388efd 100644 --- a/src/CallManager.h +++ b/src/CallManager.h @@ -53,6 +53,7 @@ public: public slots: void sendInvite(const QString &roomid, bool isVideo); void syncEvent(const mtx::events::collections::TimelineEvents &event); + void refreshDevices() { session_.refreshDevices(); } void toggleMicMute(); void toggleCameraView() { session_.toggleCameraView(); } void acceptInvite(); diff --git a/src/WebRTCSession.cpp b/src/WebRTCSession.cpp index a431ab54..094a2906 100644 --- a/src/WebRTCSession.cpp +++ b/src/WebRTCSession.cpp @@ -1292,6 +1292,7 @@ WebRTCSession::refreshDevices() addDevice(GST_DEVICE_CAST(l->data)); g_list_free(devices); } + emit devicesChanged(); #endif }