From d624e2ef65cf4ee80d79ec5432617d354fa54092 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Mar 2021 17:58:58 +0400 Subject: [PATCH] Fix build on macOS and Linux. --- Telegram/SourceFiles/calls/calls_call.cpp | 1 + Telegram/SourceFiles/calls/calls_choose_join_as.cpp | 1 - Telegram/SourceFiles/calls/calls_group_call.cpp | 3 ++- Telegram/SourceFiles/calls/calls_instance.cpp | 5 ++++- Telegram/SourceFiles/export/export_api_wrap.cpp | 2 +- Telegram/SourceFiles/ui/controls/call_mute_button.h | 1 - Telegram/ThirdParty/tgcalls | 2 +- Telegram/build/docker/centos_env/run.sh | 2 +- Telegram/lib_lottie | 2 +- Telegram/lib_ui_patch.patch | 0 10 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 Telegram/lib_ui_patch.patch diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index 9c0c1e9241..897b6d68b3 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -32,6 +32,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include +#include namespace tgcalls { class InstanceImpl; diff --git a/Telegram/SourceFiles/calls/calls_choose_join_as.cpp b/Telegram/SourceFiles/calls/calls_choose_join_as.cpp index b3d60c6994..5a6db9d590 100644 --- a/Telegram/SourceFiles/calls/calls_choose_join_as.cpp +++ b/Telegram/SourceFiles/calls/calls_choose_join_as.cpp @@ -209,7 +209,6 @@ void ChooseJoinAsProcess::start( strong->closeBox(); } }; - using Flag = MTPchannels_GetAdminedPublicChannels::Flag; _request->id = session->api().request(MTPphone_GetGroupCallJoinAs( _request->peer->input )).done([=](const MTPphone_JoinAsPeers &result) { diff --git a/Telegram/SourceFiles/calls/calls_group_call.cpp b/Telegram/SourceFiles/calls/calls_group_call.cpp index f3ce8a2d6d..7f4093c39f 100644 --- a/Telegram/SourceFiles/calls/calls_group_call.cpp +++ b/Telegram/SourceFiles/calls/calls_group_call.cpp @@ -30,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "webrtc/webrtc_create_adm.h" #include +#include #include #include @@ -710,7 +711,6 @@ void GroupCall::handleUpdate(const MTPGroupCall &call) { data.vstream_dc_id().value_or_empty()); if (const auto params = data.vparams()) { params->match([&](const MTPDdataJSON &data) { - using ConnectionMode = tgcalls::GroupConnectionMode; auto error = QJsonParseError{ 0, QJsonParseError::NoError }; const auto document = QJsonDocument::fromJson( data.vdata().v, @@ -952,6 +952,7 @@ void GroupCall::ensureControllerCreated() { const auto weak = base::make_weak(this); const auto myLevel = std::make_shared(); tgcalls::GroupInstanceDescriptor descriptor = { + .threads = tgcalls::StaticThreads::getThreads(), .config = tgcalls::GroupConfig{ }, .networkStateUpdated = [=](tgcalls::GroupNetworkState networkState) { diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp index c19d691a6c..2be9e59c44 100644 --- a/Telegram/SourceFiles/calls/calls_instance.cpp +++ b/Telegram/SourceFiles/calls/calls_instance.cpp @@ -31,9 +31,11 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include "mainwidget.h" #include "mtproto/mtproto_config.h" #include "boxes/rate_call_box.h" -#include "tgcalls/VideoCaptureInterface.h" #include "app.h" +#include +#include + namespace Calls { namespace { @@ -585,6 +587,7 @@ std::shared_ptr Instance::getVideoCapture() { } auto result = std::shared_ptr( tgcalls::VideoCaptureInterface::Create( + tgcalls::StaticThreads::getThreads(), Core::App().settings().callVideoInputDeviceId().toStdString())); _videoCapture = result; return result; diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp index cfa1d97e94..6d59b91d9e 100644 --- a/Telegram/SourceFiles/export/export_api_wrap.cpp +++ b/Telegram/SourceFiles/export/export_api_wrap.cpp @@ -301,7 +301,7 @@ auto ApiWrap::RequestBuilder::fail( auto &silence_warning = _builder.fail([ common = base::take(_commonFailHandler), specific = std::move(handler) - ](const MTP::Error &error) mutable { + ](const MTP::Error &error) { if (!specific(error)) { common(error); } diff --git a/Telegram/SourceFiles/ui/controls/call_mute_button.h b/Telegram/SourceFiles/ui/controls/call_mute_button.h index b446ae2d8f..7c80a23b86 100644 --- a/Telegram/SourceFiles/ui/controls/call_mute_button.h +++ b/Telegram/SourceFiles/ui/controls/call_mute_button.h @@ -124,7 +124,6 @@ private: rpl::variable _state; float _level = 0.; - float64 _crossLineProgress = 0.; QRect _muteIconRect; HandleMouseState _handleMouseState = HandleMouseState::Enabled; diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index d19c74b147..001d9c36b0 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit d19c74b1474e4aab01d797373f1d62e4da5f87a5 +Subproject commit 001d9c36b029094b18049198b830acc9969bae3c diff --git a/Telegram/build/docker/centos_env/run.sh b/Telegram/build/docker/centos_env/run.sh index 84e211e506..6a085b3ea9 100755 --- a/Telegram/build/docker/centos_env/run.sh +++ b/Telegram/build/docker/centos_env/run.sh @@ -18,4 +18,4 @@ if [ "$Command" == "" ]; then Command="scl enable devtoolset-8 -- bash" fi -docker run -it --rm --cpus=8 --memory=10g -v $HOME/Telegram/DesktopPrivate:/usr/src/DesktopPrivate -v $HOME/Telegram/tdesktop:/usr/src/tdesktop tdesktop:centos_env $Command +docker run -it --rm --cpus=8 --memory=22g -v $HOME/Telegram/DesktopPrivate:/usr/src/DesktopPrivate -v $HOME/Telegram/tdesktop:/usr/src/tdesktop tdesktop:centos_env $Command diff --git a/Telegram/lib_lottie b/Telegram/lib_lottie index 9739a0d567..d1b9d1dc9f 160000 --- a/Telegram/lib_lottie +++ b/Telegram/lib_lottie @@ -1 +1 @@ -Subproject commit 9739a0d5674df45443197224e1e2da95e3072dd5 +Subproject commit d1b9d1dc9fa3c8f6ef0c93dfb8406f242fdc4950 diff --git a/Telegram/lib_ui_patch.patch b/Telegram/lib_ui_patch.patch deleted file mode 100644 index e69de29bb2..0000000000