diff --git a/linphone-app/src/components/call/CallListener.cpp b/linphone-app/src/components/call/CallListener.cpp index 067eae0a8..eed4ed095 100644 --- a/linphone-app/src/components/call/CallListener.cpp +++ b/linphone-app/src/components/call/CallListener.cpp @@ -37,4 +37,9 @@ CallListener::CallListener(QObject* parent) : QObject(parent){ void CallListener::onRemoteRecording(const std::shared_ptr & call, bool recording){ qDebug() << "onRemoteRecording: " << recording; emit remoteRecording(call, recording); +} + +void CallListener::onVideoDisplayErrorReceived(const std::shared_ptr & call, const int errorCode) { + qDebug() << "onVideoDisplayErrorReceived: " << errorCode << "[" << call.get() << "]"; + emit videoDisplayErrorReceived(call, errorCode); } \ No newline at end of file diff --git a/linphone-app/src/components/call/CallListener.hpp b/linphone-app/src/components/call/CallListener.hpp index 6711bc419..360292e3d 100644 --- a/linphone-app/src/components/call/CallListener.hpp +++ b/linphone-app/src/components/call/CallListener.hpp @@ -37,9 +37,11 @@ public: virtual ~CallListener(){} virtual void onRemoteRecording(const std::shared_ptr & call, bool recording) override; + virtual void onVideoDisplayErrorReceived(const std::shared_ptr & call, const int errorCode) override; signals: void remoteRecording(const std::shared_ptr & call, bool recording); + void videoDisplayErrorReceived(const std::shared_ptr & call, const int errorCode); }; Q_DECLARE_METATYPE(CallListener*) diff --git a/linphone-app/src/components/call/CallModel.cpp b/linphone-app/src/components/call/CallModel.cpp index debf6b608..b00f84c42 100644 --- a/linphone-app/src/components/call/CallModel.cpp +++ b/linphone-app/src/components/call/CallModel.cpp @@ -1012,6 +1012,10 @@ void CallModel::onParticipantAdminStatusChanged(const std::shared_ptr & call, const int errorCode){ + emit videoDisplayErrorReceived(errorCode); +} + void CallModel::setRemoteDisplayName(const std::string& name){ mRemoteAddress->setDisplayName(name); if(mCall) { diff --git a/linphone-app/src/components/call/CallModel.hpp b/linphone-app/src/components/call/CallModel.hpp index cb6473a8e..22a22c01c 100644 --- a/linphone-app/src/components/call/CallModel.hpp +++ b/linphone-app/src/components/call/CallModel.hpp @@ -208,6 +208,7 @@ public slots: void onRemoteRecording(const std::shared_ptr & call, bool recording); void onChatRoomInitialized(int state); void onParticipantAdminStatusChanged(const std::shared_ptr & participant); + void onVideoDisplayErrorReceived(const std::shared_ptr & call, const int errorCode); signals: void meAdminChanged(); @@ -226,6 +227,7 @@ signals: void statsUpdated (); void statusChanged (CallStatus status); void videoRequested (); + void videoDisplayErrorReceived(int errorCode); void securityUpdated (); void encryptionChanged(); void isPQZrtpChanged(); diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp index 12bafd2b8..7be1d07ba 100644 --- a/linphone-app/src/components/calls/CallsListModel.cpp +++ b/linphone-app/src/components/calls/CallsListModel.cpp @@ -345,11 +345,13 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se ChatRoomInitializer::start(initializer); } timeline = timelineList->getTimeline(chatRoom, true); + qWarning() << (int)chatRoom->getState(); }else{ if(admins.size() > 0){ ChatRoomInitializer::create(chatRoom)->setAdmins(admins); } timeline = timelineList->getTimeline(chatRoom, true); + qWarning() << (int)chatRoom->getState(); } if(timeline){ CoreManager::getInstance()->getTimelineListModel()->mAutoSelectAfterCreation = false; diff --git a/linphone-app/src/components/core/CoreHandlers.cpp b/linphone-app/src/components/core/CoreHandlers.cpp index 7c325fbb0..a7d56f090 100644 --- a/linphone-app/src/components/core/CoreHandlers.cpp +++ b/linphone-app/src/components/core/CoreHandlers.cpp @@ -63,12 +63,12 @@ void CoreHandlers::connectTo(CoreListener * listener){ connect(listener, &CoreListener::messagesReceived, this, &CoreHandlers::onMessagesReceived); connect(listener, &CoreListener::notifyPresenceReceivedForUriOrTel, this, &CoreHandlers::onNotifyPresenceReceivedForUriOrTel); connect(listener, &CoreListener::notifyPresenceReceived, this, &CoreHandlers::onNotifyPresenceReceived); + connect(listener, &CoreListener::previewDisplayErrorReceived, this, &CoreHandlers::onPreviewDisplayErrorReceived); connect(listener, &CoreListener::qrcodeFound, this, &CoreHandlers::onQrcodeFound); connect(listener, &CoreListener::transferStateChanged, this, &CoreHandlers::onTransferStateChanged); connect(listener, &CoreListener::versionUpdateCheckResultReceived, this, &CoreHandlers::onVersionUpdateCheckResultReceived); connect(listener, &CoreListener::ecCalibrationResult, this, &CoreHandlers::onEcCalibrationResult); connect(listener, &CoreListener::conferenceInfoReceived, this, &CoreHandlers::onConferenceInfoReceived); - } @@ -342,6 +342,11 @@ void CoreHandlers::onNotifyPresenceReceived ( emit presenceStatusReceived(linphoneFriend); } +void CoreHandlers::onPreviewDisplayErrorReceived(const std::shared_ptr & core, const int errorCode){ + qDebug() << "[CoreHandlers] onPreviewDisplayErrorReceived: " << errorCode; + emit previewDisplayErrorReceived(core, errorCode); +} + void CoreHandlers::onQrcodeFound(const std::shared_ptr & core, const std::string & result){ emit foundQRCode(result); } diff --git a/linphone-app/src/components/core/CoreHandlers.hpp b/linphone-app/src/components/core/CoreHandlers.hpp index ca131d689..0275ce934 100644 --- a/linphone-app/src/components/core/CoreHandlers.hpp +++ b/linphone-app/src/components/core/CoreHandlers.hpp @@ -53,6 +53,7 @@ signals: void isComposingChanged (const std::shared_ptr &chatRoom); void logsUploadStateChanged (linphone::Core::LogCollectionUploadState state, const std::string &info); void messagesReceived (const std::list> &messages); + void previewDisplayErrorReceived(const std::shared_ptr & core, const int errorCode); void presenceReceived (const QString &sipAddress, const std::shared_ptr &presenceModel); void presenceStatusReceived(std::shared_ptr contact); void registrationStateChanged (const std::shared_ptr &account, linphone::RegistrationState state); @@ -84,6 +85,7 @@ public slots: void onMessagesReceived (const std::shared_ptr &core,const std::shared_ptr &room,const std::list> &messages); void onNotifyPresenceReceivedForUriOrTel (const std::shared_ptr &core,const std::shared_ptr &linphoneFriend,const std::string &uriOrTel,const std::shared_ptr &presenceModel); void onNotifyPresenceReceived (const std::shared_ptr &core,const std::shared_ptr &linphoneFriend); + void onPreviewDisplayErrorReceived(const std::shared_ptr & core, const int errorCode); void onQrcodeFound(const std::shared_ptr & core, const std::string & result); void onTransferStateChanged (const std::shared_ptr &core,const std::shared_ptr &call,linphone::Call::State state); void onVersionUpdateCheckResultReceived (const std::shared_ptr & core,linphone::VersionUpdateCheckResult result,const std::string &version,const std::string &url); diff --git a/linphone-app/src/components/core/CoreListener.cpp b/linphone-app/src/components/core/CoreListener.cpp index 5a7154635..156a54238 100644 --- a/linphone-app/src/components/core/CoreListener.cpp +++ b/linphone-app/src/components/core/CoreListener.cpp @@ -87,6 +87,9 @@ void CoreListener::onNotifyPresenceReceivedForUriOrTel (const std::shared_ptr
  • &core,const std::shared_ptr &linphoneFriend){ emit notifyPresenceReceived (core,linphoneFriend); } +void CoreListener::onPreviewDisplayErrorReceived(const std::shared_ptr & core, const int errorCode){ + emit previewDisplayErrorReceived(core,errorCode); +} void CoreListener::onQrcodeFound(const std::shared_ptr & core, const std::string & result){ emit qrcodeFound(core, result); } diff --git a/linphone-app/src/components/core/CoreListener.hpp b/linphone-app/src/components/core/CoreListener.hpp index 6bc8c6db4..39000775d 100644 --- a/linphone-app/src/components/core/CoreListener.hpp +++ b/linphone-app/src/components/core/CoreListener.hpp @@ -54,12 +54,14 @@ public: virtual void onMessagesReceived (const std::shared_ptr &core,const std::shared_ptr &room,const std::list> &messages) override; virtual void onNotifyPresenceReceivedForUriOrTel (const std::shared_ptr &core,const std::shared_ptr &linphoneFriend,const std::string &uriOrTel,const std::shared_ptr &presenceModel) override; virtual void onNotifyPresenceReceived (const std::shared_ptr &core,const std::shared_ptr &linphoneFriend) override; + virtual void onPreviewDisplayErrorReceived(const std::shared_ptr & core, const int errorCode) override; virtual void onQrcodeFound(const std::shared_ptr & core, const std::string & result) override; virtual void onTransferStateChanged (const std::shared_ptr &core,const std::shared_ptr &call,linphone::Call::State state) override; virtual void onVersionUpdateCheckResultReceived (const std::shared_ptr & core,linphone::VersionUpdateCheckResult result,const std::string &version,const std::string &url) override; virtual void onEcCalibrationResult(const std::shared_ptr & core,linphone::EcCalibratorStatus status,int delayMs) override; virtual void onConferenceInfoReceived(const std::shared_ptr & core, const std::shared_ptr & conferenceInfo) override; + signals: void accountRegistrationStateChanged(const std::shared_ptr & core,const std::shared_ptr & account,linphone::RegistrationState state,const std::string & message); void authenticationRequested (const std::shared_ptr &core,const std::shared_ptr &authInfo,linphone::AuthMethod method); @@ -80,6 +82,7 @@ signals: void messagesReceived (const std::shared_ptr &core,const std::shared_ptr &room,const std::list> &messages); void notifyPresenceReceivedForUriOrTel (const std::shared_ptr &core,const std::shared_ptr &linphoneFriend,const std::string &uriOrTel,const std::shared_ptr &presenceModel); void notifyPresenceReceived (const std::shared_ptr &core,const std::shared_ptr &linphoneFriend); + void previewDisplayErrorReceived(const std::shared_ptr & core, const int errorCode); void qrcodeFound(const std::shared_ptr & core, const std::string & result); void transferStateChanged (const std::shared_ptr &core,const std::shared_ptr &call,linphone::Call::State state); void versionUpdateCheckResultReceived (const std::shared_ptr & core,linphone::VersionUpdateCheckResult result,const std::string &version,const std::string &url); diff --git a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp index 95d700c7a..beb447dce 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListener.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListener.cpp @@ -38,6 +38,11 @@ void ParticipantDeviceListener::onIsMuted(const std::shared_ptr & participantDevice, int errorCode){ + qDebug() << "onVideoDisplayErrorReceived: " << participantDevice.get() << " => " << errorCode << " (" << participantDevice->getName().c_str() << ")"; + emit videoDisplayErrorReceived(participantDevice, errorCode); +} + void ParticipantDeviceListener::onStateChanged(const std::shared_ptr & participantDevice, linphone::ParticipantDevice::State state){ qDebug() << "onStateChanged: " << participantDevice->getAddress()->asString().c_str() << " " << (int)state; emit stateChanged(participantDevice, state); diff --git a/linphone-app/src/components/participant/ParticipantDeviceListener.hpp b/linphone-app/src/components/participant/ParticipantDeviceListener.hpp index 89524a2b1..e42073581 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceListener.hpp +++ b/linphone-app/src/components/participant/ParticipantDeviceListener.hpp @@ -41,12 +41,15 @@ public: virtual void onStateChanged(const std::shared_ptr & participantDevice, linphone::ParticipantDevice::State state) override; virtual void onStreamCapabilityChanged(const std::shared_ptr & participantDevice, linphone::MediaDirection direction, linphone::StreamType streamType) override; virtual void onStreamAvailabilityChanged(const std::shared_ptr & participantDevice, bool available, linphone::StreamType streamType) override; + virtual void onVideoDisplayErrorReceived(const std::shared_ptr & participantDevice, int errorCode) override; + signals: void isSpeakingChanged(const std::shared_ptr & participantDevice, bool isSpeaking); void isMuted(const std::shared_ptr & participantDevice, bool isMuted); void stateChanged(const std::shared_ptr & participantDevice, linphone::ParticipantDevice::State state); void streamCapabilityChanged(const std::shared_ptr & participantDevice, linphone::MediaDirection direction, linphone::StreamType streamType); void streamAvailabilityChanged(const std::shared_ptr & participantDevice, bool available, linphone::StreamType streamType); + void videoDisplayErrorReceived(const std::shared_ptr & participantDevice, int errorCode); }; #endif // PARTICIPANT_MODEL_H_ diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp index 3ac5727f2..f3591de20 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceModel.cpp +++ b/linphone-app/src/components/participant/ParticipantDeviceModel.cpp @@ -32,6 +32,7 @@ void ParticipantDeviceModel::connectTo(ParticipantDeviceListener * listener){ connect(listener, &ParticipantDeviceListener::stateChanged, this, &ParticipantDeviceModel::onStateChanged); connect(listener, &ParticipantDeviceListener::streamCapabilityChanged, this, &ParticipantDeviceModel::onStreamCapabilityChanged); connect(listener, &ParticipantDeviceListener::streamAvailabilityChanged, this, &ParticipantDeviceModel::onStreamAvailabilityChanged); + connect(listener, &ParticipantDeviceListener::videoDisplayErrorReceived, this, &ParticipantDeviceModel::onVideoDisplayErrorReceived); } // ============================================================================= @@ -196,4 +197,7 @@ void ParticipantDeviceModel::onStreamCapabilityChanged(const std::shared_ptr & participantDevice, bool available, linphone::StreamType streamType) { updateVideoEnabled(); +} +void ParticipantDeviceModel::onVideoDisplayErrorReceived(const std::shared_ptr & participantDevice, int errorCode){ + emit videoDisplayErrorReceived(errorCode); } \ No newline at end of file diff --git a/linphone-app/src/components/participant/ParticipantDeviceModel.hpp b/linphone-app/src/components/participant/ParticipantDeviceModel.hpp index ac635bdd9..7dd40adbe 100644 --- a/linphone-app/src/components/participant/ParticipantDeviceModel.hpp +++ b/linphone-app/src/components/participant/ParticipantDeviceModel.hpp @@ -79,6 +79,7 @@ public: virtual void onStateChanged(const std::shared_ptr & participantDevice, linphone::ParticipantDevice::State state); virtual void onStreamCapabilityChanged(const std::shared_ptr & participantDevice, linphone::MediaDirection direction, linphone::StreamType streamType); virtual void onStreamAvailabilityChanged(const std::shared_ptr & participantDevice, bool available, linphone::StreamType streamType); + virtual void onVideoDisplayErrorReceived(const std::shared_ptr & participantDevice, int errorCode); void connectTo(ParticipantDeviceListener * listener); void updateVideoEnabled(); @@ -93,6 +94,7 @@ signals: void isSpeakingChanged(); void isMutedChanged(); void stateChanged(); + void videoDisplayErrorReceived(int errorCode); private: diff --git a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml index 636a1dd73..e781cd1ae 100644 --- a/linphone-app/ui/modules/Linphone/Camera/CameraView.qml +++ b/linphone-app/ui/modules/Linphone/Camera/CameraView.qml @@ -45,7 +45,7 @@ Item{ } Rectangle { id: backgroundArea - color: mainItem.colorModel.color + color: mainItem.color anchors.fill: parent radius: CameraViewStyle.radius Component { @@ -120,7 +120,7 @@ Item{ height: CameraViewStyle.pauseView.button.iconSize width: height radius: width/2 - color: CameraViewStyle.pauseView.button.backgroundNormalColor.colorModel.color + color: CameraViewStyle.pauseView.button.backgroundNormalColor.color Icon{ anchors.centerIn: parent icon: CameraViewStyle.pauseView.button.icon @@ -170,7 +170,7 @@ Item{ height: CameraViewStyle.isMuted.button.iconSize width: height radius: width/2 - color: CameraViewStyle.isMuted.button.backgroundNormalColor.colorModel.color + color: CameraViewStyle.isMuted.button.backgroundNormalColor.color Icon{ anchors.centerIn: parent icon: CameraViewStyle.isMuted.button.icon diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatContent.qml b/linphone-app/ui/modules/Linphone/Chat/ChatContent.qml index 206fb76e6..e16b56c76 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatContent.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatContent.qml @@ -203,7 +203,7 @@ Loader{// Use of Loader because of Repeater (items cannot be loaded dynamically) Component.onCompleted: messagesTextsList.updateBestWidth() delegate: ChatTextMessage { - width: parent && parent.width + width: parent && parent.width || 0 contentModel: $modelData onLastTextSelectedChanged: mainItem.lastTextSelectedChanged(lastTextSelected) color: mainItem.useTextColor