summaryrefslogtreecommitdiff
path: root/orkaudio/audiocaptureplugins/voip/VoIp.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/VoIp.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/VoIp.cpp')
-rw-r--r--orkaudio/audiocaptureplugins/voip/VoIp.cpp45
1 files changed, 39 insertions, 6 deletions
diff --git a/orkaudio/audiocaptureplugins/voip/VoIp.cpp b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
index 25cda38..63fa355 100644
--- a/orkaudio/audiocaptureplugins/voip/VoIp.cpp
+++ b/orkaudio/audiocaptureplugins/voip/VoIp.cpp
@@ -83,8 +83,9 @@ public:
void Initialize();
void Run();
void Shutdown();
- void StartCapture(CStdString& port);
+ void StartCapture(CStdString& port, CStdString& orkuid);
void StopCapture(CStdString& port);
+ void PauseCapture(CStdString& port, CStdString& orkuid);
void ReportPcapStats();
pcap_t* OpenDevice(CStdString& name);
void AddPcapDeviceToMap(CStdString& deviceName, pcap_t* pcapHandle);
@@ -3199,7 +3200,12 @@ void VoIp::Shutdown()
#endif
}
-void VoIp::StartCapture(CStdString& port)
+void VoIp::StartCapture(CStdString& port, CStdString& orkuid)
+{
+ ;
+}
+
+void VoIp::PauseCapture(CStdString& port, CStdString& orkuid)
{
;
}
@@ -3225,15 +3231,42 @@ void __CDECL__ Shutdown()
VoIpSingleton::instance()->Shutdown();
}
-void __CDECL__ StartCapture(CStdString& party)
+void __CDECL__ StartCapture(CStdString& party, CStdString& orkuid)
{
CStdString logMsg;
- //logMsg.Format("StartCapture:%s", party);
- //LOG4CXX_INFO(s_voipPluginLog, logMsg);
+ logMsg.Format("StartCapture: party:%s orkuid:%s", party, orkuid);
+ LOG4CXX_INFO(s_voipPluginLog, logMsg);
MutexSentinel mutexSentinel(s_mutex);
- RtpSessionsSingleton::instance()->StartCapture(party);
+
+ if(orkuid.size())
+ {
+ RtpSessionsSingleton::instance()->StartCaptureOrkuid(orkuid);
+ }
+ else
+ {
+ RtpSessionsSingleton::instance()->StartCapture(party);
+ }
+}
+
+void __CDECL__ PauseCapture(CStdString& party, CStdString& orkuid)
+{
+ CStdString logMsg;
+
+ logMsg.Format("PauseCapture: party:%s orkuid:%s", party, orkuid);
+ LOG4CXX_INFO(s_voipPluginLog, logMsg);
+
+ MutexSentinel mutexSentinel(s_mutex);
+
+ if(orkuid.size())
+ {
+ RtpSessionsSingleton::instance()->PauseCaptureOrkuid(orkuid);
+ }
+ else
+ {
+ RtpSessionsSingleton::instance()->PauseCapture(party);
+ }
}
void __CDECL__ StopCapture(CStdString& party)