summaryrefslogtreecommitdiff
path: root/orkbasecxx
diff options
context:
space:
mode:
authorGerald Begumisa <ben_g@users.sourceforge.net>2007-09-06 16:49:44 +0000
committerGerald Begumisa <ben_g@users.sourceforge.net>2007-09-06 16:49:44 +0000
commit24cdce6e897870af929349ab7199d987713ee95c (patch)
tree808409e32691765c28df408576c862f892f0a077 /orkbasecxx
parent0f3612a0dda8de197ba7bde1878c13f30ced4dfd (diff)
Added new Tape Processor Tape File Naming
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@483 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx')
-rw-r--r--orkbasecxx/AudioTape.cpp13
-rw-r--r--orkbasecxx/AudioTape.h8
-rw-r--r--orkbasecxx/LogManager.cpp1
-rw-r--r--orkbasecxx/LogManager.h1
-rw-r--r--orkbasecxx/Makefile.am2
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 \