diff options
author | Gerald Begumisa <ben_g@users.sourceforge.net> | 2008-05-07 17:54:52 +0000 |
---|---|---|
committer | Gerald Begumisa <ben_g@users.sourceforge.net> | 2008-05-07 17:54:52 +0000 |
commit | 233100139984e7ddf250d83166c778c84b917161 (patch) | |
tree | f652391c5bf5c72abe59de9758da0a412682addc /orkbasecxx/CapturePort.cpp | |
parent | 0ef1e5245dd3112c25001439b72386e9004cb545 (diff) |
Corrected error in reporting system where if more than one tracking server is used, only the first server gets a correct message, the rest getting the wrong messages (depending on what is in the event queue on the AudioTape object provided)
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@535 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/CapturePort.cpp')
-rw-r--r-- | orkbasecxx/CapturePort.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/orkbasecxx/CapturePort.cpp b/orkbasecxx/CapturePort.cpp index 46faff2..13d70e2 100644 --- a/orkbasecxx/CapturePort.cpp +++ b/orkbasecxx/CapturePort.cpp @@ -230,11 +230,14 @@ void CapturePort::AddCaptureEvent(CaptureEventRef eventRef) case CaptureEvent::EtStart: break; case CaptureEvent::EtStop: - + { m_capturing = false; LOG4CXX_INFO(s_log, "[" + audioTapeRef->m_trackingId + "] #" + m_id + " stop"); audioTapeRef->AddCaptureEvent(eventRef, true); - Reporting::Instance()->AddAudioTape(audioTapeRef); + + MessageRef msgRef; + audioTapeRef->GetMessage(msgRef); + Reporting::Instance()->AddTapeMessage(msgRef); if (m_audioTapeRef->GetAudioFileRef().get()) { @@ -247,15 +250,26 @@ void CapturePort::AddCaptureEvent(CaptureEventRef eventRef) LOG4CXX_WARN(s_log, "[" + audioTapeRef->m_trackingId + "] #" + m_id + " no audio reported between last start and stop"); } break; + } case CaptureEvent::EtEndMetadata: + { // Now that all metadata has been acquired, we can generate the tape start message - Reporting::Instance()->AddAudioTape(audioTapeRef); + + MessageRef msgRef; + audioTapeRef->GetMessage(msgRef); + Reporting::Instance()->AddTapeMessage(msgRef); + break; + } case CaptureEvent::EtUpdate: + { audioTapeRef->AddCaptureEvent(eventRef, true); // Generate tape update message - Reporting::Instance()->AddAudioTape(audioTapeRef); + MessageRef msgRef; + audioTapeRef->GetMessage(msgRef); + Reporting::Instance()->AddTapeMessage(msgRef); break; + } case CaptureEvent::EtDirection: case CaptureEvent::EtRemoteParty: case CaptureEvent::EtLocalParty: |