Re: [GnomeMeeting-devel-list] [PATCH] Sound Input only plugins?



maillog: 04/04/2005-06:16:10(+0200): Julien PUYDT types
> Georgi Georgiev a écrit :
> 
> >How could one approach the task of allowing different sound plugins for
> >input and for output? What is the reason for the current implementation?
> >I vaguely recall the conversations when the initial ALSA plugin was
> >developed, but I'd like to bring it out in the open hoping that a
> >solution can be found.
> > 
> >
> I was the one to raise the issue, because I thought I would soon work on 
> audio input from a AVC. That 'soon' still didn't happen.
> 
> I guess you'll have to find all the places where a sound plugin is used 
> and duplicate. I don't think it will be that hard.

OK. Step one is done. Attaching a patch for gnomemeeting that allows it
to use different plugins for input and output. Feel free to test and
commit. I didn't have both OSS and ALSA enabled to give it a *real*
test, but it felt right.

The patch is against the 20050401-01 snapshot.

> Nice to have news from you :-)

It's good to be back :)

-- 
\/   Georgi Georgiev   \/ Dr. Zoidberg: "Talk to the claw." Bender:    \/
/\    chutz gg3 net    /\ "Bite my collosal metal ass."                /\
\/  +81(90)2877-8845   \/                                              \/
diff -ru gnomemeeting/configure.in gnomemeeting.new/configure.in
--- gnomemeeting/configure.in	2005-04-01 10:10:17.000000000 +0900
+++ gnomemeeting.new/configure.in	2005-04-04 18:58:36.000000000 +0900
@@ -42,7 +42,7 @@
 dnl ###########################################################################
 dnl This is to check correct gconf installation
 dnl ###########################################################################
-SCHEMA_AGE=55
+SCHEMA_AGE=56
 AC_SUBST(SCHEMA_AGE)
 
 
diff -ru gnomemeeting/gnomemeeting.schemas.in.in gnomemeeting.new/gnomemeeting.schemas.in.in
--- gnomemeeting/gnomemeeting.schemas.in.in	2004-11-20 23:49:14.000000000 +0900
+++ gnomemeeting.new/gnomemeeting.schemas.in.in	2005-04-04 18:57:29.000000000 +0900
@@ -3,8 +3,19 @@
 <gconfschemafile>
   <schemalist>
     <schema>
-      <key>/schemas/apps/gnomemeeting/devices/audio/plugin</key>
-      <applyto>/apps/gnomemeeting/devices/audio/plugin</applyto>
+      <key>/schemas/apps/gnomemeeting/devices/audio/output_plugin</key>
+      <applyto>/apps/gnomemeeting/devices/audio/output_plugin</applyto>
+      <owner>GnomeMeeting</owner>
+      <type>string</type>
+      <default>ALSA</default>
+      <locale name="C">
+	<short>Audio input plugin</short>
+	<long>The audio plugin that will be used to detect the devices and manage them</long>
+      </locale>
+    </schema>
+    <schema>
+      <key>/schemas/apps/gnomemeeting/devices/audio/input_plugin</key>
+      <applyto>/apps/gnomemeeting/devices/audio/input_plugin</applyto>
       <owner>GnomeMeeting</owner>
       <type>string</type>
       <default>ALSA</default>
diff -ru gnomemeeting/src/config.cpp gnomemeeting.new/src/config.cpp
--- gnomemeeting/src/config.cpp	2005-01-31 01:35:48.000000000 +0900
+++ gnomemeeting.new/src/config.cpp	2005-04-04 17:22:55.000000000 +0900
@@ -1471,8 +1471,11 @@
   
   
   /* Notifiers to AUDIO_DEVICES_KEY */
