Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2019-03-23 10:03:09 +10:00
parent 0423d9e342
commit bbb901dcbd
4 changed files with 180 additions and 142 deletions

View File

@@ -1,15 +1,15 @@
From ea45a14cb93dd0bfff3598ef24910c0f90db2b2c Mon Sep 17 00:00:00 2001
From 3a64e2affa9f42d6580bf85b80923cd61b68f21f Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 31 Jan 2019 12:47:54 +1000
Subject: Add haiku support
Date: Thu, 21 Mar 2019 19:35:35 +1000
Subject: Add mediakit support
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusDecoder.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusDecoder.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusDecoder.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusDecoder.cpp
old mode 100755
new mode 100644
index 0ecd63e..61081f9
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusDecoder.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusDecoder.cpp
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusDecoder.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusDecoder.cpp
@@ -10,7 +10,7 @@
#include <assert.h>
#include <math.h>
@@ -19,12 +19,12 @@ index 0ecd63e..61081f9
#include <opus/opus.h>
#else
#include "opus.h"
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusEncoder.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusEncoder.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusEncoder.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusEncoder.cpp
old mode 100755
new mode 100644
index cf66590..c2123a7
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusEncoder.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusEncoder.cpp
index 8786bf5..ab5abc4
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusEncoder.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusEncoder.cpp
@@ -9,7 +9,7 @@
#include <algorithm>
#include "logging.h"
@@ -34,15 +34,15 @@ index cf66590..c2123a7
#include <opus/opus.h>
#else
#include "opus.h"
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusEncoder.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/OpusEncoder.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusEncoder.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/OpusEncoder.h
old mode 100755
new mode 100644
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/VoIPController.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/VoIPController.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/VoIPController.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/VoIPController.cpp
old mode 100755
new mode 100644
index a0574d5..457c8b9
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/VoIPController.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/VoIPController.cpp
index 66fb80e..bb65fb6
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/VoIPController.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/VoIPController.cpp
@@ -8,6 +8,9 @@
#include <unistd.h>
#include <sys/time.h>
@@ -53,7 +53,7 @@ index a0574d5..457c8b9
#include <errno.h>
#include <string.h>
#include <wchar.h>
@@ -2844,6 +2847,10 @@ double VoIPController::GetCurrentTime(){
@@ -3052,6 +3055,10 @@ double VoIPController::GetCurrentTime(){
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec+(double)ts.tv_nsec/1000000000.0;
@@ -64,10 +64,10 @@ index a0574d5..457c8b9
#elif defined(__APPLE__)
static pthread_once_t token = PTHREAD_ONCE_INIT;
pthread_once(&token, &initMachTimestart);
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioIO.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioIO.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioIO.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioIO.cpp
index 2c16ca7..e00c731 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioIO.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioIO.cpp
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioIO.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioIO.cpp
@@ -39,6 +39,9 @@
#ifndef WITHOUT_PULSE
#include "../os/linux/AudioPulse.h"
@@ -87,10 +87,10 @@ index 2c16ca7..e00c731 100644
#elif defined(__linux__)
#ifndef WITHOUT_ALSA
#ifndef WITHOUT_PULSE
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioInput.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioInput.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioInput.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioInput.cpp
index dae647a..4bab98c 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioInput.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioInput.cpp
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioInput.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioInput.cpp
@@ -33,6 +33,8 @@
#ifndef WITHOUT_PULSE
#include "../os/linux/AudioPulse.h"
@@ -100,10 +100,10 @@ index dae647a..4bab98c 100644
#else
#error "Unsupported operating system"
#endif
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioOutput.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioOutput.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioOutput.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioOutput.cpp
index 458e8a5..1890350 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioOutput.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/audio/AudioOutput.cpp
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioOutput.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/audio/AudioOutput.cpp
@@ -37,6 +37,8 @@
#include "../os/linux/AudioOutputPulse.h"
#include "../os/linux/AudioPulse.h"
@@ -113,11 +113,11 @@ index 458e8a5..1890350 100644
#else
#error "Unsupported operating system"
#endif
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/libtgvoip.gyp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/libtgvoip.gyp
index 8c62b56..2528ba0 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/libtgvoip.gyp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/libtgvoip.gyp
@@ -113,6 +113,14 @@
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/libtgvoip.gyp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/libtgvoip.gyp
index cb1352b..6fd62fd 100644
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/libtgvoip.gyp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/libtgvoip.gyp
@@ -115,6 +115,14 @@
'<(tgvoip_src_loc)/os/linux/AudioPulse.cpp',
'<(tgvoip_src_loc)/os/linux/AudioPulse.h',
@@ -132,7 +132,7 @@ index 8c62b56..2528ba0 100644
# POSIX
'<(tgvoip_src_loc)/os/posix/NetworkSocketPosix.cpp',
'<(tgvoip_src_loc)/os/posix/NetworkSocketPosix.h',
@@ -735,6 +743,11 @@
@@ -737,6 +745,11 @@
'sources/': [['exclude', '<(tgvoip_src_loc)/os/posix/']],
},
],
@@ -144,7 +144,7 @@ index 8c62b56..2528ba0 100644
[
'"<(OS)" != "mac"', {
'sources/': [['exclude', '<(tgvoip_src_loc)/os/darwin/']],
@@ -866,6 +879,22 @@
@@ -891,6 +904,22 @@
},
],
[
@@ -167,11 +167,11 @@ index 8c62b56..2528ba0 100644
'"<(OS)" == "linux"', {
'defines': [
'WEBRTC_POSIX',
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioInputHaiku.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioInputHaiku.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioInputHaiku.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioInputHaiku.cpp
new file mode 100644
index 0000000..7cce3e3
--- /dev/null
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioInputHaiku.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioInputHaiku.cpp
@@ -0,0 +1,276 @@
+//
+// libtgvoip is free and unencumbered public domain software.
@@ -449,11 +449,11 @@ index 0000000..7cce3e3
+ snooze(100);
+ }
+}
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioInputHaiku.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioInputHaiku.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioInputHaiku.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioInputHaiku.h
new file mode 100644
index 0000000..1c63afe
--- /dev/null
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioInputHaiku.h
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioInputHaiku.h
@@ -0,0 +1,66 @@
+//
+// libtgvoip is free and unencumbered public domain software.
@@ -521,12 +521,12 @@ index 0000000..1c63afe
+}
+
+#endif //LIBTGVOIP_AUDIOINPUTHAIKU_H
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioOutputHaiku.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioOutputHaiku.cpp
new file mode 100644
index 0000000..3dc052c
index 0000000..2fca8a1
--- /dev/null
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp
@@ -0,0 +1,98 @@
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioOutputHaiku.cpp
@@ -0,0 +1,99 @@
+//
+// libtgvoip is free and unencumbered public domain software.
+// For more information, see http://unlicense.org or the UNLICENSE file
@@ -555,6 +555,7 @@ index 0000000..3dc052c
+ soundPlayer = NULL;
+ isPlaying = false;
+ isConfigured = false;
+ Configure(48000, 16, 1);
+ return;
+}
+
@@ -625,11 +626,11 @@ index 0000000..3dc052c
+bool AudioOutputHaiku::IsPlaying(){
+ return isPlaying;
+}
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioOutputHaiku.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioOutputHaiku.h
new file mode 100644
index 0000000..91f2521
--- /dev/null
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.h
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/AudioOutputHaiku.h
@@ -0,0 +1,35 @@
+//
+// libtgvoip is free and unencumbered public domain software.
@@ -666,11 +667,11 @@ index 0000000..91f2521
+}
+
+#endif //LIBTGVOIP_AUDIOOUTPUTHAIKU_H
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/RingBuffer.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/RingBuffer.cpp
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/RingBuffer.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/RingBuffer.cpp
new file mode 100644
index 0000000..43236d3
--- /dev/null
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/RingBuffer.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/RingBuffer.cpp
@@ -0,0 +1,130 @@
+#include <stdio.h>
+#include <stdlib.h>
@@ -802,11 +803,11 @@ index 0000000..43236d3
+{
+ return initialized?B_OK:B_ERROR;
+}
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/RingBuffer.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/RingBuffer.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/RingBuffer.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/RingBuffer.h
new file mode 100644
index 0000000..4715632
--- /dev/null
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/RingBuffer.h
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/haiku/RingBuffer.h
@@ -0,0 +1,31 @@
+#ifndef __RING_BUFFER_H__
+#define __RING_BUFFER_H__
@@ -839,11 +840,11 @@ index 0000000..4715632
+};
+
+#endif
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/posix/NetworkSocketPosix.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/posix/NetworkSocketPosix.cpp
index 9eff048..5e28b0f 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/posix/NetworkSocketPosix.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/posix/NetworkSocketPosix.cpp
@@ -245,12 +245,13 @@ void NetworkSocketPosix::Open(){
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/posix/NetworkSocketPosix.cpp b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/posix/NetworkSocketPosix.cpp
index 52eef76..c480dfb 100644
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/posix/NetworkSocketPosix.cpp
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/os/posix/NetworkSocketPosix.cpp
@@ -248,12 +248,13 @@ void NetworkSocketPosix::Open(){
}
int flag=0;
int res=setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &flag, sizeof(flag));
@@ -858,7 +859,7 @@ index 9eff048..5e28b0f 100644
SetMaxPriority();
fcntl(fd, F_SETFL, O_NONBLOCK);
@@ -400,6 +401,8 @@ std::string NetworkSocketPosix::GetLocalInterfaceInfo(IPv4Address *v4addr, IPv6A
@@ -403,6 +404,8 @@ std::string NetworkSocketPosix::GetLocalInterfaceInfo(IPv4Address *v4addr, IPv6A
if(didAttach){
sharedJVM->DetachCurrentThread();
}
@@ -867,12 +868,12 @@ index 9eff048..5e28b0f 100644
#else
struct ifaddrs* interfaces;
if(!getifaddrs(&interfaces)){
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/threading.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/threading.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/threading.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/threading.h
old mode 100755
new mode 100644
index 9dc2554..fc68fd4
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/threading.h
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/threading.h
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/threading.h
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/threading.h
@@ -9,7 +9,7 @@
#include <functional>
@@ -898,12 +899,12 @@ index 9dc2554..fc68fd4
}
self->entry();
return NULL;
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/logging_webrtc.cc b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/logging_webrtc.cc
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/logging_webrtc.cc b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/logging_webrtc.cc
old mode 100755
new mode 100644
index a8d1522..991241b
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/logging_webrtc.cc
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/logging_webrtc.cc
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/logging_webrtc.cc
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/logging_webrtc.cc
@@ -28,6 +28,10 @@
static const int kMaxLogLineSize = 1024 - 60;
#endif // WEBRTC_MAC && !defined(WEBRTC_IOS) || WEBRTC_ANDROID
@@ -928,13 +929,13 @@ index a8d1522..991241b
}
if (file != nullptr) {
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_file.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_file.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_file.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_file.h
old mode 100755
new mode 100644
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.cc b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.cc
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.cc b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.cc
index 70cf237..e48948e 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.cc
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.cc
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.cc
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.cc
@@ -20,6 +20,8 @@ namespace rtc {
PlatformThreadId CurrentThreadId() {
#if defined(WEBRTC_WIN)
@@ -944,10 +945,10 @@ index 70cf237..e48948e 100644
#elif defined(WEBRTC_POSIX)
#if defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
return pthread_mach_thread_np(pthread_self());
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.h b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.h
diff --git a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.h b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.h
index 0bc42eb..c87cde9 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.h
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/webrtc_dsp/rtc_base/platform_thread_types.h
--- a/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.h
+++ b/libtgvoip-16711e202393ae7e1b160436f4291c5f06a3d375/webrtc_dsp/rtc_base/platform_thread_types.h
@@ -35,6 +35,9 @@ typedef DWORD PlatformThreadRef;
#elif defined(WEBRTC_FUCHSIA)
typedef zx_handle_t PlatformThreadId;
@@ -961,25 +962,3 @@ index 0bc42eb..c87cde9 100644
--
2.19.1
From 46e431a59fcb445f3f164b55a41ccfb05843a337 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 31 Jan 2019 13:54:24 +1000
Subject: Configure output device
diff --git a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp
index 3dc052c..2fca8a1 100644
--- a/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp
+++ b/libtgvoip-59a975bf66c19ebddd8c82d9d501fddc02584d7c/os/haiku/AudioOutputHaiku.cpp
@@ -26,6 +26,7 @@ AudioOutputHaiku::AudioOutputHaiku(){
soundPlayer = NULL;
isPlaying = false;
isConfigured = false;
+ Configure(48000, 16, 1);
return;
}
--
2.19.1

View File

@@ -1,6 +1,6 @@
From 42b5d5eb9eda6a1efd5c7111d0bea81a337b125b Mon Sep 17 00:00:00 2001
From 69613a9fb9653d249d4d1780f49100faa893be48 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 1 Feb 2019 16:36:35 +1000
Date: Wed, 20 Mar 2019 20:35:40 +1000
Subject: Use system Qt
@@ -186,7 +186,7 @@ index 2959cec..04ad006 100644
CrashReports::ClearAnnotationRef("CrashString");
}
diff --git a/Telegram/SourceFiles/ui/twidget.cpp b/Telegram/SourceFiles/ui/twidget.cpp
index d105f78..9a6ad1a 100644
index 9ebe6cb..ab3418f 100644
--- a/Telegram/SourceFiles/ui/twidget.cpp
+++ b/Telegram/SourceFiles/ui/twidget.cpp
@@ -249,9 +249,9 @@ void sendSynteticMouseEvent(QWidget *widget, QEvent::Type type, Qt::MouseButton
@@ -199,7 +199,7 @@ index d105f78..9a6ad1a 100644
-#endif // OS_MAC_OLD
+#endif
);
ev.setTimestamp(getms());
ev.setTimestamp(crl::now());
QGuiApplication::sendEvent(windowHandle, &ev);
diff --git a/Telegram/gyp/PrecompiledHeader.cmake b/Telegram/gyp/PrecompiledHeader.cmake
index a0e1e04..2231130 100644
@@ -418,7 +418,7 @@ index f5624a8..1129a95 100644
'-no-compress',
'<(RULE_INPUT_PATH)',
diff --git a/Telegram/gyp/settings_linux.gypi b/Telegram/gyp/settings_linux.gypi
index 17219fa..b00fd50 100644
index 2216051..5a8c4f0 100644
--- a/Telegram/gyp/settings_linux.gypi
+++ b/Telegram/gyp/settings_linux.gypi
@@ -11,7 +11,6 @@
@@ -429,7 +429,7 @@ index 17219fa..b00fd50 100644
'-W',
'-fPIC',
'-Wno-unused-variable',
@@ -43,7 +42,7 @@
@@ -44,7 +43,7 @@
'sources': [ '__Wrong_Official_Build_Target_<(official_build_target)_' ],
}],
],
@@ -438,7 +438,7 @@ index 17219fa..b00fd50 100644
# 32 bit version can't be linked with debug info or LTO,
# virtual memory exhausted :(
'cflags_c': [ '-g' ],
@@ -60,7 +59,6 @@
@@ -61,7 +60,6 @@
],
'defines': [
'_REENTRANT',
@@ -528,10 +528,10 @@ index ffe0e5a..82316d1 100644
}], ['<!(pkg-config ayatana-appindicator3-0.1; echo $?) == 0', {
'cflags_cc': [ '<!(pkg-config --cflags ayatana-appindicator3-0.1)' ],
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
index a914a0a..0e49bec 100644
index 8d21ef0..84bdb90 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
@@ -830,14 +830,7 @@
@@ -854,14 +854,7 @@
<(emoji_suggestions_loc)/emoji_suggestions.cpp
<(emoji_suggestions_loc)/emoji_suggestions.h

View File

@@ -1,6 +1,6 @@
From 90ef5477ee4c8ebb41a3ce3613aa1d0ec6db8951 Mon Sep 17 00:00:00 2001
From e82405c4d5b0f2eae1aac641625a98443cc0d7c0 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 3 Feb 2019 00:23:28 +1000
Date: Wed, 20 Mar 2019 20:44:47 +1000
Subject: Add Haiku support
@@ -217,10 +217,10 @@ index faf45cd..ea4691f 100644
} // namespace Core
diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp
index dabeddc..20dd2c1 100644
index 8aefb97..d54c8d1 100644
--- a/Telegram/SourceFiles/core/update_checker.cpp
+++ b/Telegram/SourceFiles/core/update_checker.cpp
@@ -500,6 +500,7 @@ bool ParseCommonMap(
@@ -499,6 +499,7 @@ bool ParseCommonMap(
case dbipWindows: return "win";
case dbipMac: return "mac";
case dbipMacOld: return "mac32";
@@ -228,7 +228,7 @@ index dabeddc..20dd2c1 100644
case dbipLinux64: return "linux";
case dbipLinux32: return "linux32";
}
@@ -1509,6 +1510,9 @@ bool checkReadyUpdate() {
@@ -1508,6 +1509,9 @@ bool checkReadyUpdate() {
#elif defined Q_OS_LINUX // Q_OS_MAC
QString curUpdater = (cExeDir() + qsl("Updater"));
QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater"));
@@ -239,10 +239,10 @@ index dabeddc..20dd2c1 100644
if (!updater.exists()) {
QFileInfo current(curUpdater);
diff --git a/Telegram/SourceFiles/core/utils.h b/Telegram/SourceFiles/core/utils.h
index e8b0d33..99d61bc 100644
index ee1dbc5..cb811b3 100644
--- a/Telegram/SourceFiles/core/utils.h
+++ b/Telegram/SourceFiles/core/utils.h
@@ -350,6 +350,7 @@ enum DBIPlatform {
@@ -347,6 +347,7 @@ enum DBIPlatform {
dbipLinux64 = 2,
dbipLinux32 = 3,
dbipMacOld = 4,
@@ -285,7 +285,7 @@ index 3dc7b4e..3506b23 100644
const auto peerId = (!data.is_out()
&& data.has_from_id()
diff --git a/Telegram/SourceFiles/export/export_api_wrap.cpp b/Telegram/SourceFiles/export/export_api_wrap.cpp
index f183f3b..44053fc 100644
index 8583e34..470690d 100644
--- a/Telegram/SourceFiles/export/export_api_wrap.cpp
+++ b/Telegram/SourceFiles/export/export_api_wrap.cpp
@@ -720,7 +720,8 @@ void ApiWrap::handleUserpicsSlice(const MTPphotos_Photos &result) {
@@ -321,11 +321,11 @@ index 84c9af0..5e343c6 100644
} else {
if (!cWorkingDir().isEmpty()) {
// This value must come from TelegramForcePortable
diff --git a/Telegram/SourceFiles/media/media_audio.cpp b/Telegram/SourceFiles/media/media_audio.cpp
index b9843c2..898fbb2 100644
--- a/Telegram/SourceFiles/media/media_audio.cpp
+++ b/Telegram/SourceFiles/media/media_audio.cpp
@@ -99,6 +99,7 @@ void EnumeratePlaybackDevices() {
diff --git a/Telegram/SourceFiles/media/audio/media_audio.cpp b/Telegram/SourceFiles/media/audio/media_audio.cpp
index 60071db..4c24515 100644
--- a/Telegram/SourceFiles/media/audio/media_audio.cpp
+++ b/Telegram/SourceFiles/media/audio/media_audio.cpp
@@ -109,6 +109,7 @@ void EnumeratePlaybackDevices() {
void EnumerateCaptureDevices() {
auto deviceNames = QStringList();
auto devices = alcGetString(nullptr, ALC_CAPTURE_DEVICE_SPECIFIER);
@@ -333,7 +333,7 @@ index b9843c2..898fbb2 100644
Assert(devices != nullptr);
while (*devices != 0) {
auto deviceName8Bit = QByteArray(devices);
@@ -107,7 +108,7 @@ void EnumerateCaptureDevices() {
@@ -117,7 +118,7 @@ void EnumerateCaptureDevices() {
devices += deviceName8Bit.size() + 1;
}
LOG(("Audio Capture Devices: %1").arg(deviceNames.join(';')));
@@ -1090,10 +1090,10 @@ index 0000000..b6f3490
+resource app_signature "application/x-vnd.tg-notify-gate";
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
new file mode 100644
index 0000000..def91de
index 0000000..7747c72
--- /dev/null
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
@@ -0,0 +1,212 @@
@@ -0,0 +1,217 @@
+/*
+This file is part of Telegram Desktop for Haiku,
+
@@ -1110,8 +1110,13 @@ index 0000000..def91de
+Copyright (c) 2018 Gerasim Troeglazov, 3dEyes@gmail.com
+*/
+
+#ifdef __x86_64__
+#define int64 XXX
+#define uint64 YYY
+#else
+#define int32 XXX
+#define uint32 YYY
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
@@ -2072,10 +2077,10 @@ index 692f4b4..a40f830 100644
#include "platform/win/notifications_manager_win.h"
#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h
index 848ff21..dbc0076 100644
index 919065a..0fddc51 100644
--- a/Telegram/SourceFiles/platform/platform_specific.h
+++ b/Telegram/SourceFiles/platform/platform_specific.h
@@ -55,6 +55,8 @@ void finish();
@@ -60,6 +60,8 @@ void finish();
#include "platform/mac/specific_mac.h"
#elif defined Q_OS_LINUX // Q_OS_MAC
#include "platform/linux/specific_linux.h"
@@ -2147,7 +2152,7 @@ index 9c697fc..36ddf56 100644
#include <rpl/rpl.h>
#include <string>
diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp
index 28d9988..98607b4 100644
index c01dcc8..bca6501 100644
--- a/Telegram/SourceFiles/settings.cpp
+++ b/Telegram/SourceFiles/settings.cpp
@@ -73,6 +73,8 @@ DBIPlatform gPlatform = dbipWindows;
@@ -2160,7 +2165,7 @@ index 28d9988..98607b4 100644
DBIPlatform gPlatform = dbipLinux64;
#elif defined Q_OS_LINUX32
diff --git a/Telegram/SourceFiles/settings/settings_notifications.cpp b/Telegram/SourceFiles/settings/settings_notifications.cpp
index 91efa99..344723c 100644
index 1613aee..3bdb0b5 100644
--- a/Telegram/SourceFiles/settings/settings_notifications.cpp
+++ b/Telegram/SourceFiles/settings/settings_notifications.cpp
@@ -584,6 +584,8 @@ void SetupNotificationsContent(not_null<Ui::VerticalLayout*> container) {
@@ -2633,10 +2638,10 @@ index d9147d6..16c9d3f 100644
'variables': {
'qrc_files': [
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
index 0e49bec..06ae892 100644
index 84bdb90..c22f78c 100644
--- a/Telegram/gyp/telegram_sources.txt
+++ b/Telegram/gyp/telegram_sources.txt
@@ -539,6 +539,18 @@
@@ -561,6 +561,18 @@
<(src_loc)/platform/linux/notifications_manager_linux.h
<(src_loc)/platform/linux/specific_linux.cpp
<(src_loc)/platform/linux/specific_linux.h
@@ -2677,30 +2682,83 @@ index 622462e..e3ba800 100644
2.19.1
From 733717189728393b3fff7a14c4845df10d38130e Mon Sep 17 00:00:00 2001
From cb3e651cfa584d042081612d969dab1a97683506 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 3 Feb 2019 17:49:16 +1000
Subject: Fix build for hybrid
Date: Wed, 20 Mar 2019 23:58:20 +1000
Subject: Fix build for new API
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
index def91de..7747c72 100644
--- a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
@@ -14,8 +14,13 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
Copyright (c) 2018 Gerasim Troeglazov, 3dEyes@gmail.com
*/
diff --git a/Telegram/SourceFiles/platform/haiku/main_window_haiku.h b/Telegram/SourceFiles/platform/haiku/main_window_haiku.h
index ceb89c0..113ac3a 100644
--- a/Telegram/SourceFiles/platform/haiku/main_window_haiku.h
+++ b/Telegram/SourceFiles/platform/haiku/main_window_haiku.h
@@ -68,8 +68,6 @@ private:
int _psCheckStatusIconLeft = 100;
+#ifdef __x86_64__
#define int64 XXX
#define uint64 YYY
+#else
+#define int32 XXX
+#define uint32 YYY
+#endif
QTimer _psUpdateIndicatorTimer;
- TimeMs _psLastIndicatorUpdate = 0;
-
};
} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
index 5acf791..c71d8b3 100644
--- a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
@@ -64,7 +64,7 @@ auto _monitorLastGot = 0LL;
} // namespace
QRect psDesktopRect() {
- auto tnow = getms();
+ auto tnow = crl::now();
if (tnow > _monitorLastGot + 1000LL || tnow < _monitorLastGot) {
_monitorLastGot = tnow;
_monitorRect = QApplication::desktop()->availableGeometry(App::wnd());
@@ -267,18 +267,6 @@ auto _lastUserAction = 0LL;
} // namespace
-void psUserActionDone() {
- _lastUserAction = getms(true);
-}
-
-bool psIdleSupported() {
- return false;
-}
-
-TimeMs psIdleTime() {
- return getms(true) - _lastUserAction;
-}
-
void psActivateProcess(uint64 pid) {
// objc_activateProgram();
}
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
index a9cc589..90c58bc 100644
--- a/Telegram/SourceFiles/platform/haiku/specific_haiku.h
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
@@ -39,6 +39,10 @@ inline void ReInitOnTopPanel(QWidget *panel) {
QString CurrentExecutablePath(int argc, char *argv[]);
+inline std::optional<crl::time> LastUserInputTime() {
+ return std::nullopt;
+}
+
} // namespace Platform
inline QString psServerPrefix() {
@@ -56,10 +60,6 @@ QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile);
void psDeleteDir(const QString &dir);
-void psUserActionDone();
-bool psIdleSupported();
-TimeMs psIdleTime();
-
QStringList psInitLogs();
void psClearInitLogs();
#include <stdio.h>
#include <unistd.h>
--
2.19.1

View File

@@ -5,12 +5,12 @@ COPYRIGHT="2013-2019 Telegram"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="27916cff1fe9a1042152103cf9ad3385296240fb3d4470a079bae47b1fefd43f"
CHECKSUM_SHA256="eb092e6752c3802250f54f95af39d2e7c2f346a587caff8e8dc501d91c3de5b4"
SOURCE_FILENAME="tdesktop-$portVersion.tar.gz"
SOURCE_DIR="tdesktop-$portVersion"
srcGitRev_2="59a975bf66c19ebddd8c82d9d501fddc02584d7c"
srcGitRev_2="16711e202393ae7e1b160436f4291c5f06a3d375"
SOURCE_URI_2="https://github.com/telegramdesktop/libtgvoip/archive/$srcGitRev_2.tar.gz"
CHECKSUM_SHA256_2="def54b1aa4f9e0fcd8d1134eec8a86cbe804247ed9270cb479ceee5adc05383a"
CHECKSUM_SHA256_2="f35e6714ae3e57d78480d9d736e94f68176194becc3d67231bb9257d3c164cf4"
SOURCE_FILENAME_2="libtgvoip-$srcGitRev_2.tar.gz"
srcGitRev_3="550ac2f159ca883d360c196149b466955c77a573"
SOURCE_URI_3="https://github.com/mapbox/variant/archive/$srcGitRev_3.tar.gz"
@@ -24,9 +24,9 @@ srcGitRev_5="5ca44b68721833ae3731802ed99af67c6f38a53a"
SOURCE_URI_5="https://github.com/philsquared/Catch/archive/$srcGitRev_5.tar.gz"
CHECKSUM_SHA256_5="d24e6d9df2b8aa5739d3b9077c6b0ff0ef4d5ef8acc52c3a57e32893854d8d18"
SOURCE_FILENAME_5="Catch-$srcGitRev_5.tar.gz"
srcGitRev_6="9b7c6b5d9f1b59d2160bf6e9c4e74510f955efe1"
srcGitRev_6="84072fba75f14620935e5e91788ce603daeb1988"
SOURCE_URI_6="https://github.com/telegramdesktop/crl/archive/$srcGitRev_6.tar.gz"
CHECKSUM_SHA256_6="e605df0dc5d27066e8856b089a308f353c5e71ea7aa6cb102e50a64c7103ff8d"
CHECKSUM_SHA256_6="0f4143814b17d61d09c6a7fb6764ce74756ec14c0aab94cd65758f7b5a6d2928"
SOURCE_FILENAME_6="crl-$srcGitRev_6.tar.gz"
srcGitRev_7="4b10be9cbadd7d0880437f48f875185589fd86d3"
SOURCE_URI_7="https://github.com/ericniebler/range-v3/archive/$srcGitRev_7.tar.gz"
@@ -104,6 +104,7 @@ BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:gyp
cmd:lrelease$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed