Skip to content
Snippets Groups Projects
Commit f399a3fb authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#4874] Store call id within rtp thread context

parent f8dd8526
Branches
Tags
No related merge requests found
......@@ -53,6 +53,7 @@ AudioRtpRecord::AudioRtpRecord () : _audioCodec (NULL)
, _spkrAmplFactor (initFadeinFactor)
, _audioProcess (NULL)
, _noiseSuppress (NULL)
, _callId ("")
{
}
......
......@@ -110,6 +110,7 @@ class AudioRtpRecord
AudioProcessing *_audioProcess;
NoiseSuppress *_noiseSuppress;
ost::Mutex audioProcessMutex;
std::string _callId;
};
......@@ -207,10 +208,11 @@ class AudioRtpRecordHandler
void putDtmfEvent (int digit);
private:
protected:
AudioRtpRecord _audioRtpRecord;
private:
SIPCall *_ca;
......
......@@ -65,6 +65,8 @@ AudioRtpSession::AudioRtpSession (ManagerImpl * manager, SIPCall * sipcall) :
_info ("AudioRtpSession: Setting new RTP session with destination %s:%d", _ca->getLocalIp().c_str(), _ca->getLocalAudioPort());
_audioRtpRecord._callId = _ca->getCallId();
// static_cast<ost::DualRTPUDPIPv4Channel>(dso)->sendSocket->setTypeOfService(ost::Socket::tosLowDelay);
// static_cast<ost::DualRTPChannel<ost::DualRTPUDPIPv4Channel> >(dso)->sendSocket->setTypeOfService(ost::Socket::tosLowDelay);
......@@ -82,7 +84,7 @@ AudioRtpSession::~AudioRtpSession()
throw;
}
Manager::instance().getMainBuffer()->unBindAll (_ca->getCallId());
Manager::instance().getMainBuffer()->unBindAll (_audioRtpRecord._callId);
if (_time)
delete _time;
......@@ -362,7 +364,7 @@ void AudioRtpSession::run ()
// Set recording sampling rate
_ca->setRecordingSmplRate (getCodecSampleRate());
_debug ("AudioRtpSession: Entering mainloop for call %s",_ca->getCallId().c_str());
_debug ("AudioRtpSession: Entering mainloop for call %s", _audioRtpRecord._callId.c_str());
uint32 timeout = 0;
......@@ -412,7 +414,7 @@ void AudioRtpSession::run ()
}
}
_debug ("AudioRtpSession: Left main loop for call %s", _ca->getCallId().c_str());
_debug ("AudioRtpSession: Left main loop for call %s", _audioRtpRecord._callId.c_str());
Thread::exit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment