diff options
author | Henri Herscher <henri@oreka.org> | 2006-10-11 16:59:19 +0000 |
---|---|---|
committer | Henri Herscher <henri@oreka.org> | 2006-10-11 16:59:19 +0000 |
commit | a7f1e318b8cea70aea786580ef9b15e5e3afcd23 (patch) | |
tree | 56a0e52bf83c880184ba346646d56e72a77f3ab5 /orkbasecxx/AudioTape.cpp | |
parent | 6bc7a0c92eefd1d9374348f3d014549f78bc713c (diff) |
There is now an orkaudio wide tracking ID for recording sessions. All logging related to a recording session includes this tracking ID. The recording file name now uses this tracking ID instead of the "port" name which used to be IP+TcpPort of one endpoint. Also introduced the notion of OrkUid which is an unique identifier based on timestamp + tracking ID. OrkUid is not yet reported to orktrack.
git-svn-id: https://oreka.svn.sourceforge.net/svnroot/oreka/trunk@342 09dcff7a-b715-0410-9601-b79a96267cd0
Diffstat (limited to 'orkbasecxx/AudioTape.cpp')
-rw-r--r-- | orkbasecxx/AudioTape.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/orkbasecxx/AudioTape.cpp b/orkbasecxx/AudioTape.cpp index 9bb7239..30cd9ef 100644 --- a/orkbasecxx/AudioTape.cpp +++ b/orkbasecxx/AudioTape.cpp @@ -79,6 +79,7 @@ AudioTape::AudioTape(CStdString &portId) m_direction = CaptureEvent::DirUnkn; m_shouldStop = false; m_readyForBatchProcessing = false; + m_trackingId = portId; // to make sure this has a value before we get the capture tracking Id. GenerateFilePathAndIdentifier(); } @@ -171,13 +172,13 @@ void AudioTape::Write() // Compute RMS, RMS dB and log CStdString rmsString; rmsString.Format("%.1f dB:%.1f", chunkRef.get()->ComputeRms(), chunkRef.get()->ComputeRmsDb()); - LOG4CXX_INFO(LOG.portLog, m_portId + " RMS: " + rmsString); + LOG4CXX_INFO(LOG.portLog, "[" + m_trackingId + "] RMS: " + rmsString); } } } catch (CStdString& e) { - LOG4CXX_INFO(LOG.portLog, "#" + m_portId + ": " + e); + LOG4CXX_INFO(LOG.portLog, "[" + m_trackingId + "] " + e); m_state = StateError; } } @@ -208,6 +209,15 @@ void AudioTape::AddCaptureEvent(CaptureEventRef eventRef, bool send) // Extract useful info from well known events switch(eventRef->m_type) { + case CaptureEvent::EtStart: + m_trackingId = eventRef->m_value; + if (m_state == StateCreated) + { + // Media chunk stream not yet started, we can update begin date with the actual capture begin date + m_beginDate = eventRef->m_timestamp; + GenerateFilePathAndIdentifier(); + } + break; case CaptureEvent::EtStop: m_shouldStop = true; @@ -247,6 +257,14 @@ void AudioTape::AddCaptureEvent(CaptureEventRef eventRef, bool send) case CaptureEvent::EtRemoteIp: m_remoteIp = eventRef->m_value; break; + case CaptureEvent::EtOrkUid: + m_orkUid = eventRef->m_value; + if (m_state == StateCreated) + { + // Media chunk stream not yet started, we can set the mcf file name to be the Oreka Unique ID + m_fileIdentifier = m_orkUid; + } + break; } // Store the capture event locally |