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



maillog: 05/04/2005-10:09:12(+0200): Damien Sandras types
> There is probably still a few problems before going into CVS though.
> 
> 1) If you use the ALSA plugin, and have a camera with an internal
> microphone, the list of input devices will be different from the list of
> output devices, so the output plugin will be shown when it shouldn't.
> 
> What I suggest is to change that into the following :
> - if the output plugin returns zero devices and the input plugin doesn't
> return zero devices, then allow to change it.
> - if not, then hide it.
>
> Isn't that enough for a test?

You're right. Fixed in the attachment (incremental again).

> 2)
> I don't understand this :
> +  // 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"));

The hide/show logic is in "manager_changed_nt". This function is called
when the {output,input}_plugin key is changed.

However, when the preferences widget is first initialized, there is no
logic involved. In other words, you get the output_plugin menu unhidden
(only initially) regardless whether it should be or not. If you change
the input plugin, it will properly get hidden, but in the beginning it
is always shown.

So, I forced an update on the "output_plugin" key, in order to call
manager_changed_nt and hide/show the output_plugin menu. I thought it's
ugly, but if you like it, feel free to remove the FIXME.

> 3) druid.cpp has a couple of FIXME and some code commented out

Those FIXME-s are placeholders to show where the value for output_plugin
is derived from input_plugin. When improving the druid to support input
and output plugins they would be useful. Didn't know how to do that,
though.

> The rest seems ok :)

Good to hear. 

> Thanks!

Thank *you*. If that thing goes in I can safely work on the DV audio
plugin. Improving the druid would indeed be useful, though, as it has
the audio test feature that would greatly facilitate the work on an
audio plugin.

-- 
 /   Georgi Georgiev    / Your wig steers the gig. -- Lord Buckley      /
\     chutz gg3 net    \                                               \
 /  +81(90)2877-8845    /                                               /
diff -ru gnomemeeting.B/src/config.cpp gnomemeeting.new/src/config.cpp
--- gnomemeeting.B/src/config.cpp	2005-04-05 14:54:46.000000000 +0900
+++ gnomemeeting.new/src/config.cpp	2005-04-05 17:24:15.000000000 +0900
@@ -806,14 +806,21 @@
     {
       /*
        * Conditions for hiding the output_plugin menu:
+       *
        * - The input and output plugins are the same
-       * - The input and output devices 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() ==
-	  GnomeMeeting::Process ()->GetAudioOutputDevices()
+	  (
+	   GnomeMeeting::Process ()->GetAudioInputDevices() [0] == _("No device found")
+	   ||
+	   GnomeMeeting::Process ()->GetAudioOutputDevices()[0] != _("No device found")
+	  )
 	 )
       {
 	gm_prefs_window_display_output_plugin(GnomeMeeting::Process()->GetPrefsWindow(), FALSE);


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