-  gm_conf_notifier_add (AUDIO_DEVICES_KEY "plugin", 
+  gm_conf_notifier_add (AUDIO_DEVICES_KEY "input_plugin", 
 			manager_changed_nt, prefs_window);
+  gm_conf_notifier_add (AUDIO_DEVICES_KEY "output_plugin", 
+			manager_changed_nt, prefs_window);
+
 
   gm_conf_notifier_add (AUDIO_DEVICES_KEY "output_device",
 			audio_device_changed_nt, NULL);
diff -ru gnomemeeting/src/druid.cpp gnomemeeting.new/src/druid.cpp
--- gnomemeeting/src/druid.cpp	2004-11-21 01:42:36.000000000 +0900
+++ gnomemeeting.new/src/druid.cpp	2005-04-04 17:28:00.000000000 +0900
@@ -60,7 +60,8 @@
   GtkWidget *video_test_button;
   GtkWidget *kind_of_net;
   GtkWidget *progress;
-  GtkWidget *audio_manager;
+  GtkWidget *audio_input_manager;
+  GtkWidget *audio_output_manager;
   GtkWidget *video_manager;
   GtkWidget *audio_player;
   GtkWidget *audio_recorder;
@@ -140,6 +141,7 @@
 				gchar *&,
 				gchar *&, 
 				gchar *&, 
+				gchar *&, 
 				gchar *&,
 				gchar *&, 
 				gchar *&, 
@@ -534,7 +536,8 @@
 		    gchar * &name,
 		    gchar * &mail,
 		    gchar * &connection_type,
-		    gchar * &audio_manager,
+		    gchar * &audio_input_manager,
+		    gchar * &audio_output_manager,
 		    gchar * &player,
 		    gchar * &recorder,
 		    gchar * &video_manager,
@@ -556,11 +559,17 @@
   else
     connection_type = "";
 
-  child = GTK_BIN (dw->audio_manager)->child;
+  child = GTK_BIN (dw->audio_input_manager)->child;
+  if (child)
+    audio_input_manager = (gchar *) gtk_label_get_text (GTK_LABEL (child));
+  else
+    audio_input_manager = "";
+
+  child = GTK_BIN (dw->audio_output_manager)->child;
   if (child)
-    audio_manager = (gchar *) gtk_label_get_text (GTK_LABEL (child));
+    audio_output_manager = (gchar *) gtk_label_get_text (GTK_LABEL (child));
   else
-    audio_manager = "";
+    audio_output_manager = "";
 
   child = GTK_BIN (dw->video_manager)->child;
   if (child)
@@ -924,15 +933,33 @@
 
 
   /* The Audio devices */
-  label = gtk_label_new (_("Please choose your audio manager:"));
+  label = gtk_label_new (_("Please choose your audio output manager:"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
   gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
   
-  dw->audio_manager = gtk_option_menu_new ();
-  gtk_box_pack_start (GTK_BOX (vbox), dw->audio_manager, FALSE, FALSE, 0);
+  dw->audio_output_manager = gtk_option_menu_new ();
+  gtk_box_pack_start (GTK_BOX (vbox), dw->audio_output_manager, FALSE, FALSE, 0);
 
   label = gtk_label_new (NULL);
-  text = g_strdup_printf ("<i>%s</i>", _("The audio manager is the plugin that will manage your audio devices, ALSA is probably the best choice when available."));
+  text = g_strdup_printf ("<i>%s</i>", _("The audio output manager is the plugin that will manage your audio output devices, ALSA is probably the best choice when available."));
+  gtk_label_set_markup (GTK_LABEL (label), text);
+  g_free (text);
+  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
+
+  label = gtk_label_new (" ");
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+
+  label = gtk_label_new (_("Please choose your audio input manager:"));
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+  gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+  
+  dw->audio_input_manager = gtk_option_menu_new ();
+  gtk_box_pack_start (GTK_BOX (vbox), dw->audio_input_manager, FALSE, FALSE, 0);
+
+  label = gtk_label_new (NULL);
+  text = g_strdup_printf ("<i>%s</i>", _("The audio input manager is the plugin that will manage your audio input devices, ALSA is probably the best choice when available."));
   gtk_label_set_markup (GTK_LABEL (label), text);
   g_free (text);
   gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
@@ -1231,7 +1258,8 @@
   gchar *name = NULL;
   gchar *con_type = NULL;
   gchar *mail = NULL;
-  gchar *audio_manager = NULL;
+  gchar *audio_input_manager = NULL;
+  gchar *audio_output_manager = NULL;
   gchar *player = NULL;
   gchar *recorder = NULL;
   gchar *video_manager = NULL;
@@ -1247,7 +1275,8 @@
 		      name, 
 		      mail, 
 		      con_type, 
-		      audio_manager, 
+		      audio_input_manager, 
+		      audio_output_manager, 
 		      player,
 		      recorder, 
 		      video_manager, 
@@ -1258,7 +1287,7 @@
 
     /* Try to prevent a crossed mutex deadlock */
     gdk_threads_leave ();
-    ep->StartAudioTester (audio_manager, player, recorder);
+    ep->StartAudioTester (audio_input_manager, audio_output_manager, player, recorder);
     gdk_threads_enter ();
   }
   else {
@@ -1281,7 +1310,8 @@
   gchar *name = NULL;
   gchar *con_type = NULL;
   gchar *mail = NULL;
-  gchar *audio_manager = NULL;
+  gchar *audio_input_manager = NULL;
+  gchar *audio_output_manager = NULL;
   gchar *player = NULL;
   gchar *recorder = NULL;
   gchar *video_manager = NULL;
@@ -1295,7 +1325,8 @@
 		      name, 
 		      mail, 
 		      con_type, 
-		      audio_manager, 
+		      audio_input_manager, 
+		      audio_output_manager, 
 		      player,
 		      recorder, 
 		      video_manager, 
@@ -1350,7 +1381,8 @@
   gchar **couple = NULL;
   gchar *con_type = NULL;
   gchar *mail = NULL;
-  gchar *audio_manager = NULL;
+  gchar *audio_input_manager = NULL;
+  gchar *audio_output_manager = NULL;
   gchar *player = NULL;
   gchar *recorder = NULL;
   gchar *video_manager = NULL;
@@ -1383,7 +1415,8 @@
 		      name, 
 		      mail, 
 		      con_type, 
-		      audio_manager, 
+		      audio_input_manager, 
+		      audio_output_manager, 
 		      player,
 		      recorder, 
 		      video_manager, 
@@ -1418,8 +1451,10 @@
   
 
   /* Set the right devices and managers */
-  if (audio_manager)
-    gm_conf_set_string (AUDIO_DEVICES_KEY "plugin", audio_manager);
+  if (audio_input_manager)
+    gm_conf_set_string (AUDIO_DEVICES_KEY "input_plugin", audio_input_manager);
+  if (audio_output_manager)
+    gm_conf_set_string (AUDIO_DEVICES_KEY "output_plugin", audio_output_manager);
   if (player)
     gm_conf_set_string (AUDIO_DEVICES_KEY "output_device", player);
   if (recorder)
@@ -1554,7 +1589,8 @@
   gchar *mail = NULL;
   gchar *text = NULL;
   int kind_of_net = 0;
-  gchar *audio_manager = NULL;
+  gchar *audio_input_manager = NULL;
+  gchar *audio_output_manager = NULL;
   gchar *video_manager = NULL;
   BOOL ils_register = FALSE;
   char **array = NULL;
@@ -1597,10 +1633,16 @@
   gtk_option_menu_set_history (GTK_OPTION_MENU (dw->kind_of_net),
 			       kind_of_net - 1);
   
-  devs = GnomeMeeting::Process ()->GetAudioPlugins ();
+  devs = GnomeMeeting::Process ()->GetAudioInputPlugins ();
+  array = devs.ToCharArray ();
+  audio_input_manager = gm_conf_get_string (AUDIO_DEVICES_KEY "input_plugin");
+  gm_dw_option_menu_update (dw->audio_input_manager, array, audio_input_manager);
+  free (array);
+  
+  devs = GnomeMeeting::Process ()->GetAudioOutputPlugins ();
   array = devs.ToCharArray ();
-  audio_manager = gm_conf_get_string (AUDIO_DEVICES_KEY "plugin");
-  gm_dw_option_menu_update (dw->audio_manager, array, audio_manager);
+  audio_output_manager = gm_conf_get_string (AUDIO_DEVICES_KEY "output_plugin");
+  gm_dw_option_menu_update (dw->audio_output_manager, array, audio_output_manager);
   free (array);
   
   devs = GnomeMeeting::Process ()->GetVideoPlugins ();
@@ -1614,7 +1656,8 @@
   gm_dw_check_name (GTK_WIDGET (data));
   
   g_free (video_manager);
-  g_free (audio_manager);    
+  g_free (audio_input_manager);
+  g_free (audio_output_manager);
   g_free (mail);
   g_free (firstname);
   g_free (lastname);
@@ -1649,7 +1692,8 @@
   GMH323EndPoint *ep = NULL;
 
   GtkWidget *child = NULL;
-  gchar *audio_manager = NULL;
+  gchar *audio_input_manager = NULL;
+  gchar *audio_output_manager = NULL;
   gchar *player = NULL;
   gchar *recorder = NULL;
   PStringArray devices;
@@ -1666,12 +1710,19 @@
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dw->audio_test_button),
 				FALSE);
   
-  child = GTK_BIN (dw->audio_manager)->child;
+  child = GTK_BIN (dw->audio_input_manager)->child;
+  
+  if (child)
+    audio_input_manager = (gchar *) gtk_label_get_text (GTK_LABEL (child));
+  else
+    audio_input_manager = "";
+
+  child = GTK_BIN (dw->audio_output_manager)->child;
   
   if (child)
-    audio_manager = (gchar *) gtk_label_get_text (GTK_LABEL (child));
+    audio_output_manager = (gchar *) gtk_label_get_text (GTK_LABEL (child));
   else
-    audio_manager = "";
+    audio_output_manager = "";
 	
   player = gm_conf_get_string (AUDIO_DEVICES_KEY "output_device");
   recorder = gm_conf_get_string (AUDIO_DEVICES_KEY "input_device");
@@ -1682,10 +1733,10 @@
    * not for a random one.
    */
   gnomemeeting_sound_daemons_suspend ();
-  if (PString ("Quicknet") == audio_manager)
+  if (PString ("Quicknet") == audio_output_manager)
     devices = OpalIxJDevice::GetDeviceNames ();
   else
-    devices = PSoundChannel::GetDeviceNames (audio_manager,
+    devices = PSoundChannel::GetDeviceNames (audio_output_manager,
 					     PSoundChannel::Player);
   if (devices.GetSize () == 0) {
     
@@ -1699,10 +1750,10 @@
   gm_dw_option_menu_update (dw->audio_player, array, player);
   free (array);
 
-  if (PString ("Quicknet") == audio_manager)
+  if (PString ("Quicknet") == audio_input_manager)
     devices = OpalIxJDevice::GetDeviceNames ();
   else
-    devices = PSoundChannel::GetDeviceNames (audio_manager,
+    devices = PSoundChannel::GetDeviceNames (audio_input_manager,
 					     PSoundChannel::Recorder);
   if (devices.GetSize () == 0) {
     
@@ -1809,7 +1860,8 @@
   gchar *recorder = NULL;
   gchar *video_recorder = NULL;
   gchar *video_manager = NULL;
-  gchar *audio_manager = NULL;
+  gchar *audio_input_manager = NULL;
+  gchar *audio_output_manager = NULL;
   gchar *callto_url = NULL;
   
   PStringArray devices;
@@ -1826,7 +1878,8 @@
 		      name, 
 		      mail, 
 		      connection_type, 
-		      audio_manager,
+		      audio_input_manager,
+		      audio_output_manager,
 		      player, 
 		      recorder, 
 		      video_manager, 
@@ -1835,7 +1888,7 @@
   callto_url = g_strdup_printf ("callto:ils.seconix.com/%s",
 				mail ? mail : "");
     
-  text = g_strdup_printf (_("You have now finished the GnomeMeeting configuration. All the settings can be changed in the GnomeMeeting preferences. Enjoy!\n\n\nConfiguration summary:\n\nUsername: %s\nConnection type: %s\nAudio manager: %s\nAudio player: %s\nAudio recorder: %s\nVideo manager: %s\nVideo input: %s\nCallto URL: %s\n"), name, connection_type, audio_manager, player, recorder, video_manager, video_recorder, !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dw->use_callto)) ? callto_url : _("None"));
+  text = g_strdup_printf (_("You have now finished the GnomeMeeting configuration. All the settings can be changed in the GnomeMeeting preferences. Enjoy!\n\n\nConfiguration summary:\n\nUsername: %s\nConnection type: %s\nAudio input manager: %s\nAudio output manager: %s\nAudio player: %s\nAudio recorder: %s\nVideo manager: %s\nVideo input: %s\nCallto URL: %s\n"), name, connection_type, audio_input_manager, audio_output_manager, player, recorder, video_manager, video_recorder, !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dw->use_callto)) ? callto_url : _("None"));
   gnome_druid_page_edge_set_text (GNOME_DRUID_PAGE_EDGE (page), text);
   
   g_free (callto_url);
diff -ru gnomemeeting/src/endpoint.cpp gnomemeeting.new/src/endpoint.cpp
--- gnomemeeting/src/endpoint.cpp	2005-02-15 05:06:38.000000000 +0900
+++ gnomemeeting.new/src/endpoint.cpp	2005-04-04 17:24:54.000000000 +0900
@@ -602,7 +602,8 @@
 
 
 void 
-GMH323EndPoint::StartAudioTester (gchar *audio_manager,
+GMH323EndPoint::StartAudioTester (gchar *audio_output_manager,
+				  gchar *audio_input_manager,
 				  gchar *audio_player,
 				  gchar *audio_recorder)
 {
@@ -612,7 +613,7 @@
     delete (audio_tester);
 
   audio_tester =
-    new GMAudioTester (audio_manager, audio_player, audio_recorder);
+    new GMAudioTester (audio_output_manager, audio_input_manager, audio_player, audio_recorder);
 }
 
 
@@ -1825,11 +1826,16 @@
 #endif
     {   
       gnomemeeting_threads_enter ();
-      plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "plugin");
       if (is_encoding)
+      {
+        plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "input_plugin");
 	device = gm_conf_get_string (AUDIO_DEVICES_KEY "input_device");
+      }
       else
+      {
+        plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "output_plugin");
 	device = gm_conf_get_string (AUDIO_DEVICES_KEY "output_device");
+      }
       gnomemeeting_threads_leave ();
 
       if (device.Find (_("No device found")) == P_MAX_INDEX) {
diff -ru gnomemeeting/src/endpoint.h gnomemeeting.new/src/endpoint.h
--- gnomemeeting/src/endpoint.h	2004-11-14 03:36:12.000000000 +0900
+++ gnomemeeting.new/src/endpoint.h	2005-04-04 17:25:15.000000000 +0900
@@ -380,6 +380,7 @@
    */
   void StartAudioTester (gchar *,
 			 gchar *,
+			 gchar *,
 			 gchar *);
 
 
diff -ru gnomemeeting/src/gnomemeeting.cpp gnomemeeting.new/src/gnomemeeting.cpp
--- gnomemeeting/src/gnomemeeting.cpp	2005-02-04 04:08:07.000000000 +0900
+++ gnomemeeting.new/src/gnomemeeting.cpp	2005-04-04 17:42:27.000000000 +0900
@@ -212,12 +212,14 @@
 BOOL
 GnomeMeeting::DetectDevices ()
 {
-  gchar *audio_plugin = NULL;
+  gchar *audio_output_plugin = NULL;
+  gchar *audio_input_plugin = NULL;
   gchar *video_plugin = NULL;
 
   PINDEX fake_idx;
 
-  audio_plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "plugin");
+  audio_output_plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "output_plugin");
+  audio_input_plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "input_plugin");
   video_plugin = gm_conf_get_string (VIDEO_DEVICES_KEY "plugin");
  
   PWaitAndSignal m(dev_access_mutex);
