mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 15:17:07 +02:00
Fix build with GCC.
This commit is contained in:
parent
84cd5b9278
commit
ea30918d35
8 changed files with 1 additions and 74 deletions
Telegram
SourceFiles
boxes
chat_helpers
data/notify
ffmpeg
history
inline_bots
window
ThirdParty
|
@ -50,7 +50,6 @@ class AudioCreator final {
|
|||
public:
|
||||
AudioCreator();
|
||||
AudioCreator(AudioCreator &&other);
|
||||
AudioCreator &operator=(AudioCreator &&other);
|
||||
~AudioCreator();
|
||||
|
||||
private:
|
||||
|
@ -77,12 +76,6 @@ AudioCreator::AudioCreator(AudioCreator &&other)
|
|||
, _attached(base::take(other._attached)) {
|
||||
}
|
||||
|
||||
AudioCreator &AudioCreator::operator=(AudioCreator &&other) {
|
||||
_lifetime = base::take(other._lifetime);
|
||||
_attached = base::take(other._attached);
|
||||
return *this;
|
||||
}
|
||||
|
||||
AudioCreator::~AudioCreator() {
|
||||
if (_attached) {
|
||||
Media::Audio::ScheduleDetachIfNotUsedSafe();
|
||||
|
|
|
@ -2288,7 +2288,6 @@ void StickersListWidget::paintSticker(
|
|||
p.drawPixmapLeft(ppos, width(), frame);
|
||||
} else {
|
||||
const auto image = media->getStickerSmall();
|
||||
const auto ratio = style::DevicePixelRatio();
|
||||
const auto useSavedFrame = !sticker.savedFrame.isNull()
|
||||
&& (sticker.savedFrameFor == _singleSize);
|
||||
const auto pixmap = useSavedFrame
|
||||
|
|
|
@ -106,9 +106,6 @@ bool NotifyPeerSettingsValue::change(
|
|||
std::optional<bool> silentPosts,
|
||||
std::optional<NotifySound> sound) {
|
||||
const auto now = base::unixtime::now();
|
||||
const auto notMuted = muteForSeconds
|
||||
? !(*muteForSeconds)
|
||||
: (!_mute || *_mute <= now);
|
||||
const auto newMute = muteForSeconds
|
||||
? base::make_optional((*muteForSeconds > 0)
|
||||
? (now + *muteForSeconds)
|
||||
|
|
|
@ -181,56 +181,6 @@ enum AVPixelFormat GetFormatImplementation(
|
|||
return AV_PIX_FMT_NONE;
|
||||
}
|
||||
|
||||
template <AVPixelFormat Format>
|
||||
[[nodiscard]] HwAccelDescriptor HwAccelByFormat() {
|
||||
return {
|
||||
.getFormat = GetFormatImplementation<Format>,
|
||||
.format = Format,
|
||||
};
|
||||
}
|
||||
|
||||
[[nodiscard]] HwAccelDescriptor ResolveHwAccel(
|
||||
not_null<const AVCodec*> decoder,
|
||||
AVHWDeviceType type) {
|
||||
Expects(type != AV_HWDEVICE_TYPE_NONE);
|
||||
|
||||
const auto format = [&] {
|
||||
for (auto i = 0;; i++) {
|
||||
const auto config = avcodec_get_hw_config(decoder, i);
|
||||
if (!config) {
|
||||
break;
|
||||
} else if (config->device_type == type
|
||||
&& (config->methods
|
||||
& AV_CODEC_HW_CONFIG_METHOD_HW_DEVICE_CTX)) {
|
||||
return config->pix_fmt;
|
||||
}
|
||||
}
|
||||
return AV_PIX_FMT_NONE;
|
||||
}();
|
||||
|
||||
switch (format) {
|
||||
#ifdef Q_OS_WIN
|
||||
case AV_PIX_FMT_D3D11:
|
||||
return HwAccelByFormat<AV_PIX_FMT_D3D11>();
|
||||
case AV_PIX_FMT_DXVA2_VLD:
|
||||
return HwAccelByFormat<AV_PIX_FMT_DXVA2_VLD>();
|
||||
case AV_PIX_FMT_D3D11VA_VLD:
|
||||
return HwAccelByFormat<AV_PIX_FMT_D3D11VA_VLD>();
|
||||
#elif defined Q_OS_MAC // Q_OS_WIN
|
||||
case AV_PIX_FMT_VIDEOTOOLBOX:
|
||||
return HwAccelByFormat<AV_PIX_FMT_VIDEOTOOLBOX>();
|
||||
#else // Q_OS_WIN || Q_OS_MAC
|
||||
case AV_PIX_FMT_VAAPI:
|
||||
return HwAccelByFormat<AV_PIX_FMT_VAAPI>();
|
||||
case AV_PIX_FMT_VDPAU:
|
||||
return HwAccelByFormat<AV_PIX_FMT_VDPAU>();
|
||||
#endif // Q_OS_WIN || Q_OS_MAC
|
||||
case AV_PIX_FMT_CUDA:
|
||||
return HwAccelByFormat<AV_PIX_FMT_CUDA>();
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
IOPointer MakeIOPointer(
|
||||
|
|
|
@ -483,9 +483,6 @@ HistoryWidget::HistoryWidget(
|
|||
session().attachWebView().requestBots();
|
||||
session().attachWebView().attachBotsUpdates(
|
||||
) | rpl::start_with_next([=] {
|
||||
const auto list = [=] {
|
||||
return session().attachWebView().attachBots();
|
||||
};
|
||||
if (session().attachWebView().attachBots().empty()) {
|
||||
_attachBotsMenu = nullptr;
|
||||
return;
|
||||
|
|
|
@ -568,7 +568,6 @@ void AttachWebView::requestSimple(const WebViewButton &button) {
|
|||
});
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
_requestId = 0;
|
||||
int a = error.code();
|
||||
}).send();
|
||||
}
|
||||
|
||||
|
|
|
@ -177,7 +177,6 @@ private:
|
|||
|
||||
void addHidePromotion();
|
||||
void addTogglePin();
|
||||
void addToggleMute();
|
||||
void addToggleMuteSubmenu(bool addSeparator);
|
||||
void addSupportInfo();
|
||||
void addInfo();
|
||||
|
@ -374,13 +373,6 @@ void Filler::addTogglePin() {
|
|||
SetActionText(pinAction, std::move(actionText));
|
||||
}
|
||||
|
||||
void Filler::addToggleMute() {
|
||||
if (_peer->isSelf()) {
|
||||
return;
|
||||
}
|
||||
PeerMenuAddMuteAction(_controller, _peer, _addAction);
|
||||
}
|
||||
|
||||
void Filler::addToggleMuteSubmenu(bool addSeparator) {
|
||||
if (_peer->isSelf()) {
|
||||
return;
|
||||
|
|
2
Telegram/ThirdParty/tgcalls
vendored
2
Telegram/ThirdParty/tgcalls
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 365f19aa577b480e424651a67f90f12d56379e11
|
||||
Subproject commit 9a6e515fbb1e9c53266456447b8f301fe200ad44
|
Loading…
Add table
Reference in a new issue