135 lines
4.1 KiB
Diff
135 lines
4.1 KiB
Diff
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
index 8507dbe..8577efb 100644
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -7,8 +7,8 @@ add_subdirectory(libtgvoip)
|
||
|
|
||
|
find_package(PkgConfig REQUIRED)
|
||
|
find_package(Threads REQUIRED)
|
||
|
-find_package(Td 1.7.10 REQUIRED)
|
||
|
-find_package(spdlog 0.17 REQUIRED)
|
||
|
+find_package(Td 1.8.0 REQUIRED)
|
||
|
+find_package(spdlog 1.9.2 REQUIRED)
|
||
|
pkg_check_modules(PJSIP libpjproject>=2.8 REQUIRED)
|
||
|
pkg_check_modules(OPUS opus REQUIRED)
|
||
|
|
||
|
diff --git a/include/boost/sml.hpp b/include/boost/sml.hpp
|
||
|
index a28bddf..3245862 100644
|
||
|
--- a/include/boost/sml.hpp
|
||
|
+++ b/include/boost/sml.hpp
|
||
|
@@ -2525,7 +2525,7 @@ BOOST_SML_NAMESPACE_END
|
||
|
#if defined(__clang__)
|
||
|
#pragma clang diagnostic pop
|
||
|
#elif defined(__GNUC__)
|
||
|
-#undef __has_builtin
|
||
|
+//#undef __has_builtin
|
||
|
#pragma GCC diagnostic pop
|
||
|
#elif defined(_MSC_VER)
|
||
|
#undef __has_builtin
|
||
|
diff --git a/libtgvoip/CMakeLists.txt b/libtgvoip/CMakeLists.txt
|
||
|
index a9658fb..237bcd7 100644
|
||
|
--- a/libtgvoip/CMakeLists.txt
|
||
|
+++ b/libtgvoip/CMakeLists.txt
|
||
|
@@ -4,7 +4,9 @@ find_package(PkgConfig REQUIRED)
|
||
|
pkg_check_modules(OPUS opus REQUIRED)
|
||
|
pkg_check_modules(OPENSSL openssl REQUIRED)
|
||
|
pkg_check_modules(PJSIP libpjproject>=2.8 REQUIRED)
|
||
|
-find_package(spdlog 0.17)
|
||
|
+pkg_check_modules(FMT fmt REQUIRED)
|
||
|
+pkg_check_modules(WEBRTC webrtc-audio-processing REQUIRED)
|
||
|
+find_package(spdlog 1.9.2)
|
||
|
|
||
|
add_library(libtgvoip STATIC
|
||
|
BlockingQueue.cpp
|
||
|
@@ -675,4 +677,10 @@ if (${spdlog_FOUND})
|
||
|
TGVOIP_USE_SPDLOG)
|
||
|
else ()
|
||
|
message(STATUS "Could NOT find spdlog")
|
||
|
-endif ()
|
||
|
\ No newline at end of file
|
||
|
+endif ()
|
||
|
+
|
||
|
+target_link_libraries(libtgvoip PRIVATE
|
||
|
+ ${PJSIP_LIBRARIES}
|
||
|
+ ${OPUS_LIBRARIES}
|
||
|
+ ${FMT_LIBRARIES}
|
||
|
+ ${WEBRTC_LIBRARIES})
|
||
|
diff --git a/libtgvoip/audio/AudioIO.cpp b/libtgvoip/audio/AudioIO.cpp
|
||
|
index ad2ec82..23faf89 100644
|
||
|
--- a/libtgvoip/audio/AudioIO.cpp
|
||
|
+++ b/libtgvoip/audio/AudioIO.cpp
|
||
|
@@ -85,6 +85,7 @@ AudioIO* AudioIO::Create(std::string inputDevice, std::string outputDevice){
|
||
|
#endif
|
||
|
#endif
|
||
|
#endif
|
||
|
+ return NULL;
|
||
|
}
|
||
|
|
||
|
bool AudioIO::Failed(){
|
||
|
diff --git a/libtgvoip/os/posix/NetworkSocketPosix.cpp b/libtgvoip/os/posix/NetworkSocketPosix.cpp
|
||
|
index 26289d5..16e28b1 100644
|
||
|
--- a/libtgvoip/os/posix/NetworkSocketPosix.cpp
|
||
|
+++ b/libtgvoip/os/posix/NetworkSocketPosix.cpp
|
||
|
@@ -29,7 +29,7 @@ extern jclass jniUtilitiesClass;
|
||
|
|
||
|
// fix of undef in pjsip
|
||
|
#if defined(TGVOIP_USE_SOFTWARE_AUDIO)
|
||
|
-#define s6_addr __in6_u.__u6_addr8
|
||
|
+// #define s6_addr __in6_u.__u6_addr8
|
||
|
#endif
|
||
|
|
||
|
using namespace tgvoip;
|
||
|
diff --git a/tg2sip/logging.cpp b/tg2sip/logging.cpp
|
||
|
index 8a51353..287fb03 100755
|
||
|
--- a/tg2sip/logging.cpp
|
||
|
+++ b/tg2sip/logging.cpp
|
||
|
@@ -18,6 +18,7 @@
|
||
|
#include <iostream>
|
||
|
#include <td/telegram/Log.h>
|
||
|
#include "logging.h"
|
||
|
+#include <spdlog/sinks/rotating_file_sink.h>
|
||
|
|
||
|
void init_logging(Settings &settings) {
|
||
|
|
||
|
diff --git a/tg2sip/queue.h b/tg2sip/queue.h
|
||
|
index bfe1fa0..3e9c555 100755
|
||
|
--- a/tg2sip/queue.h
|
||
|
+++ b/tg2sip/queue.h
|
||
|
@@ -20,6 +20,7 @@
|
||
|
|
||
|
#include <mutex>
|
||
|
#include <queue>
|
||
|
+#include <optional>
|
||
|
#include <condition_variable>
|
||
|
|
||
|
template<typename T>
|
||
|
diff --git a/tg2sip/sip.cpp b/tg2sip/sip.cpp
|
||
|
index 06672a6..306f650 100755
|
||
|
--- a/tg2sip/sip.cpp
|
||
|
+++ b/tg2sip/sip.cpp
|
||
|
@@ -185,10 +185,10 @@ void Client::init_pj_endpoint(Settings &settings, LogWriter *sip_log_writer) {
|
||
|
// and TG audio port clock rate so we MUST force
|
||
|
// using 48kHz codecs for all SIP calls
|
||
|
std::string codecId = settings.raw_pcm() ? "L16/48000/1" : "opus/48000/2";
|
||
|
- CodecInfoVector codecVector = ep.codecEnum();
|
||
|
+ CodecInfoVector2 codecVector = ep.codecEnum2();
|
||
|
|
||
|
for (auto const &value : codecVector) {
|
||
|
- ep.codecSetPriority(value->codecId, (pj_uint8_t) (value->codecId == codecId ? 255 : 0));
|
||
|
+ ep.codecSetPriority(value.codecId, (pj_uint8_t) (value.codecId == codecId ? 255 : 0));
|
||
|
}
|
||
|
|
||
|
TransportConfig t_cfg;
|
||
|
diff --git a/tg2sip/utils.cpp b/tg2sip/utils.cpp
|
||
|
index c8da02b..09a330f 100644
|
||
|
--- a/tg2sip/utils.cpp
|
||
|
+++ b/tg2sip/utils.cpp
|
||
|
@@ -17,5 +17,6 @@
|
||
|
|
||
|
#include <algorithm>
|
||
|
#include "utils.h"
|
||
|
+#include <string>
|
||
|
|
||
|
bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); };
|
||
|
\ No newline at end of file
|