From c78e205237f0fd156f46ca104ee188107c53a1af Mon Sep 17 00:00:00 2001 From: Henri Herscher Date: Thu, 12 Apr 2007 22:07:45 +0000 Subject: Key-Value CaptureEvent messages are now reported as tags to orktrack. git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@436 09dcff7a-b715-0410-9601-b79a96267cd0 --- orkbasecxx/AudioTape.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'orkbasecxx/AudioTape.cpp') diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp index 7f0aadf..593f7c3 100644 --- a/orkbasecxx/AudioTape.cpp +++ b/orkbasecxx/AudioTape.cpp @@ -278,14 +278,19 @@ void AudioTape::AddCaptureEvent(CaptureEventRef eventRef, bool send) break; } - // Store the capture event locally { MutexSentinel sentinel(m_mutex); + // Store the capture event locally m_eventQueue.push(eventRef); if (send) { m_toSendEventQueue.push(eventRef); } + // Store the tags + if(eventRef->m_type == CaptureEvent::EtKeyValue && eventRef->m_value.size() > 0 && eventRef->m_key.size() > 0) + { + m_tags.insert(std::make_pair(eventRef->m_key, eventRef->m_value)); + } } } @@ -333,6 +338,9 @@ void AudioTape::PopulateTapeMessage(TapeMsg* msg, CaptureEvent::EventTypeEnum ev msg->m_timestamp = m_beginDate; msg->m_localIp = m_localIp; msg->m_remoteIp = m_remoteIp; + + MutexSentinel sentinel(m_mutex);; + std::copy(m_tags.begin(), m_tags.end(), std::inserter(msg->m_tags, msg->m_tags.begin())); } void AudioTape::GenerateCaptureFilePathAndIdentifier() -- cgit v1.2.3