Re: [GnomeMeeting-devel-list] [PATCH] Sound Input only plugins?
- From: Georgi Georgiev <chutz gg3 net>
- To: gnomemeeting-devel-list gnome org
- Subject: Re: [GnomeMeeting-devel-list] [PATCH] Sound Input only plugins?
- Date: Fri, 8 Apr 2005 10:19:29 +0900
maillog: 07/04/2005-23:06:38(+0200): Damien Sandras types
> Hi,
>
> I don't forget about your patch, don't worry.
> I just want to do a big update before, and prepare my GUADEC talk, so it
> is postponed a bit as it is not immediately needed.
>
> If that is not ok with you, please tell me.
>
> Thanks again,
OK, here is a complete patch against
http://snapshots.seconix.com/cvs/archive/gnomemeeting-opal-cvs_20050325-01.tar.gz
You tackle it when you feel like it.
--
\ Georgi Georgiev \ The earth is like a tiny grain of sand, \
/ chutz gg3 net / only much, much heavier. /
\ +81(90)2877-8845 \ \
diff -ru gnomemeeting-opal/configure.in gnomemeeting-opal.new/configure.in
--- gnomemeeting-opal/configure.in 2005-03-07 22:05:42.000000000 +0900
+++ gnomemeeting-opal.new/configure.in 2005-04-08 09:39:26.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-opal/gnomemeeting.schemas.in.in gnomemeeting-opal.new/gnomemeeting.schemas.in.in
--- gnomemeeting-opal/gnomemeeting.schemas.in.in 2005-03-07 00:08:38.000000000 +0900
+++ gnomemeeting-opal.new/gnomemeeting.schemas.in.in 2005-04-08 09:40:48.000000000 +0900
@@ -3,8 +3,19 @@
<gconfschemafile>
<schemalist>
<schema>
- <key>/schemas/apps/@PACKAGE_NAME@/devices/audio/plugin</key>
- <applyto>/apps/@PACKAGE_NAME@/devices/audio/plugin</applyto>
+ <key>/schemas/apps/@PACKAGE_NAME@/devices/audio/input_plugin</key>
+ <applyto>/apps/@PACKAGE_NAME@/devices/audio/input_plugin</applyto>
+ <owner>GnomeMeeting</owner>
+ <type>string</type>
+ <default>ALSA</default>
+ <locale name="C">
+ <short>Audio plugin</short>
+ <long>The audio plugin that will be used to detect the devices and manage them</long>
+ </locale>
+ </schema>
+ <schema>
+ <key>/schemas/apps/@PACKAGE_NAME@/devices/audio/output_plugin</key>
+ <applyto>/apps/@PACKAGE_NAME@/devices/audio/output_plugin</applyto>
<owner>GnomeMeeting</owner>
<type>string</type>
<default>ALSA</default>
diff -ru gnomemeeting-opal/src/config.cpp gnomemeeting-opal.new/src/config.cpp
--- gnomemeeting-opal/src/config.cpp 2005-03-07 00:08:38.000000000 +0900
+++ gnomemeeting-opal.new/src/config.cpp 2005-04-08 09:39:26.000000000 +0900
@@ -849,7 +849,45 @@
gdk_threads_enter ();
+
+ if ((PString)gm_conf_entry_get_key(entry) == PString(AUDIO_DEVICES_KEY "input_plugin") ) {
+ // the input_plugin was changed, also change output_plugin
+ gm_conf_set_string(AUDIO_DEVICES_KEY "output_plugin", gm_conf_entry_get_string(entry));
+ }
+
GnomeMeeting::Process ()->DetectDevices ();
+
+ /*
+ * Don't try to show/hide the output_menu if we are setting input_plugin
+ * The devices are not refreshed before this function is called for the
+ * change to output_plugin, and it only disturbs the display
+ */
+ if ( (PString)gm_conf_entry_get_key(entry) != PString(AUDIO_DEVICES_KEY "input_plugin"))
+ {
+ /*
+ * Conditions for hiding the output_plugin menu:
+ *
+ * - The input and output plugins are the same
+ * AND EITHER
+ * - There are output devices
+ * OR
+ * - There are no input devices
+ */
+ if (
+ PString(gm_conf_get_string(AUDIO_DEVICES_KEY "output_plugin")) ==
+ PString(gm_conf_get_string(AUDIO_DEVICES_KEY "input_plugin")) &&
+ (
+ GnomeMeeting::Process ()->GetAudioInputDevices() [0] == _("No device found")
+ ||
+ GnomeMeeting::Process ()->GetAudioOutputDevices()[0] != _("No device found")
+ )
+ )
+ {
+ gm_prefs_window_display_output_plugin(GnomeMeeting::Process()->GetPrefsWindow(), FALSE);
+ } else {
+ gm_prefs_window_display_output_plugin(GnomeMeeting::Process()->GetPrefsWindow(), TRUE);
+ }
+ }
gdk_threads_leave ();
}
}
@@ -1551,8 +1589,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);
@@ -1679,6 +1720,9 @@
gm_conf_notifier_add (VIDEO_CODECS_KEY "transmitted_background_blocks",
tr_ub_changed_nt, NULL);
+ // FIXME: hide/show the output_plugin_menu... there has to be a better way.
+ gm_conf_set_string (AUDIO_DEVICES_KEY "output_plugin",
+ gm_conf_get_string(AUDIO_DEVICES_KEY "output_plugin"));
return TRUE;
}
diff -ru gnomemeeting-opal/src/druid.cpp gnomemeeting-opal.new/src/druid.cpp
--- gnomemeeting-opal/src/druid.cpp 2004-12-03 06:06:56.000000000 +0900
+++ gnomemeeting-opal.new/src/druid.cpp 2005-04-08 09:46:49.000000000 +0900
@@ -60,7 +60,9 @@
GtkWidget *video_test_button;
GtkWidget *kind_of_net;
GtkWidget *progress;
- GtkWidget *audio_manager;
+ GtkWidget *audio_input_manager;
+ // FIXME: input/output plugin support not complete
+ // GtkWidget *audio_output_manager;
GtkWidget *video_manager;
GtkWidget *audio_player;
GtkWidget *audio_recorder;
@@ -140,6 +142,7 @@
gchar *&,
gchar *&,
gchar *&,
+ gchar *&,
gchar *&,
gchar *&,
gchar *&,
@@ -534,7 +537,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 +560,18 @@
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 = "";
+
+ // FIXME: input/output plugin support not complete
+ child = GTK_BIN (dw->audio_input_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)
@@ -928,8 +939,8 @@
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_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 manager is the plugin that will manage your audio devices, ALSA is probably the best choice when available."));
@@ -939,6 +950,27 @@
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);
+
+ // FIXME: input/output plugin support not complete
+ /*
+ 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_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 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);
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+ gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
+ */
+
gtk_box_pack_start (GTK_BOX (page_standard->vbox), GTK_WIDGET (vbox),
TRUE, TRUE, 8);
@@ -1231,7 +1263,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 +1280,8 @@
name,
mail,
con_type,
- audio_manager,
+ audio_input_manager,
+ audio_output_manager,
player,
recorder,
video_manager,
@@ -1258,7 +1292,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 +1315,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 +1330,8 @@
name,
mail,
con_type,
- audio_manager,
+ audio_input_manager,
+ audio_output_manager,
player,
recorder,
video_manager,
@@ -1350,7 +1386,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 +1420,8 @@
name,
mail,
con_type,
- audio_manager,
+ audio_input_manager,
+ audio_output_manager,
player,
recorder,
video_manager,
@@ -1418,8 +1456,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 +1594,9 @@
gchar *mail = NULL;
gchar *text = NULL;
int kind_of_net = 0;
- gchar *audio_manager = NULL;
+ gchar *audio_input_manager = NULL;
+ // FIXME: input/output not done yet
+ // gchar *audio_output_manager = NULL;
gchar *video_manager = NULL;
BOOL ils_register = FALSE;
char **array = NULL;
@@ -1597,12 +1639,20 @@
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_manager = gm_conf_get_string (AUDIO_DEVICES_KEY "plugin");
- gm_dw_option_menu_update (dw->audio_manager, array, audio_manager);
+ 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_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 ();
array = devs.ToCharArray ();
video_manager = gm_conf_get_string (VIDEO_DEVICES_KEY "plugin");
@@ -1614,7 +1664,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 +1700,8 @@
GMEndPoint *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 +1718,20 @@
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 = "";
+
+ // FIXME: input/output not done yet
+ child = GTK_BIN (dw->audio_input_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,7 +1742,7 @@
* not for a random one.
*/
gnomemeeting_sound_daemons_suspend ();
- devices = PSoundChannel::GetDeviceNames (audio_manager,
+ devices = PSoundChannel::GetDeviceNames (audio_output_manager,
PSoundChannel::Player);
if (devices.GetSize () == 0) {
@@ -1696,7 +1756,7 @@
gm_dw_option_menu_update (dw->audio_player, array, player);
free (array);
- devices = PSoundChannel::GetDeviceNames (audio_manager,
+ devices = PSoundChannel::GetDeviceNames (audio_input_manager,
PSoundChannel::Recorder);
if (devices.GetSize () == 0) {
@@ -1803,7 +1863,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;
@@ -1820,7 +1881,8 @@
name,
mail,
connection_type,
- audio_manager,
+ audio_input_manager,
+ audio_output_manager,
player,
recorder,
video_manager,
@@ -1829,7 +1891,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-opal/src/endpoint.cpp gnomemeeting-opal.new/src/endpoint.cpp
--- gnomemeeting-opal/src/endpoint.cpp 2005-03-07 00:08:38.000000000 +0900
+++ gnomemeeting-opal.new/src/endpoint.cpp 2005-04-08 09:49:57.000000000 +0900
@@ -485,7 +485,8 @@
void
-GMEndPoint::StartAudioTester (gchar *audio_manager,
+GMEndPoint::StartAudioTester (gchar *audio_output_manager,
+ gchar *audio_input_manager,
gchar *audio_player,
gchar *audio_recorder)
{
@@ -495,7 +496,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);
}
diff -ru gnomemeeting-opal/src/endpoint.h gnomemeeting-opal.new/src/endpoint.h
--- gnomemeeting-opal/src/endpoint.h 2005-03-07 00:08:38.000000000 +0900
+++ gnomemeeting-opal.new/src/endpoint.h 2005-04-08 09:39:26.000000000 +0900
@@ -388,6 +388,7 @@
*/
void StartAudioTester (gchar *,
gchar *,
+ gchar *,
gchar *);
diff -ru gnomemeeting-opal/src/gnomemeeting.cpp gnomemeeting-opal.new/src/gnomemeeting.cpp
--- gnomemeeting-opal/src/gnomemeeting.cpp 2005-03-07 00:08:38.000000000 +0900
+++ gnomemeeting-opal.new/src/gnomemeeting.cpp 2005-04-08 09:55:30.000000000 +0900
@@ -194,12 +194,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);
@@ -210,14 +212,17 @@
/* 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);
- PTRACE (1, "Detected audio plugins: " << setfill (',') << audio_managers
+ PTRACE (1, "Detected audio input plugins: " << setfill (',') << audio_input_managers
+ << setfill (' '));
+ PTRACE (1, "Detected audio output plugins: " << setfill (',') << audio_output_managers
<< setfill (' '));
PTRACE (1, "Detected video plugins: " << setfill (',') << video_managers
<< setfill (' '));
@@ -227,10 +232,13 @@
video_managers.RemoveAt (fake_idx);
#ifdef HAX_IXJ
- audio_managers += PString ("Quicknet");
+ audio_input_managers += PString ("Quicknet");
+ audio_output_managers += PString ("Quicknet");
#endif
- PTRACE (1, "Detected audio plugins: " << setfill (',') << audio_managers
+ PTRACE (1, "Detected audio input plugins: " << setfill (',') << audio_input_managers
+ << setfill (' '));
+ PTRACE (1, "Detected audio output plugins: " << setfill (',') << audio_output_managers
<< setfill (' '));
PTRACE (1, "Detected video plugins: " << setfill (',') << video_managers
<< setfill (' '));
@@ -241,7 +249,9 @@
return FALSE;
/* No audio plugin => Exit */
- if (audio_managers.GetSize () == 0)
+ if (audio_input_managers.GetSize () == 0)
+ return FALSE;
+ if (audio_output_managers.GetSize () == 0)
return FALSE;
@@ -249,9 +259,9 @@
video_input_devices = PVideoInputDevice::GetDriversDeviceNames (video_plugin);
audio_input_devices =
- PSoundChannel::GetDeviceNames (audio_plugin, PSoundChannel::Recorder);
+ PSoundChannel::GetDeviceNames (audio_input_plugin, PSoundChannel::Recorder);
audio_output_devices =
- PSoundChannel::GetDeviceNames (audio_plugin, PSoundChannel::Player);
+ PSoundChannel::GetDeviceNames (audio_output_plugin, PSoundChannel::Player);
if (audio_input_devices.GetSize () == 0)
@@ -264,25 +274,26 @@
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);
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 ();
@@ -502,7 +513,7 @@
PStringArray
-GnomeMeeting::GetAudioOutpoutDevices ()
+GnomeMeeting::GetAudioOutputDevices ()
{
PWaitAndSignal m(dev_access_mutex);
@@ -511,11 +522,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-opal/src/gnomemeeting.h gnomemeeting-opal.new/src/gnomemeeting.h
--- gnomemeeting-opal/src/gnomemeeting.h 2005-02-25 20:41:54.000000000 +0900
+++ gnomemeeting-opal.new/src/gnomemeeting.h 2005-04-08 09:39:26.000000000 +0900
@@ -223,7 +223,7 @@
* for that.
* PRE : /
*/
- PStringArray GetAudioOutpoutDevices ();
+ PStringArray GetAudioOutputDevices ();
/* DESCRIPTION : /
@@ -232,7 +232,8 @@
* for that.
* PRE : /
*/
- PStringArray GetAudioPlugins ();
+ PStringArray GetAudioOutputPlugins ();
+ PStringArray GetAudioInputPlugins ();
/* DESCRIPTION : /
@@ -257,7 +258,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-opal/src/pref_window.cpp gnomemeeting-opal.new/src/pref_window.cpp
--- gnomemeeting-opal/src/pref_window.cpp 2005-03-12 04:10:13.000000000 +0900
+++ gnomemeeting-opal.new/src/pref_window.cpp 2005-04-08 09:56:38.000000000 +0900
@@ -69,6 +69,7 @@
GtkWidget *sound_events_output;
GtkWidget *audio_recorder;
GtkWidget *video_device;
+ GtkWidget *output_plugin_menu;
} GmPreferencesWindow;
#define GM_PREFERENCES_WINDOW(x) (GmPreferencesWindow *) (x)
@@ -1654,19 +1655,24 @@
_("Audio Plugin"), 1, 2);
/* Add all the fields for the audio manager */
- devs = GnomeMeeting::Process ()->GetAudioPlugins ();
+ devs = GnomeMeeting::Process ()->GetAudioInputPlugins ();
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 plugin:"), array, AUDIO_DEVICES_KEY "input_plugin", _("The audio plugin that will be used to detect the devices and manage them."), 0);
free (array);
+ devs = GnomeMeeting::Process ()->GetAudioOutputPlugins ();
+ array = devs.ToCharArray ();
+ pw->output_plugin_menu =
+ 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."), 1);
+
/* Add all the fields */
subsection = gnome_prefs_subsection_new (prefs_window, container,
_("Audio Devices"), 4, 2);
/* 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);
@@ -2813,3 +2819,19 @@
return window;
}
+void
+gm_prefs_window_display_output_plugin(GtkWidget *prefs_window, BOOL show)
+{
+ GmPreferencesWindow *pw = NULL;
+ g_return_if_fail (prefs_window != NULL);
+ pw = gm_pw_get_pw (prefs_window);
+ GList * w = gtk_widget_list_mnemonic_labels(pw->output_plugin_menu);
+ if (show) {
+ g_list_foreach(w, (GFunc)gtk_widget_show, NULL);
+ gtk_widget_show(pw->output_plugin_menu);
+ } else {
+ g_list_foreach(w, (GFunc)gtk_widget_hide, NULL);
+ gtk_widget_hide(pw->output_plugin_menu);
+ }
+ g_list_free(w);
+}
diff -ru gnomemeeting-opal/src/pref_window.h gnomemeeting-opal.new/src/pref_window.h
--- gnomemeeting-opal/src/pref_window.h 2005-02-22 06:07:20.000000000 +0900
+++ gnomemeeting-opal.new/src/pref_window.h 2005-04-08 09:39:26.000000000 +0900
@@ -80,6 +80,12 @@
*/
void gm_prefs_window_update_accounts_list (GtkWidget *prefs_window);
+/* DESCRIPTION : /
+ * BEHAVIOR : Hides or shows the selection for the output plugin
+ * PRE : /
+ */
+void
+gm_prefs_window_display_output_plugin(GtkWidget *, BOOL);
/* DESCRIPTION : /
* BEHAVIOR : Refreshes the codecs list in the GUI to update them from
diff -ru gnomemeeting-opal/src/sound_handling.cpp gnomemeeting-opal.new/src/sound_handling.cpp
--- gnomemeeting-opal/src/sound_handling.cpp 2004-12-05 20:39:10.000000000 +0900
+++ gnomemeeting-opal.new/src/sound_handling.cpp 2005-04-08 09:39:26.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
@@ -461,7 +461,8 @@
/* The Audio tester class */
- GMAudioTester::GMAudioTester (gchar *m,
+ GMAudioTester::GMAudioTester (gchar *mo,
+ gchar *mi,
gchar *p,
gchar *r)
:PThread (1000, NoAutoDeleteThread)
@@ -471,8 +472,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)
@@ -505,7 +508,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"))
@@ -556,8 +560,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-opal/src/sound_handling.h gnomemeeting-opal.new/src/sound_handling.h
--- gnomemeeting-opal/src/sound_handling.h 2004-09-10 18:44:23.000000000 +0900
+++ gnomemeeting-opal.new/src/sound_handling.h 2005-04-08 09:39:26.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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]