Enter conference part1

This commit is contained in:
Julien Wadel 2022-03-31 17:38:09 +02:00
parent dc997150ce
commit 6c88ec6ab4
7 changed files with 20 additions and 19 deletions

View file

@ -1566,7 +1566,7 @@ Buraya tıklayın: <a href="%1">%1</a>
<message>
<source>missingConferenceURI</source>
<extracomment>&apos;You need to set the conference URI in your account settings to create a conference based chat room.&apos; : Tooltip to warn the user that a setting is missong in its configuration.</extracomment>
<translation type="unfinished"></translation>
<translation type="unfinished">Toplantı tabanlı konuşma odası oluşturmak için hesap ayarlarınızda toplantı URI&apos;si belirlemelisiniz.</translation>
</message>
<message>
<source>newConferenceTitle</source>
@ -1607,7 +1607,7 @@ Buraya tıklayın: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<message>
<source>adminStatus</source>
<extracomment>&apos;Admin&apos; : Admin(istrator)</extracomment>
<translation type="unfinished"></translation>
<translation type="unfinished">Yönetici</translation>
<extra-one>word for admin status</extra-one>
</message>
<message>

View file

@ -88,9 +88,9 @@ void ConferenceModel::onParticipantDeviceJoined(const std::shared_ptr<linphone::
qWarning() << "Me devices : " << conference->getMe()->getDevices().size();
emit participantDeviceJoined(participantDevice);
}
void ConferenceModel::onParticipantDeviceMediaChanged(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice){
qWarning() << "ConferenceModel::onParticipantDeviceMediaChanged: " << (int)participantDevice->getStreamAvailability(linphone::StreamType::Video) << ". Me devices : " << conference->getMe()->getDevices().size();
emit participantDeviceMediaChanged(participantDevice);
void ConferenceModel::onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice){
qWarning() << "ConferenceModel::onParticipantDeviceMediaAvailabilityChanged: " << (int)participantDevice->getStreamAvailability(linphone::StreamType::Video) << ". Me devices : " << conference->getMe()->getDevices().size();
emit participantDeviceMediaAvailabilityChanged(participantDevice);
}
void ConferenceModel::onStateChanged(const std::shared_ptr<linphone::Conference> & conference, linphone::Conference::State newState){
emit conferenceStateChanged(newState);

View file

@ -45,7 +45,7 @@ public:
virtual void onParticipantAdminStatusChanged(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::Participant> & participant) override;
virtual void onParticipantDeviceLeft(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::ParticipantDevice> & device) override;
virtual void onParticipantDeviceJoined(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::ParticipantDevice> & device) override;
virtual void onParticipantDeviceMediaChanged(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::ParticipantDevice> & device) override;
virtual void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::ParticipantDevice> & device) override;
virtual void onStateChanged(const std::shared_ptr<linphone::Conference> & conference, linphone::Conference::State newState) override;
virtual void onSubjectChanged(const std::shared_ptr<linphone::Conference> & conference, const std::string & subject) override;
virtual void onAudioDeviceChanged(const std::shared_ptr<linphone::Conference> & conference, const std::shared_ptr<const linphone::AudioDevice> & audioDevice) override;
@ -56,7 +56,7 @@ signals:
void participantDeviceRemoved(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void participantDeviceLeft(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void participantDeviceJoined(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void participantDeviceMediaChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void participantDeviceMediaAvailabilityChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void conferenceStateChanged(linphone::Conference::State newState);
private:

View file

@ -208,7 +208,7 @@ void ConferenceInfoModel::createConference(const int& securityLevel, const int&
mConferenceSchedulerModel->getConferenceScheduler()->setInfo(mConferenceInfo);
}else{
auto conferenceParameters = core->createConferenceParams();
auto conferenceParameters = core->createConferenceParams(nullptr);
conferenceParameters->enableAudio(true);
conferenceParameters->enableVideo(true);
conferenceParameters->setDescription(mConferenceInfo->getDescription());

View file

@ -35,7 +35,7 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (std::shared_ptr<linphone
for(auto device : devices){
auto deviceModel = std::make_shared<ParticipantDeviceModel>(device, false);
connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaAvailabilityChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
mList << deviceModel;
}
}
@ -56,7 +56,7 @@ ParticipantDeviceListModel::ParticipantDeviceListModel (CallModel * callModel, Q
*/
connect(conferenceModel.get(), &ConferenceModel::participantDeviceAdded, this, &ParticipantDeviceListModel::onParticipantDeviceAdded);
connect(conferenceModel.get(), &ConferenceModel::participantDeviceRemoved, this, &ParticipantDeviceListModel::onParticipantDeviceRemoved);
connect(conferenceModel.get(), &ConferenceModel::participantDeviceMediaChanged, this, &ParticipantDeviceListModel::onParticipantDeviceMediaChanged);
connect(conferenceModel.get(), &ConferenceModel::participantDeviceMediaAvailabilityChanged, this, &ParticipantDeviceListModel::onParticipantDeviceMediaAvailabilityChanged);
connect(conferenceModel.get(), &ConferenceModel::conferenceStateChanged, this, &ParticipantDeviceListModel::onConferenceStateChanged);
}
}
@ -74,11 +74,12 @@ int ParticipantDeviceListModel::count(){
void ParticipantDeviceListModel::updateDevices(std::shared_ptr<linphone::Participant> participant){
std::list<std::shared_ptr<linphone::ParticipantDevice>> devices = participant->getDevices() ;
beginResetModel();
qWarning() << "Update devices from participant";
mList.clear();
for(auto device : devices){
auto deviceModel = std::make_shared<ParticipantDeviceModel>(device, false);
connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaAvailabilityChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
mList << deviceModel;
}
endResetModel();
@ -101,11 +102,12 @@ void ParticipantDeviceListModel::updateDevices(const std::list<std::shared_ptr<l
if(exist == mList.end()){
auto deviceModel = std::make_shared<ParticipantDeviceModel>(device, isMe);
connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaAvailabilityChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
devicesToAdd << deviceModel;
}
//}
}
qWarning() << "Update devices from devices : " << devicesToAdd.size();
if(devicesToAdd.size() > 0){
int row = mList.count();
beginInsertRows(QModelIndex(), row, row+devicesToAdd.size()-1);
@ -161,7 +163,6 @@ void ParticipantDeviceListModel::onSecurityLevelChanged(std::shared_ptr<const li
//----------------------------------------------------------------------------------------------------------
void ParticipantDeviceListModel::onParticipantDeviceAdded(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice){
qWarning() << "Adding participant";
auto conferenceModel = mCallModel->getConferenceModel();
std::list<std::shared_ptr<linphone::ParticipantDevice>> devices = conferenceModel->getConference()->getParticipantDeviceList();
for(auto realParticipantDevice : devices){
@ -170,7 +171,7 @@ void ParticipantDeviceListModel::onParticipantDeviceAdded(const std::shared_ptr<
beginInsertRows(QModelIndex(), row, row);
auto deviceModel = std::make_shared<ParticipantDeviceModel>(realParticipantDevice, false);
connect(this, &ParticipantDeviceListModel::securityLevelChanged, deviceModel.get(), &ParticipantDeviceModel::onSecurityLevelChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
connect(this, &ParticipantDeviceListModel::participantDeviceMediaAvailabilityChanged, deviceModel.get(), &ParticipantDeviceModel::videoEnabledChanged);
mList << deviceModel;
endInsertRows();
emit countChanged();
@ -204,8 +205,8 @@ void ParticipantDeviceListModel::onParticipantDeviceLeft(const std::shared_ptr<c
qWarning() << "onParticipantDeviceLeft is not yet implemented. Current participants count: " << mList.size();
}
void ParticipantDeviceListModel::onParticipantDeviceMediaChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice) {
emit participantDeviceMediaChanged();
void ParticipantDeviceListModel::onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice) {
emit participantDeviceMediaAvailabilityChanged();
}
void ParticipantDeviceListModel::onConferenceStateChanged(linphone::Conference::State newState){
if(newState == linphone::Conference::State::Created){

View file

@ -55,13 +55,13 @@ public slots:
void onParticipantDeviceRemoved(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void onParticipantDeviceJoined(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void onParticipantDeviceLeft(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void onParticipantDeviceMediaChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void onParticipantDeviceMediaAvailabilityChanged(const std::shared_ptr<const linphone::ParticipantDevice> & participantDevice);
void onConferenceStateChanged(linphone::Conference::State newState);
signals:
void securityLevelChanged(std::shared_ptr<const linphone::Address> device);
void countChanged();
void participantDeviceMediaChanged();
void participantDeviceMediaAvailabilityChanged();
private:
bool removeRow (int row, const QModelIndex &parent = QModelIndex());

View file

@ -69,7 +69,7 @@ enum EventLogType {
EventLogTypeConferenceParticipantUnsetAdmin = int(linphone::EventLog::Type::ConferenceParticipantUnsetAdmin),
EventLogTypeConferenceParticipantDeviceAdded = int(linphone::EventLog::Type::ConferenceParticipantDeviceAdded),
EventLogTypeConferenceParticipantDeviceRemoved = int(linphone::EventLog::Type::ConferenceParticipantDeviceRemoved),
//EventLogTypeConferenceParticipantDeviceMediaChanged = int(linphone::EventLog::Type::ConferenceParticipantDeviceMediaChanged),
EventLogTypeConferenceParticipantDeviceMediaAvailabilityChanged = int(linphone::EventLog::Type::ConferenceParticipantDeviceMediaAvailabilityChanged),
EventLogTypeConferenceSubjectChanged= int(linphone::EventLog::Type::ConferenceSubjectChanged),
EventLogTypeConferenceAvailableMediaChanged = int(linphone::EventLog::Type::ConferenceAvailableMediaChanged),
EventLogTypeConferenceSecurityEvent = int(linphone::EventLog::Type::ConferenceSecurityEvent),