@@ -228,16 +230,20 @@
 
   
   /* Detect the plugins */
-  audio_managers = PSoundChannel::GetDriverNames ();
+  audio_output_managers = PSoundChannel::GetDriverNames ();
+  audio_input_managers = PSoundChannel::GetDriverNames ();
   video_managers = PVideoInputDevice::GetDriverNames ();
 
   fake_idx = video_managers.GetValuesIndex (PString ("FakeVideo"));
   if (fake_idx != P_MAX_INDEX)
     video_managers.RemoveAt (fake_idx);
   
-  audio_managers += PString ("Quicknet");
+  audio_output_managers += PString ("Quicknet");
+  audio_input_managers += PString ("Quicknet");
 
-  PTRACE (1, "Detected audio plugins: " << setfill (',') << audio_managers
+  PTRACE (1, "Detected audio output plugins: " << setfill (',') << audio_output_managers
+	  << setfill (' '));
+  PTRACE (1, "Detected audio input plugins: " << setfill (',') << audio_input_managers
 	  << setfill (' '));
   PTRACE (1, "Detected video plugins: " << setfill (',') << video_managers
 	  << setfill (' '));
@@ -250,26 +256,29 @@
 
 
   /* No audio plugin => Exit */
-  if (audio_managers.GetSize () == 0)
+  if (audio_output_managers.GetSize () == 0)
+    return FALSE;
+  if (audio_input_managers.GetSize () == 0)
     return FALSE;
-  
   
   /* Detect the devices */
   video_input_devices = PVideoInputDevice::GetDriversDeviceNames (video_plugin);
  
-  if (PString ("Quicknet") == audio_plugin) {
+  if (PString ("Quicknet") == audio_output_plugin) {
+    audio_output_devices = OpalIxJDevice::GetDeviceNames ();
+  }
+  else {
+    audio_output_devices = 
+      PSoundChannel::GetDeviceNames (audio_output_plugin, PSoundChannel::Player);
+  }
 
+  if (PString ("Quicknet") == audio_input_plugin) {
     audio_input_devices = OpalIxJDevice::GetDeviceNames ();
-    audio_output_devices = audio_input_devices;
   }
   else {
-    
     audio_input_devices = 
-      PSoundChannel::GetDeviceNames (audio_plugin, PSoundChannel::Recorder);
-    audio_output_devices = 
-      PSoundChannel::GetDeviceNames (audio_plugin, PSoundChannel::Player);
+      PSoundChannel::GetDeviceNames (audio_input_plugin, PSoundChannel::Recorder);
   }
-    
   
   if (audio_input_devices.GetSize () == 0) 
     audio_input_devices += PString (_("No device found"));
@@ -281,15 +290,16 @@
   
   PTRACE (1, "Detected the following audio input devices: " 
 	  << setfill (',') << audio_input_devices << setfill (' ') 
-	  << " with plugin " << audio_plugin);
+	  << " with plugin " << audio_input_plugin);
   PTRACE (1, "Detected the following audio output devices: " 
 	  << setfill (',') << audio_output_devices << setfill (' ') 
-	  << " with plugin " << audio_plugin);
+	  << " with plugin " << audio_output_plugin);
   PTRACE (1, "Detected the following video input devices: " 
 	  << setfill (',') << video_input_devices << setfill (' ')  
 	  << " with plugin " << video_plugin);
 
