Compare commits

...

9 Commits

Author SHA1 Message Date
Alexander Zhirov b6201faace link lib webrtc 2023-03-20 18:35:03 +03:00
Alexander Zhirov 7d35182c4c link lib webrtc 2023-03-20 18:29:16 +03:00
Alexander Zhirov f34e08ea7a link lib webrtc 2023-03-20 18:25:55 +03:00
Alexander Zhirov b89af2cf46 link lib fmt 2023-03-20 18:12:22 +03:00
Alexander Zhirov 1be11fbe9c link library 2023-03-20 17:56:47 +03:00
Alexander Zhirov 23ab3a990c CodecInfoVector2 2023-03-20 17:44:05 +03:00
Alexander Zhirov e1ce525c34 fix net 2023-03-20 17:39:56 +03:00
Alexander Zhirov 486f970b2a fix spdlog 1.9.2 2023-03-20 17:31:27 +03:00
Alexander Zhirov 0a443ecb27 fix network ipv6 2023-03-20 17:27:09 +03:00
4 changed files with 14 additions and 6 deletions

View File

@ -8,7 +8,7 @@ add_subdirectory(libtgvoip)
find_package(PkgConfig REQUIRED)
find_package(Threads REQUIRED)
find_package(Td 1.8.0 REQUIRED)
find_package(spdlog 1.11.0 REQUIRED)
find_package(spdlog 1.9.2 REQUIRED)
pkg_check_modules(PJSIP libpjproject>=2.8 REQUIRED)
pkg_check_modules(OPUS opus REQUIRED)

View File

@ -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 1.11.0)
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 ()
endif ()
target_link_libraries(libtgvoip PRIVATE
${PJSIP_LIBRARIES}
${OPUS_LIBRARIES}
${FMT_LIBRARIES}
${WEBRTC_LIBRARIES})

View File

@ -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;

View File

@ -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;