diff --git a/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp index 2ccda8216e853d907ec90ddffa59da1e2f6eccd2..e6143b9f3460f55b7d9ef1390b69002d2a031d89 100644 --- a/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioRtpSession.cpp @@ -45,10 +45,10 @@ AudioRtpSession::AudioRtpSession (ManagerImpl * manager, SIPCall * sipcall) : // ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()), AudioRtpRecordHandler(manager, sipcall), ost::TRTPSessionBase<ost::SymmetricRTPChannel,ost::SymmetricRTPChannel,ost::AVPQueue>(ost::InetHostAddress (sipcall->getLocalIp().c_str()), - sipcall->getLocalAudioPort(), - 0, - ost::MembershipBookkeeping::defaultMembersHashSize, - ost::defaultApplication()) + sipcall->getLocalAudioPort(), + 0, + ost::MembershipBookkeeping::defaultMembersHashSize, + ost::defaultApplication()) , _time (new ost::Time()) , _mainloopSemaphore (0) , _manager (manager) diff --git a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp index d3041fe45bd1b9060e6e1b48523c169f5693d9a5..d78818a494d095b182cfe20551d35537a95e724e 100644 --- a/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp +++ b/sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp @@ -35,6 +35,7 @@ #include "audio/audiolayer.h" #include "manager.h" +#include <libzrtpcpp/zrtpccrtp.h> #include <libzrtpcpp/ZrtpQueue.h> #include <libzrtpcpp/ZrtpUserCallback.h> @@ -42,13 +43,20 @@ #include <cstring> #include <cerrno> +#include <ccrtp/rtp.h> + namespace sfl { AudioZrtpSession::AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, const std::string& zidFilename) : - ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()), - AudioRtpRecordHandler(manager, sipcall) - , _zidFilename (zidFilename) + // ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()), + AudioRtpRecordHandler(manager, sipcall), + ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue> (ost::InetHostAddress (sipcall->getLocalIp().c_str()), + sipcall->getLocalAudioPort(), + 0, + ost::MembershipBookkeeping::defaultMembersHashSize, + ost::defaultApplication()) + , _zidFilename (zidFilename) , _time (new ost::Time()) , _mainloopSemaphore (0) , _manager (manager) @@ -361,6 +369,7 @@ void AudioZrtpSession::run () // Timestamp must be initialized randomly _timestamp = getCurrentTimestamp(); + /* int threadSleep = 0; if (getCodecSampleRate() != 0) { @@ -371,6 +380,7 @@ void AudioZrtpSession::run () } TimerPort::setTimer (threadSleep); + */ // Set recording sampling rate _ca->setRecordingSmplRate (getCodecSampleRate()); diff --git a/sflphone-common/src/audio/audiortp/AudioZrtpSession.h b/sflphone-common/src/audio/audiortp/AudioZrtpSession.h index 91c77019e7691a856e7d71e8e900f6cef0a85abc..0d0de47cb86dab887d85a016c13bb0245b4deccc 100644 --- a/sflphone-common/src/audio/audiortp/AudioZrtpSession.h +++ b/sflphone-common/src/audio/audiortp/AudioZrtpSession.h @@ -29,7 +29,12 @@ #ifndef __SFL_AUDIO_ZRTP_SESSION_H__ #define __SFL_AUDIO_ZRTP_SESSION_H__ + +#include <ccrtp/rtp.h> + #include <libzrtpcpp/zrtpccrtp.h> +#include <libzrtpcpp/ZrtpQueue.h> +#include <libzrtpcpp/ZrtpUserCallback.h> #include "AudioRtpRecordHandler.h" #include <cc++/numbers.h> // OST::Time @@ -47,7 +52,8 @@ class ZrtpZidException: public std::exception } }; -class AudioZrtpSession : public ost::TimerPort, public ost::SymmetricZRTPSession, public AudioRtpRecordHandler +// class AudioZrtpSession : public ost::TimerPort, public ost::SymmetricZRTPSession, public AudioRtpRecordHandler +class AudioZrtpSession : protected ost::Thread, public AudioRtpRecordHandler, public ost::TRTPSessionBase<ost::SymmetricRTPChannel, ost::SymmetricRTPChannel, ost::ZrtpQueue> { public: AudioZrtpSession (ManagerImpl * manager, SIPCall * sipcall, const std::string& zidFilename);