Fixed formatting

This commit is contained in:
r0hit05 2022-06-30 16:03:44 +05:30
parent a31cb9cc82
commit 4c8ce911bd
5 changed files with 16 additions and 10 deletions

View file

@ -580,8 +580,8 @@ if(USE_BUNDLED_MTXCLIENT)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
MatrixClient MatrixClient
GIT_REPOSITORY https://github.com/r0hit05/mtxclient.git GIT_REPOSITORY https://github.com/Nheko-Reborn/mtxclient.git
GIT_TAG 9743ddde60151c2d0e3fd622d5e3fe469813f5d9 GIT_TAG c2824dae5050882872a6c3f5677f3309a60511be
) )
set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "") set(BUILD_LIB_EXAMPLES OFF CACHE INTERNAL "")
set(BUILD_LIB_TESTS OFF CACHE INTERNAL "") set(BUILD_LIB_TESTS OFF CACHE INTERNAL "")

View file

@ -203,10 +203,10 @@ modules:
buildsystem: cmake-ninja buildsystem: cmake-ninja
name: mtxclient name: mtxclient
sources: sources:
- commit: 9743ddde60151c2d0e3fd622d5e3fe469813f5d9 - commit: c2824dae5050882872a6c3f5677f3309a60511be
#tag: v0.7.0 #tag: v0.7.0
type: git type: git
url: https://github.com/r0hit05/mtxclient.git url: https://github.com/Nheko-Reborn/mtxclient.git
- config-opts: - config-opts:
- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_BUILD_TYPE=Release
- -DLMDBXX_INCLUDE_DIR=.deps/lmdbxx - -DLMDBXX_INCLUDE_DIR=.deps/lmdbxx

View file

@ -44,6 +44,7 @@ using namespace mtx::events;
using namespace mtx::events::voip; using namespace mtx::events::voip;
using webrtc::CallType; using webrtc::CallType;
//! Session Description Object
typedef RTCSessionDescriptionInit SDO; typedef RTCSessionDescriptionInit SDO;
namespace { namespace {
@ -66,7 +67,9 @@ CallManager::CallManager(QObject *parent)
this, this,
[this](const std::string &sdp, const std::vector<CallCandidates::Candidate> &candidates) { [this](const std::string &sdp, const std::vector<CallCandidates::Candidate> &candidates) {
nhlog::ui()->debug("WebRTC: call id: {} - sending offer", callid_); nhlog::ui()->debug("WebRTC: call id: {} - sending offer", callid_);
emit newMessage(roomid_, CallInvite{callid_, partyid_, SDO{sdp, SDO::Type::Offer}, "0", timeoutms_, invitee_}); emit newMessage(
roomid_,
CallInvite{callid_, partyid_, SDO{sdp, SDO::Type::Offer}, "0", timeoutms_, invitee_});
emit newMessage(roomid_, CallCandidates{callid_, partyid_, candidates, "0"}); emit newMessage(roomid_, CallCandidates{callid_, partyid_, candidates, "0"});
std::string callid(callid_); std::string callid(callid_);
QTimer::singleShot(timeoutms_, this, [this, callid]() { QTimer::singleShot(timeoutms_, this, [this, callid]() {
@ -299,7 +302,8 @@ CallManager::handleEvent(const RoomEvent<CallInvite> &callInviteEvent)
if (isOnCall() || roomInfo.member_count != 2) { if (isOnCall() || roomInfo.member_count != 2) {
emit newMessage( emit newMessage(
QString::fromStdString(callInviteEvent.room_id), QString::fromStdString(callInviteEvent.room_id),
CallHangUp{callInviteEvent.content.call_id, partyid_, "0", CallHangUp::Reason::InviteTimeOut}); CallHangUp{
callInviteEvent.content.call_id, partyid_, "0", CallHangUp::Reason::InviteTimeOut});
return; return;
} }

View file

@ -67,7 +67,8 @@ public slots:
void toggleMicMute(); void toggleMicMute();
void toggleLocalPiP() { session_.toggleLocalPiP(); } void toggleLocalPiP() { session_.toggleLocalPiP(); }
void acceptInvite(); void acceptInvite();
void hangUp(mtx::events::voip::CallHangUp::Reason = mtx::events::voip::CallHangUp::Reason::User); void
hangUp(mtx::events::voip::CallHangUp::Reason = mtx::events::voip::CallHangUp::Reason::User);
QStringList windowList(); QStringList windowList();
void previewWindow(unsigned int windowIndex) const; void previewWindow(unsigned int windowIndex) const;
@ -92,8 +93,8 @@ private:
QString callPartyDisplayName_; QString callPartyDisplayName_;
QString callPartyAvatarUrl_; QString callPartyAvatarUrl_;
std::string callid_; std::string callid_;
std::string partyid_ = ""; std::string partyid_ = "";
std::string invitee_ = ""; std::string invitee_ = "";
const uint32_t timeoutms_ = 120000; const uint32_t timeoutms_ = 120000;
webrtc::CallType callType_ = webrtc::CallType::VOICE; webrtc::CallType callType_ = webrtc::CallType::VOICE;
bool haveCallInvite_ = false; bool haveCallInvite_ = false;

View file

@ -1151,7 +1151,8 @@ WebRTCSession::acceptAnswer(const std::string &)
} }
void void
WebRTCSession::acceptICECandidates(const std::vector<mtx::events::voip::CallCandidates::Candidate> &) WebRTCSession::acceptICECandidates(
const std::vector<mtx::events::voip::CallCandidates::Candidate> &)
{} {}
bool bool