summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2009-01-07 13:07:31 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2009-01-07 13:07:31 +0000
commit0e2a2e49077b79bd52d6c83c5202e452e7eea091 (patch)
tree58ae466e2c74be585548f10ffff96560099c9370 /orkaudio/audiocaptureplugins/voip/RtpSession.cpp
parentded03e95a1eb78cb16ef3a4a0dc9bb140bd748ba (diff)
Modified the orkaudio API, adding the record and pause HTTP commands. The record command commences or un-pauses recording while the pause command pauses recording - discarding RTP packets from when the pause command is issued. Both commands require the orkuid and party to be specified as HTTP parameters. Note that this represents a change in the arguments required for the StartCapture function in DLLs. Also added an event streaming feature which streams out all tape messages as they are reported in real-time to a client connected. Clients should connect via HTTP, on port 59150. The port is configurable by setting the parameter EventStreamingServerPort in config.xml
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@590 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/audiocaptureplugins/voip/RtpSession.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/RtpSession.cpp94
1 files changed, 92 insertions, 2 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
index cf1ba08..a8b2d40 100644
--- a/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
+++ b/orkaudio/audiocaptureplugins/voip/RtpSession.cpp
@@ -2383,6 +2383,36 @@ void RtpSessions::Hoover(time_t now)
}
}
+void RtpSessions::StartCaptureOrkuid(CStdString& orkuid)
+{
+ std::map<CStdString, RtpSessionRef>::iterator pair;
+ bool found = false;
+ CStdString logMsg;
+ RtpSessionRef session;
+
+ for(pair = m_byIpAndPort.begin(); pair != m_byIpAndPort.end() && found == false; pair++)
+ {
+ session = pair->second;
+
+ if(session->OrkUidMatches(orkuid))
+ {
+ session->m_keep = true;
+ found = true;
+ }
+ }
+
+ if(found)
+ {
+ logMsg.Format("[%s] StartCaptureOrkuid: Started capture, orkuid:%s", session->m_trackingId, orkuid);
+ }
+ else
+ {
+ logMsg.Format("StartCaptureOrkuid: No session has orkuid:%s", orkuid);
+ }
+
+ LOG4CXX_INFO(m_log, logMsg);
+}
+
void RtpSessions::StartCapture(CStdString& party)
{
std::map<CStdString, RtpSessionRef>::iterator pair;
@@ -2403,16 +2433,76 @@ void RtpSessions::StartCapture(CStdString& party)
if(found)
{
- logMsg.Format("[%s] Started capture, party:%s", session->m_trackingId, party);
+ logMsg.Format("[%s] StartCapture: Started capture, party:%s", session->m_trackingId, party);
}
else
{
- logMsg.Format("No session has party %s", party);
+ logMsg.Format("StartCapture: No session has party %s", party);
}
LOG4CXX_INFO(m_log, logMsg);
}
+void RtpSessions::PauseCapture(CStdString& party)
+{
+ std::map<CStdString, RtpSessionRef>::iterator pair;
+ bool found = false;
+ CStdString logMsg;
+ RtpSessionRef session;
+
+ for(pair = m_byIpAndPort.begin(); pair != m_byIpAndPort.end() && found == false; pair++)
+ {
+ session = pair->second;
+
+ if (session->PartyMatches(party))
+ {
+ session->m_keep = false;
+ found = true;
+ }
+ }
+
+ if(found)
+ {
+ logMsg.Format("[%s] PauseCapture: Paused capture, party:%s", session->m_trackingId, party);
+ }
+ else
+ {
+ logMsg.Format("PauseCapture: No session has party %s", party);
+ }
+
+ LOG4CXX_INFO(m_log, logMsg);
+}
+
+void RtpSessions::PauseCaptureOrkuid(CStdString& orkuid)
+{
+ std::map<CStdString, RtpSessionRef>::iterator pair;
+ bool found = false;
+ CStdString logMsg;
+ RtpSessionRef session;
+
+ for(pair = m_byIpAndPort.begin(); pair != m_byIpAndPort.end() && found == false; pair++)
+ {
+ session = pair->second;
+
+ if(session->OrkUidMatches(orkuid))
+ {
+ session->m_keep = false;
+ found = true;
+ }
+ }
+
+ if(found)
+ {
+ logMsg.Format("[%s] PauseCaptureOrkuid: Paused capture, orkuid:%s", session->m_trackingId, orkuid);
+ }
+ else
+ {
+ logMsg.Format("PauseCaptureOrkuid: No session has orkuid:%s", orkuid);
+ }
+
+ LOG4CXX_INFO(m_log, logMsg);
+}
+
//==========================================================
SipInviteInfo::SipInviteInfo()
{