push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
libsForQt5,
yasm,
alsa-lib,
jemalloc,
libopus,
libpulseaudio,
withWebkit ? true,
}:
let
telegram-desktop = libsForQt5.callPackage ../telegram-desktop {
inherit stdenv;
# N/A on Qt5
kimageformats = null;
};
version = "1.4.9";
tg_owt = telegram-desktop.tg_owt.overrideAttrs (oldAttrs: {
version = "0-unstable-2024-06-15";
src = fetchFromGitHub {
owner = "desktop-app";
repo = "tg_owt";
rev = "c9cc4390ab951f2cbc103ff783a11f398b27660b";
hash = "sha256-FfWmSYaeryTDbsGJT3R7YK1oiyJcrR7YKKBOF+9PmpY=";
fetchSubmodules = true;
};
patches = [
(fetchpatch {
url = "https://webrtc.googlesource.com/src/+/e7d10047096880feb5e9846375f2da54aef91202%5E%21/?format=TEXT";
decode = "base64 -d";
stripLen = 1;
extraPrefix = "src/";
hash = "sha256-goxnuRRbwcdfIk1jFaKGiKCTCYn2saEj7En1Iyglzko=";
})
];
nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ yasm ];
});
in
telegram-desktop.override {
pname = "kotatogram-desktop";
inherit withWebkit;
unwrapped = (telegram-desktop.unwrapped.override { inherit tg_owt; }).overrideAttrs (old: {
pname = "kotatogram-desktop-unwrapped";
version = "${version}-unstable-2024-09-27";
src = fetchFromGitHub {
owner = "kotatogram";
repo = "kotatogram-desktop";
rev = "0581eb6219343b3cfcbb81124b372df1039b7568";
hash = "sha256-rvn8GZmHdMkVutLUe/LmUNIawlb9VgU3sYhPwZ2MWsI=";
fetchSubmodules = true;
};
patches = [
./macos-qt5.patch
(fetchpatch {
url = "https://gitlab.com/mnauw/cppgir/-/commit/c8bb1c6017a6f7f2e47bd10543aea6b3ec69a966.patch";
stripLen = 1;
extraPrefix = "cmake/external/glib/cppgir/";
hash = "sha256-8B4h3BTG8dIlt3+uVgBI569E9eCebcor9uohtsrZpnI=";
})
];
buildInputs = (old.buildInputs or [ ]) ++ [
alsa-lib
jemalloc
libopus
libpulseaudio
];
meta = {
description = "Kotatogram experimental Telegram Desktop fork";
longDescription = ''
Unofficial desktop client for the Telegram messenger, based on Telegram Desktop.
It contains some useful (or purely cosmetic) features, but they could be unstable. A detailed list is available here: https://kotatogram.github.io/changes
'';
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
homepage = "https://kotatogram.github.io";
changelog = "https://github.com/kotatogram/kotatogram-desktop/releases/tag/k${version}";
maintainers = with lib.maintainers; [ ilya-fedin ];
mainProgram = if stdenv.hostPlatform.isLinux then "kotatogram-desktop" else "Kotatogram";
};
});
}

View File

