summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/kopete/PKGBUILD54
-rw-r--r--libre/kopete/kopete-mediastreamer-4.3.patch84
-rw-r--r--libre/kopete/kopete-mediastreamer2.14.patch266
3 files changed, 338 insertions, 66 deletions
diff --git a/libre/kopete/PKGBUILD b/libre/kopete/PKGBUILD
index 988599c65..a02382edd 100644
--- a/libre/kopete/PKGBUILD
+++ b/libre/kopete/PKGBUILD
@@ -1,67 +1,58 @@
-# Maintainer: Andreas Grapentin <andreas@grapentin.org>
# Maintainer (Arch): Felix Yan <felixonmars@archlinux.org>
# Maintainer (Arch): Antonio Rojas <arojas@archlinux.org>
-# Contributor: André Silva <emulatorman@hyperbola.info>
-# Contributor: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Contributor (Arch): Andrea Scarpino <andrea@archlinux.org>
+# Maintainer: Andreas Grapentin <andreas@grapentin.org>
+# Contributor (Hyperbola): André Silva <emulatorman@hyperbola.info>
+# Contributor: jc_gargma <jc_gargma@iserlohn-fortress.net>
pkgname=kopete
-pkgver=18.08.1
-pkgrel=1.parabola1
-pkgdesc='Instant Messenger, without nonfree Skype support'
+pkgver=19.12.3
+pkgrel=1
+pkgrel+=.parabola1
+pkgdesc='Instant Messenger'
+pkgdesc+=', without nonfree Skype support'
url='https://kde.org/applications/internet/kopete/'
-arch=(i686 x86_64 armv7h)
+arch=(x86_64)
+arch+=(i686 armv7h)
license=(GPL LGPL FDL)
groups=(kde-applications kdenetwork)
-depends=(knotifyconfig kcmutils ktexteditor kcontacts kidentitymanagement libkleo qca kdelibs4support khtml libotr)
-makedepends=(extra-cmake-modules mediastreamer libgadu jsoncpp kdoctools kdesignerplugin kdnssd libkleo ktexteditor)
+depends=(knotifyconfig kcmutils ktexteditor kcontacts kidentitymanagement libkleo qca kdelibs4support khtml
+ libidn libotr)
+makedepends=(extra-cmake-modules mediastreamer libgadu jsoncpp kdoctools kdesignerplugin kdnssd libkleo ktexteditor kinit)
optdepends=('mediastreamer: jingle support' 'libgadu: Gadu-Gadu protocol' 'kdnssd: bonjour protocol')
-conflicts=(kdenetwork-kopete)
-replaces=(kdenetwork-kopete)
-source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}
- kopete-mediastreamer2.14.patch
- kopete-srtp2.patch
- kopete-openssl-1.1.patch
- kopete-glibc-2.28.patch
- kopete-pthread-link.patch)
-sha256sums=('93fc1c360cce2471eae7286b1fb72b112e6192fee78ef68cda3ce270ed866844'
+source=("https://download.kde.org/stable/release-service/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig}
+ kopete-mediastreamer2.14.patch kopete-srtp2.patch kopete-openssl-1.1.patch kopete-mediastreamer-4.3.patch)
+sha256sums=('8d58fb0c9dd8b651bfc996e6928f7ccdad8e21cba39ffd0e54d46f7145fa7b27'
'SKIP'
- 'c34a268aaa058e563174581dbe37c15fed91e82326ec704d2a872463139865e0'
+ '8b8e7a5d9f17fafdddb402fab22b0b8d9963039ea8ea9fa749cad67aeeb879ac'
'ceed663f7007654d186d918cf7a0742972ed5bd319879021e9ba80e395177700'
'a12ea422e5162ef11274a98fd53658d6e780cafbe2e0fac70c8bc7d3291fef8b'
- 'ba1b830bbd74c3dde8de99d887bd20205b4bbb1e466a41aa2b230404f1959c83'
- 'a7ebdd8dd4336b7ec085ef254bf18040f473b73379a8cd84569b28441a6c71df')
+ '7ff38588f25bc05eae8ba20d9624536b33addf26b74e8c64ac036291f98f2bc2')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7 # Albert Astals Cid <aacid@kde.org>
F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>
prepare() {
mkdir -p build
- cd kopete-$pkgver
-
+ cd $pkgname-$pkgver
# based on https://devel.trisquel.info/trisquel/package-helpers/blob/belenos/helpers/make-kopete
sed -i 's/Skype protocol" ON/Skype protocol" OFF/g' protocols/CMakeLists.txt
rm -rf protocols/skype
sed 's/, Skype//' -i ./doc/index.docbook
-# fix build with mediastreamer 2.14
+# fix build with mediastreamer 2.14 https://phabricator.kde.org/D15956
patch -p1 -i ../kopete-mediastreamer2.14.patch
+# Detect mediastreamer 4.3
+ patch -p1 -i ../kopete-mediastreamer-4.3.patch
# fix build with OpenSSL 1.1 (Fedora patch)
patch -p1 -i ../kopete-openssl-1.1.patch
-# fix link to pthread
- patch -p1 -i ../kopete-pthread-link.patch
# support SRTP2
patch -p1 -i ../kopete-srtp2.patch
-# fix build with glibc 2.28
- patch -p1 -i ../kopete-glibc-2.28.patch
}
build() {
cd build
-
cmake ../$pkgname-$pkgver \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_TESTING=OFF \
-DWITH_skype=OFF
make
@@ -69,6 +60,5 @@ build() {
package() {
cd build
-
make DESTDIR="$pkgdir" install
}
diff --git a/libre/kopete/kopete-mediastreamer-4.3.patch b/libre/kopete/kopete-mediastreamer-4.3.patch
new file mode 100644
index 000000000..0b6bac556
--- /dev/null
+++ b/libre/kopete/kopete-mediastreamer-4.3.patch
@@ -0,0 +1,84 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 55556be4a..8e63c2cee 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -92,8 +92,8 @@ set_package_properties(Libgadu PROPERTIES DESCRIPTION "A library providing suppo
+ find_package(LibMeanwhile QUIET)
+ set_package_properties(LibMeanwhile PROPERTIES DESCRIPTION "A library for protocol support for connection to sametime servers" URL "http://meanwhile.sourceforge.net/" TYPE OPTIONAL PURPOSE "Required for the meanwhile protocol")
+
+-find_package(LiboRTP QUIET)
+-set_package_properties(LiboRTP PROPERTIES DESCRIPTION "oRTP provides an API to send rtp packets" URL "http://www.linphone.org/index.php/eng/code_review/ortp/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
++find_package(ortp QUIET)
++set_package_properties(ortp PROPERTIES DESCRIPTION "oRTP provides an API to send rtp packets" URL "http://www.linphone.org/index.php/eng/code_review/ortp/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
+
+ find_package(LibOTR QUIET)
+ set_package_properties(LibOTR PROPERTIES DESCRIPTION "Library to encrypt messages with off-the-record encryption" URL "http://www.cypherpunks.ca/otr/" TYPE OPTIONAL PURPOSE "Required for the OTR plugin")
+@@ -107,8 +107,8 @@ set_package_properties(LibXml2 PROPERTIES DESCRIPTION "Libraries used to develop
+ find_package(LibXslt QUIET)
+ set_package_properties(LibXslt PROPERTIES DESCRIPTION "A library to transform XML files into other XML files" URL "http://www.xmlsoft.org/XSLT/" TYPE OPTIONAL PURPOSE "Required for the Webpresence plugin")
+
+-find_package(Mediastreamer QUIET)
+-set_package_properties(Mediastreamer PROPERTIES DESCRIPTION "A streaming enginer specialized for voice/video telephony applications" URL "http://www.linphone.org/index.php/eng/code_review/mediastreamer2/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
++find_package(Mediastreamer2 QUIET)
++set_package_properties(Mediastreamer2 PROPERTIES DESCRIPTION "A streaming enginer specialized for voice/video telephony applications" URL "http://www.linphone.org/index.php/eng/code_review/mediastreamer2/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
+
+ find_package(OpenSSL QUIET)
+ set_package_properties(OpenSSL PROPERTIES DESCRIPTION "OpenSSL implementation of SSL" URL "https://www.openssl.org/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
+diff --git a/protocols/CMakeLists.txt b/protocols/CMakeLists.txt
+index 89d36a4e4..5f13ff9d9 100644
+--- a/protocols/CMakeLists.txt
++++ b/protocols/CMakeLists.txt
+@@ -22,7 +22,7 @@ option(WITH_skype "Enable Kopete Skype protocol" ON)
+ set(BUILD_JINGLE FALSE)
+
+ if(OPENSSL_FOUND OR WIN32)
+- if(EXPAT_FOUND AND LIBORTP_FOUND AND SRTP_FOUND AND JSONCPP_FOUND AND MEDIASTREAMER_FOUND AND WITH_libjingle)
++ if(EXPAT_FOUND AND ORTP_FOUND AND SRTP_FOUND AND JSONCPP_FOUND AND MEDIASTREAMER2_FOUND AND WITH_libjingle)
+ message(STATUS "Building jabber libjingle support")
+ set(BUILD_LIBJINGLE TRUE)
+ else()
+diff --git a/protocols/jabber/libjingle/CMakeLists.txt b/protocols/jabber/libjingle/CMakeLists.txt
+index af7c1c3af..de7596615 100644
+--- a/protocols/jabber/libjingle/CMakeLists.txt
++++ b/protocols/jabber/libjingle/CMakeLists.txt
+@@ -286,8 +286,8 @@ set ( call_LIBS
+ ${SRTP_LIBRARY}
+ ${JSONCPP_LIBRARY}
+ ${EXPAT_LIBRARY}
+- ${MEDIASTREAMER_LIBRARIES}
+- ${LIBORTP_LIBRARY}
++ ${MEDIASTREAMER2_LIBRARIES}
++ ${ORTP_LIBRARIES}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${CMAKE_DL_LIBS}
+ )
+diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
+index bd11027e0..6f9e05a0a 100644
+--- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
++++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
+@@ -34,11 +34,9 @@
+ #ifdef HAVE_LINPHONE
+
+ // LinphoneMediaEngine is a Linphone implementation of MediaEngine
+-extern "C" {
+ #include <mediastreamer2/mediastream.h>
+ #include <mediastreamer2/mssndcard.h>
+ #include <mediastreamer2/msfilter.h>
+-}
+
+ #include "talk/session/phone/linphonemediaengine.h"
+
+diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h
+index 6105ab8cb..f5b5c3b14 100644
+--- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h
++++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h
+@@ -35,9 +35,7 @@
+ #include <string>
+ #include <vector>
+
+-extern "C" {
+ #include <mediastreamer2/mediastream.h>
+-}
+
+ #include "talk/base/scoped_ptr.h"
+ #include "talk/session/phone/codec.h"
diff --git a/libre/kopete/kopete-mediastreamer2.14.patch b/libre/kopete/kopete-mediastreamer2.14.patch
index f4ee1a096..5d106400b 100644
--- a/libre/kopete/kopete-mediastreamer2.14.patch
+++ b/libre/kopete/kopete-mediastreamer2.14.patch
@@ -1,83 +1,281 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -34,6 +34,7 @@
+
+ find_package(KF5Contacts ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
+ find_package(KF5IdentityManagement ${KCONTACTS_LIB_VERSION} CONFIG REQUIRED)
++find_package(Threads)
+
+ include(KDEInstallDirs)
+ include(KDECompilerSettings NO_POLICY_SCOPE)
+diff --git a/cmake/modules/FindLiboRTP.cmake b/cmake/modules/FindLiboRTP.cmake
+--- a/cmake/modules/FindLiboRTP.cmake
++++ b/cmake/modules/FindLiboRTP.cmake
+@@ -11,7 +11,7 @@
+
+ SET( LIBORTP_FOUND FALSE )
+
+-pkg_check_modules(ortp ortp)
++pkg_check_modules(ORTP ortp)
+
+ FIND_PATH( LIBORTP_INCLUDE_DIR
+ ortp/ortp.h
+@@ -40,7 +40,13 @@
+ if ( run_result EQUAL 0 )
+ # Version OK
+ SET( LIBORTP_FOUND TRUE )
+- MESSAGE( STATUS "Found libortp: ${LIBORTP_LIBRARY}" )
++ MESSAGE( STATUS "Found libortp: ${LIBORTP_LIBRARY} ${ORTP_VERSION}" )
++ IF (ORTP_VERSION VERSION_LESS 1.0.1)
++ SET(ORTP_LESS_1_0_1 TRUE)
++ ELSE (ORTP_VERSION VERSION_LESS 1.0.1)
++ SET(ORTP_LESS_1_0_1 FALSE)
++ ENDIF (ORTP_VERSION VERSION_LESS 1.0.1)
++
+ endif ( run_result EQUAL 0 )
+ endif( compile_result )
+ ENDIF( LIBORTP_INCLUDE_DIR AND LIBORTP_LIBRARY )
diff --git a/cmake/modules/FindMediastreamer.cmake b/cmake/modules/FindMediastreamer.cmake
-index 47fe5c3..31802f0 100644
--- a/cmake/modules/FindMediastreamer.cmake
+++ b/cmake/modules/FindMediastreamer.cmake
-@@ -24,12 +24,19 @@ IF (MEDIASTREAMER_FOUND)
+@@ -20,17 +20,25 @@
+
+ IF (MEDIASTREAMER_FOUND)
+ IF (NOT MEDIASTREAMER_FIND_QUIETLY)
++
+ MESSAGE(STATUS "Found Mediastreamer: ${MEDIASTREAMER_LIBRARIES} (version: ${MEDIASTREAMER_VERSION})")
++
++ SET(MEDIASTREAMER_LESS_2_9 FALSE)
++ SET(MEDIASTREAMER_LESS_2_11 FALSE)
++ SET(MEDIASTREAMER_LESS_2_14 FALSE)
++
IF (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
SET(MEDIASTREAMER_LESS_2_9 TRUE)
- SET(MEDIASTREAMER_LESS_2_11 TRUE)
-+ SET(MEDIASTREAMER_LESS_2_14 TRUE)
- ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11)
- SET(MEDIASTREAMER_LESS_2_9 FALSE)
- SET(MEDIASTREAMER_LESS_2_11 TRUE)
-+ SET(MEDIASTREAMER_LESS_2_14 TRUE)
-+ ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.14)
-+ SET(MEDIASTREAMER_LESS_2_9 FALSE)
-+ SET(MEDIASTREAMER_LESS_2_11 FALSE)
-+ SET(MEDIASTREAMER_LESS_2_14 TRUE)
- ELSE (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
- SET(MEDIASTREAMER_LESS_2_9 FALSE)
- SET(MEDIASTREAMER_LESS_2_11 FALSE)
-+ SET(MEDIASTREAMER_LESS_2_14 FALSE)
+- SET(MEDIASTREAMER_LESS_2_11 TRUE)
+- ELSEIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11)
+- SET(MEDIASTREAMER_LESS_2_9 FALSE)
+- SET(MEDIASTREAMER_LESS_2_11 TRUE)
+- ELSE (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
+- SET(MEDIASTREAMER_LESS_2_9 FALSE)
+- SET(MEDIASTREAMER_LESS_2_11 FALSE)
ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.9)
++
++ IF (MEDIASTREAMER_VERSION VERSION_LESS 2.11)
++ SET(MEDIASTREAMER_LESS_2_11 TRUE)
++ ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.11)
++
++ IF (MEDIASTREAMER_VERSION VERSION_LESS 2.14)
++ SET(MEDIASTREAMER_LESS_2_14 TRUE)
++ ENDIF (MEDIASTREAMER_VERSION VERSION_LESS 2.14)
++
ENDIF (NOT MEDIASTREAMER_FIND_QUIETLY)
ELSE (MEDIASTREAMER_FOUND)
+ IF (MEDIASTREAMER_FIND_REQUIRED)
+diff --git a/protocols/jabber/libjingle/CMakeLists.txt b/protocols/jabber/libjingle/CMakeLists.txt
+--- a/protocols/jabber/libjingle/CMakeLists.txt
++++ b/protocols/jabber/libjingle/CMakeLists.txt
+@@ -51,6 +51,10 @@
+ add_definitions ( -DMEDIASTREAMER_LESS_2_11 )
+ endif ( MEDIASTREAMER_LESS_2_11 )
+
++if ( MEDIASTREAMER_LESS_2_14 )
++ add_definitions ( -DMEDIASTREAMER_LESS_2_14 )
++endif ( MEDIASTREAMER_LESS_2_14 )
++
+ if ( CMAKE_BUILD_TYPE STREQUAL "Debug" )
+ add_definitions ( -D_DEBUG )
+ endif ( CMAKE_BUILD_TYPE STREQUAL "Debug" )
+@@ -284,6 +288,7 @@
+ ${EXPAT_LIBRARY}
+ ${MEDIASTREAMER_LIBRARIES}
+ ${LIBORTP_LIBRARY}
++ ${CMAKE_THREAD_LIBS_INIT}
+ ${CMAKE_DL_LIBS}
+ )
+
+diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h
+--- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h
++++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.h
+@@ -53,7 +53,11 @@
+ class LinphoneMediaEngine : public MediaEngineInterface {
+ public:
+ LinphoneMediaEngine(const std::string& ringWav, const std::string& callWav);
++#ifdef MEDIASTREAMER_LESS_2_14
+ virtual ~LinphoneMediaEngine() {}
++#else
++ ~LinphoneMediaEngine();
++#endif
+
+ // Implement pure virtual methods of MediaEngine.
+ virtual bool Init() { return true; }
+@@ -97,6 +101,10 @@
+ bool have_speex;
+ bool have_gsm;
+
++#ifndef MEDIASTREAMER_LESS_2_14
++ MSFactory *factory;
++#endif
++
+ private:
+ std::vector<AudioCodec> voice_codecs_;
+ std::vector<VideoCodec> video_codecs_;
+@@ -110,7 +118,11 @@
+ class LinphoneVoiceChannel : public VoiceMediaChannel {
+ public:
+ LinphoneVoiceChannel(LinphoneMediaEngine *eng);
++#ifdef MEDIASTREAMER_LESS_2_14
+ virtual ~LinphoneVoiceChannel();
++#else
++ ~LinphoneVoiceChannel();
++#endif
+
+ // Implement pure virtual methods of VoiceMediaChannel.
+ virtual bool SetRecvCodecs(const std::vector<AudioCodec>& codecs);
diff --git a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
-index bd3de2b..9379226 100644
--- a/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
+++ b/protocols/jabber/libjingle/talk/session/phone/linphonemediaengine.cc
-@@ -151,15 +151,25 @@ LinphoneVoiceChannel::LinphoneVoiceChannel(LinphoneMediaEngine*eng)
+@@ -60,18 +60,34 @@
+ ///////////////////////////////////////////////////////////////////////////
+ LinphoneMediaEngine::LinphoneMediaEngine(const std::string& ringWav, const std::string& callWav) : ring_wav_(ringWav), call_wav_(callWav) {
+ ortp_init();
++#ifdef MEDIASTREAMER_LESS_2_14
+ ms_init();
++#else
++ factory = ms_factory_new();
++ ms_factory_init_voip(factory);
++ ms_factory_init_plugins(factory);
++#endif
+
+ #ifndef WIN32
+ char * path = strdup(MSILBC_LIBRARY);
+ char * dirc = dirname(path);
++#ifdef MEDIASTREAMER_LESS_2_14
+ ms_load_plugins(dirc);
++#else
++ ms_factory_load_plugins(factory, dirc);
++#endif
+ free(path);
+ #endif
+
++#ifdef MEDIASTREAMER_LESS_2_14
+ have_ilbc = ms_filter_codec_supported("iLBC");
+ have_speex = ms_filter_codec_supported("speex");
+ have_gsm = ms_filter_codec_supported("gsm");
++#else
++ have_ilbc = ms_factory_codec_supported(factory, "iLBC");
++ have_speex = ms_factory_codec_supported(factory, "speex");
++ have_gsm = ms_factory_codec_supported(factory, "gsm");
++#endif
+
+ if (have_speex) {
+ voice_codecs_.push_back(AudioCodec(110, payload_type_speex_wb.mime_type, payload_type_speex_wb.clock_rate, 0, 1, 8));
+@@ -88,6 +104,14 @@
+ voice_codecs_.push_back(AudioCodec(101, payload_type_telephone_event.mime_type, payload_type_telephone_event.clock_rate, 0, 1, 1));
+ }
+
++#ifndef MEDIASTREAMER_LESS_2_14
++LinphoneMediaEngine::~LinphoneMediaEngine() {
++ ms_factory_uninit_plugins(factory);
++ ms_factory_uninit_voip(factory);
++ ms_factory_destroy(factory);
++}
++#endif
++
+ void LinphoneMediaEngine::Terminate() {
+ fflush(stdout);
+ }
+@@ -149,15 +173,25 @@
playport2 = PORT_UNUSED;
#ifdef _DEBUG
+#ifdef MEDIASTREAMER_LESS_2_14
ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
#else
-+ ortp_set_log_level_mask(NULL, ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
++ ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL);
+#endif
+#else
+#ifdef MEDIASTREAMER_LESS_2_14
ortp_set_log_level_mask(ORTP_FATAL);
+#else
-+ ortp_set_log_level_mask(NULL, ORTP_FATAL);
- #endif
--
++ ortp_set_log_level_mask(ORTP_LOG_DOMAIN, ORTP_FATAL);
+#endif
-+
+ #endif
+
#ifdef MEDIASTREAMER_LESS_2_9
audio_stream_ = audio_stream_new(-1, 0); /* -1 means that function will choose some free port */
-#else
-+#elseif MEDIASTREAMER_LESS_2_14
++#elif MEDIASTREAMER_LESS_2_14
audio_stream_ = audio_stream_new(-1, -1, 0); /* -1 means that function will choose some free port */
+#else
-+ audio_stream_ = audio_stream_new(NULL, -1, -1, 0); /* -1 means that function will choose some free port */
++ audio_stream_ = audio_stream_new(engine_->factory, -1, -1, 0); /* -1 means that function will choose some free port */
#endif
}
-@@ -344,16 +354,24 @@ void LinphoneVoiceChannel::StartRing(bool bIncomingCall)
+@@ -272,11 +306,22 @@
+ {
+ StopRing();
+
++#ifdef MEDIASTREAMER_LESS_2_14
++ MSSndCardManager *snd_manager = ms_snd_card_manager_get();
+ MSSndCard *playcard = ms_snd_card_manager_get_default_playback_card(ms_snd_card_manager_get());
++#else
++ MSSndCardManager *snd_manager = ms_factory_get_snd_card_manager(engine_->factory);
++ MSSndCard *playcard = ms_snd_card_manager_get_default_playback_card(snd_manager);
++#endif
++
+ if (!playcard)
+ return false;
+
++#ifdef MEDIASTREAMER_LESS_2_14
+ MSSndCard *captcard = ms_snd_card_manager_get_default_capture_card(ms_snd_card_manager_get());
++#else
++ MSSndCard *captcard = ms_snd_card_manager_get_default_capture_card(snd_manager);
++#endif
+ if (!captcard)
+ return false;
+
+@@ -333,8 +378,18 @@
+
+ void LinphoneVoiceChannel::StartRing(bool bIncomingCall)
+ {
++#ifdef MEDIASTREAMER_LESS_2_14
++ MSSndCardManager *snd_manager = ms_snd_card_manager_get();
++#else
++ MSSndCardManager *snd_manager = ms_factory_get_snd_card_manager(engine_->factory);
++#endif
++
+ MSSndCard *sndcard = NULL;
++#ifdef MEDIASTREAMER_LESS_2_14
+ sndcard=ms_snd_card_manager_get_default_card(ms_snd_card_manager_get());
++#else
++ sndcard=ms_snd_card_manager_get_default_card(snd_manager);
++#endif
+ if (sndcard)
+ {
+ if (bIncomingCall)
+@@ -342,7 +397,11 @@
if (engine_->GetRingWav().size() > 0)
{
LOG(LS_VERBOSE) << "incoming ring. sound file: " << engine_->GetRingWav().c_str() << "\n";
+#ifdef MEDIASTREAMER_LESS_2_14
ring_stream_ = ring_start (engine_->GetRingWav().c_str(), 1, sndcard);
-- }
+#else
-+ ring_stream_ = ring_start (NULL, engine_->GetRingWav().c_str(), 1, sndcard);
++ ring_stream_ = ring_start (engine_->factory, engine_->GetRingWav().c_str(), 1, sndcard);
+#endif
-+ }
+ }
}
else
- {
+@@ -350,7 +409,11 @@
if (engine_->GetCallWav().size() > 0)
{
LOG(LS_VERBOSE) << "outgoing ring. sound file: " << engine_->GetCallWav().c_str() << "\n";
+#ifdef MEDIASTREAMER_LESS_2_14
ring_stream_ = ring_start (engine_->GetCallWav().c_str(), 1, sndcard);
-- }
+#else
-+ ring_stream_ = ring_start (NULL, engine_->GetCallWav().c_str(), 1, sndcard);
++ ring_stream_ = ring_start (engine_->factory, engine_->GetCallWav().c_str(), 1, sndcard);
+#endif
-+ }
+ }
}
}
- }
+