summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2009-08-20 22:10:08 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2009-08-20 22:10:08 +0000
commiteec7b116d5db1716810a3210b1e895be309cb39c (patch)
tree3ceb98b75328b8dcf4922cee6be1149f9ab8b5ed /orkaudio/audiocaptureplugins/voip/RtpSession.cpp
parent6d612d25b50447faffd8a78404dc08f1b9d28151 (diff)
Added a parameter to the tape message called "ondemand". This parameter is reported to orktrack. When a recording has been started by the API, instead of automatically, this parameter is set to 'true'.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@636 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index a8695eb..a6f2225 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -1355,6 +1355,31 @@ CStdString RtpSession::GetOrkUid()
return m_orkUid;
}
+void RtpSession::MarkAsOnDemand()
+{
+ if(m_onDemand == true)
+ {
+ return;
+ }
+
+ m_onDemand = true;
+
+ // Report direction
+ if(m_started == true)
+ {
+ CaptureEventRef event(new CaptureEvent());
+ event->m_type = CaptureEvent::EtKeyValue;
+ event->m_key = CStdString("ondemand");
+ event->m_value = CStdString("true");
+ g_captureEventCallBack(event, m_capturePort);
+
+ // Trigger metadata update
+ event.reset(new CaptureEvent());
+ event->m_type = CaptureEvent::EtUpdate;
+ g_captureEventCallBack(event, m_capturePort);
+ }
+}
+
//=====================================================================
RtpSessions::RtpSessions()
{
@@ -2684,6 +2709,7 @@ void RtpSessions::StartCaptureOrkuid(CStdString& orkuid)
if(session->OrkUidMatches(orkuid))
{
session->m_keep = true;
+ session->MarkAsOnDemand();
found = true;
}
}
@@ -2716,6 +2742,7 @@ CStdString RtpSessions::StartCaptureNativeCallId(CStdString& nativecallid)
{
session->m_keep = true;
found = true;
+ session->MarkAsOnDemand();
orkUid = session->GetOrkUid();
}
}
@@ -2751,6 +2778,7 @@ CStdString RtpSessions::StartCapture(CStdString& party)
session->m_keep = true;
found = true;
orkUid = session->GetOrkUid();
+ session->MarkAsOnDemand();
}
}