Skip to content
Snippets Groups Projects
Commit 8b770d0f authored by asavard's avatar asavard
Browse files

[#4367] Fix AudioRtpclass using TRTPSessionBase

parent e5ddc0f1
Branches
Tags
No related merge requests found
......@@ -42,7 +42,12 @@ namespace sfl
{
AudioRtpSession::AudioRtpSession (ManagerImpl * manager, SIPCall * sipcall) :
ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
// ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
TRTPSessionBase<ost::DualRTPUDPIPv4Channel,ost::DualRTPUDPIPv4Channel,ost::AVPQueue>(ost::InetHostAddress (sipcall->getLocalIp().c_str()),
sipcall->getLocalAudioPort(),
0,
ost::MembershipBookkeeping::defaultMembersHashSize,
ost::defaultApplication()),
AudioRtpRecordHandler(manager, sipcall)
, _time (new ost::Time())
, _mainloopSemaphore (0)
......@@ -53,7 +58,7 @@ AudioRtpSession::AudioRtpSession (ManagerImpl * manager, SIPCall * sipcall) :
, _countNotificationTime (0)
, _ca (sipcall)
{
this->setCancel (cancelDefault);
static_cast<ost::Thread *>(this)->setCancel (cancelDefault);
assert (_ca);
......@@ -66,7 +71,7 @@ AudioRtpSession::~AudioRtpSession()
_debug ("AudioRtpSession: Delete AudioRtpSession instance");
try {
this->terminate();
static_cast<ost::Thread *>(this)->terminate();
} catch (...) {
_debugException ("AudioRtpSession: Thread destructor didn't terminate correctly");
throw;
......@@ -266,7 +271,7 @@ int AudioRtpSession::startRtpThread (AudioCodec* audiocodec)
setSessionTimeouts();
setSessionMedia (audiocodec);
initBuffers();
int ret = this->start (_mainloopSemaphore);
int ret = static_cast<ost::Thread *>(this)->start (_mainloopSemaphore);
this->startRunning();
return ret;
}
......@@ -299,7 +304,7 @@ void AudioRtpSession::run ()
_debug ("AudioRtpSession: Entering mainloop for call %s",_ca->getCallId().c_str());
while (!testCancel()) {
while (!static_cast<ost::Thread *>(this)->testCancel()) {
// Reset timestamp to make sure the timing information are up to date
if (_timestampCount > RTP_TIMESTAMP_RESET_FREQ) {
......
......@@ -57,7 +57,8 @@ namespace sfl
{
// class AudioRtpSession : public ost::Thread, public ost::TimerPort, public AudioRtpRecordHandler, public ost::SymmetricRTPSession
class AudioRtpSession : public ost::TimerPort, public ost::SymmetricRTPSession, public AudioRtpRecordHandler
// class AudioRtpSession : public ost::Thread, public ost::TimerPort, public ost::SymmetricRTPSession, public AudioRtpRecordHandler
class AudioRtpSession : public ost::Thread, public ost::TimerPort, public AudioRtpRecordHandler, public ost::TRTPSessionBase<ost::DualRTPUDPIPv4Channel,ost::DualRTPUDPIPv4Channel,ost::AVPQueue>
{
public:
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment