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
ee33dbad
Commit
ee33dbad
authored
Jan 07, 2011
by
Alexandre Savard
Browse files
[#4857] Fix audio codec negotiation problem
parent
ad5b79d7
Changes
62
Hide whitespace changes
Inline
Side-by-side
sflphone-client-gnome/src/config/addressbook-config.c
View file @
ee33dbad
...
...
@@ -183,7 +183,7 @@ search_phone_home_cb (GtkWidget *widget)
{
addressbook_config
->
search_phone_home
=
(
guint
)
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
widget
));
GTK_TOGGLE_BUTTON
(
widget
));
}
static
void
...
...
sflphone-client-gnome/src/contacts/searchbar.c
View file @
ee33dbad
...
...
@@ -166,8 +166,8 @@ static void search_all (GtkWidget *item UNUSED, GtkEntry *entry)
gtk_entry_set_icon_from_stock
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
GTK_STOCK_FIND
);
gtk_entry_set_icon_tooltip_text
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
g_markup_printf_escaped
(
"%s
\n
%s"
,
_
(
"Search all"
),
_
(
"Click here to change the search type"
)));
_
(
"Search all"
),
_
(
"Click here to change the search type"
)));
history_search
(
HistorySearchType
);
}
...
...
@@ -179,8 +179,8 @@ static void search_by_missed (GtkWidget *item UNUSED, GtkEntry *entry)
gtk_entry_set_icon_from_pixbuf
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
missed_pixbuf
);
gtk_entry_set_icon_tooltip_text
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
g_markup_printf_escaped
(
"%s
\n
%s"
,
_
(
"Search by missed call"
),
_
(
"Click here to change the search type"
)));
_
(
"Search by missed call"
),
_
(
"Click here to change the search type"
)));
history_search
(
HistorySearchType
);
}
...
...
@@ -191,8 +191,8 @@ static void search_by_incoming (GtkWidget *item UNUSED, GtkEntry *entry)
gtk_entry_set_icon_from_pixbuf
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
incoming_pixbuf
);
gtk_entry_set_icon_tooltip_text
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
g_markup_printf_escaped
(
"%s
\n
%s"
,
_
(
"Search by incoming call"
),
_
(
"Click here to change the search type"
)));
_
(
"Search by incoming call"
),
_
(
"Click here to change the search type"
)));
history_search
(
HistorySearchType
);
}
...
...
@@ -203,8 +203,8 @@ static void search_by_outgoing (GtkWidget *item UNUSED, GtkEntry *entry)
gtk_entry_set_icon_from_pixbuf
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
outgoing_pixbuf
);
gtk_entry_set_icon_tooltip_text
(
entry
,
GTK_ENTRY_ICON_PRIMARY
,
g_markup_printf_escaped
(
"%s
\n
%s"
,
_
(
"Search by outgoing call"
),
_
(
"Click here to change the search type"
)));
_
(
"Search by outgoing call"
),
_
(
"Click here to change the search type"
)));
history_search
(
HistorySearchType
);
}
...
...
sflphone-client-gnome/src/uimanager.c
View file @
ee33dbad
...
...
@@ -1629,7 +1629,7 @@ create_waiting_icon()
waiting_icon
=
gtk_image_menu_item_new_with_label
(
""
);
gtk_image_menu_item_set_image
(
GTK_IMAGE_MENU_ITEM
(
waiting_icon
),
gtk_image_new_from_animation
(
gdk_pixbuf_animation_new_from_file
(
ICONS_DIR
"/wait-on.gif"
,
NULL
)));
ICONS_DIR
"/wait-on.gif"
,
NULL
)));
gtk_menu_item_set_right_justified
(
GTK_MENU_ITEM
(
waiting_icon
),
TRUE
);
return
waiting_icon
;
...
...
sflphone-common/src/audio/alsa/alsalayer.cpp
View file @
ee33dbad
...
...
@@ -37,21 +37,21 @@ int framesPerBufferAlsa = 2048;
// Constructor
AlsaLayer
::
AlsaLayer
(
ManagerImpl
*
manager
)
:
AudioLayer
(
manager
,
ALSA
)
,
_PlaybackHandle
(
NULL
)
,
_RingtoneHandle
(
NULL
)
,
_CaptureHandle
(
NULL
)
,
_periodSize
(
160
)
,
_audioPlugin
(
"default"
)
,
IDSoundCards
()
,
_is_prepared_playback
(
false
)
,
_is_prepared_capture
(
false
)
,
_is_running_playback
(
false
)
,
_is_running_capture
(
false
)
,
_is_open_playback
(
false
)
,
_is_open_capture
(
false
)
,
_trigger_request
(
false
)
,
_audioThread
(
NULL
)
:
AudioLayer
(
manager
,
ALSA
)
,
_PlaybackHandle
(
NULL
)
,
_RingtoneHandle
(
NULL
)
,
_CaptureHandle
(
NULL
)
,
_periodSize
(
160
)
,
_audioPlugin
(
"default"
)
,
IDSoundCards
()
,
_is_prepared_playback
(
false
)
,
_is_prepared_capture
(
false
)
,
_is_running_playback
(
false
)
,
_is_running_capture
(
false
)
,
_is_open_playback
(
false
)
,
_is_open_capture
(
false
)
,
_trigger_request
(
false
)
,
_audioThread
(
NULL
)
{
_debug
(
"Audio: Build ALSA layer"
);
...
...
sflphone-common/src/audio/audiodevice.cpp
View file @
ee33dbad
...
...
@@ -34,7 +34,7 @@
const
double
AudioDevice
::
DEFAULT_RATE
=
8000.0
;
AudioDevice
::
AudioDevice
(
int
id
,
const
std
::
string
&
name
)
:
_id
(
id
),
_name
(
name
),
_rate
(
DEFAULT_RATE
)
_id
(
id
),
_name
(
name
),
_rate
(
DEFAULT_RATE
)
{
_rate
=
DEFAULT_RATE
;
}
...
...
sflphone-common/src/audio/audiolayer.h
View file @
ee33dbad
...
...
@@ -68,18 +68,18 @@ class AudioLayer
* @param manager An instance of managerimpl
*/
AudioLayer
(
ManagerImpl
*
manager
,
int
type
)
:
_defaultVolume
(
100
)
,
_layerType
(
type
)
,
_manager
(
manager
)
,
_urgentRingBuffer
(
SIZEBUF
,
default_id
)
,
_indexIn
(
0
)
,
_indexOut
(
0
)
,
_audioSampleRate
(
0
)
,
_frameSize
(
0
)
,
_inChannel
(
1
)
,
_outChannel
(
1
)
,
_errorMessage
(
0
)
,
_mutex
()
{
:
_defaultVolume
(
100
)
,
_layerType
(
type
)
,
_manager
(
manager
)
,
_urgentRingBuffer
(
SIZEBUF
,
default_id
)
,
_indexIn
(
0
)
,
_indexOut
(
0
)
,
_audioSampleRate
(
0
)
,
_frameSize
(
0
)
,
_inChannel
(
1
)
,
_outChannel
(
1
)
,
_errorMessage
(
0
)
,
_mutex
()
{
}
...
...
sflphone-common/src/audio/audiorecord.cpp
View file @
ee33dbad
...
...
@@ -50,16 +50,16 @@ struct wavhdr {
AudioRecord
::
AudioRecord
()
:
fp
(
NULL
)
,
channels_
(
1
)
,
byteCounter_
(
0
)
,
sndSmplRate_
(
8000
)
,
nbSamplesMic_
(
0
)
,
nbSamplesSpk_
(
0
)
,
nbSamplesMax_
(
3000
)
,
recordingEnabled_
(
false
)
,
mixBuffer_
(
NULL
)
,
micBuffer_
(
NULL
)
,
spkBuffer_
(
NULL
)
,
channels_
(
1
)
,
byteCounter_
(
0
)
,
sndSmplRate_
(
8000
)
,
nbSamplesMic_
(
0
)
,
nbSamplesSpk_
(
0
)
,
nbSamplesMax_
(
3000
)
,
recordingEnabled_
(
false
)
,
mixBuffer_
(
NULL
)
,
micBuffer_
(
NULL
)
,
spkBuffer_
(
NULL
)
{
mixBuffer_
=
new
SFLDataFormat
[
nbSamplesMax_
];
...
...
sflphone-common/src/audio/audiortp/AudioRtpRecordHandler.cpp
View file @
ee33dbad
...
...
@@ -38,21 +38,21 @@ namespace sfl
static
const
SFLDataFormat
initFadeinFactor
=
32000
;
AudioRtpRecord
::
AudioRtpRecord
()
:
_audioCodec
(
NULL
)
,
_hasDynamicPayloadType
(
false
)
,
_micData
(
NULL
)
,
_micDataConverted
(
NULL
)
,
_micDataEncoded
(
NULL
)
,
_spkrDataDecoded
(
NULL
)
,
_spkrDataConverted
(
NULL
)
,
_converter
(
NULL
)
,
_codecSampleRate
(
0
)
,
_codecFrameSize
(
0
)
,
_micFadeInComplete
(
false
)
,
_spkrFadeInComplete
(
false
)
,
_micAmplFactor
(
initFadeinFactor
)
,
_spkrAmplFactor
(
initFadeinFactor
)
,
_audioProcess
(
NULL
)
,
_noiseSuppress
(
NULL
)
,
_hasDynamicPayloadType
(
false
)
,
_micData
(
NULL
)
,
_micDataConverted
(
NULL
)
,
_micDataEncoded
(
NULL
)
,
_spkrDataDecoded
(
NULL
)
,
_spkrDataConverted
(
NULL
)
,
_converter
(
NULL
)
,
_codecSampleRate
(
0
)
,
_codecFrameSize
(
0
)
,
_micFadeInComplete
(
false
)
,
_spkrFadeInComplete
(
false
)
,
_micAmplFactor
(
initFadeinFactor
)
,
_spkrAmplFactor
(
initFadeinFactor
)
,
_audioProcess
(
NULL
)
,
_noiseSuppress
(
NULL
)
{
}
...
...
sflphone-common/src/audio/audiortp/AudioRtpSession.cpp
View file @
ee33dbad
...
...
@@ -42,22 +42,22 @@ namespace sfl
{
AudioRtpSession
::
AudioRtpSession
(
ManagerImpl
*
manager
,
SIPCall
*
sipcall
)
:
// ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpRecordHandler
(
manager
,
sipcall
),
ost
::
TRTPSessionBase
<
ost
::
SymmetricRTPChannel
,
ost
::
SymmetricRTPChannel
,
ost
::
AVPQueue
>
(
ost
::
InetHostAddress
(
sipcall
->
getLocalIp
().
c_str
()),
sipcall
->
getLocalAudioPort
(),
0
,
ost
::
MembershipBookkeeping
::
defaultMembersHashSize
,
ost
::
defaultApplication
())
,
_time
(
new
ost
::
Time
())
,
_mainloopSemaphore
(
0
)
,
_manager
(
manager
)
,
_timestamp
(
0
)
,
_timestampIncrement
(
0
)
,
_timestampCount
(
0
)
,
_countNotificationTime
(
0
)
,
_ca
(
sipcall
)
,
_isStarted
(
false
)
// ost::SymmetricRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpRecordHandler
(
manager
,
sipcall
),
ost
::
TRTPSessionBase
<
ost
::
SymmetricRTPChannel
,
ost
::
SymmetricRTPChannel
,
ost
::
AVPQueue
>
(
ost
::
InetHostAddress
(
sipcall
->
getLocalIp
().
c_str
()),
sipcall
->
getLocalAudioPort
(),
0
,
ost
::
MembershipBookkeeping
::
defaultMembersHashSize
,
ost
::
defaultApplication
())
,
_time
(
new
ost
::
Time
())
,
_mainloopSemaphore
(
0
)
,
_manager
(
manager
)
,
_timestamp
(
0
)
,
_timestampIncrement
(
0
)
,
_timestampCount
(
0
)
,
_countNotificationTime
(
0
)
,
_ca
(
sipcall
)
,
_isStarted
(
false
)
{
ost
::
Thread
::
setCancel
(
cancelDefault
);
...
...
sflphone-common/src/audio/audiortp/AudioSrtpSession.cpp
View file @
ee33dbad
...
...
@@ -50,16 +50,16 @@ namespace sfl
{
AudioSrtpSession
::
AudioSrtpSession
(
ManagerImpl
*
manager
,
SIPCall
*
sipcall
)
:
AudioRtpSession
(
manager
,
sipcall
),
_localCryptoSuite
(
0
),
_remoteCryptoSuite
(
0
),
_localMasterKeyLength
(
0
),
_localMasterSaltLength
(
0
),
_remoteMasterKeyLength
(
0
),
_remoteMasterSaltLength
(
0
),
_remoteCryptoCtx
(
NULL
),
_localCryptoCtx
(
NULL
),
_remoteOfferIsSet
(
false
)
AudioRtpSession
(
manager
,
sipcall
),
_localCryptoSuite
(
0
),
_remoteCryptoSuite
(
0
),
_localMasterKeyLength
(
0
),
_localMasterSaltLength
(
0
),
_remoteMasterKeyLength
(
0
),
_remoteMasterSaltLength
(
0
),
_remoteCryptoCtx
(
NULL
),
_localCryptoCtx
(
NULL
),
_remoteOfferIsSet
(
false
)
{
}
...
...
sflphone-common/src/audio/audiortp/AudioZrtpSession.cpp
View file @
ee33dbad
...
...
@@ -50,22 +50,22 @@ namespace sfl
{
AudioZrtpSession
::
AudioZrtpSession
(
ManagerImpl
*
manager
,
SIPCall
*
sipcall
,
const
std
::
string
&
zidFilename
)
:
// ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpRecordHandler
(
manager
,
sipcall
),
ost
::
TRTPSessionBase
<
ost
::
SymmetricRTPChannel
,
ost
::
SymmetricRTPChannel
,
ost
::
ZrtpQueue
>
(
ost
::
InetHostAddress
(
sipcall
->
getLocalIp
().
c_str
()),
sipcall
->
getLocalAudioPort
(),
0
,
ost
::
MembershipBookkeeping
::
defaultMembersHashSize
,
ost
::
defaultApplication
())
,
_zidFilename
(
zidFilename
)
,
_time
(
new
ost
::
Time
())
,
_mainloopSemaphore
(
0
)
,
_manager
(
manager
)
,
_timestamp
(
0
)
,
_timestampIncrement
(
0
)
,
_timestampCount
(
0
)
,
_countNotificationTime
(
0
)
,
_ca
(
sipcall
)
// ost::SymmetricZRTPSession (ost::InetHostAddress (sipcall->getLocalIp().c_str()), sipcall->getLocalAudioPort()),
AudioRtpRecordHandler
(
manager
,
sipcall
),
ost
::
TRTPSessionBase
<
ost
::
SymmetricRTPChannel
,
ost
::
SymmetricRTPChannel
,
ost
::
ZrtpQueue
>
(
ost
::
InetHostAddress
(
sipcall
->
getLocalIp
().
c_str
()),
sipcall
->
getLocalAudioPort
(),
0
,
ost
::
MembershipBookkeeping
::
defaultMembersHashSize
,
ost
::
defaultApplication
())
,
_zidFilename
(
zidFilename
)
,
_time
(
new
ost
::
Time
())
,
_mainloopSemaphore
(
0
)
,
_manager
(
manager
)
,
_timestamp
(
0
)
,
_timestampIncrement
(
0
)
,
_timestampCount
(
0
)
,
_countNotificationTime
(
0
)
,
_ca
(
sipcall
)
{
_debug
(
"AudioZrtpSession initialized"
);
initializeZid
();
...
...
sflphone-common/src/audio/audiortp/ZrtpSessionCallback.cpp
View file @
ee33dbad
...
...
@@ -48,7 +48,7 @@ namespace sfl
{
ZrtpSessionCallback
::
ZrtpSessionCallback
(
SIPCall
*
sipcall
)
:
_sipcall
(
sipcall
)
_sipcall
(
sipcall
)
{
if
(
_mapInitialized
)
{
...
...
sflphone-common/src/audio/codecs/alaw.cpp
View file @
ee33dbad
...
...
@@ -38,7 +38,7 @@ class Alaw : public AudioCodec
public:
// 8 PCMA A 8000 1 [RFC3551]
Alaw
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"PCMA"
)
{
:
AudioCodec
(
payload
,
"PCMA"
)
{
_clockRate
=
8000
;
_frameSize
=
160
;
// samples, 20 ms at 8kHz
_channel
=
1
;
...
...
sflphone-common/src/audio/codecs/audiocodec.h
View file @
ee33dbad
...
...
@@ -64,7 +64,7 @@ class AudioCodec
public:
AudioCodec
(
int
payload
,
const
std
::
string
&
codecName
)
:
_codecName
(
codecName
),
_clockRate
(
8000
),
_channel
(
1
),
_bitrate
(
0.0
),
_bandwidth
(
0
),
_payload
(
payload
),
_hasDynamicPayload
(
false
),
_state
(
true
)
{
:
_codecName
(
codecName
),
_clockRate
(
8000
),
_channel
(
1
),
_bitrate
(
0.0
),
_bandwidth
(
0
),
_payload
(
payload
),
_hasDynamicPayload
(
false
),
_state
(
true
)
{
_hasDynamicPayload
=
(
_payload
>=
96
&&
_payload
<=
127
)
?
true
:
false
;
...
...
@@ -78,7 +78,7 @@ class AudioCodec
}
AudioCodec
(
const
AudioCodec
&
codec
)
:
_codecName
(
codec
.
_codecName
),
_clockRate
(
codec
.
_clockRate
),
_channel
(
codec
.
_channel
),
_bitrate
(
codec
.
_bitrate
),
_bandwidth
(
codec
.
_bandwidth
),
_payload
(
codec
.
_payload
),
_hasDynamicPayload
(
false
),
_state
(
true
)
{
:
_codecName
(
codec
.
_codecName
),
_clockRate
(
codec
.
_clockRate
),
_channel
(
codec
.
_channel
),
_bitrate
(
codec
.
_bitrate
),
_bandwidth
(
codec
.
_bandwidth
),
_payload
(
codec
.
_payload
),
_hasDynamicPayload
(
false
),
_state
(
true
)
{
_hasDynamicPayload
=
(
_payload
>=
96
&&
_payload
<=
127
)
?
true
:
false
;
...
...
sflphone-common/src/audio/codecs/g722.cpp
View file @
ee33dbad
...
...
@@ -49,7 +49,7 @@ class G722 : public AudioCodec
public:
G722
(
int
payload
=
9
)
:
AudioCodec
(
payload
,
"G722"
)
{
:
AudioCodec
(
payload
,
"G722"
)
{
_clockRate
=
16000
;
_frameSize
=
320
;
// samples, 20 ms at 16kHz
_channel
=
1
;
...
...
sflphone-common/src/audio/codecs/speexcodec_nb.cpp
View file @
ee33dbad
...
...
@@ -39,13 +39,13 @@ class Speex : public AudioCodec
public:
Speex
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"speex"
),
_speexModePtr
(
NULL
),
_speex_dec_bits
(),
_speex_enc_bits
(),
_speex_dec_state
(),
_speex_enc_state
(),
_speex_frame_size
()
{
:
AudioCodec
(
payload
,
"speex"
),
_speexModePtr
(
NULL
),
_speex_dec_bits
(),
_speex_enc_bits
(),
_speex_dec_state
(),
_speex_enc_state
(),
_speex_frame_size
()
{
_clockRate
=
8000
;
_frameSize
=
160
;
// samples, 20 ms at 8kHz
_channel
=
1
;
...
...
sflphone-common/src/audio/codecs/speexcodec_ub.cpp
View file @
ee33dbad
...
...
@@ -38,13 +38,13 @@ class Speex : public AudioCodec
public:
Speex
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"speex"
),
_speexModePtr
(
NULL
),
_speex_dec_bits
(),
_speex_enc_bits
(),
_speex_dec_state
(),
_speex_enc_state
(),
_speex_frame_size
()
{
:
AudioCodec
(
payload
,
"speex"
),
_speexModePtr
(
NULL
),
_speex_dec_bits
(),
_speex_enc_bits
(),
_speex_dec_state
(),
_speex_enc_state
(),
_speex_frame_size
()
{
_clockRate
=
32000
;
_frameSize
=
640
;
// 20 ms at 32 kHz
_channel
=
1
;
...
...
sflphone-common/src/audio/codecs/speexcodec_wb.cpp
View file @
ee33dbad
...
...
@@ -38,13 +38,13 @@ class Speex : public AudioCodec
public:
Speex
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"speex"
),
_speexModePtr
(
NULL
),
_speex_dec_bits
(),
_speex_enc_bits
(),
_speex_dec_state
(),
_speex_enc_state
(),
_speex_frame_size
()
{
:
AudioCodec
(
payload
,
"speex"
),
_speexModePtr
(
NULL
),
_speex_dec_bits
(),
_speex_enc_bits
(),
_speex_dec_state
(),
_speex_enc_state
(),
_speex_frame_size
()
{
_clockRate
=
16000
;
_frameSize
=
320
;
// 20 ms at 16 kHz
_channel
=
1
;
...
...
sflphone-common/src/audio/codecs/ulaw.cpp
View file @
ee33dbad
...
...
@@ -40,7 +40,7 @@ class Ulaw : public AudioCodec
public:
// 0 PCMU A 8000 1 [RFC3551]
Ulaw
(
int
payload
=
0
)
:
AudioCodec
(
payload
,
"PCMU"
)
{
:
AudioCodec
(
payload
,
"PCMU"
)
{
_clockRate
=
8000
;
_frameSize
=
160
;
// samples, 20 ms at 8kHz
_channel
=
1
;
...
...
sflphone-common/src/audio/delaydetection.cpp
View file @
ee33dbad
...
...
@@ -61,8 +61,8 @@ std::vector<double> irb (bandpassCoefs, bandpassCoefs + sizeof (bandpassCoefs) /
FirFilter
::
FirFilter
(
std
::
vector
<
double
>
ir
)
:
_length
(
ir
.
size
()),
_impulseResponse
(
ir
),
_count
(
0
)
_impulseResponse
(
ir
),
_count
(
0
)
{
memset
(
_taps
,
0
,
sizeof
(
double
)
*
MAXFILTERSIZE
);
}
...
...
Prev
1
2
3
4
Next
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