diff options
-rw-r--r-- | orkbasecxx/AudioTape.cpp | 13 | ||||
-rw-r--r-- | orkbasecxx/AudioTape.h | 8 | ||||
-rw-r--r-- | orkbasecxx/LogManager.cpp | 1 | ||||
-rw-r--r-- | orkbasecxx/LogManager.h | 1 | ||||
-rw-r--r-- | orkbasecxx/Makefile.am | 2 |
5 files changed, 21 insertions, 4 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp index c29f501..baebd36 100644 --- a/orkbasecxx/AudioTape.cpp +++ b/orkbasecxx/AudioTape.cpp @@ -201,7 +201,11 @@ void AudioTape::Write() if(m_audioFileRef.get()) { m_audioFileRef->Close(); - GenerateFinalFilePathAndIdentifier(); + /* + * This function is now called in the TapeFileNaming + * tape processor. + */ + //GenerateFinalFilePathAndIdentifier(); m_readyForBatchProcessing = true; } } @@ -532,7 +536,12 @@ void AudioTape::GenerateFinalFilePath() if(pathIdentifier.size() > 0) { - m_filePath = pathIdentifier; + m_filePath = pathIdentifier; + + CStdString mkdirPath; + + mkdirPath.Format("%s/%s", CONFIG.m_audioOutputPath, m_filePath); + FileRecursiveMkdir(mkdirPath, CONFIG.m_audioFilePermissions, CONFIG.m_audioFileOwner, CONFIG.m_audioFileGroup, CONFIG.m_audioOutputPath); } } } diff --git a/orkbasecxx/AudioTape.h b/orkbasecxx/AudioTape.h index 4cc6e3a..c637c01 100644 --- a/orkbasecxx/AudioTape.h +++ b/orkbasecxx/AudioTape.h @@ -95,9 +95,15 @@ public: TapeResponseRef m_tapeResponse; + /* + * This function has been made public in order to allow the TapeFileNaming + * tape processor to do its work in the easiest way, with as little as possible + * access to the internal variables of the AudioTape class. + */ + void GenerateFinalFilePathAndIdentifier(); + private: void GenerateCaptureFilePathAndIdentifier(); - void GenerateFinalFilePathAndIdentifier(); void GenerateFinalFilePath(); void PreventFileIdentifierCollision(CStdString& path, CStdString& identifier, CStdString& extension); void PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum eventType); diff --git a/orkbasecxx/LogManager.cpp b/orkbasecxx/LogManager.cpp index 884111f..6259a70 100644 --- a/orkbasecxx/LogManager.cpp +++ b/orkbasecxx/LogManager.cpp @@ -79,6 +79,7 @@ void OrkLogManager::Initialize() topLog = Logger::getLogger("top"); immediateProcessingLog = Logger::getLogger("immediateProcessing"); batchProcessingLog = Logger::getLogger("batchProcessing"); + tapeFileNamingLog = Logger::getLogger("tapeFileNamingLog"); portLog = Logger::getLogger("port"); fileLog = Logger::getLogger("file"); reportingLog = Logger::getLogger("reporting"); diff --git a/orkbasecxx/LogManager.h b/orkbasecxx/LogManager.h index 1a73519..69f2b10 100644 --- a/orkbasecxx/LogManager.h +++ b/orkbasecxx/LogManager.h @@ -34,6 +34,7 @@ public: LoggerPtr topLog; LoggerPtr immediateProcessingLog; LoggerPtr batchProcessingLog; + LoggerPtr tapeFileNamingLog; LoggerPtr portLog; LoggerPtr fileLog; LoggerPtr reportingLog; diff --git a/orkbasecxx/Makefile.am b/orkbasecxx/Makefile.am index ae4e242..f9aadf5 100644 --- a/orkbasecxx/Makefile.am +++ b/orkbasecxx/Makefile.am @@ -14,7 +14,7 @@ liborkbase_la_SOURCES = Filter.cpp g711.c \ MemUtils.cpp BatchProcessing.cpp \ CapturePluginProxy.cpp CapturePort.cpp \ Daemon.cpp ImmediateProcessing.cpp \ - Reporting.cpp + Reporting.cpp TapeFileNaming.cpp #INCLUDES = -I/projects/ext/xmlrpc++/xmlrpc++0.7/src SUBDIRS = messages serializers audiofile filters liborkbase_la_LIBADD = $(top_builddir)/serializers/libserializers.la \ |