telegram-desktop ver. bump

This commit is contained in:
Rmys
2021-02-03 23:47:19 +03:00
committed by GitHub
parent d453ced394
commit 35ae105343
3 changed files with 120 additions and 7 deletions
+18 -3
View File
@@ -6,14 +6,24 @@
from pisi.actionsapi import cmaketools
from pisi.actionsapi import mesontools
from pisi.actionsapi import shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
def setup():
shelltools.export("NINJAJOBS", "-j 4")
#shelltools.export("LC_ALL", "en_US.UTF-8")
shelltools.system("sed -i 's/DESKTOP_APP_USE_PACKAGED/NO_ONE_WILL_EVER_SET_THIS/' \
cmake/external/rlottie/CMakeLists.txt || die")
shelltools.system('echo "target_link_libraries(external_webrtc INTERFACE jpeg)" | tee -a cmake/external/webrtc/CMakeLists.txt')
pisitools.cxxflags.add("-Wno-deprecated-declarations -Wno-error=deprecated-declarations -Wno-switch")
params = ' '.join([
'-B build',
'-G Ninja .',
'-Ddisable_autoupdate=1',
'-DCMAKE_BUILD_TYPE=Release',
'-DCMAKE_INSTALL_PREFIX="/usr"',
'-DTDESKTOP_API_TEST=ON',
'-DDESKTOP_APP_USE_GLIBC_WRAPS=OFF',
'-DDESKTOP_APP_USE_PACKAGED=ON',
@@ -25,6 +35,7 @@ def setup():
'-DTDESKTOP_DISABLE_DESKTOP_FILE_GENERATION=ON',
'-DTDESKTOP_USE_PACKAGED_TGVOIP=OFF',
'-DDESKTOP_APP_SPECIAL_TARGET=""',
'-DDESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=OFF'
'-DTDESKTOP_LAUNCHER_BASENAME="telegramdesktop"'
])
@@ -32,8 +43,12 @@ def setup():
def build():
mesontools.build()
shelltools.cd("build")
cmaketools.make()
#mesontools.build()
def install():
mesontools.install()
shelltools.cd("build")
cmaketools.rawInstall("DESTDIR=%s" % get.installDIR())
#mesontools.install()
@@ -0,0 +1,96 @@
diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp
index e99958109..bb7678d3c 100644
--- a/Telegram/SourceFiles/calls/calls_instance.cpp
+++ b/Telegram/SourceFiles/calls/calls_instance.cpp
@@ -350,8 +350,11 @@ std::shared_ptr<tgcalls::VideoCaptureInterface> Instance::getVideoCapture() {
return result;
}
auto result = std::shared_ptr<tgcalls::VideoCaptureInterface>(
+ #ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
tgcalls::VideoCaptureInterface::Create(
- Core::App().settings().callVideoInputDeviceId().toStdString()));
+ Core::App().settings().callVideoInputDeviceId().toStdString())
+ #endif
+ );
_videoCapture = result;
return result;
}
diff --git Telegram/lib_webrtc/CMakeLists.txt b/CMakeLists.txt
index 47796f1..1f54c21 100644
--- a/Telegram/lib_webrtc/CMakeLists.txt
+++ b/Telegram/lib_webrtc/CMakeLists.txt
@@ -14,8 +14,10 @@ target_precompile_headers(lib_webrtc PRIVATE ${src_loc}/webrtc/webrtc_pch.h)
nice_target_sources(lib_webrtc ${src_loc}
PRIVATE
webrtc/webrtc_audio_input_tester.cpp
+ webrtc/webrtc_audio_input_tester_dummy.cpp
webrtc/webrtc_audio_input_tester.h
webrtc/webrtc_media_devices.cpp
+ webrtc/webrtc_media_devices_dummy.cpp
webrtc/webrtc_media_devices.h
webrtc/webrtc_video_track.cpp
webrtc/webrtc_video_track.h
@@ -40,10 +42,14 @@ PUBLIC
if (DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION)
remove_target_sources(lib_webrtc ${src_loc}
webrtc/webrtc_video_track.cpp
+ webrtc/webrtc_media_devices.cpp
+ webrtc/webrtc_audio_input_tester.cpp
)
else()
remove_target_sources(lib_webrtc ${src_loc}
webrtc/webrtc_video_track_dummy.cpp
+ webrtc/webrtc_media_devices_dummy.cpp
+ webrtc/webrtc_audio_input_tester_dummy.cpp
)
target_link_libraries(lib_webrtc
PRIVATE
diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h b/webrtc/webrtc_audio_input_tester.h
index 1ae8d30..008df7e 100644
--- a/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
+++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester.h
@@ -20,11 +20,13 @@ public:
[[nodiscard]] float getAndResetLevel();
private:
+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
class Impl;
-
+#endif
std::shared_ptr<std::atomic<int>> _maxSample;
+#ifndef DESKTOP_APP_DISABLE_WEBRTC_INTEGRATION
crl::object_on_thread<Impl> _impl;
-
+#endif
};
} // namespace Webrtc
diff --git Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp b/webrtc/webrtc_audio_input_tester_dummy.cpp
new file mode 100644
index 0000000..4e47eaa
--- a//dev/null
+++ b/Telegram/lib_webrtc/webrtc/webrtc_audio_input_tester_dummy.cpp
@@ -0,0 +1,11 @@
+#include "webrtc/webrtc_audio_input_tester.h"
+
+namespace Webrtc {
+AudioInputTester::AudioInputTester(const QString &deviceId)
+: _maxSample(std::make_shared<std::atomic<int>>(0)) {}
+AudioInputTester::~AudioInputTester() {}
+void AudioInputTester::setDeviceId(const QString &deviceId) {};
+float AudioInputTester::getAndResetLevel() {
+ return _maxSample->exchange(0) / float(INT16_MAX);\
+}
+}
diff --git Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp b/webrtc/webrtc_media_devices_dummy.cpp
new file mode 100644
index 0000000..8d5d245
--- a/dev/null
+++ b/Telegram/lib_webrtc/webrtc/webrtc_media_devices_dummy.cpp
@@ -0,0 +1,6 @@
+#include "webrtc/webrtc_media_devices.h"
+namespace Webrtc {
+std::vector<VideoInput> GetVideoInputList() { return std::vector<VideoInput>(); };
+std::vector<AudioInput> GetAudioInputList() { return std::vector<AudioInput>(); };
+std::vector<AudioOutput> GetAudioOutputList() { return std::vector<AudioOutput>(); };
+}
+6 -4
View File
@@ -12,10 +12,11 @@
<IsA>app:gui</IsA>
<Summary>Official Telegram Desktop client</Summary>
<Description>Telegram is a messaging app with a focus on speed and security, it is super-fast, simple and free. You can use Telegram on all your devices at the same time — your messages sync seamlessly across any number of your phones, tablets or computers.</Description>
<Archive sha1sum="45ae3015aae102c172fca02b3a6aaf8a068a7372" type="targz">https://github.com/telegramdesktop/tdesktop/releases/download/v2.5.1/tdesktop-2.5.1-full.tar.gz</Archive>
<Archive sha1sum="a90df9beede550d140eb53234c8ae0d15435ac53" type="targz">https://github.com/telegramdesktop/tdesktop/releases/download/v2.5.8/tdesktop-2.5.8-full.tar.gz</Archive>
<BuildDependencies>
<Dependency>cmake</Dependency>
<Dependency>ninja</Dependency>
<Dependency>gtk3-devel</Dependency>
<Dependency>qt5-base-devel</Dependency>
<Dependency>xz-devel</Dependency>
<Dependency>libdbusmenu-qt-devel</Dependency>
@@ -32,7 +33,8 @@
<Dependency>alsa-lib-devel</Dependency>
<Dependency>pulseaudio-libs-devel</Dependency>
<Dependency>lz4-devel</Dependency>
<Dependency>qt5-wayland-devel</Dependency>
<!--Dependency>qt5-wayland-devel</Dependency>
<Dependency>kwayland-devel</Dependency-->
<Dependency>libtg_owt-devel</Dependency>
<Dependency>xcb-util-keysyms-devel</Dependency>
</BuildDependencies>
@@ -62,8 +64,8 @@
<History>
<Update release="4">
<Date>2021-01-26</Date>
<Version>2.5.1</Version>
<Date>2021-02-01</Date>
<Version>2.5.8</Version>
<Comment>Version bump.</Comment>
<Name>Mustafa Cinasal</Name>
<Email>muscnsl@gmail.com</Email>