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
0714f633
Commit
0714f633
authored
Aug 09, 2011
by
Tristan Matthews
Browse files
return a copy of the call ID, not just a reference.
parent
592e8153
Changes
5
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.cpp
View file @
0714f633
...
...
@@ -126,7 +126,7 @@ AudioRtpRecord::~AudioRtpRecord()
}
AudioRtpRecordHandler
::
AudioRtpRecordHandler
(
SIPCall
*
ca
)
:
_audioRtpRecord
(),
_
id
(
ca
->
getCallId
()),
echoCanceller
(
ca
->
getMemoryPool
()),
gainController
(
8000
,
-
10.0
)
AudioRtpRecordHandler
::
AudioRtpRecordHandler
(
SIPCall
*
ca
)
:
_audioRtpRecord
(),
id
_
(
ca
->
getCallId
()),
echoCanceller
(
ca
->
getMemoryPool
()),
gainController
(
8000
,
-
10.0
)
{
}
...
...
@@ -275,13 +275,13 @@ int AudioRtpRecordHandler::processDataEncode (void)
int
bytesToGet
=
computeNbByteAudioLayer
(
mainBufferSampleRate
,
fixedCodecFramesize
);
// available bytes inside ringbuffer
int
availBytesFromMic
=
Manager
::
instance
().
getMainBuffer
()
->
availForGet
(
_
id
);
int
availBytesFromMic
=
Manager
::
instance
().
getMainBuffer
()
->
availForGet
(
id
_
);
if
(
availBytesFromMic
<
bytesToGet
)
return
0
;
// Get bytes from micRingBuffer to data_from_mic
int
nbSample
=
Manager
::
instance
().
getMainBuffer
()
->
getData
(
micData
,
bytesToGet
,
100
,
_
id
)
/
sizeof
(
SFLDataFormat
);
int
nbSample
=
Manager
::
instance
().
getMainBuffer
()
->
getData
(
micData
,
bytesToGet
,
100
,
id
_
)
/
sizeof
(
SFLDataFormat
);
// process mic fade in
if
(
!
_audioRtpRecord
.
_micFadeInComplete
)
...
...
@@ -393,7 +393,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned
}
// put data in audio layer, size in byte
Manager
::
instance
().
getMainBuffer
()
->
putData
(
spkrDataConverted
,
nbSample
*
sizeof
(
SFLDataFormat
),
100
,
_
id
);
Manager
::
instance
().
getMainBuffer
()
->
putData
(
spkrDataConverted
,
nbSample
*
sizeof
(
SFLDataFormat
),
100
,
id
_
);
}
else
{
...
...
@@ -401,7 +401,7 @@ void AudioRtpRecordHandler::processDataDecode (unsigned char *spkrData, unsigned
echoCanceller
.
putData
(
spkrDataDecoded
,
expandedSize
);
}
// put data in audio layer, size in byte
Manager
::
instance
().
getMainBuffer
()
->
putData
(
spkrDataDecoded
,
expandedSize
,
100
,
_
id
);
Manager
::
instance
().
getMainBuffer
()
->
putData
(
spkrDataDecoded
,
expandedSize
,
100
,
id
_
);
}
}
...
...
sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.h
View file @
0714f633
...
...
@@ -225,9 +225,9 @@ class AudioRtpRecordHandler
private:
std
::
string
&
_
id
;
const
std
::
string
id
_
;
EchoSuppress
echoCanceller
;
EchoSuppress
echoCanceller
;
GainControl
gainController
;
};
...
...
sflphone-common/src/call.h
View file @
0714f633
...
...
@@ -86,10 +86,10 @@ class Call: public Recordable
virtual
~
Call
();
/**
* Return a
reference
o
n
the call id
* Return a
copy
o
f
the call id
* @return call id
*/
std
::
string
&
getCallId
()
{
std
::
string
getCallId
()
const
{
return
_id
;
}
...
...
sflphone-common/src/im/InstantMessaging.cpp
View file @
0714f633
...
...
@@ -75,7 +75,7 @@ static void XMLCALL startElementCallback (void *userData, const char *name, cons
}
static
void
XMLCALL
endElementCallback
(
void
*
userData
,
const
char
*
name
)
static
void
XMLCALL
endElementCallback
(
void
*
/*
userData
*/
,
const
char
*
/*
name
*/
)
{
// std::cout << "endElement " << name << std::endl;
}
...
...
@@ -133,7 +133,7 @@ bool InstantMessaging::saveMessage (const std::string& message, const std::strin
return
true
;
}
std
::
string
InstantMessaging
::
receive
(
const
std
::
string
&
message
,
const
std
::
string
&
author
,
std
::
string
&
id
)
std
::
string
InstantMessaging
::
receive
(
const
std
::
string
&
message
,
const
std
::
string
&
/*
author
*/
,
const
std
::
string
&
/*id*/
)
{
// We just receive a TEXT message. Before sent it to the recipient, we must assure that the message is complete.
...
...
@@ -153,7 +153,7 @@ std::string InstantMessaging::receive (const std::string& message, const std::st
}
pj_status_t
InstantMessaging
::
notify
(
std
::
string
&
id
)
pj_status_t
InstantMessaging
::
notify
(
const
std
::
string
&
/*id*/
)
{
// Notify the clients through a D-Bus signal
return
PJ_SUCCESS
;
...
...
@@ -246,7 +246,7 @@ pj_status_t InstantMessaging::send_sip_message (pjsip_inv_session *session, std:
}
bool
InstantMessaging
::
iax_send
(
iax_session
*
session
,
const
std
::
string
&
id
,
const
std
::
string
&
message
)
bool
InstantMessaging
::
iax_send
(
iax_session
*
session
,
const
std
::
string
&
/*id*/
,
const
std
::
string
&
message
)
{
if
(
iax_send_text
(
session
,
message
.
c_str
())
!=
-
1
)
return
true
;
...
...
sflphone-common/src/im/InstantMessaging.h
View file @
0714f633
...
...
@@ -141,7 +141,7 @@ class InstantMessaging
* @param message The message contained in the TEXT message
* @param id The call recipient of the message
*/
std
::
string
receive
(
const
std
::
string
&
message
,
const
std
::
string
&
author
,
std
::
string
&
id
);
std
::
string
receive
(
const
std
::
string
&
message
,
const
std
::
string
&
author
,
const
std
::
string
&
id
);
/*
* Send a SIP string message inside a call
...
...
@@ -168,7 +168,7 @@ class InstantMessaging
*
* @param id The callID to notify (TODO: accountID?)
*/
pj_status_t
notify
(
std
::
string
&
id
);
pj_status_t
notify
(
const
std
::
string
&
/*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