2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Fix build on macOS and Linux.

This commit is contained in:
John Preston
2021-03-12 17:58:58 +04:00
parent 0e72dc3974
commit d624e2ef65
10 changed files with 11 additions and 8 deletions

View File

@@ -32,6 +32,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <tgcalls/Instance.h>
#include <tgcalls/VideoCaptureInterface.h>
#include <tgcalls/StaticThreads.h>
namespace tgcalls {
class InstanceImpl;

View File

@@ -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) {

View File

@@ -30,6 +30,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "webrtc/webrtc_create_adm.h"
#include <tgcalls/group/GroupInstanceCustomImpl.h>
#include <tgcalls/StaticThreads.h>
#include <QtCore/QJsonDocument>
#include <QtCore/QJsonObject>
@@ -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::GroupLevelValue>();
tgcalls::GroupInstanceDescriptor descriptor = {
.threads = tgcalls::StaticThreads::getThreads(),
.config = tgcalls::GroupConfig{
},
.networkStateUpdated = [=](tgcalls::GroupNetworkState networkState) {

View File

@@ -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 <tgcalls/VideoCaptureInterface.h>
#include <tgcalls/StaticThreads.h>
namespace Calls {
namespace {
@@ -585,6 +587,7 @@ std::shared_ptr<tgcalls::VideoCaptureInterface> Instance::getVideoCapture() {
}
auto result = std::shared_ptr<tgcalls::VideoCaptureInterface>(
tgcalls::VideoCaptureInterface::Create(
tgcalls::StaticThreads::getThreads(),
Core::App().settings().callVideoInputDeviceId().toStdString()));
_videoCapture = result;
return result;

View File

@@ -301,7 +301,7 @@ auto ApiWrap::RequestBuilder<Request>::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);
}

View File

@@ -124,7 +124,6 @@ private:
rpl::variable<CallMuteButtonState> _state;
float _level = 0.;
float64 _crossLineProgress = 0.;
QRect _muteIconRect;
HandleMouseState _handleMouseState = HandleMouseState::Enabled;

View File

@@ -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