diff options
author | Henri Herscher <henri@oreka.org> | 2006-01-20 22:38:18 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-01-20 22:38:18 +0000 |
commit | e07f34274b8912f773993ed96624242115440a3b (patch) | |
tree | 6b2f35398ceb7ff5c6a5afc9991f9a3670cb3a27 /orkaudio/OrkAudio.cpp | |
parent | 4ab4f3d3b2f0c3c51922eaeea49df162a9c892cd (diff) |
VoIP mixing and decoding does now happen in the batch processing thread instead of immediately. Additionally, the system now supports filter plugins such as codecs.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@120 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/OrkAudio.cpp')
-rw-r--r-- | orkaudio/OrkAudio.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/orkaudio/OrkAudio.cpp b/orkaudio/OrkAudio.cpp index 05ac4c1..daea814 100644 --- a/orkaudio/OrkAudio.cpp +++ b/orkaudio/OrkAudio.cpp @@ -16,6 +16,7 @@ #include "MultiThreadedServer.h" #include "ace/Thread_Manager.h" +#include "ace/DLL.h" #include "OrkAudio.h" #include "Utils.h" #include "messages/TapeMsg.h" @@ -33,6 +34,8 @@ #include "ObjectFactory.h" #include "CapturePluginProxy.h" #include "ace/OS_NS_arpa_inet.h" +#include "AudioCapturePlugin.h" +#include "Filter.h" static volatile bool serviceStop = false; @@ -73,6 +76,35 @@ void MainThread() ConfigManagerSingleton::instance()->Initialize(); + // Register in-built filters + FilterRef filter(new AlawToPcmFilter()); + FilterRegistry::instance()->RegisterFilter(filter); + + // Load filter plugins ##################### + //CStdString pluginPath = "./filters/VoIpMixer/Debug/VoIpMixer.dll"; + CStdString pluginPath = "./filters/VoIpMixer.dll"; + ACE_DLL dll; + dll.open((PCSTR)pluginPath); + ACE_TCHAR* error = dll.error(); + if(error) + { + LOG4CXX_ERROR(LOG.rootLog, CStdString("Failed to load the following plugin: ") + pluginPath); + } + else + { + // Ok, the dll has been successfully loaded + LOG4CXX_INFO(LOG.rootLog, CStdString("Loaded plugin: ") + pluginPath); + + //void (*initfunction)(void); + InitializeFunction initfunction; + initfunction = (InitializeFunction)dll.symbol("Initialize"); + + if (initfunction) + { + initfunction(); + } + } + if (!ACE_Thread_Manager::instance()->spawn(ACE_THR_FUNC(ImmediateProcessing::ThreadHandler))) { LOG4CXX_INFO(LOG.rootLog, CStdString("Failed to create immediate processing thread")); |