ekiga r6532 - in trunk: . lib/engine/audioinput/null lib/engine/audioinput/ptlib lib/engine/audioinput/skel lib/engine/audiooutput/null lib/engine/audiooutput/ptlib lib/engine/audiooutput/skel lib/engine/videoinput/skel src/gui
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6532 - in trunk: . lib/engine/audioinput/null lib/engine/audioinput/ptlib lib/engine/audioinput/skel lib/engine/audiooutput/null lib/engine/audiooutput/ptlib lib/engine/audiooutput/skel lib/engine/videoinput/skel src/gui
- Date: Mon, 28 Jul 2008 21:16:19 +0000 (UTC)
Author: dsandras
Date: Mon Jul 28 21:16:19 2008
New Revision: 6532
URL: http://svn.gnome.org/viewvc/ekiga?rev=6532&view=rev
Log:
Added support for better default network profiles + a few misc fixes.
Modified:
trunk/ChangeLog
trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp
trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp
trunk/lib/engine/audioinput/skel/audioinput-core.cpp
trunk/lib/engine/audioinput/skel/audioinput-core.h
trunk/lib/engine/audioinput/skel/audioinput-info.h
trunk/lib/engine/audioinput/skel/audioinput-manager.h
trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp
trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp
trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp
trunk/lib/engine/audiooutput/skel/audiooutput-core.h
trunk/lib/engine/audiooutput/skel/audiooutput-info.h
trunk/lib/engine/audiooutput/skel/audiooutput-manager.h
trunk/lib/engine/videoinput/skel/videoinput-core.cpp
trunk/lib/engine/videoinput/skel/videoinput-core.h
trunk/src/gui/assistant.cpp
trunk/src/gui/assistant.h
trunk/src/gui/main.cpp
Modified: trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp
==============================================================================
--- trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp (original)
+++ trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp Mon Jul 28 21:16:19 2008
@@ -38,6 +38,7 @@
#define DEVICE_SOURCE "NULL"
#define DEVICE_NAME "NULL"
+
GMAudioInputManager_null::GMAudioInputManager_null (Ekiga::ServiceCore & _core)
: core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
{
@@ -78,10 +79,10 @@
adaptive_delay.Restart();
- Ekiga::AudioInputConfig config;
- config.volume = 0;
- config.modifyable = false;
- runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, config));
+ Ekiga::AudioInputSettings settings;
+ settings.volume = 0;
+ settings.modifyable = false;
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, settings));
return true;
}
Modified: trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp
==============================================================================
--- trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp (original)
+++ trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp Mon Jul 28 21:16:19 2008
@@ -40,6 +40,7 @@
#define DEVICE_TYPE "PTLIB"
+
GMAudioInputManager_ptlib::GMAudioInputManager_ptlib (Ekiga::ServiceCore & _core)
: core (_core),
runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
@@ -122,10 +123,10 @@
input_device->GetVolume (volume);
current_state.opened = true;
- Ekiga::AudioInputConfig config;
- config.volume = volume;
- config.modifyable = true;
- runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, config));
+ Ekiga::AudioInputSettings settings;
+ settings.volume = volume;
+ settings.modifyable = true;
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, settings));
return true;
}
Modified: trunk/lib/engine/audioinput/skel/audioinput-core.cpp
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-core.cpp (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-core.cpp Mon Jul 28 21:16:19 2008
@@ -233,7 +233,7 @@
if ( desired_device == device)
internal_set_device(desired_device);
- runtime.run_in_main (sigc::bind (device_added.make_slot (), device));
+ device_added.emit (device);
}
}
}
@@ -258,7 +258,7 @@
new_device.name = AUDIO_INPUT_FALLBACK_DEVICE_NAME;
internal_set_device( new_device);
}
- runtime.run_in_main (sigc::bind (device_removed.make_slot (), device));
+ device_removed.emit (device);
}
}
}
@@ -400,10 +400,10 @@
}
void AudioInputCore::on_device_opened (AudioInputDevice device,
- AudioInputConfig audioinput_config,
+ AudioInputSettings settings,
AudioInputManager *manager)
{
- device_opened.emit (*manager, device, audioinput_config);
+ device_opened.emit (*manager, device, settings);
}
void AudioInputCore::on_device_closed (AudioInputDevice device, AudioInputManager *manager)
Modified: trunk/lib/engine/audioinput/skel/audioinput-core.h
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-core.h (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-core.h Mon Jul 28 21:16:19 2008
@@ -167,7 +167,7 @@
* It determines responsible managers for that specific device and informs the
* GUI about the device that was added (via device_added signal).
* In case the added device was the desired device and we fell back,
- * we will reactivate it.
+ * we will reactivate it. MUST be called from main thread.
* @param source the device source (e.g. alsa).
* @param device_name the name of the added device.
* @param manager the HalManger detected the addition.
@@ -179,7 +179,7 @@
* It determines responsible managers for that specific device and informs the
* GUI about the device that was removed (via device_removed signal).
* In case the removed device was the current device we fall back to the
- * fallback device.
+ * fallback device. MUST be called from main thread.
* @param source the device source (e.g. alsa).
* @param device_name the name of the removed device.
* @param manager the HalManger detected the removal.
@@ -262,7 +262,7 @@
/** See audioinput-manager.h for the API
*/
- sigc::signal<void, AudioInputManager &, AudioInputDevice &, AudioInputConfig&> device_opened;
+ sigc::signal<void, AudioInputManager &, AudioInputDevice &, AudioInputSettings&> device_opened;
sigc::signal<void, AudioInputManager &, AudioInputDevice &> device_closed;
sigc::signal<void, AudioInputManager &, AudioInputDevice &, AudioInputErrorCodes> device_error;
@@ -282,7 +282,7 @@
private:
void on_device_opened (AudioInputDevice device,
- AudioInputConfig vidinput_config,
+ AudioInputSettings settings,
AudioInputManager *manager);
void on_device_closed (AudioInputDevice device, AudioInputManager *manager);
void on_device_error (AudioInputDevice device, AudioInputErrorCodes error_code, AudioInputManager *manager);
Modified: trunk/lib/engine/audioinput/skel/audioinput-info.h
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-info.h (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-info.h Mon Jul 28 21:16:19 2008
@@ -44,10 +44,10 @@
{
class AudioInputDevice : public Device {};
- typedef struct AudioInputConfig {
+ typedef struct AudioInputSettings {
unsigned volume;
bool modifyable;
- } AudioInputConfig;
+ } AudioInputSettings;
enum AudioInputErrorCodes {
AI_ERROR_NONE = 0,
Modified: trunk/lib/engine/audioinput/skel/audioinput-manager.h
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-manager.h (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-manager.h Mon Jul 28 21:16:19 2008
@@ -144,7 +144,7 @@
* @param device the audio input device that was opened.
* @param config the current audio input device configuration (current volume, etc.).
*/
- sigc::signal<void, AudioInputDevice, AudioInputConfig> device_opened;
+ sigc::signal<void, AudioInputDevice, AudioInputSettings> device_opened;
/** This signal is emitted when an audio input device is closed.
* @param device the audio input device that was closed.
Modified: trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp (original)
+++ trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp Mon Jul 28 21:16:19 2008
@@ -81,10 +81,10 @@
adaptive_delay[ps].Restart();
- Ekiga::AudioOutputConfig config;
- config.volume = 0;
- config.modifyable = false;
- runtime.run_in_main (sigc::bind (device_opened.make_slot (), ps, current_state[ps].device, config));
+ Ekiga::AudioOutputSettings settings;
+ settings.volume = 0;
+ settings.modifyable = false;
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), ps, current_state[ps].device, settings));
return true;
}
Modified: trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp (original)
+++ trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp Mon Jul 28 21:16:19 2008
@@ -123,10 +123,10 @@
output_device[ps]->GetVolume (volume);
current_state[ps].opened = true;
- Ekiga::AudioOutputConfig config;
- config.volume = volume;
- config.modifyable = true;
- runtime.run_in_main (sigc::bind (device_opened.make_slot (), ps, current_state[ps].device, config));
+ Ekiga::AudioOutputSettings settings;
+ settings.volume = volume;
+ settings.modifyable = true;
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), ps, current_state[ps].device, settings));
return true;
}
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp Mon Jul 28 21:16:19 2008
@@ -39,6 +39,7 @@
#include <math.h>
using namespace Ekiga;
+
AudioOutputCore::AudioOutputCore (Ekiga::Runtime & _runtime)
: runtime (_runtime),
audio_event_scheduler(*this)
@@ -208,7 +209,7 @@
internal_set_primary_device(desired_primary_device);
}
- runtime.run_in_main (sigc::bind (device_added.make_slot (), device));
+ device_added.emit(device);
}
}
}
@@ -233,7 +234,7 @@
internal_set_primary_device(new_device);
}
- runtime.run_in_main (sigc::bind (device_removed.make_slot (), device));
+ device_removed.emit(device);
}
}
}
@@ -361,10 +362,10 @@
void AudioOutputCore::on_device_opened (AudioOutputPS ps,
AudioOutputDevice device,
- AudioOutputConfig config,
+ AudioOutputSettings settings,
AudioOutputManager *manager)
{
- device_opened.emit (*manager, ps, device, config);
+ device_opened.emit (*manager, ps, device, settings);
}
void AudioOutputCore::on_device_closed (AudioOutputPS ps, AudioOutputDevice device, AudioOutputManager *manager)
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-core.h
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-core.h (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-core.h Mon Jul 28 21:16:19 2008
@@ -157,7 +157,7 @@
* It determines responsible managers for that specific device and informs the
* GUI about the device that was added (via device_added signal).
* In case the added device was the desired device and we fell back,
- * we will reactivate it.
+ * we will reactivate it. MUST be called from main thread,
* @param sink the device sink (e.g. alsa).
* @param device_name the name of the added device.
* @param manager the HalManger detected the addition.
@@ -169,7 +169,7 @@
* It determines responsible managers for that specific device and informs the
* GUI about the device that was removed (via device_removed signal).
* In case the removed device was the current device we fall back to the
- * fallback device.
+ * fallback device. MUST be called from main thread,
* @param sink the device sink (e.g. alsa).
* @param device_name the name of the removed device.
* @param manager the HalManger detected the removal.
@@ -306,7 +306,7 @@
/** See audiooutput-manager.h for the API
*/
- sigc::signal<void, AudioOutputManager &, AudioOutputPS, AudioOutputDevice&, AudioOutputConfig&> device_opened;
+ sigc::signal<void, AudioOutputManager &, AudioOutputPS, AudioOutputDevice&, AudioOutputSettings&> device_opened;
sigc::signal<void, AudioOutputManager &, AudioOutputPS, AudioOutputDevice&> device_closed;
sigc::signal<void, AudioOutputManager &, AudioOutputPS, AudioOutputDevice&, AudioOutputErrorCodes> device_error;
@@ -327,7 +327,7 @@
private:
void on_device_opened (AudioOutputPS ps,
AudioOutputDevice device,
- AudioOutputConfig config,
+ AudioOutputSettings settings,
AudioOutputManager *manager);
void on_device_closed (AudioOutputPS ps, AudioOutputDevice device, AudioOutputManager *manager);
void on_device_error (AudioOutputPS ps, AudioOutputDevice device, AudioOutputErrorCodes error_code, AudioOutputManager *manager);
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-info.h
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-info.h (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-info.h Mon Jul 28 21:16:19 2008
@@ -43,10 +43,10 @@
{
class AudioOutputDevice : public Device {};
- typedef struct AudioOutputConfig {
+ typedef struct AudioOutputSettings {
unsigned volume;
bool modifyable;
- } AudioOutputConfig;
+ } AudioOutputSettings;
enum AudioOutputErrorCodes {
AO_ERROR_NONE = 0,
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-manager.h
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-manager.h (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-manager.h Mon Jul 28 21:16:19 2008
@@ -148,7 +148,7 @@
* @param device the audio output device that was opened.
* @param config the current audio output device configuration (current volume, etc.).
*/
- sigc::signal<void, AudioOutputPS, AudioOutputDevice, AudioOutputConfig> device_opened;
+ sigc::signal<void, AudioOutputPS, AudioOutputDevice, AudioOutputSettings> device_opened;
/** This signal is emitted when an audio output device is closed.
* @param prim whether the primary or secondary audio output device was closed.
Modified: trunk/lib/engine/videoinput/skel/videoinput-core.cpp
==============================================================================
--- trunk/lib/engine/videoinput/skel/videoinput-core.cpp (original)
+++ trunk/lib/engine/videoinput/skel/videoinput-core.cpp Mon Jul 28 21:16:19 2008
@@ -227,7 +227,7 @@
if ( desired_device == device )
internal_set_device(device, current_channel, current_format);
- runtime.run_in_main (sigc::bind (device_added.make_slot (), device));
+ device_added.emit(device);
}
}
}
@@ -251,7 +251,7 @@
internal_set_device(new_device, current_channel, current_format);
}
- runtime.run_in_main (sigc::bind (device_removed.make_slot (), device));
+ device_removed.emit(device);
}
}
}
Modified: trunk/lib/engine/videoinput/skel/videoinput-core.h
==============================================================================
--- trunk/lib/engine/videoinput/skel/videoinput-core.h (original)
+++ trunk/lib/engine/videoinput/skel/videoinput-core.h Mon Jul 28 21:16:19 2008
@@ -171,7 +171,7 @@
* It determines responsible managers for that specific device and informs the
* GUI about the device that was added (via device_added signal).
* In case the added device was the desired device and we fell back,
- * we will reactivate it.
+ * we will reactivate it. MUST be called from main thread.
* @param source the device source (e.g. video4linux).
* @param device_name the name of the added device.
* @param capabilities used for differentiating V4L1 and V4L2.
@@ -184,7 +184,7 @@
* It determines responsible managers for that specific device and informs the
* GUI about the device that was removed (via device_removed signal).
* In case the removed device was the current device we fall back to the
- * fallback device.
+ * fallback device. MUST be called from main thread.
* @param source the device source (e.g. video4linux).
* @param device_name the name of the removed device.
* @param capabilities used for differentiating V4L1 and V4L2.
Modified: trunk/src/gui/assistant.cpp
==============================================================================
--- trunk/src/gui/assistant.cpp (original)
+++ trunk/src/gui/assistant.cpp Mon Jul 28 21:16:19 2008
@@ -790,12 +790,17 @@
-1);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- CNX_LABEL_COLUMN, _("xDSL/Cable"),
- CNX_CODE_COLUMN, NET_DSL,
+ CNX_LABEL_COLUMN, _("DSL/Cable (128 kbit/s uplink)"),
+ CNX_CODE_COLUMN, NET_DSL128,
-1);
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
- CNX_LABEL_COLUMN, _("T1/LAN"),
+ CNX_LABEL_COLUMN, _("DSL/Cable (512 kbit/s uplink)"),
+ CNX_CODE_COLUMN, NET_DSL512,
+ -1);
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ CNX_LABEL_COLUMN, _("LAN"),
CNX_CODE_COLUMN, NET_LAN,
-1);
gtk_list_store_append (store, &iter);
@@ -854,26 +859,28 @@
/* Set the connection quality settings */
switch (connection_type) {
case NET_PSTN:
- gm_conf_set_int (VIDEO_CODECS_KEY "frame_rate", 5);
- gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 8);
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", FALSE);
break;
case NET_ISDN:
- gm_conf_set_int (VIDEO_CODECS_KEY "frame_rate", 10);
- gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 16);
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", FALSE);
break;
- case NET_DSL:
- gm_conf_set_int (VIDEO_CODECS_KEY "frame_rate", 15);
+ case NET_DSL128:
+ gm_conf_set_int (VIDEO_DEVICES_KEY "size", 0); //QCIF
gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 64);
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", TRUE);
break;
+ case NET_DSL512:
+ gm_conf_set_int (VIDEO_DEVICES_KEY "size", 3); // 320x240
+ gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 384);
+ gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", TRUE);
+ break;
+
case NET_LAN:
- gm_conf_set_int (VIDEO_CODECS_KEY "frame_rate", 25);
- gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 800);
+ gm_conf_set_int (VIDEO_DEVICES_KEY "size", 3); // 320x240
+ gm_conf_set_int (VIDEO_CODECS_KEY "maximum_video_tx_bitrate", 1024);
gm_conf_set_bool (VIDEO_CODECS_KEY "enable_video", TRUE);
break;
Modified: trunk/src/gui/assistant.h
==============================================================================
--- trunk/src/gui/assistant.h (original)
+++ trunk/src/gui/assistant.h Mon Jul 28 21:16:19 2008
@@ -47,7 +47,8 @@
enum {
NET_PSTN,
NET_ISDN,
- NET_DSL,
+ NET_DSL128,
+ NET_DSL512,
NET_LAN,
NET_CUSTOM
};
Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp (original)
+++ trunk/src/gui/main.cpp Mon Jul 28 21:16:19 2008
@@ -1134,7 +1134,7 @@
void
on_audioinput_device_opened_cb (Ekiga::AudioInputManager & /* manager */,
Ekiga::AudioInputDevice & /* device */,
- Ekiga::AudioInputConfig & config,
+ Ekiga::AudioInputSettings & settings,
gpointer self)
{
GmMainWindow *mw = NULL;
@@ -1142,8 +1142,8 @@
mw = gm_mw_get_mw (GTK_WIDGET (self));
g_return_if_fail (mw != NULL);
- gtk_widget_set_sensitive (GTK_WIDGET (mw->audio_input_volume_frame), config.modifyable ? TRUE : FALSE);
- GTK_ADJUSTMENT (mw->adj_input_volume)->value = config.volume;
+ gtk_widget_set_sensitive (GTK_WIDGET (mw->audio_input_volume_frame), settings.modifyable ? TRUE : FALSE);
+ GTK_ADJUSTMENT (mw->adj_input_volume)->value = settings.volume;
gtk_widget_queue_draw (GTK_WIDGET (mw->audio_input_volume_frame));
}
@@ -1208,7 +1208,7 @@
on_audiooutput_device_opened_cb (Ekiga::AudioOutputManager & /*manager*/,
Ekiga::AudioOutputPS ps,
Ekiga::AudioOutputDevice & /*device*/,
- Ekiga::AudioOutputConfig & config,
+ Ekiga::AudioOutputSettings & settings,
gpointer self)
{
if (ps == Ekiga::secondary)
@@ -1219,8 +1219,8 @@
mw = gm_mw_get_mw (GTK_WIDGET (self));
g_return_if_fail (mw != NULL);
- gtk_widget_set_sensitive (GTK_WIDGET (mw->audio_output_volume_frame), config.modifyable ? TRUE : FALSE);
- GTK_ADJUSTMENT (mw->adj_output_volume)->value = config.volume;
+ gtk_widget_set_sensitive (GTK_WIDGET (mw->audio_output_volume_frame), settings.modifyable ? TRUE : FALSE);
+ GTK_ADJUSTMENT (mw->adj_output_volume)->value = settings.volume;
gtk_widget_queue_draw (GTK_WIDGET (mw->audio_output_volume_frame));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]