summaryrefslogtreecommitdiff
path: root/orkbasecxx
diff options
context:
space:
mode:
Diffstat (limited to 'orkbasecxx')
-rw-r--r--orkbasecxx/AudioTape.cpp35
-rw-r--r--orkbasecxx/AudioTape.h2
2 files changed, 25 insertions, 12 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp
index fedc828..7f0aadf 100644
--- a/orkbasecxx/AudioTape.cpp
+++ b/orkbasecxx/AudioTape.cpp
@@ -305,18 +305,7 @@ void AudioTape::GetMessage(MessageRef& msgRef)
TapeMsg* pTapeMsg = (TapeMsg*)msgRef.get();
if(captureEventRef->m_type == CaptureEvent::EtStop || captureEventRef->m_type == CaptureEvent::EtStart || captureEventRef->m_type == CaptureEvent::EtReady || captureEventRef->m_type == CaptureEvent::EtUpdate)
{
- pTapeMsg->m_recId = m_orkUid;
- pTapeMsg->m_fileName = m_filePath + m_fileIdentifier + m_fileExtension;
- pTapeMsg->m_stage = CaptureEvent::EventTypeToString(captureEventRef->m_type);
- pTapeMsg->m_capturePort = m_portId;
- pTapeMsg->m_localParty = m_localParty;
- pTapeMsg->m_localEntryPoint = m_localEntryPoint;
- pTapeMsg->m_remoteParty = m_remoteParty;
- pTapeMsg->m_direction = CaptureEvent::DirectionToString(m_direction);
- pTapeMsg->m_duration = m_duration;
- pTapeMsg->m_timestamp = m_beginDate;
- pTapeMsg->m_localIp = m_localIp;
- pTapeMsg->m_remoteIp = m_remoteIp;
+ PopulateTapeMessage(pTapeMsg, captureEventRef->m_type);
}
else
{
@@ -324,6 +313,28 @@ void AudioTape::GetMessage(MessageRef& msgRef)
}
}
+void AudioTape::GetDetails(TapeMsg* msg)
+{
+ PopulateTapeMessage(msg, CaptureEvent::EtStop);
+}
+
+
+void AudioTape::PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum eventType)
+{
+ msg->m_recId = m_orkUid;
+ msg->m_fileName = m_filePath + m_fileIdentifier + m_fileExtension;
+ msg->m_stage = CaptureEvent::EventTypeToString(eventType);
+ msg->m_capturePort = m_portId;
+ msg->m_localParty = m_localParty;
+ msg->m_localEntryPoint = m_localEntryPoint;
+ msg->m_remoteParty = m_remoteParty;
+ msg->m_direction = CaptureEvent::DirectionToString(m_direction);
+ msg->m_duration = m_duration;
+ msg->m_timestamp = m_beginDate;
+ msg->m_localIp = m_localIp;
+ msg->m_remoteIp = m_remoteIp;
+}
+
void AudioTape::GenerateCaptureFilePathAndIdentifier()
{
struct tm date = {0};
diff --git a/orkbasecxx/AudioTape.h b/orkbasecxx/AudioTape.h
index 341797f..6690316 100644
--- a/orkbasecxx/AudioTape.h
+++ b/orkbasecxx/AudioTape.h
@@ -77,6 +77,7 @@ public:
CStdString GetExtension();
AudioFileRef GetAudioFileRef();
bool IsReadyForBatchProcessing();
+ void GetDetails(TapeMsg* msg);
CStdString m_portId;
@@ -98,6 +99,7 @@ private:
void GenerateCaptureFilePathAndIdentifier();
void GenerateFinalFilePathAndIdentifier();
void PreventFileIdentifierCollision(CStdString& path, CStdString& identifier, CStdString& extension);
+ void PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum eventType);
CStdString m_filePath;
CStdString m_fileIdentifier;