summaryrefslogtreecommitdiff
path: root/orkaudio/BatchProcessing.h
diff options
context:
space:
mode:
authorHenri Herscher <henri@oreka.org>2006-07-05 01:59:32 +0000
committerHenri Herscher <henri@oreka.org>2006-07-05 01:59:32 +0000
commitc27745d1b387606b7e1a5869b7fe4b566410720d (patch)
tree978a3e5176ff6db2f6b0856d8031e662b68ff03d /orkaudio/BatchProcessing.h
parent0d758fbcf5a581ca5909245cef65c00652219283 (diff)
* Tape processor interface becomes usable and used
* Reporting and BatchProcessing become "standard" tape processors * Imediate processing kicks off the tape processor chain * Object now references Serializer * ConfigManager singleton not an ACE singleton anymore because ACE singletons are not unique across DLL boundaries. git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@296 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkaudio/BatchProcessing.h')
-rw-r--r--orkaudio/BatchProcessing.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/orkaudio/BatchProcessing.h b/orkaudio/BatchProcessing.h
index ec9c88b..09eb1da 100644
--- a/orkaudio/BatchProcessing.h
+++ b/orkaudio/BatchProcessing.h
@@ -15,35 +15,39 @@
#define __BATCHPROCESSING_H__
#include "ThreadSafeQueue.h"
+#include "TapeProcessor.h"
#include "AudioTape.h"
#include "ace/Thread_Mutex.h"
#include <map>
-class BatchProcessing
+class BatchProcessing;
+typedef boost::shared_ptr<BatchProcessing> BatchProcessingRef;
+
+/**
+ * This tape processor handles the audio transcoding
+ */
+class BatchProcessing : public TapeProcessor
{
public:
- static BatchProcessing* GetInstance();
+ static void Initialize();
+
+ CStdString __CDECL__ GetName();
+ TapeProcessorRef __CDECL__ Instanciate();
+ void __CDECL__ AddAudioTape(AudioTapeRef& audioTapeRef);
+
+
static void ThreadHandler(void *args);
- void AddAudioTape(AudioTapeRef audioTapeRef);
void SetQueueSize(int size);
- /** Ask for a tape to be deleted from disk */
- void TapeDropRegistration(CStdString& filename);
private:
BatchProcessing();
+ static TapeProcessorRef m_singleton;
- bool DropTapeIfNeeded(CStdString&filename);
- void TapeDropHousekeeping();
-
- static BatchProcessing m_batchProcessingSingleton;
ThreadSafeQueue<AudioTapeRef> m_audioTapeQueue;
size_t m_threadCount;
ACE_Thread_Mutex m_mutex;
-
- ACE_Thread_Mutex m_tapeDropMutex;
- std::map<CStdString, time_t> m_tapesToDrop;
int m_currentDay;
};