-  g_free (audio_plugin);
+  g_free (audio_input_plugin);
+  g_free (audio_output_plugin);
   g_free (video_plugin);
 
   gnomemeeting_sound_daemons_resume ();
@@ -540,7 +550,7 @@
 
 
 PStringArray 
-GnomeMeeting::GetAudioOutpoutDevices ()
+GnomeMeeting::GetAudioOutputDevices ()
 {
   PWaitAndSignal m(dev_access_mutex);
 
@@ -549,11 +559,19 @@
 
 
 PStringArray 
-GnomeMeeting::GetAudioPlugins ()
+GnomeMeeting::GetAudioOutputPlugins ()
+{
+  PWaitAndSignal m(dev_access_mutex);
+
+  return audio_output_managers;
+}
+
+PStringArray 
+GnomeMeeting::GetAudioInputPlugins ()
 {
   PWaitAndSignal m(dev_access_mutex);
 
-  return audio_managers;
+  return audio_input_managers;
 }
 
 
diff -ru gnomemeeting/src/gnomemeeting.h gnomemeeting.new/src/gnomemeeting.h
--- gnomemeeting/src/gnomemeeting.h	2004-10-27 16:55:43.000000000 +0900
+++ gnomemeeting.new/src/gnomemeeting.h	2005-04-04 17:29:58.000000000 +0900
@@ -225,7 +225,7 @@
    * 		    for that.
    * PRE          : /
    */
-  PStringArray GetAudioOutpoutDevices ();
+  PStringArray GetAudioOutputDevices ();
   
   
   /* DESCRIPTION  : / 
@@ -234,7 +234,8 @@
    * 		    for that.
    * PRE          : /
    */
-  PStringArray GetAudioPlugins ();
+  PStringArray GetAudioOutputPlugins ();
+  PStringArray GetAudioInputPlugins ();
   
   
   /* DESCRIPTION  : / 
@@ -259,7 +260,8 @@
   PStringArray video_input_devices;
   PStringArray audio_input_devices;
   PStringArray audio_output_devices;
-  PStringArray audio_managers;
+  PStringArray audio_input_managers;
+  PStringArray audio_output_managers;
   PStringArray video_managers;
 
   
diff -ru gnomemeeting/src/pref_window.cpp gnomemeeting.new/src/pref_window.cpp
--- gnomemeeting/src/pref_window.cpp	2005-01-31 01:35:48.000000000 +0900
+++ gnomemeeting.new/src/pref_window.cpp	2005-04-04 17:22:14.000000000 +0900
@@ -1090,12 +1090,17 @@
   
 
   subsection = gnome_prefs_subsection_new (prefs_window, container,
-					   _("Audio Plugin"), 1, 2);
+					   _("Audio Plugins"), 1, 2);
                                                                                
   /* Add all the fields for the audio manager */
-  devs = GnomeMeeting::Process ()->GetAudioPlugins ();
+  devs = GnomeMeeting::Process ()->GetAudioOutputPlugins ();
   array = devs.ToCharArray ();
-  gnome_prefs_string_option_menu_new (subsection, _("Audio plugin:"), array, AUDIO_DEVICES_KEY "plugin", _("The audio plugin that will be used to detect the devices and manage them."), 0);
+  gnome_prefs_string_option_menu_new (subsection, _("Audio output plugin:"), array, AUDIO_DEVICES_KEY "output_plugin", _("The audio plugin that will be used to detect the devices and manage them."), 0);
+  free (array);
+
+  devs = GnomeMeeting::Process ()->GetAudioInputPlugins ();
+  array = devs.ToCharArray ();
+  gnome_prefs_string_option_menu_new (subsection, _("Audio input plugin:"), array, AUDIO_DEVICES_KEY "input_plugin", _("The audio plugin that will be used to detect the devices and manage them."), 1);
   free (array);
 
 
@@ -1105,7 +1110,7 @@
                                                                                
 
   /* The player */
-  devs = GnomeMeeting::Process ()->GetAudioOutpoutDevices ();
+  devs = GnomeMeeting::Process ()->GetAudioOutputDevices ();
   array = devs.ToCharArray ();
   pw->audio_player =
     gnome_prefs_string_option_menu_new (subsection, _("Output device:"), array, AUDIO_DEVICES_KEY "output_device", _("Select the audio output device to use"), 0);
diff -ru gnomemeeting/src/sound_handling.cpp gnomemeeting.new/src/sound_handling.cpp
--- gnomemeeting/src/sound_handling.cpp	2004-11-20 23:37:56.000000000 +0900
+++ gnomemeeting.new/src/sound_handling.cpp	2005-04-04 17:38:14.000000000 +0900
@@ -184,7 +184,7 @@
   PString enable_event_conf_key;
   PString event_conf_key;
   
-  plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "plugin");
+  plugin = gm_conf_get_string (AUDIO_DEVICES_KEY "output_plugin");
   if (event == "incoming_call_sound")
     device = gm_conf_get_string (SOUND_EVENTS_KEY "output_device");
   else
