mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 03:18:07 +00:00
Activate screensharing even if camera was disabled.
Fix crash/error on comparaison operators when switching layout. When screensharing is enabled, don't use the current active speaker API that is not synchronized to the screen sharing mode.
This commit is contained in:
parent
9ff2ab705a
commit
619ffc45c9
4 changed files with 25 additions and 17 deletions
|
|
@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
- Avoid mosaic layout when screensharing is enabled.
|
||||
- Video conference stabilization.
|
||||
|
||||
### Changed
|
||||
- Update SDK to 5.4.50
|
||||
|
||||
|
|
|
|||
|
|
@ -114,6 +114,11 @@ void ConferenceModel::toggleScreenSharing() {
|
|||
if(enable) {
|
||||
params->setConferenceVideoLayout(linphone::Conference::Layout::ActiveSpeaker);
|
||||
params->enableVideo(true);
|
||||
auto localParams = mConference->getCall()->getParams();
|
||||
if(localParams->getVideoDirection() == linphone::MediaDirection::SendRecv)
|
||||
params->setVideoDirection(linphone::MediaDirection::SendRecv);
|
||||
else
|
||||
params->setVideoDirection(linphone::MediaDirection::SendOnly);
|
||||
}
|
||||
if(params->isValid())
|
||||
mConference->getCall()->update(params);
|
||||
|
|
|
|||
|
|
@ -71,11 +71,10 @@ void ParticipantDeviceListModel::initConferenceModel(){
|
|||
connect(conferenceModel.get(), &ConferenceModel::participantDeviceMediaAvailabilityChanged, this, &ParticipantDeviceListModel::onParticipantDeviceMediaAvailabilityChanged);
|
||||
connect(conferenceModel.get(), &ConferenceModel::participantDeviceIsSpeakingChanged, this, &ParticipantDeviceListModel::onParticipantDeviceIsSpeakingChanged);
|
||||
connect(conferenceModel.get(), &ConferenceModel::participantDeviceScreenSharingChanged, this, &ParticipantDeviceListModel::onParticipantDeviceScreenSharingChanged);
|
||||
|
||||
// TODO activeSpeaker
|
||||
//auto activeSpeaker = conferenceModel->getConference()->getScreenSharingParticipantDevice();
|
||||
//if(!activeSpeaker)
|
||||
auto activeSpeaker = conferenceModel->getConference()->getActiveSpeakerParticipantDevice();
|
||||
|
||||
auto activeSpeaker = conferenceModel->getConference()->getScreenSharingParticipantDevice();
|
||||
if(!activeSpeaker)
|
||||
activeSpeaker = conferenceModel->getConference()->getActiveSpeakerParticipantDevice();
|
||||
mActiveSpeaker = get(activeSpeaker);
|
||||
mInitialized = true;
|
||||
}
|
||||
|
|
@ -149,13 +148,14 @@ bool ParticipantDeviceListModel::add(std::shared_ptr<linphone::ParticipantDevice
|
|||
qDebug() << "Added a me device";
|
||||
emit meChanged();
|
||||
}else{
|
||||
// Todo ActiveSpeaker
|
||||
//if(deviceToAdd->screenSharingEnabled())
|
||||
// mActiveSpeaker = deviceModel;
|
||||
//else
|
||||
mActiveSpeaker = get(mCallModel->getConferenceSharedModel()->getConference()->getActiveSpeakerParticipantDevice());
|
||||
if(!mActiveSpeaker && (mList.size() == 1 || (mList.size() == 2 && isMe(mList.front().objectCast<ParticipantDeviceModel>()->getDevice()))))
|
||||
mActiveSpeaker = mList.back().objectCast<ParticipantDeviceModel>();
|
||||
|
||||
auto activeSpeaker = mCallModel->getConferenceSharedModel()->getConference()->getScreenSharingParticipantDevice();
|
||||
if(!activeSpeaker)
|
||||
activeSpeaker = mCallModel->getConferenceSharedModel()->getConference()->getActiveSpeakerParticipantDevice();
|
||||
if(activeSpeaker)
|
||||
mActiveSpeaker = get(activeSpeaker);
|
||||
else if(!mActiveSpeaker && (mList.size() == 1 || (mList.size() == 2 && isMe(mList.front().objectCast<ParticipantDeviceModel>()->getDevice()))))
|
||||
mActiveSpeaker = mList.back().objectCast<ParticipantDeviceModel>();
|
||||
emit activeSpeakerChanged();
|
||||
}
|
||||
return true;
|
||||
|
|
@ -331,10 +331,11 @@ void ParticipantDeviceListModel::onParticipantDeviceIsSpeakingChanged(const std:
|
|||
emit participantSpeaking(device.get());
|
||||
}
|
||||
void ParticipantDeviceListModel::onParticipantDeviceScreenSharingChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice){
|
||||
// TODO activeSpeaker
|
||||
//auto activeSpeaker = mCallModel->getConferenceSharedModel()->getConference()->getScreenSharingParticipantDevice();
|
||||
//if(!activeSpeaker)
|
||||
auto activeSpeaker = mCallModel->getConferenceSharedModel()->getConference()->getActiveSpeakerParticipantDevice();
|
||||
// getActiveSpeakerParticipantDevice is not synchronized with screen sharing.
|
||||
// => if screen sharing is activated, use the argument as the active speaker.
|
||||
auto activeSpeaker = participantDevice;
|
||||
if(!activeSpeaker)
|
||||
activeSpeaker = mCallModel->getConferenceSharedModel()->getConference()->getActiveSpeakerParticipantDevice();
|
||||
qDebug() << "onParticipantDeviceScreenSharingChanged " << participantDevice.get() << " == " << get(participantDevice) << " ; "
|
||||
<< activeSpeaker.get() << " == " << get(activeSpeaker) << " : " << (activeSpeaker ? activeSpeaker->getAddress()->asStringUriOnly().c_str() : "")
|
||||
<< ", ScreenShared:" << participantDevice->screenSharingEnabled();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ bool ParticipantDeviceProxyModel::lessThan (const QModelIndex &left, const QMode
|
|||
const ParticipantDeviceModel *deviceA = sourceModel()->data(left).value<ParticipantDeviceModel *>();
|
||||
const ParticipantDeviceModel *deviceB = sourceModel()->data(right).value<ParticipantDeviceModel *>();
|
||||
// 'me' at end (for grid).
|
||||
return deviceB->isLocal() || !deviceA->isLocal() && deviceB->isMe() || left.row() < right.row();
|
||||
return deviceB->isLocal() || !deviceA->isLocal() && deviceB->isMe() || !deviceA->isLocal() && !deviceB->isMe() && left.row() < right.row();
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue