diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2009-06-03 13:26:35 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2009-06-03 13:26:35 +0000 |
commit | 2997d9599a7f90527983e42bf8a0bb9f2e4c7d09 (patch) | |
tree | 4868baffed8d76c150aa1d91fedf2fc4de7c2f8a /orkbasecxx/CapturePluginProxy.cpp | |
parent | 49bd54fee4e12d32b73b851e093048d87b01b88d (diff) |
Added methods SetOnHold and SetOffHold to orkaudio API for capture plugins. Implemented this change in VoIp plugin.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@618 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/CapturePluginProxy.cpp')
-rw-r--r-- | orkbasecxx/CapturePluginProxy.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/orkbasecxx/CapturePluginProxy.cpp b/orkbasecxx/CapturePluginProxy.cpp index f5db16c..67c8395 100644 --- a/orkbasecxx/CapturePluginProxy.cpp +++ b/orkbasecxx/CapturePluginProxy.cpp @@ -90,9 +90,18 @@ bool CapturePluginProxy::Init() { m_dll.open((PCSTR)pluginPath); ACE_TCHAR* error = m_dll.error(); +#ifndef WIN32 + char *errorstr; +#endif if(error) { +#ifndef WIN32 + errorstr = dlerror(); + CStdString errorcstds(errorstr); + LOG4CXX_ERROR(LOG.rootLog, CStdString("Failed to load the following plugin: ") + pluginPath + " " + errorcstds); +#else LOG4CXX_ERROR(LOG.rootLog, CStdString("Failed to load the following plugin: ") + pluginPath); +#endif } else { @@ -123,9 +132,25 @@ bool CapturePluginProxy::Init() if (m_stopCaptureFunction) { m_pauseCaptureFunction = (PauseCaptureFunction)m_dll.symbol("PauseCapture"); - if(m_stopCaptureFunction) + if(m_pauseCaptureFunction) { - m_loaded = true; + m_setOnHoldFunction = (SetOnHoldFunction)m_dll.symbol("SetOnHold"); + if(m_setOnHoldFunction) + { + m_setOffHoldFunction = (SetOnHoldFunction)m_dll.symbol("SetOffHold"); + if(m_setOffHoldFunction) + { + m_loaded = true; + } + else + { + LOG4CXX_ERROR(LOG.rootLog, CStdString("Could not find SetOffHold function in ") + pluginPath); + } + } + else + { + LOG4CXX_ERROR(LOG.rootLog, CStdString("Could not find SetOnHold function in ") + pluginPath); + } } else { |