From 24ebb44d9898d18f0cedb717c53a3c1ac615de3b Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Thu, 1 Sep 2022 15:58:14 +0200 Subject: [PATCH] Add debug info for speaking and mute events. Limit video size on mosaic from linphonerc-factory (choice). Fix active speaking name display. --- linphone-app/assets/linphonerc-factory | 5 ++++- .../components/participant/ParticipantDeviceListModel.cpp | 3 ++- .../src/components/participant/ParticipantDeviceListener.cpp | 5 +++-- linphone-app/ui/views/App/Calls/IncallGrid.qml | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/linphone-app/assets/linphonerc-factory b/linphone-app/assets/linphonerc-factory index 75e2a6033..426f8ba6b 100644 --- a/linphone-app/assets/linphonerc-factory +++ b/linphone-app/assets/linphonerc-factory @@ -9,4 +9,7 @@ record_aware=1 [sip] chat_messages_aggregation_delay=1000 -chat_messages_aggregation=1 \ No newline at end of file +chat_messages_aggregation=1 + +[video] +max_mosaic_size=vga \ No newline at end of file diff --git a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp index fa279c423..a44f56f98 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListModel.cpp @@ -289,9 +289,10 @@ void ParticipantDeviceListModel::onParticipantDeviceIsSpeakingChanged(const std: void ParticipantDeviceListModel::onParticipantDeviceSpeaking(){ auto deviceModel = qobject_cast(sender()); - bool changed = (mActiveSpeakers.removeAll(deviceModel) > 0); + bool changed = false; // Me should not be in the list. if( !deviceModel->isMe() && (mActiveSpeakers.size() == 0 || deviceModel->getIsSpeaking())) {// Ensure to have at least one last active speaker + changed = mActiveSpeakers.removeAll(deviceModel) > 0; mActiveSpeakers.push_front(deviceModel); changed = true; } diff --git a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp index 512e8269e..64f99520c 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp @@ -29,16 +29,17 @@ ParticipantDeviceListener::ParticipantDeviceListener(QObject *parent) : QObject( //-------------------------------------------------------------------- void ParticipantDeviceListener::onIsSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking) { + qInfo() << "onIsSpeakingChanged " << participantDevice->getAddress()->asString().c_str() << " " << isSpeaking; emit isSpeakingChanged(participantDevice, isSpeaking); } void ParticipantDeviceListener::onIsMuted(const std::shared_ptr & participantDevice, bool isMutedVar) { - qDebug() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted(); + qInfo() << "onIsMuted " << isMutedVar << " vs " << participantDevice->getIsMuted(); emit isMuted(participantDevice, isMutedVar); } void ParticipantDeviceListener::onStateChanged(const std::shared_ptr & participantDevice, linphone::ParticipantDeviceState state){ - qDebug() << "onStateChanged: " << participantDevice->getAddress()->asString().c_str() << " " << (int)state; + qInfo() << "onStateChanged: " << participantDevice->getAddress()->asString().c_str() << " " << (int)state; emit stateChanged(participantDevice, state); } diff --git a/linphone-app/ui/views/App/Calls/IncallGrid.qml b/linphone-app/ui/views/App/Calls/IncallGrid.qml index 52cfddb38..44b89592e 100644 --- a/linphone-app/ui/views/App/Calls/IncallGrid.qml +++ b/linphone-app/ui/views/App/Calls/IncallGrid.qml @@ -25,8 +25,8 @@ Mosaic { property bool cameraEnabled: true property int participantCount: gridModel.count - // On grid view, we limit the quality if there are enough participants - onParticipantCountChanged: participantCount > ConstantsCpp.maxMosaicParticipants ? SettingsModel.setLimitedMosaicQuality() : SettingsModel.setHighMosaicQuality() + // On grid view, we limit the quality if there are enough participants// The vga mode has been activated from the factory rc + //onParticipantCountChanged: participantCount > ConstantsCpp.maxMosaicParticipants ? SettingsModel.setLimitedMosaicQuality() : SettingsModel.setHighMosaicQuality() function clearAll(layoutMode){ if( layoutMode != 2 && layoutMode != LinphoneEnums.ConferenceLayoutGrid){ clear()