mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-29 01:39:19 +00:00
The feature of connecting multi devices on the same account is not supported by the video conference.
- Part fix previews for this case. Fix download text for outgoing files after the restart of the application. Update SDK to 5.2.88
This commit is contained in:
parent
163f9ba067
commit
3fedc31812
12 changed files with 52 additions and 12 deletions
|
|
@ -36,7 +36,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Display video thumbnails.
|
||||
- Crop thumbnail and pictures if distored.
|
||||
- Enable registration from accounts list.
|
||||
- Update SDK to 5.2.84
|
||||
- Update SDK to 5.2.88
|
||||
|
||||
### Removed
|
||||
- Picture zoom on mouse over.
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ QSharedPointer<ParticipantDeviceModel> ParticipantDeviceListModel::getMe(int * i
|
|||
int row = 0;
|
||||
for(auto item : mList){
|
||||
auto device = item.objectCast<ParticipantDeviceModel>();
|
||||
if( device->isMe()){
|
||||
if( device->isMe() && device->isLocal()){
|
||||
if(index)
|
||||
*index = row;
|
||||
return device;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ ParticipantDeviceModel::ParticipantDeviceModel (CallModel * callModel, std::shar
|
|||
if(mCall)
|
||||
connect(mCall, &CallModel::statusChanged, this, &ParticipantDeviceModel::onCallStatusChanged);
|
||||
mIsVideoEnabled = false;
|
||||
if(mCall && mParticipantDevice)
|
||||
updateIsLocal();
|
||||
updateVideoEnabled();
|
||||
}
|
||||
|
||||
|
|
@ -132,6 +134,13 @@ void ParticipantDeviceModel::setIsSpeaking(bool speaking){
|
|||
}
|
||||
}
|
||||
|
||||
void ParticipantDeviceModel::setIsLocal(bool local){
|
||||
if(mIsLocal != local){
|
||||
mIsLocal = local;
|
||||
emit isLocalChanged();
|
||||
}
|
||||
}
|
||||
|
||||
void ParticipantDeviceModel::setState(LinphoneEnums::ParticipantDeviceState state){
|
||||
auto newState = LinphoneEnums::toLinphone(state);
|
||||
if(mState != newState){
|
||||
|
|
@ -145,9 +154,9 @@ void ParticipantDeviceModel::updateVideoEnabled(){
|
|||
( mParticipantDevice->getStreamCapability(linphone::StreamType::Video) == linphone::MediaDirection::SendRecv
|
||||
|| mParticipantDevice->getStreamCapability(linphone::StreamType::Video) == linphone::MediaDirection::SendOnly
|
||||
)
|
||||
|| isMe()) && !mIsPaused;
|
||||
|| (isMe() && isLocal())) && !mIsPaused;
|
||||
if( mIsVideoEnabled != enabled && mCall && mCall->getCall()->getState() == linphone::Call::State::StreamsRunning) {
|
||||
qDebug() << "VideoEnabled: " << enabled << ", old=" << mIsVideoEnabled << (mParticipantDevice ? mParticipantDevice->getAddress()->asString().c_str() : "") << ", me=" << isMe() << ", CallState=" << (mCall ? (int)mCall->getCall()->getState() : -1);
|
||||
qDebug() << "VideoEnabled: " << enabled << ", old=" << mIsVideoEnabled << (mParticipantDevice ? mParticipantDevice->getAddress()->asString().c_str() : "") << ", me=" << isMe() << ", isLocal=" << isLocal() << ", CallState=" << (mCall ? (int)mCall->getCall()->getState() : -1);
|
||||
mIsVideoEnabled = enabled;
|
||||
emit videoEnabledChanged();
|
||||
}
|
||||
|
|
@ -157,6 +166,17 @@ bool ParticipantDeviceModel::isMe() const{
|
|||
return mIsMe;
|
||||
}
|
||||
|
||||
bool ParticipantDeviceModel::isLocal()const{
|
||||
return mIsLocal;
|
||||
}
|
||||
|
||||
void ParticipantDeviceModel::updateIsLocal(){
|
||||
auto deviceAddress = mParticipantDevice->getAddress();
|
||||
auto callAddress = mCall->getConferenceSharedModel()->getConference()->getMe()->getAddress();
|
||||
auto gruuAddress = CoreManager::getInstance()->getAccountSettingsModel()->findAccount(callAddress)->getContactAddress();
|
||||
setIsLocal(deviceAddress->equal(gruuAddress));
|
||||
}
|
||||
|
||||
void ParticipantDeviceModel::onSecurityLevelChanged(std::shared_ptr<const linphone::Address> device){
|
||||
if(!device || mParticipantDevice && mParticipantDevice->getAddress()->weakEqual(device))
|
||||
emit securityLevelChanged();
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public:
|
|||
Q_PROPERTY(time_t timeOfJoining READ getTimeOfJoining CONSTANT)
|
||||
Q_PROPERTY(bool videoEnabled READ isVideoEnabled NOTIFY videoEnabledChanged)
|
||||
Q_PROPERTY(bool isMe READ isMe CONSTANT)
|
||||
Q_PROPERTY(bool isLocal READ isLocal WRITE setIsLocal NOTIFY isLocalChanged)// Can change on call update. Not really used but it just in case as Object can be initialized with empty call/device.
|
||||
Q_PROPERTY(bool isPaused READ getPaused WRITE setPaused NOTIFY isPausedChanged)
|
||||
Q_PROPERTY(bool isSpeaking READ getIsSpeaking WRITE setIsSpeaking NOTIFY isSpeakingChanged)
|
||||
Q_PROPERTY(bool isMuted READ getIsMuted NOTIFY isMutedChanged)
|
||||
|
|
@ -63,6 +64,7 @@ public:
|
|||
time_t getTimeOfJoining() const;
|
||||
bool isVideoEnabled() const;
|
||||
bool isMe() const;
|
||||
bool isLocal()const;
|
||||
bool getPaused() const;
|
||||
bool getIsSpeaking() const;
|
||||
bool getIsMuted() const;
|
||||
|
|
@ -72,6 +74,7 @@ public:
|
|||
|
||||
void setPaused(bool paused);
|
||||
void setIsSpeaking(bool speaking);
|
||||
void setIsLocal(bool local);
|
||||
void setState(LinphoneEnums::ParticipantDeviceState state);
|
||||
|
||||
virtual void onIsSpeakingChanged(const std::shared_ptr<linphone::ParticipantDevice> & participantDevice, bool isSpeaking);
|
||||
|
|
@ -82,6 +85,7 @@ public:
|
|||
|
||||
void connectTo(ParticipantDeviceListener * listener);
|
||||
void updateVideoEnabled();
|
||||
void updateIsLocal();
|
||||
|
||||
public slots:
|
||||
void onSecurityLevelChanged(std::shared_ptr<const linphone::Address> device);
|
||||
|
|
@ -92,11 +96,13 @@ signals:
|
|||
void isPausedChanged();
|
||||
void isSpeakingChanged();
|
||||
void isMutedChanged();
|
||||
void isLocalChanged();
|
||||
void stateChanged();
|
||||
|
||||
private:
|
||||
|
||||
bool mIsMe = false;
|
||||
bool mIsLocal = false;
|
||||
bool mIsVideoEnabled;
|
||||
bool mIsPaused = false;
|
||||
bool mIsSpeaking = false;
|
||||
|
|
|
|||
|
|
@ -44,14 +44,14 @@ bool ParticipantDeviceProxyModel::filterAcceptsRow (
|
|||
auto listModel = qobject_cast<ParticipantDeviceListModel*>(sourceModel());
|
||||
const QModelIndex index = listModel->index(sourceRow, 0, sourceParent);
|
||||
const ParticipantDeviceModel *device = index.data().value<ParticipantDeviceModel *>();
|
||||
return device && (isShowMe() || !device->isMe());
|
||||
return device && (isShowMe() || !(device->isMe() && device->isLocal()));
|
||||
}
|
||||
|
||||
bool ParticipantDeviceProxyModel::lessThan (const QModelIndex &left, const QModelIndex &right) const {
|
||||
const ParticipantDeviceModel *deviceA = sourceModel()->data(left).value<ParticipantDeviceModel *>();
|
||||
const ParticipantDeviceModel *deviceB = sourceModel()->data(right).value<ParticipantDeviceModel *>();
|
||||
// 'me' at end (for grid).
|
||||
return deviceB->isMe() || left.row() < right.row();
|
||||
return deviceB->isLocal() || !deviceA->isLocal() && deviceB->isMe() || left.row() < right.row();
|
||||
}
|
||||
//---------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -212,5 +212,5 @@ bool ParticipantProxyModel::lessThan (const QModelIndex &left, const QModelIndex
|
|||
const ParticipantModel* a = sourceModel()->data(left).value<ParticipantModel*>();
|
||||
const ParticipantModel* b = sourceModel()->data(right).value<ParticipantModel*>();
|
||||
|
||||
return a->getCreationTime() > b->getCreationTime();
|
||||
return a->getCreationTime() > b->getCreationTime() || b->isMe();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,16 @@ shared_ptr<const linphone::Address> AccountSettingsModel::getUsedSipAddress () c
|
|||
return account ? account->getParams()->getIdentityAddress() : core->createPrimaryContactParsed();
|
||||
}
|
||||
|
||||
std::shared_ptr<linphone::Account> AccountSettingsModel::findAccount(shared_ptr<const linphone::Address> address) const {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
list<shared_ptr<linphone::Account>> accounts = CoreManager::getInstance()->getAccountList();
|
||||
for(auto account : accounts){
|
||||
if(account->getContactAddress()->weakEqual(address))
|
||||
return account;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void AccountSettingsModel::setUsedSipAddress (const shared_ptr<const linphone::Address> &address) {
|
||||
shared_ptr<linphone::Core> core = CoreManager::getInstance()->getCore();
|
||||
shared_ptr<linphone::Account> account = core->getDefaultAccount();
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ public:
|
|||
std::shared_ptr<const linphone::Address> getUsedSipAddress () const;
|
||||
void setUsedSipAddress (const std::shared_ptr<const linphone::Address> &address);
|
||||
|
||||
std::shared_ptr<linphone::Account> findAccount(std::shared_ptr<const linphone::Address> address) const ;
|
||||
|
||||
QString getUsedSipAddressAsStringUriOnly () const;
|
||||
QString getUsedSipAddressAsString () const;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,19 +20,19 @@ Item {
|
|||
property CallModel callModel
|
||||
property SoundPlayer linphonePlayer
|
||||
property string qmlName
|
||||
property bool isPreview: (!callModel && !container.currentDevice) || ( container.currentDevice && container.currentDevice.isMe)
|
||||
property bool isPreview: (!callModel && !container.currentDevice) || ( container.currentDevice && container.currentDevice.isMe && container.currentDevice.isLocal)
|
||||
property bool isFullscreen: false
|
||||
property bool hideCamera: false
|
||||
property bool isPaused: false
|
||||
property bool deactivateCamera: true
|
||||
property bool isVideoEnabled: !deactivateCamera && (!callModel || callModel.videoEnabled)
|
||||
&& (!container.currentDevice || ( callModel && container.currentDevice &&
|
||||
( (!container.currentDevice.isMe && container.currentDevice.videoEnabled)
|
||||
|| (container.currentDevice.isMe && callModel.cameraEnabled))))
|
||||
( (! (container.currentDevice.isMe && container.currentDevice.isLocal) && container.currentDevice.videoEnabled)
|
||||
|| (container.currentDevice.isMe && container.currentDevice.isLocal && callModel.cameraEnabled))))
|
||||
|
||||
property bool a : callModel && callModel.videoEnabled
|
||||
property bool b: container.currentDevice && container.currentDevice.videoEnabled
|
||||
property bool c: container.currentDevice && container.currentDevice.isMe
|
||||
property bool c: container.currentDevice && container.currentDevice.isMe && container.currentDevice.isLocal
|
||||
property bool d : callModel && callModel.cameraEnabled
|
||||
property bool isReady: cameraLoader.item && cameraLoader.item.isReady
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ Item {
|
|||
name: mainRow.contentModel && mainRow.contentModel.name
|
||||
filePath: mainRow.contentModel && mainRow.contentModel.filePath
|
||||
isTransferring: mainRow.chatMessageModel && (mainRow.chatMessageModel.state == LinphoneEnums.ChatMessageStateFileTransferInProgress || mainRow.chatMessageModel.state == LinphoneEnums.ChatMessageStateInProgress )
|
||||
isOutgoing: mainRow.chatMessageModel && mainRow.chatMessageModel.isOutgoing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -34,6 +34,7 @@ Item {
|
|||
|
||||
property bool isTransferring
|
||||
property bool isHovering: thumbnailProvider.state == 'hovered'
|
||||
property bool isOutgoing: false
|
||||
|
||||
signal clickOnFile()
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 7133a75fbcfa79cccfe5e8b4410aa515e4c75f4a
|
||||
Subproject commit 427cc9848f43e5ed88be897341709ebed79bb354
|
||||
Loading…
Add table
Reference in a new issue