Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
adbadc5e
Commit
adbadc5e
authored
Sep 10, 2009
by
Alexandre Savard
Browse files
[#2165] Implement call recording using the Recordable interface
parent
8fbbe7e4
Changes
7
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/call.cpp
View file @
adbadc5e
...
...
@@ -36,18 +36,11 @@ Call::Call (const CallID& id, Call::CallType type)
,
_peerNumber
()
{
FILE_TYPE
fileType
=
FILE_WAV
;
SOUND_FORMAT
soundFormat
=
INT16
;
recAudio
.
setRecordingOption
(
fileType
,
soundFormat
,
44100
,
Manager
::
instance
().
getConfigString
(
AUDIO
,
RECORD_PATH
),
id
);
}
Call
::~
Call
()
{
if
(
recAudio
.
isOpenFile
())
{
recAudio
.
closeFile
();
}
}
void
...
...
sflphone-common/src/call.h
View file @
adbadc5e
...
...
@@ -235,6 +235,9 @@ class Call: public Recordable{
*/
void
initRecFileName
();
std
::
string
getRecFileId
(){
return
getPeerName
();
}
protected:
/** Protect every attribute that can be changed by two threads */
ost
::
Mutex
_callMutex
;
...
...
sflphone-common/src/conference.cpp
View file @
adbadc5e
...
...
@@ -43,6 +43,8 @@ Conference::Conference()
_nbParticipant
=
0
;
_id
=
conf
.
append
(
s
);
}
...
...
sflphone-common/src/conference.h
View file @
adbadc5e
...
...
@@ -20,6 +20,7 @@
#define CONFERENCE_H
#include
<set>
#include
<string>
#include
"audio/recordable.h"
#include
"call.h"
...
...
@@ -61,6 +62,8 @@ class Conference: public Recordable{
ParticipantSet
getParticipantList
();
std
::
string
getRecFileId
(){
return
getConfID
();
}
private:
/** Unique ID of the conference */
...
...
sflphone-common/src/managerimpl.cpp
View file @
adbadc5e
...
...
@@ -639,8 +639,6 @@ ManagerImpl::offHoldCall (const CallID& call_id)
}
if
(
participToConference
(
call_id
)
)
{
_debug
(
"????????????????????????? Particip to conference ????????????????????????????"
);
AccountID
currentAccountId
;
Call
*
call
=
NULL
;
...
...
@@ -2658,19 +2656,32 @@ ManagerImpl::setVolumeControls (void)
void
ManagerImpl
::
setRecordingCall
(
const
CallID
&
id
)
{
/*
_debug ("ManagerImpl::setRecording()! \n");
AccountID accountid = getAccountFromCall (id);
getAccountLink (accountid)->setRecording (id);
*/
AccountID
accountid
=
getAccountFromCall
(
id
);
Recordable
*
rec
=
(
Recordable
*
)
getAccountLink
(
accountid
)
->
getCall
(
id
);
rec
->
setRecording
();
}
bool
ManagerImpl
::
isRecording
(
const
CallID
&
id
)
{
/*
_debug ("ManagerImpl::isRecording()! \n");
AccountID accountid = getAccountFromCall (id);
return getAccountLink (accountid)->isRecording (id);
*/
AccountID
accountid
=
getAccountFromCall
(
id
);
Recordable
*
rec
=
(
Recordable
*
)
getAccountLink
(
accountid
)
->
getCall
(
id
);
rec
->
isRecording
();
}
void
...
...
sflphone-common/src/plug-in/audiorecorder/audiorecord.cpp
View file @
adbadc5e
...
...
@@ -68,7 +68,7 @@ void AudioRecord::setSndSamplingRate (int smplRate)
sndSmplRate_
=
smplRate
;
}
void
AudioRecord
::
setRecordingOption
(
FILE_TYPE
type
,
SOUND_FORMAT
format
,
int
sndSmplRate
,
std
::
string
path
,
std
::
string
id
)
void
AudioRecord
::
setRecordingOption
(
FILE_TYPE
type
,
SOUND_FORMAT
format
,
int
sndSmplRate
,
std
::
string
path
)
{
...
...
@@ -76,7 +76,6 @@ void AudioRecord::setRecordingOption (FILE_TYPE type, SOUND_FORMAT format, int s
sndFormat_
=
format
;
channels_
=
1
;
sndSmplRate_
=
sndSmplRate
;
call_id_
=
id
;
savePath_
=
path
+
"/"
;
...
...
sflphone-common/src/plug-in/audiorecorder/audiorecord.h
View file @
adbadc5e
...
...
@@ -45,7 +45,7 @@ public:
void
setSndSamplingRate
(
int
smplRate
);
void
setRecordingOption
(
FILE_TYPE
type
,
SOUND_FORMAT
format
,
int
sndSmplRate
,
std
::
string
path
,
std
::
string
id
);
void
setRecordingOption
(
FILE_TYPE
type
,
SOUND_FORMAT
format
,
int
sndSmplRate
,
std
::
string
path
);
void
initFileName
(
std
::
string
peerNumber
);
...
...
@@ -226,11 +226,6 @@ protected:
* Path for this recording
*/
std
::
string
savePath_
;
/**
* Path for this recordingId for this call
*/
std
::
string
call_id_
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment