[ekiga] Remove useless dynamic maximum size of jitter buffer



commit 9bbdf22380fb90f1426cf94f8d5b395ccf03b967
Author: Eugen Dedu <eugen dedu univ-fcomte fr>
Date:   Mon Jul 13 17:36:57 2015 +0200

    Remove useless dynamic maximum size of jitter buffer
    
    The jitter buffer is still dynamic, only its upper limit becomes static
    (500 ms).

 ekiga.convert.in                                   |    1 -
 lib/engine/components/opal/opal-call-manager.cpp   |   16 ------
 lib/engine/components/opal/opal-call-manager.h     |    4 --
 .../components/opal/process/opal-endpoint.cpp      |   49 +-------------------
 lib/engine/components/opal/process/opal-endpoint.h |    3 -
 lib/engine/gui/gtk-frontend/preferences-window.cpp |    8 ---
 lib/engine/protocol/call-manager.h                 |   10 ----
 org.gnome.ekiga.gschema.xml.in.in                  |    6 --
 8 files changed, 1 insertions(+), 96 deletions(-)
---
diff --git a/ekiga.convert.in b/ekiga.convert.in
index cde66dc..cbd7099 100644
--- a/ekiga.convert.in
+++ b/ekiga.convert.in
@@ -46,7 +46,6 @@ auto-answer = /apps/@PACKAGE_NAME@/general/call_options/auto_answer
 media-list = /apps/@PACKAGE_NAME@/codecs/audio/media_list
 enable-silence-detection = /apps/@PACKAGE_NAME@/codecs/audio/enable_silence_detection
 enable-echo-cancellation = /apps/@PACKAGE_NAME@/codecs/audio/enable_echo_cancellation
-maximum-jitter-buffer = /apps/@PACKAGE_NAME@/codecs/audio/maximum_jitter_buffer
 
 [org gnome  PACKAGE_NAME@.codecs.video]
 media-list = /apps/@PACKAGE_NAME@/codecs/video/media_list
diff --git a/lib/engine/components/opal/opal-call-manager.cpp 
b/lib/engine/components/opal/opal-call-manager.cpp
index be2f80c..9779405 100644
--- a/lib/engine/components/opal/opal-call-manager.cpp
+++ b/lib/engine/components/opal/opal-call-manager.cpp
@@ -43,7 +43,6 @@
 
 #include "call-core.h"
 
-
 /* The engine class */
 Opal::CallManager::CallManager (Ekiga::ServiceCore& _core,
                                 Opal::EndPoint& _endpoint) : core(_core), endpoint(_endpoint)
@@ -168,25 +167,10 @@ bool Opal::CallManager::get_silence_detection () const
 }
 
 
-void Opal::CallManager::set_maximum_jitter (unsigned max_val)
-{
-  endpoint.SetMaximumJitter (max_val);
-}
-
-
-unsigned Opal::CallManager::get_maximum_jitter () const
-{
-  return endpoint.GetMaximumJitter ();
-}
-
-
 void Opal::CallManager::setup (const std::string & setting)
 {
   std::cout << "IN Opal::CallManager::setup" << std::endl;
 
-  if (setting.empty () || setting == "maximum-jitter-buffer")
-    set_maximum_jitter (audio_codecs_settings->get_int ("maximum-jitter-buffer"));
-
   if (setting.empty () || setting == "enable-silence-detection")
     set_silence_detection (audio_codecs_settings->get_bool ("enable-silence-detection"));
 
diff --git a/lib/engine/components/opal/opal-call-manager.h b/lib/engine/components/opal/opal-call-manager.h
index df4c7e2..7e1807c 100644
--- a/lib/engine/components/opal/opal-call-manager.h
+++ b/lib/engine/components/opal/opal-call-manager.h
@@ -117,10 +117,6 @@ public:
 
     bool get_silence_detection () const;
 
-    void set_maximum_jitter (unsigned max_val);
-
-    unsigned get_maximum_jitter () const;
-
 
 protected:
 
diff --git a/lib/engine/components/opal/process/opal-endpoint.cpp 
b/lib/engine/components/opal/process/opal-endpoint.cpp
index 5576b6a..53e2969 100644
--- a/lib/engine/components/opal/process/opal-endpoint.cpp
+++ b/lib/engine/components/opal/process/opal-endpoint.cpp
@@ -127,6 +127,7 @@ Opal::EndPoint::EndPoint (Ekiga::ServiceCore& _core) : core(_core)
   SetTCPPorts (30000, 30100);
   SetRtpIpPorts (5000, 5100);
   SetSignalingTimeout (1500);  // Useless to wait 10 seconds for a connection
+  SetAudioJitterDelay (20, 500);
 
   stun_enabled = false;
   isReady = false;
@@ -216,54 +217,6 @@ bool Opal::EndPoint::GetEchoCancellation () const
 }
 
 
