ekiga r5911 - in trunk: . src/endpoints



Author: dsandras
Date: Sun Jan 13 19:16:26 2008
New Revision: 5911
URL: http://svn.gnome.org/viewvc/ekiga?rev=5911&view=rev

Log:
Moved jitter configuration to the bridge.


Modified:
   trunk/ChangeLog
   trunk/src/endpoints/manager.cpp
   trunk/src/endpoints/opal-gmconf-bridge.cpp

Modified: trunk/src/endpoints/manager.cpp
==============================================================================
--- trunk/src/endpoints/manager.cpp	(original)
+++ trunk/src/endpoints/manager.cpp	Sun Jan 13 19:16:26 2008
@@ -101,16 +101,6 @@
                                   gpointer data);
 
 
-/* DESCRIPTION  :  This callback is called when the jitter buffer needs to be 
- *                 changed.
- * BEHAVIOR     :  Update the jitter.
- * PRE          :  data is a pointer to the GMManager.
- */
-static void jitter_buffer_changed_nt (G_GNUC_UNUSED gpointer id,
-                                      GmConfEntry *entry, 
-                                      gpointer data);
-
-
 /* DESCRIPTION  :  This callback is called when the video device changes
  *                 in the config database.
  * BEHAVIOR     :  It creates a new video grabber if preview is active with
@@ -225,22 +215,6 @@
 
 
 static void 
-jitter_buffer_changed_nt (G_GNUC_UNUSED gpointer id,
-                          GmConfEntry *entry, 
-                          gpointer data)
-{
-  GMManager *ep = (GMManager *) data;
-  
-  if (gm_conf_entry_get_type (entry) == GM_CONF_INT) {
-
-    unsigned min_val, max_val = 0;
-    ep->get_jitter_buffer_size (min_val, max_val);
-    ep->set_jitter_buffer_size (min_val, max_val);
-  }
-}
-
-
-static void 
 video_device_changed_nt (G_GNUC_UNUSED gpointer id,
 			 GmConfEntry *entry, 
 			 gpointer data)
@@ -375,15 +349,6 @@
   gm_conf_notifier_add (VIDEO_CODECS_KEY "maximum_video_rx_bitrate",
                         video_option_changed_nt, this);
   gm_conf_notifier_trigger (VIDEO_CODECS_KEY "maximum_video_rx_bitrate");
-  
-
-
-  // The jitter
-  gm_conf_notifier_add (AUDIO_CODECS_KEY "minimum_jitter_buffer", 
-			jitter_buffer_changed_nt, this);
-  gm_conf_notifier_add (AUDIO_CODECS_KEY "maximum_jitter_buffer", 
-			jitter_buffer_changed_nt, this);
-  gm_conf_notifier_trigger (AUDIO_CODECS_KEY "maximum_jitter_buffer"); 
 }
 
 

Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp	(original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp	Sun Jan 13 19:16:26 2008
@@ -58,6 +58,9 @@
   keys.push_back (AUDIO_CODECS_KEY "list");
   keys.push_back (VIDEO_CODECS_KEY "list");
 
+  keys.push_back (AUDIO_CODECS_KEY "minimum_jitter_buffer");
+  keys.push_back (AUDIO_CODECS_KEY "maximum_jitter_buffer");
+
   load (keys);
 }
 
@@ -66,17 +69,47 @@
 {
   GMManager & manager = (GMManager &) service;
 
-  if (key == AUDIO_CODECS_KEY "enable_silence_detection") {
+  // 
+  // Jitter buffer configuration
+  //
+  if (key == AUDIO_CODECS_KEY "minimum_jitter_buffer") {
+
+    unsigned max = (unsigned) gm_conf_get_int (AUDIO_CODECS_KEY "maximum_jitter_buffer");
+    manager.set_jitter_buffer_size (gm_conf_entry_get_int (entry), max);
+  }
+  else if (key == AUDIO_CODECS_KEY "maximum_jitter_buffer") {
+
+    unsigned min = (unsigned) gm_conf_get_int (AUDIO_CODECS_KEY "minimum_jitter_buffer");
+    manager.set_jitter_buffer_size (min, gm_conf_entry_get_int (entry));
+  }
+
+
+  // 
+  // Silence detection
+  //
+  else if (key == AUDIO_CODECS_KEY "enable_silence_detection") {
 
     manager.set_silence_detection (gm_conf_entry_get_bool (entry));
   }
+
+
+  //
+  // Echo cancelation
+  //
   else if (key == AUDIO_CODECS_KEY "enable_echo_cancelation") {
 
     manager.set_echo_cancelation (gm_conf_entry_get_bool (entry));
   }
+  
+  
+  // 
+  // Audio & video codecs
+  //
   else if (key == AUDIO_CODECS_KEY "list"
            || key == VIDEO_CODECS_KEY "list") {
 
+    // This is a bit longer, we are not sure the list stored in the 
+    // configuration is complete, and it could also contain unsupported codecs
     GSList *audio_codecs = NULL;
     GSList *video_codecs = NULL;
 



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