summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-06-21 21:36:29 +0000
committerHenri Herscher <henri@oreka.org>2006-06-21 21:36:29 +0000
commitf88e28defeeae1284f716a877f10a4f7b486f360 (patch)
treee395ceb8c40da98a20e8cc27de540e048713d4c2
parent2da3fde0f17f0df3ac54559badadefcc347126e5 (diff)
Added #pragma warning( disable: 4786 ) to a few files
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@281 09dcff7a-b715-0410-9601-b79a96267cd0
-rw-r--r--orkaudio/AudioTape.cpp1
-rw-r--r--orkaudio/BatchProcessing.cpp1
-rw-r--r--orkaudio/CapturePort.cpp30
-rw-r--r--orkaudio/CapturePort.h6
-rw-r--r--orkaudio/Reporting.cpp1
5 files changed, 39 insertions, 0 deletions
diff --git a/orkaudio/AudioTape.cpp b/orkaudio/AudioTape.cpp
index 7df41b8..5195e2d 100644
--- a/orkaudio/AudioTape.cpp
+++ b/orkaudio/AudioTape.cpp
@@ -10,6 +10,7 @@
* Please refer to http://www.gnu.org/copyleft/gpl.html
*
*/
+#pragma warning( disable: 4786 )
#include "ConfigManager.h"
#include "AudioTape.h"
diff --git a/orkaudio/BatchProcessing.cpp b/orkaudio/BatchProcessing.cpp
index 31f464b..1769a01 100644
--- a/orkaudio/BatchProcessing.cpp
+++ b/orkaudio/BatchProcessing.cpp
@@ -10,6 +10,7 @@
* Please refer to http://www.gnu.org/copyleft/gpl.html
*
*/
+#pragma warning( disable: 4786 )
#include "ConfigManager.h"
#include "BatchProcessing.h"
diff --git a/orkaudio/CapturePort.cpp b/orkaudio/CapturePort.cpp
index 0240841..d1f5727 100644
--- a/orkaudio/CapturePort.cpp
+++ b/orkaudio/CapturePort.cpp
@@ -27,6 +27,9 @@ CapturePort::CapturePort(CStdString& id)
m_vadUp = false;
m_capturing = false;
m_lastUpdated = 0;
+
+ FilterRef streamingSink = FilterRegistry::instance()->GetNewFilter(CStdString("LiveMonitoring"));
+ m_filters.push_back(streamingSink);
}
CStdString CapturePort::ToString()
@@ -40,9 +43,34 @@ CStdString CapturePort::GetId()
return m_id;
}
+void CapturePort::FilterAudioChunk(AudioChunkRef& chunkRef)
+{
+ // Iterate through all filters
+ std::list<FilterRef>::iterator it;
+ for(it = m_filters.begin(); it != m_filters.end(); it++)
+ {
+ FilterRef filter = *it;
+ filter->AudioChunkIn(chunkRef);
+ filter->AudioChunkOut(chunkRef);
+ }
+}
+
+void CapturePort::FilterCaptureEvent(CaptureEventRef& eventRef)
+{
+ // Iterate through all filters
+ std::list<FilterRef>::iterator it;
+ for(it = m_filters.begin(); it != m_filters.end(); it++)
+ {
+ FilterRef filter = *it;
+ filter->CaptureEventIn(eventRef);
+ filter->CaptureEventOut(eventRef);
+ }
+}
void CapturePort::AddAudioChunk(AudioChunkRef chunkRef)
{
+ FilterAudioChunk(chunkRef);
+
time_t now = time(NULL);
m_lastUpdated = now;
@@ -147,6 +175,8 @@ void CapturePort::AddAudioChunk(AudioChunkRef chunkRef)
void CapturePort::AddCaptureEvent(CaptureEventRef eventRef)
{
+ FilterCaptureEvent(eventRef);
+
m_lastUpdated = time(NULL);
AudioTapeRef audioTapeRef = m_audioTapeRef;
diff --git a/orkaudio/CapturePort.h b/orkaudio/CapturePort.h
index 69b4c0a..04ebf49 100644
--- a/orkaudio/CapturePort.h
+++ b/orkaudio/CapturePort.h
@@ -17,6 +17,7 @@
#define __PORT_H__
#include <map>
+#include <list>
#include "boost/shared_ptr.hpp"
#include "ace/Thread_Mutex.h"
#include "ace/Singleton.h"
@@ -25,6 +26,7 @@
#include "AudioCapture.h"
#include "AudioTape.h"
+#include "Filter.h"
/** Base class for all types of capture ports. */
@@ -39,6 +41,9 @@ public:
void AddCaptureEvent(CaptureEventRef eventRef);
bool IsExpired(time_t now);
private:
+ void FilterAudioChunk(AudioChunkRef& chunkRef);
+ void FilterCaptureEvent(CaptureEventRef& eventRef);
+
CStdString m_id;
AudioTapeRef m_audioTapeRef;
ACE_Thread_Mutex m_mutex;
@@ -46,6 +51,7 @@ private:
double m_vadBelowThresholdSec;
bool m_vadUp;
time_t m_lastUpdated;
+ std::list<FilterRef> m_filters;
};
typedef boost::shared_ptr<CapturePort> CapturePortRef;
diff --git a/orkaudio/Reporting.cpp b/orkaudio/Reporting.cpp
index 2be599e..bd71abf 100644
--- a/orkaudio/Reporting.cpp
+++ b/orkaudio/Reporting.cpp
@@ -10,6 +10,7 @@
* Please refer to http://www.gnu.org/copyleft/gpl.html
*
*/
+#pragma warning( disable: 4786 )
#include "ConfigManager.h"
#include "Reporting.h"