summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2008-09-10 16:42:40 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2008-09-10 16:42:40 +0000
commit3da9054f481654e346bc52b2c7c0143e2a6dc48c (patch)
treebddb4cbe642b8925faadeb4ce642ed465bc52b44 /orkaudio/audiocaptureplugins/voip/RtpSession.cpp
parentb6519c2c1e4fa79049e5d5fba05a78d890c68aaf (diff)
Changed the way DTMF events are tracked, to know the position where the place them in the .wav file. Instead, the position is indicated as an offset in milliseconds from the time the recording started.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@558 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index 0a0bc91..abc9108 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -578,9 +578,17 @@ void RtpSession::RecordRtpEvent()
{
CaptureEventRef event(new CaptureEvent());
CStdString dtmfEventString, dtmfEventKey;
+ ACE_Time_Value timeNow;
+ ACE_Time_Value beginTime;
+ ACE_Time_Value timeDiff;
+ int msDiff = 0;
- dtmfEventString.Format("event:%d timestamp:%d duration:%d volume:%d seqno:%d", m_currentRtpEvent, m_currentRtpEventTs,
- m_currentDtmfDuration, m_currentDtmfVolume, m_currentSeqNo);
+ beginTime.set(m_beginDate, 0);
+ timeNow = ACE_OS::gettimeofday();
+ timeDiff = timeNow - beginTime;
+ msDiff = (timeDiff.sec() * 1000) + (timeDiff.usec() / 1000);
+
+ dtmfEventString.Format("event:%d timestamp:%d duration:%d volume:%d seqno:%d offsetms:%d", m_currentRtpEvent, m_currentRtpEventTs, m_currentDtmfDuration, m_currentDtmfVolume, m_currentSeqNo, msDiff);
dtmfEventKey.Format("%d_RtpDtmfEvent", m_currentRtpEventTs);
event->m_type = CaptureEvent::EtKeyValue;
event->m_key = dtmfEventKey;