-void Opal::EndPoint::SetMaximumJitter (unsigned max_val)
-{
-  unsigned val = std::min (std::max (max_val, (unsigned) 20), (unsigned) 1000);
-
-  SetAudioJitterDelay (20, val);
-
-  /*
-  // Adjust setting for all sessions of all connections of all calls
-  for (PSafePtr<OpalCall> call = activeCalls;
-       call != NULL;
-       ++call) {
-
-    for (int i = 0;
-         i < 2;
-         i++) {
-
-      PSafePtr<OpalRTPConnection> connection = PSafePtrCast<OpalConnection, OpalRTPConnection> 
(call->GetConnection (i));
-      if (connection) {
-
-        OpalMediaStreamPtr stream = connection->GetMediaStream (OpalMediaType::Audio (), false);
-        if (stream != NULL) {
-
-          OpalRTPSession *session = (OpalRTPSession*)connection->GetMediaSession (stream->GetSessionID ());
-          if (session != NULL) {
-
-            unsigned units = session->GetJitterTimeUnits ();
-            OpalJitterBuffer::Init init;
-            init.m_minJitterDelay = 20 * units;
-            init.m_maxJitterDelay = val * units;
-            init.m_timeUnits = units;
-            session->SetJitterBufferSize (init);
-          }
-        }
-      }
-    }
-  }
-  */
-
-  PTRACE (4, "Opal::EndPoint\tSet Maximum Jitter to " << val);
-}
-
-
-unsigned Opal::EndPoint::GetMaximumJitter () const
-{
-  return GetMaxAudioJitterDelay ();
-}
-
-
 void Opal::EndPoint::SetSilenceDetection (bool enabled)
 {
   OpalSilenceDetector::Params sd;
diff --git a/lib/engine/components/opal/process/opal-endpoint.h 
b/lib/engine/components/opal/process/opal-endpoint.h
index 7dbc98c..c36860a 100644
--- a/lib/engine/components/opal/process/opal-endpoint.h
+++ b/lib/engine/components/opal/process/opal-endpoint.h
@@ -90,9 +90,6 @@ public:
     void SetEchoCancellation (bool enabled);
     bool GetEchoCancellation () const;
 
-    void SetMaximumJitter (unsigned max_val);
-    unsigned GetMaximumJitter () const;
-
     void SetSilenceDetection (bool enabled);
     bool GetSilenceDetection () const;
 
diff --git a/lib/engine/gui/gtk-frontend/preferences-window.cpp 
b/lib/engine/gui/gtk-frontend/preferences-window.cpp
index 3b09849..10bd5b9 100644
--- a/lib/engine/gui/gtk-frontend/preferences-window.cpp
+++ b/lib/engine/gui/gtk-frontend/preferences-window.cpp
@@ -882,8 +882,6 @@ gm_pw_init_audio_page (PreferencesWindow *self,
   /* Here we add the audio codecs options */
   gm_pw_subsection_new (container, _("Settings"));
 
-  /* Translators: the full sentence is Automatically adjust jitter buffer
-     between X and Y ms */
   gm_pw_toggle_new (container, _("Enable silence _detection"),
                     self->priv->audio_codecs_settings, "enable-silence-detection",
                     _("If enabled, use silence detection with the codecs supporting it"));
@@ -892,12 +890,6 @@ gm_pw_init_audio_page (PreferencesWindow *self,
                     self->priv->audio_codecs_settings, "enable-echo-cancellation",
                     _("If enabled, use echo cancellation"));
 
-  /* Translators: the full sentence is Maximum jitter buffer of x ms. */
-  gm_pw_spin_new (container, _("Use a maximum _jitter buffer of"), _("ms"),
-                  self->priv->audio_codecs_settings, "maximum-jitter-buffer",
-                  _("The maximum jitter buffer size for audio reception (in ms)"),
-                  20.0, 2000.0, 50.0);
-
   /* Audio Devices */
   gm_pw_subsection_new (container, _("Devices"));
 
diff --git a/lib/engine/protocol/call-manager.h b/lib/engine/protocol/call-manager.h
index 9d1b7e8..e34d65a 100644
--- a/lib/engine/protocol/call-manager.h
+++ b/lib/engine/protocol/call-manager.h
@@ -208,16 +208,6 @@ namespace Ekiga
      * @return true if silence detection is enabled.
      */
     virtual bool get_silence_detection () const = 0;
-
-    /** Set maximum jitter
-     * @param max_val is the maximum jitter for calls in seconds.
-     */
-    virtual void set_maximum_jitter (unsigned max_val) = 0;
-
-    /** Get maximum jitter
-     * @return the maximum jitter for calls in seconds.
-     */
-    virtual unsigned get_maximum_jitter () const = 0;
   };
 
   /**
diff --git a/org.gnome.ekiga.gschema.xml.in.in b/org.gnome.ekiga.gschema.xml.in.in
index 7503a41..aa93237 100644
--- a/org.gnome.ekiga.gschema.xml.in.in
+++ b/org.gnome.ekiga.gschema.xml.in.in
@@ -360,12 +360,6 @@
       <_summary>Enable echo cancellation</_summary>
       <_description>If enabled, use echo cancellation</_description>
     </key>
-    <key name="maximum-jitter-buffer" type="i">
-      <range min="20" max="1000"/>
-      <default>500</default>
-      <_summary>Maximum jitter buffer</_summary>
-      <_description>The maximum jitter buffer size for audio reception (in ms)</_description>
-    </key>
   </schema>
   <schema gettext-domain="@GETTEXT_PACKAGE@" id="org gnome  PACKAGE_NAME@.codecs.video" 
path="/org/gnome/@PACKAGE_NAME@/codecs/video/">
     <key name="media-list" type="as">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]