mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-08-04 06:45:45 +02:00
calls: follow API changes (add accountId for calls and conferences)
Change-Id: I54f0c6c144bcf6774883f58ec3bc4fac4bc4ef49
This commit is contained in:
parent
a126eb69cb
commit
b4c7661a8e
5 changed files with 37 additions and 37 deletions
|
@ -88,7 +88,8 @@ AvAdapter::shareEntireScreen(int screenNumber)
|
|||
return;
|
||||
QRect rect = screen->geometry();
|
||||
|
||||
auto resource = lrcInstance_->avModel().getDisplay(getScreenNumber(),
|
||||
auto resource = lrcInstance_->getCurrentCallModel()
|
||||
->getDisplay(getScreenNumber(),
|
||||
rect.x(),
|
||||
rect.y(),
|
||||
rect.width() * screen->devicePixelRatio(),
|
||||
|
@ -100,7 +101,8 @@ AvAdapter::shareEntireScreen(int screenNumber)
|
|||
resource,
|
||||
lrc::api::NewCallModel::MediaRequestType::SCREENSHARING,
|
||||
false);
|
||||
set_currentRenderingDeviceType(lrcInstance_->avModel().getCurrentRenderedDevice(callId).type);
|
||||
set_currentRenderingDeviceType(
|
||||
lrcInstance_->getCurrentCallModel()->getCurrentRenderedDevice(callId).type);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -108,7 +110,7 @@ AvAdapter::shareAllScreens()
|
|||
{
|
||||
const auto arrangementRect = getAllScreensBoundingRect();
|
||||
|
||||
auto resource = lrcInstance_->avModel().getDisplay(getScreenNumber(),
|
||||
auto resource = lrcInstance_->getCurrentCallModel()->getDisplay(getScreenNumber(),
|
||||
arrangementRect.x(),
|
||||
arrangementRect.y(),
|
||||
arrangementRect.width(),
|
||||
|
@ -120,7 +122,8 @@ AvAdapter::shareAllScreens()
|
|||
resource,
|
||||
lrc::api::NewCallModel::MediaRequestType::SCREENSHARING,
|
||||
false);
|
||||
set_currentRenderingDeviceType(lrcInstance_->avModel().getCurrentRenderedDevice(callId).type);
|
||||
set_currentRenderingDeviceType(
|
||||
lrcInstance_->getCurrentCallModel()->getCurrentRenderedDevice(callId).type);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -189,7 +192,7 @@ AvAdapter::shareFile(const QString& filePath)
|
|||
lrc::api::NewCallModel::MediaRequestType::FILESHARING,
|
||||
false);
|
||||
set_currentRenderingDeviceType(
|
||||
lrcInstance_->avModel().getCurrentRenderedDevice(callId).type);
|
||||
lrcInstance_->getCurrentCallModel()->getCurrentRenderedDevice(callId).type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -203,7 +206,7 @@ AvAdapter::shareScreenArea(unsigned x, unsigned y, unsigned width, unsigned heig
|
|||
QTimer::singleShot(100, [=]() mutable {
|
||||
x = y = width = height = 0;
|
||||
xrectsel(&x, &y, &width, &height);
|
||||
auto resource = lrcInstance_->avModel().getDisplay(getScreenNumber(),
|
||||
auto resource = lrcInstance_->getCurrentCallModel()->getDisplay(getScreenNumber(),
|
||||
x,
|
||||
y,
|
||||
width < 128 ? 128 : width,
|
||||
|
@ -216,10 +219,10 @@ AvAdapter::shareScreenArea(unsigned x, unsigned y, unsigned width, unsigned heig
|
|||
lrc::api::NewCallModel::MediaRequestType::SCREENSHARING,
|
||||
false);
|
||||
set_currentRenderingDeviceType(
|
||||
lrcInstance_->avModel().getCurrentRenderedDevice(callId).type);
|
||||
lrcInstance_->getCurrentCallModel()->getCurrentRenderedDevice(callId).type);
|
||||
});
|
||||
#else
|
||||
auto resource = lrcInstance_->avModel().getDisplay(getScreenNumber(),
|
||||
auto resource = lrcInstance_->getCurrentCallModel()->getDisplay(getScreenNumber(),
|
||||
x,
|
||||
y,
|
||||
width < 128 ? 128 : width,
|
||||
|
@ -231,7 +234,8 @@ AvAdapter::shareScreenArea(unsigned x, unsigned y, unsigned width, unsigned heig
|
|||
resource,
|
||||
lrc::api::NewCallModel::MediaRequestType::SCREENSHARING,
|
||||
false);
|
||||
set_currentRenderingDeviceType(lrcInstance_->avModel().getCurrentRenderedDevice(callId).type);
|
||||
set_currentRenderingDeviceType(
|
||||
lrcInstance_->getCurrentCallModel()->getCurrentRenderedDevice(callId).type);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -682,7 +682,8 @@ CallAdapter::saveConferenceSubcalls()
|
|||
const auto& currentConvId = lrcInstance_->get_selectedConvUid();
|
||||
const auto& convInfo = lrcInstance_->getConversationFromConvUid(currentConvId);
|
||||
if (!convInfo.confId.isEmpty()) {
|
||||
currentConfSubcalls_ = lrcInstance_->getConferenceSubcalls(convInfo.confId);
|
||||
auto* callModel = lrcInstance_->getAccountInfo(accountId_).callModel.get();
|
||||
currentConfSubcalls_ = callModel->getConferenceSubcalls(convInfo.confId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,12 +69,6 @@ LRCInstance::LRCInstance(migrateCallback willMigrateCb,
|
|||
}
|
||||
};
|
||||
|
||||
VectorString
|
||||
LRCInstance::getConferenceSubcalls(const QString& callId)
|
||||
{
|
||||
return lrc_->getConferenceSubcalls(callId);
|
||||
}
|
||||
|
||||
RenderManager*
|
||||
LRCInstance::renderer()
|
||||
{
|
||||
|
|
|
@ -122,7 +122,6 @@ public:
|
|||
void monitor(bool continous);
|
||||
|
||||
bool hasActiveCall(bool withVideo = false);
|
||||
VectorString getConferenceSubcalls(const QString& callId);
|
||||
|
||||
QString get_selectedConvUid();
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ VideoDevices::setDefaultDevice(int index, bool useSourceModel)
|
|||
lrcInstance_->avModel().setDefaultDevice(deviceId);
|
||||
|
||||
if (!callId.isEmpty())
|
||||
lrcInstance_->avModel().switchInputTo(deviceId, callId);
|
||||
lrcInstance_->getCurrentCallModel()->switchInputTo(deviceId, callId);
|
||||
|
||||
updateData();
|
||||
}
|
||||
|
@ -435,6 +435,7 @@ void
|
|||
VideoDevices::onVideoDeviceEvent()
|
||||
{
|
||||
auto& avModel = lrcInstance_->avModel();
|
||||
auto* callModel = lrcInstance_->getCurrentCallModel();
|
||||
auto defaultDevice = avModel.getDefaultDevice();
|
||||
QString callId = lrcInstance_->getCurrentCallId();
|
||||
|
||||
|
@ -455,11 +456,12 @@ VideoDevices::onVideoDeviceEvent()
|
|||
|
||||
auto cb = [this, currentDeviceListSize, deviceEvent, defaultDevice, callId] {
|
||||
auto& avModel = lrcInstance_->avModel();
|
||||
auto* callModel = lrcInstance_->getCurrentCallModel();
|
||||
if (currentDeviceListSize == 0) {
|
||||
avModel.switchInputTo({}, callId);
|
||||
callModel->switchInputTo({}, callId);
|
||||
avModel.stopPreview(this->getDefaultDevice());
|
||||
} else if (deviceEvent == DeviceEvent::Removed) {
|
||||
avModel.switchInputTo(defaultDevice, callId);
|
||||
callModel->switchInputTo(defaultDevice, callId);
|
||||
}
|
||||
|
||||
updateData();
|
||||
|
@ -475,7 +477,7 @@ VideoDevices::onVideoDeviceEvent()
|
|||
if (callId.isEmpty()) {
|
||||
Q_EMIT deviceAvailable();
|
||||
} else {
|
||||
avModel.switchInputTo(defaultDevice, callId);
|
||||
callModel->switchInputTo(defaultDevice, callId);
|
||||
}
|
||||
|
||||
Q_EMIT deviceListChanged(currentDeviceListSize);
|
||||
|
|
Loading…
Add table
Reference in a new issue