diff options
author | Henri Herscher <henri@oreka.org> | 2006-07-07 19:31:41 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-07-07 19:31:41 +0000 |
commit | e88b6fb3ba37a5c7547f415c13a2053d8d5c32fc (patch) | |
tree | 608df196effaf251e0346c4fc4b06cf29a17cbc2 /orkbasecxx | |
parent | c27745d1b387606b7e1a5869b7fe4b566410720d (diff) |
* Added EndMetadata capture event
* A tape start message is now sent upon reception of the EndMetadata capture event
* Removed TapeMsg.m_loginString
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@297 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx')
-rw-r--r-- | orkbasecxx/AudioCapture.cpp | 6 | ||||
-rw-r--r-- | orkbasecxx/AudioCapture.h | 4 | ||||
-rw-r--r-- | orkbasecxx/AudioTape.cpp | 11 | ||||
-rw-r--r-- | orkbasecxx/messages/TapeMsg.h | 1 |
4 files changed, 16 insertions, 6 deletions
diff --git a/orkbasecxx/AudioCapture.cpp b/orkbasecxx/AudioCapture.cpp index 7788fe8..dc72935 100644 --- a/orkbasecxx/AudioCapture.cpp +++ b/orkbasecxx/AudioCapture.cpp @@ -233,6 +233,8 @@ CStdString CaptureEvent::EventTypeToString(int eventTypeEnum) return ET_LOCALMAC; case EtRemoteMac: return ET_REMOTEMAC; + case EtEndMetadata: + return ET_ENDMETADATA; } return ET_INVALID; } @@ -284,6 +286,10 @@ int CaptureEvent::EventTypeToEnum(CStdString& eventTypeString) { eventTypeEnum = EtRemoteMac; } + else if (eventTypeString.CompareNoCase(ET_ENDMETADATA) == 0) + { + eventTypeEnum = EtEndMetadata; + } return eventTypeEnum; } diff --git a/orkbasecxx/AudioCapture.h b/orkbasecxx/AudioCapture.h index a81ce8b..1d6e8e9 100644 --- a/orkbasecxx/AudioCapture.h +++ b/orkbasecxx/AudioCapture.h @@ -120,6 +120,7 @@ public: #define ET_REMOTEIP "remoteip" #define ET_LOCALMAC "localmac" #define ET_REMOTEMAC "remotemac" +#define ET_ENDMETADATA "endmetadata" #define ET_INVALID "invalid" typedef enum { @@ -135,7 +136,8 @@ public: EtRemoteIp = 9, EtLocalMac = 10, EtRemoteMac = 11, - EtInvalid = 12 + EtEndMetadata = 12, + EtInvalid = 13 } EventTypeEnum; static CStdString EventTypeToString(int eventTypeEnum); static int EventTypeToEnum(CStdString&); diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp index 3cb81e5..c406485 100644 --- a/orkbasecxx/AudioTape.cpp +++ b/orkbasecxx/AudioTape.cpp @@ -249,13 +249,16 @@ void AudioTape::GetMessage(MessageRef& msgRef) CaptureEventRef captureEventRef; { MutexSentinel sentinel(m_mutex); - captureEventRef = m_toSendEventQueue.front(); - m_toSendEventQueue.pop(); + if(m_toSendEventQueue.size() > 0) + { + captureEventRef = m_toSendEventQueue.front(); + m_toSendEventQueue.pop(); + } } msgRef.reset(new TapeMsg); TapeMsg* pTapeMsg = (TapeMsg*)msgRef.get(); - if(captureEventRef->m_type == CaptureEvent::EtStop) + if(captureEventRef->m_type == CaptureEvent::EtStop || captureEventRef->m_type == CaptureEvent::EtStart) { pTapeMsg->m_recId = m_fileIdentifier; pTapeMsg->m_fileName = m_filePath + m_fileIdentifier + m_fileExtension; @@ -272,7 +275,7 @@ void AudioTape::GetMessage(MessageRef& msgRef) } else { - // This should be a key-value pair message or a start event + // This should be a key-value pair message } } diff --git a/orkbasecxx/messages/TapeMsg.h b/orkbasecxx/messages/TapeMsg.h index f83805e..481bfd3 100644 --- a/orkbasecxx/messages/TapeMsg.h +++ b/orkbasecxx/messages/TapeMsg.h @@ -53,7 +53,6 @@ public: CStdString m_localEntryPoint; CStdString m_remoteParty; CStdString m_direction; - CStdString m_loginString; int m_duration; CStdString m_serviceName; CStdString m_localIp; |