@@ -0,0 +1,75 @@
diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.h b/Telegram/SourceFiles/platform/mac/main_window_mac.h
index 2a3a59b9cf..16b7b6cdde 100644
--- a/Telegram/SourceFiles/platform/mac/main_window_mac.h
+++ b/Telegram/SourceFiles/platform/mac/main_window_mac.h
@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/platform_main_window.h"
#include "platform/mac/specific_mac_p.h"
#include "base/timer.h"
+#include "base/qt/qt_common_adapters.h"
#include <QtWidgets/QMenuBar>
#include <QtCore/QTimer>
@@ -52,7 +53,7 @@ private:
bool nativeEvent(
const QByteArray &eventType,
void *message,
- qintptr *result) override;
+ base::NativeEventResult *result) override;
void hideAndDeactivate();
void updateDockCounter();
diff --git a/Telegram/SourceFiles/platform/mac/main_window_mac.mm b/Telegram/SourceFiles/platform/mac/main_window_mac.mm
index e95ef79f16..c3381926a9 100644
--- a/Telegram/SourceFiles/platform/mac/main_window_mac.mm
+++ b/Telegram/SourceFiles/platform/mac/main_window_mac.mm
@@ -305,7 +305,7 @@ void MainWindow::updateWindowIcon() {
bool MainWindow::nativeEvent(
const QByteArray &eventType,
void *message,
- qintptr *result) {
+ base::NativeEventResult *result) {
if (message && eventType == "NSEvent") {
const auto event = static_cast<NSEvent*>(message);
if (PossiblyTextTypingEvent(event)) {
diff --git a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm
index de28809077..2521428567 100644
--- a/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm
+++ b/Telegram/SourceFiles/platform/mac/notifications_manager_mac.mm
@@ -502,11 +502,11 @@ void Manager::Private::invokeIfNotFocused(Fn<void()> callback) {
} else {
if (!_processesInited) {
_processesInited = true;
- QObject::connect(&_dnd, &QProcess::finished, [=] {
+ QObject::connect(&_dnd, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [=] {
_waitingDnd = false;
checkFocusState();
});
- QObject::connect(&_focus, &QProcess::finished, [=] {
+ QObject::connect(&_focus, QOverload<int, QProcess::ExitStatus>::of(&QProcess::finished), [=] {
_waitingFocus = false;
checkFocusState();
});
@@ -536,7 +536,7 @@ void Manager::Private::checkFocusState() {
}
const auto istrue = [](QProcess &process) {
const auto output = process.readAllStandardOutput();
- DEBUG_LOG(("Focus Check: %1").arg(output));
+ DEBUG_LOG(("Focus Check: %1").arg(QString::fromUtf8(output)));
const auto result = (output.trimmed() == u"true"_q);
return result;
};
Submodule Telegram/lib_ui contains modified content
diff --git a/Telegram/lib_ui/ui/rp_widget.cpp b/Telegram/lib_ui/ui/rp_widget.cpp
index 0b57704..0d2ca01 100644
--- a/Telegram/lib_ui/ui/rp_widget.cpp
+++ b/Telegram/lib_ui/ui/rp_widget.cpp
@@ -62,7 +62,7 @@ TWidget::TWidget(QWidget *parent)
auto format = QSurfaceFormat::defaultFormat();
format.setSwapInterval(0);
#ifdef Q_OS_MAC
- format.setColorSpace(QColorSpace::SRgb);
+ format.setColorSpace(QSurfaceFormat::sRGBColorSpace);
#endif // Q_OS_MAC
QSurfaceFormat::setDefaultFormat(format);
return true;

View File

@@ -0,0 +1,554 @@
diff --git a/src/api/environment/environment.h b/src/api/environment/environment.h
index d86b7ae78..cc2761f71 100644
--- a/src/api/environment/environment.h
+++ b/src/api/environment/environment.h
@@ -99,10 +99,10 @@ class RTC_EXPORT Environment final {
private:
friend class EnvironmentFactory;
Environment(scoped_refptr<const rtc::RefCountedBase> storage,
- absl::Nonnull<const FieldTrialsView*> field_trials,
- absl::Nonnull<Clock*> clock,
- absl::Nonnull<TaskQueueFactory*> task_queue_factory,
- absl::Nonnull<RtcEventLog*> event_log)
+ const FieldTrialsView* absl_nonnull field_trials,
+ Clock* absl_nonnull clock,
+ TaskQueueFactory* absl_nonnull task_queue_factory,
+ RtcEventLog* absl_nonnull event_log)
: storage_(std::move(storage)),
field_trials_(field_trials),
clock_(clock),
@@ -117,10 +117,10 @@ class RTC_EXPORT Environment final {
// `storage_` is alive.
scoped_refptr<const rtc::RefCountedBase> storage_;
- absl::Nonnull<const FieldTrialsView*> field_trials_;
- absl::Nonnull<Clock*> clock_;
- absl::Nonnull<TaskQueueFactory*> task_queue_factory_;
- absl::Nonnull<RtcEventLog*> event_log_;
+ const FieldTrialsView* absl_nonnull field_trials_;
+ Clock* absl_nonnull clock_;
+ TaskQueueFactory* absl_nonnull task_queue_factory_;
+ RtcEventLog* absl_nonnull event_log_;
};
//------------------------------------------------------------------------------
diff --git a/src/api/environment/environment_factory.cc b/src/api/environment/environment_factory.cc
index c0b681aa0..ded3effe8 100644
--- a/src/api/environment/environment_factory.cc
+++ b/src/api/environment/environment_factory.cc
@@ -25,12 +25,12 @@ namespace webrtc {
namespace {
template <typename T>
-void Store(absl::Nonnull<std::unique_ptr<T>> value,
+void Store(std::unique_ptr<T> absl_nonnull value,
scoped_refptr<const rtc::RefCountedBase>& leaf) {
class StorageNode : public rtc::RefCountedBase {
public:
StorageNode(scoped_refptr<const rtc::RefCountedBase> parent,
- absl::Nonnull<std::unique_ptr<T>> value)
+ std::unique_ptr<T> absl_nonnull value)
: parent_(std::move(parent)), value_(std::move(value)) {}
StorageNode(const StorageNode&) = delete;
@@ -40,7 +40,7 @@ void Store(absl::Nonnull<std::unique_ptr<T>> value,
private:
scoped_refptr<const rtc::RefCountedBase> parent_;
- absl::Nonnull<std::unique_ptr<T>> value_;
+ std::unique_ptr<T> absl_nonnull value_;
};
// Utilities provided with ownership form a tree:
@@ -63,14 +63,14 @@ EnvironmentFactory::EnvironmentFactory(const Environment& env)
event_log_(env.event_log_) {}
void EnvironmentFactory::Set(
- absl::Nullable<std::unique_ptr<const FieldTrialsView>> utility) {
+ std::unique_ptr<const FieldTrialsView> absl_nullable utility) {
if (utility != nullptr) {
field_trials_ = utility.get();
Store(std::move(utility), leaf_);
}
}
-void EnvironmentFactory::Set(absl::Nullable<std::unique_ptr<Clock>> utility) {
+void EnvironmentFactory::Set(std::unique_ptr<Clock> absl_nullable utility) {
if (utility != nullptr) {
clock_ = utility.get();
Store(std::move(utility), leaf_);
@@ -78,7 +78,7 @@ void EnvironmentFactory::Set(absl::Nullable<std::unique_ptr<Clock>> utility) {
}
void EnvironmentFactory::Set(
- absl::Nullable<std::unique_ptr<TaskQueueFactory>> utility) {
+ std::unique_ptr<TaskQueueFactory> absl_nullable utility) {
if (utility != nullptr) {
task_queue_factory_ = utility.get();
Store(std::move(utility), leaf_);
@@ -86,7 +86,7 @@ void EnvironmentFactory::Set(
}
void EnvironmentFactory::Set(
- absl::Nullable<std::unique_ptr<RtcEventLog>> utility) {
+ std::unique_ptr<RtcEventLog> absl_nullable utility) {
if (utility != nullptr) {
event_log_ = utility.get();
Store(std::move(utility), leaf_);
diff --git a/src/api/environment/environment_factory.h b/src/api/environment/environment_factory.h
index a0fc3effd..b6be04f6a 100644
--- a/src/api/environment/environment_factory.h
+++ b/src/api/environment/environment_factory.h
@@ -54,15 +54,15 @@ class RTC_EXPORT EnvironmentFactory final {
~EnvironmentFactory() = default;
- void Set(absl::Nullable<std::unique_ptr<const FieldTrialsView>> utility);
- void Set(absl::Nullable<std::unique_ptr<Clock>> utility);
- void Set(absl::Nullable<std::unique_ptr<TaskQueueFactory>> utility);
- void Set(absl::Nullable<std::unique_ptr<RtcEventLog>> utility);
+ void Set(std::unique_ptr<const FieldTrialsView> absl_nullable utility);
+ void Set(std::unique_ptr<Clock> absl_nullable utility);
+ void Set(std::unique_ptr<TaskQueueFactory> absl_nullable utility);
+ void Set(std::unique_ptr<RtcEventLog> absl_nullable utility);
- void Set(absl::Nullable<const FieldTrialsView*> utility);
- void Set(absl::Nullable<Clock*> utility);
- void Set(absl::Nullable<TaskQueueFactory*> utility);
- void Set(absl::Nullable<RtcEventLog*> utility);
+ void Set(const FieldTrialsView* absl_nullable utility);
+ void Set(Clock* absl_nullable utility);
+ void Set(TaskQueueFactory* absl_nullable utility);
+ void Set(RtcEventLog* absl_nullable utility);
Environment Create() const;
@@ -71,10 +71,10 @@ class RTC_EXPORT EnvironmentFactory final {
scoped_refptr<const rtc::RefCountedBase> leaf_;
- absl::Nullable<const FieldTrialsView*> field_trials_ = nullptr;
- absl::Nullable<Clock*> clock_ = nullptr;
- absl::Nullable<TaskQueueFactory*> task_queue_factory_ = nullptr;
- absl::Nullable<RtcEventLog*> event_log_ = nullptr;
+ const FieldTrialsView* absl_nullable field_trials_ = nullptr;
+ Clock* absl_nullable clock_ = nullptr;
+ TaskQueueFactory* absl_nullable task_queue_factory_ = nullptr;
+ RtcEventLog* absl_nullable event_log_ = nullptr;
};
// Helper for concise way to create an environment.
@@ -97,25 +97,25 @@ Environment CreateEnvironment(Utilities&&... utilities);
//------------------------------------------------------------------------------
inline void EnvironmentFactory::Set(
- absl::Nullable<const FieldTrialsView*> utility) {
+ const FieldTrialsView* absl_nullable utility) {
if (utility != nullptr) {
field_trials_ = utility;
}
}
-inline void EnvironmentFactory::Set(absl::Nullable<Clock*> utility) {
+inline void EnvironmentFactory::Set(Clock* absl_nullable utility) {
if (utility != nullptr) {
clock_ = utility;
}
}
-inline void EnvironmentFactory::Set(absl::Nullable<TaskQueueFactory*> utility) {
+inline void EnvironmentFactory::Set(TaskQueueFactory* absl_nullable utility) {
if (utility != nullptr) {
task_queue_factory_ = utility;
}
}
-inline void EnvironmentFactory::Set(absl::Nullable<RtcEventLog*> utility) {
+inline void EnvironmentFactory::Set(RtcEventLog* absl_nullable utility) {
if (utility != nullptr) {
event_log_ = utility;
}
diff --git a/src/api/rtc_event_log/rtc_event_log_factory.cc b/src/api/rtc_event_log/rtc_event_log_factory.cc
index bfe272d2a..2196c31cd 100644
--- a/src/api/rtc_event_log/rtc_event_log_factory.cc
+++ b/src/api/rtc_event_log/rtc_event_log_factory.cc
@@ -23,7 +23,7 @@
namespace webrtc {
-absl::Nonnull<std::unique_ptr<RtcEventLog>> RtcEventLogFactory::Create(
+std::unique_ptr<RtcEventLog> absl_nonnull RtcEventLogFactory::Create(
const Environment& env) const {
#ifndef WEBRTC_ENABLE_RTC_EVENT_LOG
return std::make_unique<RtcEventLogNull>();
diff --git a/src/api/rtc_event_log/rtc_event_log_factory.h b/src/api/rtc_event_log/rtc_event_log_factory.h
index 1deb0612b..7f868a552 100644
--- a/src/api/rtc_event_log/rtc_event_log_factory.h
+++ b/src/api/rtc_event_log/rtc_event_log_factory.h
@@ -31,7 +31,7 @@ class RTC_EXPORT RtcEventLogFactory : public RtcEventLogFactoryInterface {
~RtcEventLogFactory() override = default;
- absl::Nonnull<std::unique_ptr<RtcEventLog>> Create(
+ std::unique_ptr<RtcEventLog> absl_nonnull Create(
const Environment& env) const override;
};
diff --git a/src/api/rtc_event_log/rtc_event_log_factory_interface.h b/src/api/rtc_event_log/rtc_event_log_factory_interface.h
index 313558496..d39766955 100644
--- a/src/api/rtc_event_log/rtc_event_log_factory_interface.h
+++ b/src/api/rtc_event_log/rtc_event_log_factory_interface.h
@@ -26,7 +26,7 @@ class RtcEventLogFactoryInterface {
public:
virtual ~RtcEventLogFactoryInterface() = default;
- virtual absl::Nonnull<std::unique_ptr<RtcEventLog>> Create(
+ virtual std::unique_ptr<RtcEventLog> absl_nonnull Create(
const Environment& env) const = 0;
};
diff --git a/src/api/task_queue/pending_task_safety_flag.cc b/src/api/task_queue/pending_task_safety_flag.cc
index 4d8fc2b9f..4b521ea04 100644
--- a/src/api/task_queue/pending_task_safety_flag.cc
+++ b/src/api/task_queue/pending_task_safety_flag.cc
@@ -37,7 +37,7 @@ PendingTaskSafetyFlag::CreateDetached() {
rtc::scoped_refptr<PendingTaskSafetyFlag>
PendingTaskSafetyFlag::CreateAttachedToTaskQueue(
bool alive,
- absl::Nonnull<TaskQueueBase*> attached_queue) {
+ TaskQueueBase* absl_nonnull attached_queue) {
RTC_DCHECK(attached_queue) << "Null TaskQueue provided";
return rtc::scoped_refptr<PendingTaskSafetyFlag>(
new PendingTaskSafetyFlag(alive, attached_queue));
diff --git a/src/api/task_queue/pending_task_safety_flag.h b/src/api/task_queue/pending_task_safety_flag.h
index 12b1e00ee..1a002e0ad 100644
--- a/src/api/task_queue/pending_task_safety_flag.h
+++ b/src/api/task_queue/pending_task_safety_flag.h
@@ -73,7 +73,7 @@ class RTC_EXPORT PendingTaskSafetyFlag final
// a given task queue and the `alive()` flag specified.
static rtc::scoped_refptr<PendingTaskSafetyFlag> CreateAttachedToTaskQueue(
bool alive,
- absl::Nonnull<TaskQueueBase*> attached_queue);
+ TaskQueueBase* absl_nonnull attached_queue);
// Same as `CreateDetached()` except the initial state of the returned flag
// will be `!alive()`.
@@ -103,7 +103,7 @@ class RTC_EXPORT PendingTaskSafetyFlag final
protected:
explicit PendingTaskSafetyFlag(bool alive) : alive_(alive) {}
PendingTaskSafetyFlag(bool alive,
- absl::Nonnull<TaskQueueBase*> attached_queue)
+ TaskQueueBase* absl_nonnull attached_queue)
: alive_(alive), main_sequence_(attached_queue) {}
private:
diff --git a/src/api/test/create_time_controller.cc b/src/api/test/create_time_controller.cc
index cbf1f09aa..049451bf5 100644
--- a/src/api/test/create_time_controller.cc
+++ b/src/api/test/create_time_controller.cc
@@ -44,8 +44,8 @@ void EnableMediaWithDefaultsAndTimeController(
class TimeControllerBasedFactory : public MediaFactory {
public:
TimeControllerBasedFactory(
- absl::Nonnull<Clock*> clock,
- absl::Nonnull<std::unique_ptr<MediaFactory>> media_factory)
+ Clock* absl_nonnull clock,
+ std::unique_ptr<MediaFactory> absl_nonnull media_factory)
: clock_(clock), media_factory_(std::move(media_factory)) {}
std::unique_ptr<Call> CreateCall(const CallConfig& config) override {
@@ -64,8 +64,8 @@ void EnableMediaWithDefaultsAndTimeController(
}
private:
- absl::Nonnull<Clock*> clock_;
- absl::Nonnull<std::unique_ptr<MediaFactory>> media_factory_;
+ Clock* absl_nonnull clock_;
+ std::unique_ptr<MediaFactory> absl_nonnull media_factory_;
};
EnableMediaWithDefaults(deps);
diff --git a/src/logging/rtc_event_log/fake_rtc_event_log_factory.cc b/src/logging/rtc_event_log/fake_rtc_event_log_factory.cc
index bacc3cd1c..c5a43e7dd 100644
--- a/src/logging/rtc_event_log/fake_rtc_event_log_factory.cc
+++ b/src/logging/rtc_event_log/fake_rtc_event_log_factory.cc
@@ -17,7 +17,7 @@
namespace webrtc {
-absl::Nonnull<std::unique_ptr<RtcEventLog>> FakeRtcEventLogFactory::Create(
+std::unique_ptr<RtcEventLog> absl_nonnull FakeRtcEventLogFactory::Create(
const Environment& /*env*/) const {
auto fake_event_log = std::make_unique<FakeRtcEventLog>();
const_cast<FakeRtcEventLog*&>(last_log_created_) = fake_event_log.get();
diff --git a/src/logging/rtc_event_log/fake_rtc_event_log_factory.h b/src/logging/rtc_event_log/fake_rtc_event_log_factory.h
index 0d6d07603..08017432a 100644
--- a/src/logging/rtc_event_log/fake_rtc_event_log_factory.h
+++ b/src/logging/rtc_event_log/fake_rtc_event_log_factory.h
@@ -25,7 +25,7 @@ class FakeRtcEventLogFactory : public RtcEventLogFactoryInterface {
FakeRtcEventLogFactory() = default;
~FakeRtcEventLogFactory() override = default;
- absl::Nonnull<std::unique_ptr<RtcEventLog>> Create(
+ std::unique_ptr<RtcEventLog> absl_nonnull Create(
const Environment& env) const override;
FakeRtcEventLog* last_log_created() { return last_log_created_; }
diff --git a/src/modules/audio_processing/aec_dump/aec_dump_factory.h b/src/modules/audio_processing/aec_dump/aec_dump_factory.h
index 0d258a9eb..89435d62c 100644
--- a/src/modules/audio_processing/aec_dump/aec_dump_factory.h
+++ b/src/modules/audio_processing/aec_dump/aec_dump_factory.h
@@ -29,18 +29,18 @@ class RTC_EXPORT AecDumpFactory {
// The AecDump takes responsibility for `handle` and closes it in the
// destructor. A non-null return value indicates that the file has been
// sucessfully opened.
- static absl::Nullable<std::unique_ptr<AecDump>> Create(
+ static std::unique_ptr<AecDump> absl_nullable Create(
FileWrapper file,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue);
- static absl::Nullable<std::unique_ptr<AecDump>> Create(
+ TaskQueueBase* absl_nonnull worker_queue);
+ static std::unique_ptr<AecDump> absl_nullable Create(
absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue);
- static absl::Nullable<std::unique_ptr<AecDump>> Create(
- absl::Nonnull<FILE*> handle,
+ TaskQueueBase* absl_nonnull worker_queue);
+ static std::unique_ptr<AecDump> absl_nullable Create(
+ FILE* absl_nonnull handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue);
+ TaskQueueBase* absl_nonnull worker_queue);
};
} // namespace webrtc
diff --git a/src/modules/audio_processing/aec_dump/aec_dump_impl.cc b/src/modules/audio_processing/aec_dump/aec_dump_impl.cc
index 8484fcc6e..76b59d0e5 100644
--- a/src/modules/audio_processing/aec_dump/aec_dump_impl.cc
+++ b/src/modules/audio_processing/aec_dump/aec_dump_impl.cc
@@ -60,7 +60,7 @@ void CopyFromConfigToEvent(const webrtc::InternalAPMConfig& config,
AecDumpImpl::AecDumpImpl(FileWrapper debug_file,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue)
+ TaskQueueBase* absl_nonnull worker_queue)
: debug_file_(std::move(debug_file)),
num_bytes_left_for_log_(max_log_size_bytes),
worker_queue_(worker_queue) {}
@@ -255,10 +255,10 @@ void AecDumpImpl::PostWriteToFileTask(std::unique_ptr<audioproc::Event> event) {
});
}
-absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
+std::unique_ptr<AecDump> absl_nullable AecDumpFactory::Create(
FileWrapper file,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
RTC_DCHECK(worker_queue);
if (!file.is_open())
return nullptr;
@@ -267,18 +267,18 @@ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
worker_queue);
}
-absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
+std::unique_ptr<AecDump> absl_nullable AecDumpFactory::Create(
absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
return Create(FileWrapper::OpenWriteOnly(file_name), max_log_size_bytes,
worker_queue);
}
-absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
- absl::Nonnull<FILE*> handle,
+std::unique_ptr<AecDump> absl_nullable AecDumpFactory::Create(
+ FILE* absl_nonnull handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
return Create(FileWrapper(handle), max_log_size_bytes, worker_queue);
}
diff --git a/src/modules/audio_processing/aec_dump/aec_dump_impl.h b/src/modules/audio_processing/aec_dump/aec_dump_impl.h
index d5af31b01..e3fb25469 100644
--- a/src/modules/audio_processing/aec_dump/aec_dump_impl.h
+++ b/src/modules/audio_processing/aec_dump/aec_dump_impl.h
@@ -39,7 +39,7 @@ class AecDumpImpl : public AecDump {
// `max_log_size_bytes == -1` means the log size will be unlimited.
AecDumpImpl(FileWrapper debug_file,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue);
+ TaskQueueBase* absl_nonnull worker_queue);
AecDumpImpl(const AecDumpImpl&) = delete;
AecDumpImpl& operator=(const AecDumpImpl&) = delete;
~AecDumpImpl() override;
@@ -74,7 +74,7 @@ class AecDumpImpl : public AecDump {
FileWrapper debug_file_;
int64_t num_bytes_left_for_log_ = 0;
rtc::RaceChecker race_checker_;
- absl::Nonnull<TaskQueueBase*> worker_queue_;
+ TaskQueueBase* absl_nonnull worker_queue_;
CaptureStreamInfo capture_stream_info_;
};
} // namespace webrtc
diff --git a/src/modules/audio_processing/aec_dump/null_aec_dump_factory.cc b/src/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
index 63929afac..2902c1bbc 100644
--- a/src/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
+++ b/src/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
@@ -16,24 +16,24 @@
namespace webrtc {
-absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
+std::unique_ptr<AecDump> absl_nullable AecDumpFactory::Create(
FileWrapper file,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
return nullptr;
}
-absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
+std::unique_ptr<AecDump> absl_nullable AecDumpFactory::Create(
absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
return nullptr;
}
-absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
- absl::Nonnull<FILE*> handle,
+std::unique_ptr<AecDump> absl_nullable AecDumpFactory::Create(
+ FILE* absl_nonnull handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
return nullptr;
}
} // namespace webrtc
diff --git a/src/modules/audio_processing/audio_processing_impl.cc b/src/modules/audio_processing/audio_processing_impl.cc
index 0d11e418e..0a579f7dd 100644
--- a/src/modules/audio_processing/audio_processing_impl.cc
+++ b/src/modules/audio_processing/audio_processing_impl.cc
@@ -2087,7 +2087,7 @@ void AudioProcessingImpl::UpdateRecommendedInputVolumeLocked() {
bool AudioProcessingImpl::CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
std::unique_ptr<AecDump> aec_dump =
AecDumpFactory::Create(file_name, max_log_size_bytes, worker_queue);
if (!aec_dump) {
@@ -2101,7 +2101,7 @@ bool AudioProcessingImpl::CreateAndAttachAecDump(
bool AudioProcessingImpl::CreateAndAttachAecDump(
FILE* handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) {
+ TaskQueueBase* absl_nonnull worker_queue) {
std::unique_ptr<AecDump> aec_dump =
AecDumpFactory::Create(handle, max_log_size_bytes, worker_queue);
if (!aec_dump) {
diff --git a/src/modules/audio_processing/audio_processing_impl.h b/src/modules/audio_processing/audio_processing_impl.h
index 2c0ab198d..4cea151cd 100644
--- a/src/modules/audio_processing/audio_processing_impl.h
+++ b/src/modules/audio_processing/audio_processing_impl.h
@@ -76,11 +76,11 @@ class AudioProcessingImpl : public AudioProcessing {
bool CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) override;
+ TaskQueueBase* absl_nonnull worker_queue) override;
bool CreateAndAttachAecDump(
FILE* handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) override;
+ TaskQueueBase* absl_nonnull worker_queue) override;
// TODO(webrtc:5298) Deprecated variant.
void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override;
void DetachAecDump() override;
diff --git a/src/modules/audio_processing/include/audio_processing.h b/src/modules/audio_processing/include/audio_processing.h
index dd484be4f..f7c115e58 100644
--- a/src/modules/audio_processing/include/audio_processing.h
+++ b/src/modules/audio_processing/include/audio_processing.h
@@ -633,11 +633,11 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
virtual bool CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
+ TaskQueueBase* absl_nonnull worker_queue) = 0;
virtual bool CreateAndAttachAecDump(
- absl::Nonnull<FILE*> handle,
+ FILE* absl_nonnull handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
+ TaskQueueBase* absl_nonnull worker_queue) = 0;
// TODO(webrtc:5298) Deprecated variant.
// Attaches provided webrtc::AecDump for recording debugging
diff --git a/src/modules/audio_processing/include/mock_audio_processing.h b/src/modules/audio_processing/include/mock_audio_processing.h
index dfe7d84e0..fad0a5b83 100644
--- a/src/modules/audio_processing/include/mock_audio_processing.h
+++ b/src/modules/audio_processing/include/mock_audio_processing.h
@@ -157,13 +157,13 @@ class MockAudioProcessing : public AudioProcessing {
CreateAndAttachAecDump,
(absl::string_view file_name,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue),
+ TaskQueueBase* absl_nonnull worker_queue),
(override));
MOCK_METHOD(bool,
CreateAndAttachAecDump,
(FILE * handle,
int64_t max_log_size_bytes,
- absl::Nonnull<TaskQueueBase*> worker_queue),
+ TaskQueueBase* absl_nonnull worker_queue),
(override));
MOCK_METHOD(void, AttachAecDump, (std::unique_ptr<AecDump>), (override));
MOCK_METHOD(void, DetachAecDump, (), (override));
diff --git a/src/pc/test/enable_fake_media.cc b/src/pc/test/enable_fake_media.cc
index 5497c6072..5c10fd8d5 100644
--- a/src/pc/test/enable_fake_media.cc
+++ b/src/pc/test/enable_fake_media.cc
@@ -29,11 +29,11 @@ using ::cricket::MediaEngineInterface;
void EnableFakeMedia(
PeerConnectionFactoryDependencies& deps,
- absl::Nonnull<std::unique_ptr<FakeMediaEngine>> fake_media_engine) {
+ std::unique_ptr<FakeMediaEngine> absl_nonnull fake_media_engine) {
class FakeMediaFactory : public MediaFactory {
public:
explicit FakeMediaFactory(
- absl::Nonnull<std::unique_ptr<FakeMediaEngine>> fake)
+ std::unique_ptr<FakeMediaEngine> absl_nonnull fake)
: fake_(std::move(fake)) {}
std::unique_ptr<Call> CreateCall(const CallConfig& config) override {
@@ -49,7 +49,7 @@ void EnableFakeMedia(
}
private:
- absl::Nullable<std::unique_ptr<FakeMediaEngine>> fake_;
+ std::unique_ptr<FakeMediaEngine> absl_nullable fake_;
};
deps.media_factory =
diff --git a/src/pc/test/enable_fake_media.h b/src/pc/test/enable_fake_media.h
index 82c55ad08..5fc339d29 100644
--- a/src/pc/test/enable_fake_media.h
+++ b/src/pc/test/enable_fake_media.h
@@ -28,7 +28,7 @@ namespace webrtc {
// Enables media support backed by the 'fake_media_engine'.
void EnableFakeMedia(
PeerConnectionFactoryDependencies& deps,
- absl::Nonnull<std::unique_ptr<cricket::FakeMediaEngine>> fake_media_engine);
+ std::unique_ptr<cricket::FakeMediaEngine> absl_nonnull fake_media_engine);
// Enables media support backed by unspecified lightweight fake implementation.
void EnableFakeMedia(PeerConnectionFactoryDependencies& deps);

View File

@@ -0,0 +1,81 @@
{
callPackage,
lib,
stdenv,
pname ? "telegram-desktop",
unwrapped ? callPackage ./unwrapped.nix { inherit stdenv; },
qtbase,
qtimageformats,
qtsvg,
qtwayland,
kimageformats,
libavif,
libheif,
libjxl,
wrapGAppsHook3,
wrapQtAppsHook,
glib-networking,
webkitgtk_4_1,
withWebkit ? true,
}:
stdenv.mkDerivation (finalAttrs: {
inherit pname;
inherit (finalAttrs.unwrapped) version meta passthru;
inherit unwrapped;
nativeBuildInputs = [
wrapQtAppsHook
]
++ lib.optionals withWebkit [
wrapGAppsHook3
];
buildInputs = [
qtbase
qtimageformats
qtsvg
]
++ lib.optionals stdenv.hostPlatform.isLinux [
kimageformats
qtwayland
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libavif
libheif
libjxl
]
++ lib.optionals withWebkit [
glib-networking
];
qtWrapperArgs = lib.optionals (stdenv.hostPlatform.isLinux && withWebkit) [
"--prefix"
"LD_LIBRARY_PATH"
":"
(lib.makeLibraryPath [ webkitgtk_4_1 ])
];
dontUnpack = true;
dontWrapGApps = true;
dontWrapQtApps = stdenv.hostPlatform.isDarwin;
installPhase = ''
runHook preInstall
cp -r "$unwrapped" "$out"
runHook postInstall
'';
preFixup = lib.optionalString (stdenv.hostPlatform.isLinux && withWebkit) ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';
postFixup =
lib.optionalString stdenv.hostPlatform.isDarwin ''
wrapQtApp "$out/Applications/${finalAttrs.meta.mainProgram}.app/Contents/MacOS/${finalAttrs.meta.mainProgram}"
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace $out/share/dbus-1/services/* \
--replace-fail "$unwrapped" "$out"
'';
})

View File

@@ -0,0 +1,110 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
cmake,
ninja,
python3,
libjpeg,
openssl,
libopus,
ffmpeg_6,
openh264,
crc32c,
libvpx,
libX11,
libXtst,
libXcomposite,
libXdamage,
libXext,
libXrender,
libXrandr,
libXi,
glib,
abseil-cpp,
pipewire,
libgbm,
libdrm,
libGL,
apple-sdk_15,
unstableGitUpdater,
}:
stdenv.mkDerivation {
pname = "tg_owt";
version = "0-unstable-2025-06-02";
src = fetchFromGitHub {
owner = "desktop-app";
repo = "tg_owt";
rev = "62321fd7128ab2650b459d4195781af8185e46b5";
hash = "sha256-l6EdHJLd42TU+4pLakdU3a5PLVxrxjta0CSRy5hVBFU=";
fetchSubmodules = true;
};
patches = [
# fix build with abseil 202508
# upstream PR: https://github.com/desktop-app/tg_owt/pull/164
./abseil-202508.patch
];
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace src/modules/desktop_capture/linux/wayland/egl_dmabuf.cc \
--replace-fail '"libEGL.so.1"' '"${lib.getLib libGL}/lib/libEGL.so.1"' \
--replace-fail '"libGL.so.1"' '"${lib.getLib libGL}/lib/libGL.so.1"' \
--replace-fail '"libgbm.so.1"' '"${lib.getLib libgbm}/lib/libgbm.so.1"' \
--replace-fail '"libdrm.so.2"' '"${lib.getLib libdrm}/lib/libdrm.so.2"'
'';
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
pkg-config
cmake
ninja
python3
];
propagatedBuildInputs = [
libjpeg
openssl
libopus
ffmpeg_6
openh264
crc32c
libvpx
abseil-cpp
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libX11
libXtst
libXcomposite
libXdamage
libXext
libXrender
libXrandr
libXi
glib
pipewire
libgbm
libdrm
libGL
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_15
];
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Fork of Google's webrtc library for telegram-desktop";
homepage = "https://github.com/desktop-app/tg_owt";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ oxalica ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,131 @@
{
lib,
stdenv,
fetchFromGitHub,
callPackage,
pkg-config,
cmake,
ninja,
clang,
python3,
tdlib,
tg_owt ? callPackage ./tg_owt.nix { inherit stdenv; },
qtbase,
qtsvg,
qtwayland,
kcoreaddons,
lz4,
xxHash,
ffmpeg_6,
protobuf,
openalSoft,
minizip,
range-v3,
tl-expected,
hunspell,
gobject-introspection,
rnnoise,
microsoft-gsl,
boost,
ada,
libicns,
apple-sdk_15,
nix-update-script,
}:
# Main reference:
# - This package was originally based on the Arch package but all patches are now upstreamed:
# https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/telegram-desktop
# Other references that could be useful:
# - https://git.alpinelinux.org/aports/tree/testing/telegram-desktop/APKBUILD
# - https://github.com/void-linux/void-packages/blob/master/srcpkgs/telegram-desktop/template
stdenv.mkDerivation (finalAttrs: {
pname = "telegram-desktop-unwrapped";
version = "6.1.3";
src = fetchFromGitHub {
owner = "telegramdesktop";
repo = "tdesktop";
rev = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-ElbKzv+QMqH62BGAvNjDDNp7NSJYIEvoDzxKCbEdwqM=";
};
nativeBuildInputs = [
pkg-config
cmake
ninja
python3
]
++ lib.optionals stdenv.hostPlatform.isLinux [
# to build bundled libdispatch
clang
gobject-introspection
];
buildInputs = [
qtbase
qtsvg
lz4
xxHash
ffmpeg_6
openalSoft
minizip
range-v3
tl-expected
rnnoise
tg_owt
microsoft-gsl
boost
ada
(tdlib.override { tde2eOnly = true; })
]
++ lib.optionals stdenv.hostPlatform.isLinux [
protobuf
qtwayland
kcoreaddons
hunspell
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
apple-sdk_15
libicns
];
dontWrapQtApps = true;
cmakeFlags = [
# We're allowed to used the API ID of the Snap package:
(lib.cmakeFeature "TDESKTOP_API_ID" "611335")
(lib.cmakeFeature "TDESKTOP_API_HASH" "d524b414d21f4d37f08684c1df41ac9c")
];
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
runHook preInstall
mkdir -p $out/Applications
cp -r ${finalAttrs.meta.mainProgram}.app $out/Applications
ln -sr $out/{Applications/${finalAttrs.meta.mainProgram}.app/Contents/MacOS,bin}
runHook postInstall
'';
passthru = {
inherit tg_owt;
updateScript = nix-update-script { };
};
meta = {
description = "Telegram Desktop messaging app";
longDescription = ''
Desktop client for the Telegram messenger, based on the Telegram API and
the MTProto secure protocol.
'';
license = lib.licenses.gpl3Only;
platforms = lib.platforms.all;
homepage = "https://desktop.telegram.org/";
changelog = "https://github.com/telegramdesktop/tdesktop/releases/tag/v${finalAttrs.version}";
maintainers = with lib.maintainers; [ nickcao ];
mainProgram = "Telegram";
};
})