summary refs log tree commit diff
path: root/src/voip/CallManager.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2023-02-08 00:54:02 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2023-02-08 00:54:02 +0100
commitfc7937c73d5729066079484c32a9785bddd74bc5 (patch)
tree21699b53f95e0a7d11ef79478cc0f2de98f3b3c3 /src/voip/CallManager.cpp
parentUse more modern flatpak build features (diff)
downloadnheko-fc7937c73d5729066079484c32a9785bddd74bc5.tar.xz
Fix required plugin check on gstreamer 1.22
GStreamer 1.22 merged the videoscale plugin into the videoconvertscale
plugin. So we should check if the Element is still loadable instead of
checking the plugin name.

fixes #1352
Diffstat (limited to 'src/voip/CallManager.cpp')
-rw-r--r--src/voip/CallManager.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/voip/CallManager.cpp b/src/voip/CallManager.cpp

index 3d795fc1..135d0b6a 100644 --- a/src/voip/CallManager.cpp +++ b/src/voip/CallManager.cpp
@@ -193,9 +193,8 @@ CallManager::sendInvite(const QString &roomid, CallType callType, unsigned int w auto roomInfo = cache::singleRoomInfo(roomid.toStdString()); std::string errorMessage; - if (!session_.havePlugins(false, &errorMessage) || - ((callType == CallType::VIDEO || callType == CallType::SCREEN) && - !session_.havePlugins(true, &errorMessage))) { + if (!session_.havePlugins( + callType != CallType::VOICE, callType == CallType::SCREEN, &errorMessage)) { emit ChatPage::instance()->showNotification(QString::fromStdString(errorMessage)); return; } @@ -469,8 +468,8 @@ CallManager::acceptInvite() stopRingtone(); std::string errorMessage; - if (!session_.havePlugins(false, &errorMessage) || - (callType_ == CallType::VIDEO && !session_.havePlugins(true, &errorMessage))) { + if (!session_.havePlugins( + callType_ != CallType::VOICE, callType_ == CallType::SCREEN, &errorMessage)) { emit ChatPage::instance()->showNotification(QString::fromStdString(errorMessage)); hangUp(CallHangUp::Reason::UserMediaFailed); return;