ekiga r6172 - in trunk: . lib/engine/vidinput/skel src/endpoints src/gui
- From: mschneid svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6172 - in trunk: . lib/engine/vidinput/skel src/endpoints src/gui
- Date: Fri, 11 Apr 2008 20:02:04 +0100 (BST)
Author: mschneid
Date: Fri Apr 11 20:02:03 2008
New Revision: 6172
URL: http://svn.gnome.org/viewvc/ekiga?rev=6172&view=rev
Log:
Fix last commit. Update audio devices list on hot addition or removal.
Modified:
trunk/ChangeLog
trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.cpp
trunk/src/endpoints/opal-gmconf-bridge.cpp
trunk/src/gui/preferences.cpp
Modified: trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.cpp
==============================================================================
--- trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.cpp (original)
+++ trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.cpp Fri Apr 11 20:02:03 2008
@@ -51,7 +51,7 @@
property_changed.connect (sigc::mem_fun (this, &VidInputCoreConfBridge::on_property_changed));
keys.push_back (VIDEO_DEVICES_KEY "size");
- keys.push_back (VIDEO_CODECS_KEY "max_frame_rate");
+ keys.push_back (VIDEO_DEVICES_KEY "max_frame_rate");
keys.push_back (VIDEO_DEVICES_KEY "input_device");
keys.push_back (VIDEO_DEVICES_KEY "channel");
keys.push_back (VIDEO_DEVICES_KEY "format");
Modified: trunk/src/endpoints/opal-gmconf-bridge.cpp
==============================================================================
--- trunk/src/endpoints/opal-gmconf-bridge.cpp (original)
+++ trunk/src/endpoints/opal-gmconf-bridge.cpp Fri Apr 11 20:02:03 2008
@@ -124,9 +124,9 @@
GMManager::VideoOptions options;
manager.get_video_options (options);
options.maximum_frame_rate = gm_conf_entry_get_int (entry);
- if ( (options.max_frame_rate < 1) || (options.max_frame_rate > 30) ) {
+ if ( (options.maximum_frame_rate < 1) || (options.maximum_frame_rate > 30) ) {
PTRACE(1, "OpalConfBridge\t" << VIDEO_DEVICES_KEY "max_frame_rate" << " out of range, ajusting to 30");
- options.max_frame_rate = 30;
+ options.maximum_frame_rate = 30;
}
manager.set_video_options (options);
}
Modified: trunk/src/gui/preferences.cpp
==============================================================================
--- trunk/src/gui/preferences.cpp (original)
+++ trunk/src/gui/preferences.cpp Fri Apr 11 20:02:03 2008
@@ -1357,6 +1357,44 @@
gnome_prefs_string_option_menu_remove(pw->video_device, device.c_str());
}
+void on_audioinputdevice_added_cb (const Ekiga::AudioInputDevice & audioinput_device, GtkWidget *prefs_window)
+{
+ GmPreferencesWindow *pw = NULL;
+ g_return_if_fail (prefs_window != NULL);
+ pw = gm_pw_get_pw (prefs_window);
+ std::string device = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.device;
+ gnome_prefs_string_option_menu_add (pw->audio_recorder, device.c_str());
+
+}
+
+void on_audioinputdevice_removed_cb (const Ekiga::AudioInputDevice & audioinput_device, GtkWidget *prefs_window)
+{
+ GmPreferencesWindow *pw = NULL;
+ g_return_if_fail (prefs_window != NULL);
+ pw = gm_pw_get_pw (prefs_window);
+ std::string device = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.device;
+ gnome_prefs_string_option_menu_remove(pw->audio_recorder, device.c_str());
+}
+
+void on_audiooutputdevice_added_cb (const Ekiga::AudioOutputDevice & audiooutput_device, GtkWidget *prefs_window)
+{
+ GmPreferencesWindow *pw = NULL;
+ g_return_if_fail (prefs_window != NULL);
+ pw = gm_pw_get_pw (prefs_window);
+ std::string device = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.device;
+ gnome_prefs_string_option_menu_add (pw->audio_player, device.c_str());
+ gnome_prefs_string_option_menu_add (pw->sound_events_output, device.c_str());
+}
+
+void on_audiooutputdevice_removed_cb (const Ekiga::AudioOutputDevice & audiooutput_device, GtkWidget *prefs_window)
+{
+ GmPreferencesWindow *pw = NULL;
+ g_return_if_fail (prefs_window != NULL);
+ pw = gm_pw_get_pw (prefs_window);
+ std::string device = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.device;
+ gnome_prefs_string_option_menu_remove(pw->audio_player, device.c_str());
+ gnome_prefs_string_option_menu_remove(pw->sound_events_output, device.c_str());
+}
/* Public functions */
void
@@ -1577,11 +1615,23 @@
sigc::connection conn;
Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (core->get ("vidinput-core"));
+ Ekiga::AudioInputCore *audioinput_core = dynamic_cast<Ekiga::AudioInputCore *> (core->get ("audioinput-core"));
+ Ekiga::AudioOutputCore *audiooutput_core = dynamic_cast<Ekiga::AudioOutputCore *> (core->get ("audiooutput-core"));
+
conn = vidinput_core->vidinputdevice_added.connect (sigc::bind (sigc::ptr_fun (on_vidinputdevice_added_cb), window));
pw->connections.push_back (conn);
conn = vidinput_core->vidinputdevice_removed.connect (sigc::bind (sigc::ptr_fun (on_vidinputdevice_removed_cb), window));
pw->connections.push_back (conn);
+ conn = audioinput_core->audioinputdevice_added.connect (sigc::bind (sigc::ptr_fun (on_audioinputdevice_added_cb), window));
+ pw->connections.push_back (conn);
+ conn = audioinput_core->audioinputdevice_removed.connect (sigc::bind (sigc::ptr_fun (on_audioinputdevice_removed_cb), window));
+ pw->connections.push_back (conn);
+
+ conn = audiooutput_core->audiooutputdevice_added.connect (sigc::bind (sigc::ptr_fun (on_audiooutputdevice_added_cb), window));
+ pw->connections.push_back (conn);
+ conn = audiooutput_core->audiooutputdevice_removed.connect (sigc::bind (sigc::ptr_fun (on_audiooutputdevice_removed_cb), window));
+ pw->connections.push_back (conn);
return window;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]