Commit 007abd23 authored by alexandresavard's avatar alexandresavard
Browse files

Stop recording when transfering

parent c5202fcb
...@@ -173,6 +173,12 @@ Call::setRecording() ...@@ -173,6 +173,12 @@ Call::setRecording()
recAudio.setRecording(); recAudio.setRecording();
} }
void
Call::stopRecording()
{
recAudio.stopRecording();
}
bool bool
Call::isRecording() Call::isRecording()
{ {
......
...@@ -224,6 +224,11 @@ class Call{ ...@@ -224,6 +224,11 @@ class Call{
* SetRecording * SetRecording
*/ */
void setRecording(); void setRecording();
/**
* stopRecording, make sure the recording is stopped (whe transfering call)
*/
void stopRecording();
/** /**
* Return Recording state * Return Recording state
......
...@@ -152,6 +152,13 @@ bool AudioRecord::setRecording() { ...@@ -152,6 +152,13 @@ bool AudioRecord::setRecording() {
} }
void AudioRecord::stopRecording() {
_debug("AudioRecording::stopRecording() \n");
if(recordingEnabled_)
recordingEnabled_ = false;
}
bool AudioRecord::setRawFile() { bool AudioRecord::setRawFile() {
......
...@@ -90,6 +90,11 @@ public: ...@@ -90,6 +90,11 @@ public:
*/ */
bool setRecording(); bool setRecording();
/**
* Stop recording flag
*/
void stopRecording();
/** /**
* Record a chunk of data in an openend file * Record a chunk of data in an openend file
* @param buffer The data chunk to be recorded * @param buffer The data chunk to be recorded
......
...@@ -642,6 +642,7 @@ SIPVoIPLink::transfer(const CallID& id, const std::string& to) ...@@ -642,6 +642,7 @@ SIPVoIPLink::transfer(const CallID& id, const std::string& to)
call = getSIPCall(id); call = getSIPCall(id);
call->stopRecording();
account_id = Manager::instance().getAccountFromCall(id); account_id = Manager::instance().getAccountFromCall(id);
account = dynamic_cast<SIPAccount *>(Manager::instance().getAccount(account_id)); account = dynamic_cast<SIPAccount *>(Manager::instance().getAccount(account_id));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment