From 0e2a2e49077b79bd52d6c83c5202e452e7eea091 Mon Sep 17 00:00:00 2001 From: Gerald Begumisa Date: Wed, 7 Jan 2009 13:07:31 +0000 Subject: 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 --- orkaudio/OrkAudio.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'orkaudio/OrkAudio.cpp') diff --git a/orkaudio/OrkAudio.cpp b/orkaudio/OrkAudio.cpp index 0083f8b..edda45a 100644 --- a/orkaudio/OrkAudio.cpp +++ b/orkaudio/OrkAudio.cpp @@ -44,7 +44,7 @@ #include "filters/audiogain/AudioGain.h" #include "TapeProcessor.h" #include - +#include "EventStreaming.h" static volatile bool serviceStop = false; @@ -213,6 +213,8 @@ void MainThread() ObjectFactory::GetSingleton()->RegisterObject(objRef); objRef.reset(new RecordMsg); ObjectFactory::GetSingleton()->RegisterObject(objRef); + objRef.reset(new PauseMsg); + ObjectFactory::GetSingleton()->RegisterObject(objRef); //objRef.reset(new TestMsg); //ObjectFactory::GetSingleton()->RegisterObject(objRef); @@ -276,6 +278,12 @@ void MainThread() LOG4CXX_INFO(LOG.rootLog, CStdString("Failed to create Http server")); } + // Create streaming server on port 59150 (default) + if(!ACE_Thread_Manager::instance()->spawn(ACE_THR_FUNC(EventStreamingServer::run), (void *)CONFIG.m_eventStreamingServerPort)) + { + LOG4CXX_INFO(LOG.rootLog, CStdString("Failed to create event streaming server")); + } + if(capturePluginOk) { CapturePluginProxy::Singleton()->Run(); -- cgit v1.2.3