summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2008-07-22 14:27:49 +0000
committerHenri Herscher <henri@oreka.org>2008-07-22 14:27:49 +0000
commitec1349898f3084a594ee1855fa2a4fafa455e9f3 (patch)
tree547f7ef86be1f9c671a14d7c1ee8ec518ce59fe6 /orkaudio/audiocaptureplugins/voip/RtpSession.cpp
parent51ab6edcab824eca6dcf6b34f207aa99226b862c (diff)
RTP activity now only puts a session off hold when there's been at least one second of RTP inactivity first. This is so that leftover RTP packets received after hold has been pressed do not put the session back off hold.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@553 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index a4ab00e..d6f147f 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -705,8 +705,17 @@ bool RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
// If we are on hold, unmark this
if(m_onHold)
{
- logMsg = "[" + m_trackingId + "] Session going off hold due to RTP activity";
- m_onHold = false;
+ if(m_lastRtpPacket.get())
+ {
+ if( (rtpPacket->m_arrivalTimestamp - m_lastRtpPacket->m_arrivalTimestamp) > 1)
+ {
+ // There's been an RTP interruption of a least 1 second,
+ // presence of new RTP indicates session has gone out of hold
+ logMsg = "[" + m_trackingId + "] Session going off hold due to RTP activity";
+ LOG4CXX_INFO(m_log, logMsg);
+ m_onHold = false;
+ }
+ }
}
if(m_lastRtpPacket.get() == NULL)