diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2008-11-11 17:40:24 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2008-11-11 17:40:24 +0000 |
commit | 8278fd69bdca293e4e8a094dcdb7d985c97f3b7d (patch) | |
tree | 534ee78bf5ed042b24e426017e19b8528a935baf /orkbasecxx/CapturePluginProxy.cpp | |
parent | a8a150d2ae7ec2eecdcd35d3365cc7e27bf5019e (diff) |
Enhanced the audio segmentation feature such that it may be used on other feeds apart from continuous streams. This means it now works correctly with VoIP or TDM feeds
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@569 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/CapturePluginProxy.cpp')
-rw-r--r-- | orkbasecxx/CapturePluginProxy.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/orkbasecxx/CapturePluginProxy.cpp b/orkbasecxx/CapturePluginProxy.cpp index fbfc3da..925c14a 100644 --- a/orkbasecxx/CapturePluginProxy.cpp +++ b/orkbasecxx/CapturePluginProxy.cpp @@ -217,7 +217,31 @@ void __CDECL__ CapturePluginProxy::CaptureEventCallBack(CaptureEventRef eventRef { if (eventRef->m_type == CaptureEvent::EtStart || eventRef->m_type == CaptureEvent::EtStop) { - LOG4CXX_ERROR(LOG.portLog, "#" + capturePort + ": received start or stop while in VAD or audio segmentation mode"); + if(CONFIG.m_audioSegmentation == true) + { + // find the right port and give it the event + // If this is EtStop, we clear the event cache + CapturePortRef portRef = CapturePortsSingleton::instance()->AddAndReturnPort(capturePort); + if(eventRef->m_type == CaptureEvent::EtStop) + { + portRef->ClearEventQueue(); + } + portRef->AddCaptureEvent(eventRef); + } + else + { + LOG4CXX_ERROR(LOG.portLog, "#" + capturePort + ": received start or stop while in VAD mode"); + } + } + else + { + if(CONFIG.m_audioSegmentation == true) + { + // find the right port and give it the event + CapturePortRef portRef = CapturePortsSingleton::instance()->AddAndReturnPort(capturePort); + portRef->QueueCaptureEvent(eventRef); + portRef->AddCaptureEvent(eventRef); + } } } else |