diff --git a/sflphone-client-gnome/src/codeclist.c b/sflphone-client-gnome/src/codeclist.c index 04d4736fb28f1ca1ce19d8f353a985fcf7209017..246ad2f1307ea793eab328ae5e12b60704b7bd1c 100644 --- a/sflphone-client-gnome/src/codeclist.c +++ b/sflphone-client-gnome/src/codeclist.c @@ -132,7 +132,6 @@ void codec_create_new (gint payload, gboolean active, codec_t **c) codec->name = specs[0]; codec->sample_rate = atoi (specs[1]); codec->_bitrate = atoi (specs[2]); - codec->_bandwidth = atoi (specs[3]); codec->is_active = active; *c = codec; @@ -148,7 +147,6 @@ void codec_create_new_with_specs (gint payload, gchar **specs, gboolean active, codec->name = strdup(specs[0]); codec->sample_rate = atoi (specs[1]); codec->_bitrate = atoi (specs[2]); - codec->_bandwidth = atoi (specs[3]); codec->is_active = active; *c = codec; @@ -169,7 +167,6 @@ void codec_create_new_from_caps (codec_t *original, codec_t **copy) codec->name = original->name; codec->sample_rate = original->sample_rate; codec->_bitrate = original->_bitrate; - codec->_bandwidth = original->_bandwidth; codec->is_active = original->is_active; *copy = codec; diff --git a/sflphone-client-gnome/src/codeclist.h b/sflphone-client-gnome/src/codeclist.h index fe62bb37f7ceb1ad5f7ed8ccc7dbad883364ef06..c7412e1aae539842548537f45110a8ce43d78f48 100644 --- a/sflphone-client-gnome/src/codeclist.h +++ b/sflphone-client-gnome/src/codeclist.h @@ -48,8 +48,6 @@ typedef struct { int sample_rate; /** Bitrate */ gdouble _bitrate; - /** Bandwidth */ - gdouble _bandwidth; } codec_t; /** @struct codec_t @@ -158,7 +156,7 @@ void codec_create_new (gint payload, gboolean active, codec_t **c); * Instanciate a new codec with the given specification * * @param payload The unique RTP payload - * @param specs A list of codec specifications. Ordered: name, sample rate, bit rate, bandwith + * @param specs A list of codec specifications. Ordered: name, sample rate, bit rate * @param active Whether or not this codec should active (checked) * @param c A pointer to receive the new codec instance */ diff --git a/sflphone-client-gnome/src/config/audioconf.c b/sflphone-client-gnome/src/config/audioconf.c index c3ecb8077f333e64a39381e2edd20fabea2dc084..3e860164f1ac2e67d5e37b3cc5c1a03fefe6f0ef 100644 --- a/sflphone-client-gnome/src/config/audioconf.c +++ b/sflphone-client-gnome/src/config/audioconf.c @@ -58,7 +58,6 @@ enum { COLUMN_CODEC_NAME, COLUMN_CODEC_FREQUENCY, COLUMN_CODEC_BITRATE, - COLUMN_CODEC_BANDWIDTH, CODEC_COLUMN_COUNT }; @@ -95,7 +94,6 @@ static void preferences_dialog_fill_codec_list (account_t *a) COLUMN_CODEC_NAME, c->name, // Name COLUMN_CODEC_FREQUENCY, g_strdup_printf ("%d kHz", c->sample_rate/1000), // Frequency (kHz) COLUMN_CODEC_BITRATE, g_strdup_printf ("%.1f kbps", c->_bitrate), // Bitrate (kbps) - COLUMN_CODEC_BANDWIDTH, g_strdup_printf ("%.1f kbps", c->_bandwidth), // Bandwidth (kpbs) -1); } } @@ -693,11 +691,6 @@ GtkWidget* audiocodecs_box (account_t *a) treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Bitrate"), renderer, "text", COLUMN_CODEC_BITRATE, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn); - // Frequency column - renderer = gtk_cell_renderer_text_new(); - treeViewColumn = gtk_tree_view_column_new_with_attributes (_ ("Bandwidth"), renderer, "text", COLUMN_CODEC_BANDWIDTH, NULL); - gtk_tree_view_append_column (GTK_TREE_VIEW (codecTreeView), treeViewColumn); - g_object_unref (G_OBJECT (codecStore)); gtk_container_add (GTK_CONTAINER (scrolledWindow), codecTreeView); diff --git a/sflphone-common/src/Codec.h b/sflphone-common/src/Codec.h index f8f4d57d2ca43eff39e2e5c9b0a9183372a876c1..c432a039e33159c227451edc8dc231b90f1389ed 100644 --- a/sflphone-common/src/Codec.h +++ b/sflphone-common/src/Codec.h @@ -66,11 +66,6 @@ class Codec */ virtual double getBitRate() const = 0; - /** - * @return The expected bandwidth used by this codec. - */ - virtual double getBandwidth() const = 0; - /** * Build a unique hash code for identifying the codec uniquely. * Note that if multiple implementations of codec are provided, diff --git a/sflphone-common/src/audio/codecs/alaw.cpp b/sflphone-common/src/audio/codecs/alaw.cpp index b5d8c6402655e6d40b498f56ce2fb0266e166e6e..7f488952d154e119ce20130a078108fd1a1e6ee4 100644 --- a/sflphone-common/src/audio/codecs/alaw.cpp +++ b/sflphone-common/src/audio/codecs/alaw.cpp @@ -43,7 +43,6 @@ class Alaw : public sfl::AudioCodec _frameSize = 160; // samples, 20 ms at 8kHz _channel = 1; _bitrate = 64; - _bandwidth = 80; _hasDynamicPayload = false; } diff --git a/sflphone-common/src/audio/codecs/audiocodec.cpp b/sflphone-common/src/audio/codecs/audiocodec.cpp index 98b372e4f0f3e0698ab1098ef1b65b5e6a1d9ea1..ed5c5cc95fdb32d52d4c8c84c15788b6d9294217 100644 --- a/sflphone-common/src/audio/codecs/audiocodec.cpp +++ b/sflphone-common/src/audio/codecs/audiocodec.cpp @@ -38,15 +38,15 @@ namespace sfl { AudioCodec::AudioCodec (uint8 payload, const std::string &codecName) : _codecName (codecName), _clockRate (8000), _channel (1), _bitrate (0.0), - _bandwidth (0), _hasDynamicPayload (false), _payload(payload) + _hasDynamicPayload (false), _payload(payload) { init (payload, _clockRate); } AudioCodec::AudioCodec (const AudioCodec& codec) : _codecName (codec._codecName), _clockRate (codec._clockRate), _channel ( - codec._channel), _bitrate (codec._bitrate), _bandwidth ( - codec._bandwidth), _hasDynamicPayload (false), _payload(codec._payload) + codec._channel), _bitrate (codec._bitrate), + _hasDynamicPayload (false), _payload(codec._payload) { init (codec._payload, codec._clockRate); } @@ -110,11 +110,6 @@ double AudioCodec::getBitRate (void) const return _bitrate; } -double AudioCodec::getBandwidth (void) const -{ - return _bandwidth; -} - AudioCodec::~AudioCodec() { delete _payloadFormat; diff --git a/sflphone-common/src/audio/codecs/audiocodec.h b/sflphone-common/src/audio/codecs/audiocodec.h index 5a8030e4099215b1cd75704887701288e3452b02..7f443db054fd4447269073c76bcc60068c1e9727 100644 --- a/sflphone-common/src/audio/codecs/audiocodec.h +++ b/sflphone-common/src/audio/codecs/audiocodec.h @@ -128,11 +128,6 @@ class AudioCodec : public Codec */ double getBitRate() const; - /** - * @Override - */ - double getBandwidth() const; - /** * @return the framing size for this codec. */ diff --git a/sflphone-common/src/audio/codecs/audiocodecfactory.cpp b/sflphone-common/src/audio/codecs/audiocodecfactory.cpp index 8c13e13a18f9db5674d8f4856649a4d93a5b429a..2142e5bc1be5e213d91adad47b0e86e87fc42740 100644 --- a/sflphone-common/src/audio/codecs/audiocodecfactory.cpp +++ b/sflphone-common/src/audio/codecs/audiocodecfactory.cpp @@ -129,16 +129,6 @@ double AudioCodecFactory::getBitRate (AudioCodecType payload) return 0.0; } -double AudioCodecFactory::getBandwidthPerCall (AudioCodecType payload) -{ - - CodecsMap::iterator iter = _CodecsMap.find (payload); - - if (iter!=_CodecsMap.end()) - return (iter->second->getBandwidth()); - else - return 0.0; -} int AudioCodecFactory::getSampleRate (AudioCodecType payload) { @@ -417,11 +407,6 @@ std::vector <std::string> AudioCodecFactory::getCodecSpecifications (const int32 v.push_back ( (ss.str()).data()); ss.str (""); - // Add the bandwidth information - ss << getBandwidthPerCall ( (AudioCodecType) payload); - v.push_back ( (ss.str()).data()); - ss.str (""); - return v; } diff --git a/sflphone-common/src/audio/codecs/audiocodecfactory.h b/sflphone-common/src/audio/codecs/audiocodecfactory.h index 46a88e3afd7d3d41bb205e48dfa04e62f6eb7a50..fa8c053f0124e979391ed677ddc582c1d4be1eb3 100644 --- a/sflphone-common/src/audio/codecs/audiocodecfactory.h +++ b/sflphone-common/src/audio/codecs/audiocodecfactory.h @@ -106,15 +106,6 @@ class AudioCodecFactory */ double getBitRate (AudioCodecType payload); - /** - * Get the bandwidth for one call with the specified codec. - * The value has been calculated with the further information: - * RTp communication, SIP protocol (the value with IAX2 is very close), no RTCP, one simultaneous call, for one channel (the incoming one). - * @param payload The payload of the codec - * @return double The bandwidth - */ - double getBandwidthPerCall (AudioCodecType payload); - /** * Get the clock rate of the specified codec * @param payload The payload of the codec diff --git a/sflphone-common/src/audio/codecs/celtcodec.cpp b/sflphone-common/src/audio/codecs/celtcodec.cpp index a2d5bb1b141f13c672c06a3e4bb3ca6560f943e4..9e9f15141f9b866b6aadabd8f175e8171b8d8b4a 100644 --- a/sflphone-common/src/audio/codecs/celtcodec.cpp +++ b/sflphone-common/src/audio/codecs/celtcodec.cpp @@ -43,7 +43,6 @@ class Celt : public sfl::AudioCodec _frameSize = 320; // fixed frameSize, TODO: support variable size from 64 to 512 _channel = 1; _bitrate = 0; - _bandwidth = 0; _hasDynamicPayload = true; initCelt(); diff --git a/sflphone-common/src/audio/codecs/g722.cpp b/sflphone-common/src/audio/codecs/g722.cpp index 7b613272b635dc45dce3d5abe30aae99d63cf9e4..4ea5e7c86950ad9c6b165d2e922dc258352c777e 100644 --- a/sflphone-common/src/audio/codecs/g722.cpp +++ b/sflphone-common/src/audio/codecs/g722.cpp @@ -54,7 +54,6 @@ class G722 : public sfl::AudioCodec _frameSize = 320; // samples, 20 ms at 16kHz _channel = 1; _bitrate = 64; - _bandwidth = 80; _hasDynamicPayload = false; diff --git a/sflphone-common/src/audio/codecs/gsmcodec.cpp b/sflphone-common/src/audio/codecs/gsmcodec.cpp index b58d356d26ef6b0d225a3fa152d7a1901888b0ff..0cba124532f275d92e4ec344cc2d887365816960 100644 --- a/sflphone-common/src/audio/codecs/gsmcodec.cpp +++ b/sflphone-common/src/audio/codecs/gsmcodec.cpp @@ -49,7 +49,6 @@ class Gsm : public sfl::AudioCodec _frameSize = 160; // samples, 20 ms at 8kHz _channel = 1; _bitrate = 13.3; - _bandwidth = 29.2; _hasDynamicPayload = false; if (! (_decode_gsmhandle = gsm_create())) diff --git a/sflphone-common/src/audio/codecs/speexcodec_nb.cpp b/sflphone-common/src/audio/codecs/speexcodec_nb.cpp index 38cb80eb34095db7a2ec8ae9d9fea6793f3c3f18..151b781b625ff8185f88bb7982b9b3d9b579e1eb 100644 --- a/sflphone-common/src/audio/codecs/speexcodec_nb.cpp +++ b/sflphone-common/src/audio/codecs/speexcodec_nb.cpp @@ -50,7 +50,6 @@ class Speex : public sfl::AudioCodec _frameSize = 160; // samples, 20 ms at 8kHz _channel = 1; _bitrate = 24; - _bandwidth = 0; _hasDynamicPayload = true; initSpeex(); } diff --git a/sflphone-common/src/audio/codecs/speexcodec_ub.cpp b/sflphone-common/src/audio/codecs/speexcodec_ub.cpp index 82b8ea0d5be16cf365f2ebaae8ffd77b6f064364..b3f956297d4d14e525217132c1ec841c33d5d8f2 100644 --- a/sflphone-common/src/audio/codecs/speexcodec_ub.cpp +++ b/sflphone-common/src/audio/codecs/speexcodec_ub.cpp @@ -49,7 +49,6 @@ class Speex : public sfl::AudioCodec _frameSize = 640; // 20 ms at 32 kHz _channel = 1; _bitrate = 0; - _bandwidth = 0; _hasDynamicPayload = true; initSpeex(); } diff --git a/sflphone-common/src/audio/codecs/speexcodec_wb.cpp b/sflphone-common/src/audio/codecs/speexcodec_wb.cpp index 93030198d9739fc6244f80c3fa72ec065a498039..482d9f47cf4fd0f21b9553b6c9a95b9d43545609 100644 --- a/sflphone-common/src/audio/codecs/speexcodec_wb.cpp +++ b/sflphone-common/src/audio/codecs/speexcodec_wb.cpp @@ -49,7 +49,6 @@ class Speex : public sfl::AudioCodec _frameSize = 320; // 20 ms at 16 kHz _channel = 1; _bitrate = 42; - _bandwidth = 0; initSpeex(); } diff --git a/sflphone-common/src/audio/codecs/ulaw.cpp b/sflphone-common/src/audio/codecs/ulaw.cpp index d090f493a4d85c0ad31bbe30d470f7bb263478ce..0032eb9dc9282f5ad7934bd6b47861a2dd29793c 100644 --- a/sflphone-common/src/audio/codecs/ulaw.cpp +++ b/sflphone-common/src/audio/codecs/ulaw.cpp @@ -45,7 +45,6 @@ class Ulaw : public sfl::AudioCodec _frameSize = 160; // samples, 20 ms at 8kHz _channel = 1; _bitrate = 64; - _bandwidth = 80; _hasDynamicPayload = false; }