@@ -514,7 +514,8 @@
 
 
 /* The Audio tester class */
-  GMAudioTester::GMAudioTester (gchar *m,
+  GMAudioTester::GMAudioTester (gchar *mo,
+				gchar *mi,
 				gchar *p,
 				gchar *r)
   :PThread (1000, NoAutoDeleteThread)
@@ -524,8 +525,10 @@
   test_dialog = NULL;
   test_label = NULL;
   
-  if (m)
-    audio_manager = PString (m);
+  if (mo)
+    audio_output_manager = PString (mo);
+  if (mi)
+    audio_input_manager = PString (mi);
   if (p)
     audio_player = PString (p);
   if (r)
@@ -558,7 +561,8 @@
   PWaitAndSignal m(quit_mutex);
   thread_sync_point.Signal ();
 
-  if (audio_manager.IsEmpty ()
+  if (audio_output_manager.IsEmpty ()
+      || audio_input_manager.IsEmpty ()
       || audio_recorder.IsEmpty ()
       || audio_player.IsEmpty ()
       || audio_recorder == PString (_("No device found"))
@@ -609,8 +613,8 @@
   gtk_widget_show_all (GTK_DIALOG (test_dialog)->vbox);
   gdk_threads_leave ();
 
-  recorder = new GMAudioRP (this, audio_manager, audio_recorder, TRUE);
-  player = new GMAudioRP (this, audio_manager, audio_player, FALSE);
+  recorder = new GMAudioRP (this, audio_input_manager, audio_recorder, TRUE);
+  player = new GMAudioRP (this, audio_output_manager, audio_player, FALSE);
 
   
   while (!stop && !player->IsTerminated () && !recorder->IsTerminated ()) {
diff -ru gnomemeeting/src/sound_handling.h gnomemeeting.new/src/sound_handling.h
--- gnomemeeting/src/sound_handling.h	2004-09-10 18:44:23.000000000 +0900
+++ gnomemeeting.new/src/sound_handling.h	2005-04-04 17:32:27.000000000 +0900
@@ -115,6 +115,7 @@
    */
   GMAudioTester (gchar *,
 		 gchar *,
+		 gchar *,
 		 gchar *);
 
 
@@ -139,7 +140,8 @@
 
   char *buffer_ring;
 
-  PString audio_manager;
+  PString audio_output_manager;
+  PString audio_input_manager;
   PString audio_player;
   PString audio_recorder;
   

Attachment: pgpRSra9QdiAb.pgp
Description: PGP signature



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