Commit ee33dbad authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#4857] Fix audio codec negotiation problem

parent ad5b79d7
......@@ -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
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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");
......
......@@ -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;
}
......
......@@ -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 () {
}
......
......@@ -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_];
......
......@@ -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)
{
}
......
......@@ -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);
......
......@@ -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)
{
}
......
......@@ -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();
......
......@@ -48,7 +48,7 @@ namespace sfl
{
ZrtpSessionCallback::ZrtpSessionCallback (SIPCall *sipcall) :
_sipcall (sipcall)
_sipcall (sipcall)
{
if (_mapInitialized) {
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
}
......
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