summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-06-03 19:38:49 +0000
committerHenri Herscher <henri@oreka.org>2006-06-03 19:38:49 +0000
commit389c61f35df5bdaa095671fb776782e2c29c04bb (patch)
treec52d23fe0770ba299f697588b46a5108e785c3c0
parenta4895c2583b267285f09e86e40fb9ed9d5416a39 (diff)
Added more logging around start, stop and RTP timestamps.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@245 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index 1e18e45..5f3a370 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -50,7 +50,8 @@ RtpSession::RtpSession(CStdString& trackingId)
void RtpSession::Stop()
{
- LOG4CXX_INFO(m_log, m_trackingId + ": " + m_capturePort + " Session stop");
+ CStdString lastUpdated = IntToString(m_lastUpdated);
+ LOG4CXX_INFO(m_log, m_trackingId + ": " + m_capturePort + " Session stop, last updated:" + lastUpdated);
if(m_started && !m_stopped)
{
@@ -65,11 +66,12 @@ void RtpSession::Stop()
void RtpSession::Start()
{
m_started = true;
- LOG4CXX_INFO(m_log, m_trackingId + ": " + m_capturePort + " " + ProtocolToString(m_protocol) + " Session start");
m_rtpRingBuffer.SetCapturePort(m_capturePort);
CaptureEventRef startEvent(new CaptureEvent);
startEvent->m_type = CaptureEvent::EtStart;
startEvent->m_timestamp = time(NULL);
+ CStdString timestamp = IntToString(startEvent->m_timestamp);
+ LOG4CXX_INFO(m_log, m_trackingId + ": " + m_capturePort + " " + ProtocolToString(m_protocol) + " Session start, timestamp:" + timestamp);
g_captureEventCallBack(startEvent, m_capturePort);
}
@@ -341,14 +343,15 @@ void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
//if(timestampOffset > 8000 || timestampOffset < -8000) // 1s @ 8KHz
//{
m_rtpTimestampCorrectiveDelta = timestampOffset;
- if(m_log->isDebugEnabled())
+ if(m_log->isInfoEnabled())
{
CStdString timestampOffsetString = IntToString(timestampOffset);
- LOG4CXX_DEBUG(m_log, m_trackingId + ": " + m_capturePort + ": " + "Applying timestamp corrective offset:" + timestampOffsetString);
+ LOG4CXX_INFO(m_log, m_trackingId + ": " + m_capturePort + ": " + "Applying timestamp corrective delta:" + timestampOffsetString);
}
//}
}
// apply the corrective offset
+ unsigned int timestamp = rtpPacket->m_timestamp;
if(m_lastRtpPacketSide2.get() != NULL)
{
m_lastRtpPacketSide2->m_timestamp = m_lastRtpPacketSide2->m_timestamp - m_rtpTimestampCorrectiveDelta;
@@ -357,7 +360,7 @@ void RtpSession::AddRtpPacket(RtpPacketInfoRef& rtpPacket)
if(m_log->isDebugEnabled())
{
CStdString debug;
- debug.Format("%s: %s: Add RTP packet ts:%u arrival:%u", m_trackingId, m_capturePort, rtpPacket->m_timestamp, rtpPacket->m_arrivalTimestamp);
+ debug.Format("%s: %s: Add RTP packet ts:%u, corrected ts:%u, arrival:%u, channel:%d", m_trackingId, m_capturePort, timestamp, rtpPacket->m_timestamp, rtpPacket->m_arrivalTimestamp, channel);
LOG4CXX_DEBUG(m_log, debug);
}