ekiga r6267 - in trunk: . lib/engine 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/display/common lib/engine/display/dx lib/engine/display/skel lib/engine/display/x lib/engine/framework lib/engine/hal/dbus lib/engine/vidinput/mlogo lib/engine/vidinput/ptlib lib/engine/vidinput/skel pixmaps src/devices src/endpoints src/gui
- From: mschneid svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6267 - in trunk: . lib/engine 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/display/common lib/engine/display/dx lib/engine/display/skel lib/engine/display/x lib/engine/framework lib/engine/hal/dbus lib/engine/vidinput/mlogo lib/engine/vidinput/ptlib lib/engine/vidinput/skel pixmaps src/devices src/endpoints src/gui
- Date: Sun, 18 May 2008 13:08:24 +0000 (UTC)
Author: mschneid
Date: Sun May 18 13:08:23 2008
New Revision: 6267
URL: http://svn.gnome.org/viewvc/ekiga?rev=6267&view=rev
Log:
Some more cleanup and renaming. VidInputCore is now VideoInputCore.
DisplayCore is now VideoOutputCore.
Added:
trunk/lib/engine/framework/device-def.h
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-gmconf-bridge.cpp
trunk/lib/engine/audioinput/skel/audioinput-info.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-gmconf-bridge.cpp
trunk/lib/engine/audiooutput/skel/audiooutput-info.h
trunk/lib/engine/display/common/display-manager-common.cpp
trunk/lib/engine/display/common/display-manager-common.h
trunk/lib/engine/display/dx/display-main-dx.cpp
trunk/lib/engine/display/dx/display-manager-dx.cpp
trunk/lib/engine/display/skel/display-core.cpp
trunk/lib/engine/display/skel/display-core.h
trunk/lib/engine/display/skel/display-gmconf-bridge.cpp
trunk/lib/engine/display/skel/display-gmconf-bridge.h
trunk/lib/engine/display/skel/display-info.h
trunk/lib/engine/display/skel/display-manager.h
trunk/lib/engine/display/x/display-main-x.cpp
trunk/lib/engine/display/x/display-manager-x.cpp
trunk/lib/engine/engine.cpp
trunk/lib/engine/hal/dbus/hal-main-dbus.h
trunk/lib/engine/hal/dbus/hal-manager-dbus.h
trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.cpp
trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.h
trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.cpp
trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.h
trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.cpp
trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.h
trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp
trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h
trunk/lib/engine/vidinput/skel/vidinput-core.cpp
trunk/lib/engine/vidinput/skel/vidinput-core.h
trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.cpp
trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.h
trunk/lib/engine/vidinput/skel/vidinput-info.h
trunk/lib/engine/vidinput/skel/vidinput-manager.h
trunk/pixmaps/conv-icon.pl
trunk/pixmaps/icon.h
trunk/src/devices/videoinput.cpp
trunk/src/devices/videoinput.h
trunk/src/devices/videooutput.cpp
trunk/src/devices/videooutput.h
trunk/src/endpoints/opal-main.cpp
trunk/src/gui/assistant.cpp
trunk/src/gui/main.cpp
trunk/src/gui/preferences.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 Sun May 18 13:08:23 2008
@@ -35,9 +35,9 @@
#include "audioinput-manager-null.h"
-#define DEVICE_TYPE "NULL"
+#define DEVICE_TYPE "NULL"
#define DEVICE_SOURCE "NULL"
-#define DEVICE_DEVICE "NULL"
+#define DEVICE_NAME "NULL"
GMAudioInputManager_null::GMAudioInputManager_null (Ekiga::ServiceCore & _core)
: core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
@@ -50,7 +50,7 @@
Ekiga::AudioInputDevice device;
device.type = DEVICE_TYPE;
device.source = DEVICE_SOURCE;
- device.device = DEVICE_DEVICE;
+ device.name = DEVICE_NAME;
devices.push_back(device);
}
@@ -58,9 +58,9 @@
{
if ( ( device.type == DEVICE_TYPE ) &&
( device.source == DEVICE_SOURCE) &&
- ( device.device == DEVICE_DEVICE) ) {
+ ( device.name == DEVICE_NAME) ) {
- PTRACE(4, "GMAudioInputManager_null\tSetting Device " << device.source << "/" << device.device);
+ PTRACE(4, "GMAudioInputManager_null\tSetting Device " << device);
current_state.device = device;
return true;
}
@@ -71,7 +71,7 @@
{
Ekiga::AudioInputConfig audioinput_config;
- PTRACE(4, "GMAudioInputManager_null\tOpening Device " << current_state.device.source << "/" << current_state.device.device);
+ PTRACE(4, "GMAudioInputManager_null\tOpening Device " << current_state.device);
PTRACE(4, "GMAudioInputManager_null\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state.channels = channels;
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 Sun May 18 13:08:23 2008
@@ -70,7 +70,7 @@
for (PINDEX j = 0; devices_array[j] != NULL; j++) {
- device.device = devices_array[j];
+ device.name = devices_array[j];
devices.push_back(device);
}
free (devices_array);
@@ -83,7 +83,7 @@
{
if ( device.type == DEVICE_TYPE ) {
- PTRACE(4, "GMAudioInputManager_ptlib\tSetting Device " << device.source << "/" << device.device);
+ PTRACE(4, "GMAudioInputManager_ptlib\tSetting Device " << device);
current_state.device = device;
return true;
}
@@ -96,7 +96,7 @@
unsigned volume;
Ekiga::AudioInputConfig audioinput_config;
- PTRACE(4, "GMAudioInputManager_ptlib\tOpening Device " << current_state.device.source << "/" << current_state.device.device);
+ PTRACE(4, "GMAudioInputManager_ptlib\tOpening Device " << current_state.device);
PTRACE(4, "GMAudioInputManager_ptlib\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state.channels = channels;
@@ -104,7 +104,7 @@
current_state.bits_per_sample = bits_per_sample;
input_device = PSoundChannel::CreateOpenedChannel (current_state.device.source,
- current_state.device.device,
+ current_state.device.name,
PSoundChannel::Recorder,
channels,
samplerate,
@@ -133,7 +133,7 @@
void GMAudioInputManager_ptlib::close()
{
- PTRACE(4, "GMAudioInputManager_ptlib\tClosing device " << current_state.device.source << "/" << current_state.device.device);
+ PTRACE(4, "GMAudioInputManager_ptlib\tClosing device " << current_state.device);
if (input_device) {
delete input_device;
input_device = NULL;
@@ -188,7 +188,7 @@
if (source == "alsa") {
device.type = DEVICE_TYPE;
device.source = "ALSA";
- device.device = device_name;
+ device.name = device_name;
return true;
}
/* if (source == "oss") {
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 Sun May 18 13:08:23 2008
@@ -197,7 +197,7 @@
for (std::vector<AudioInputDevice>::iterator iter = audioinput_devices.begin ();
iter != audioinput_devices.end ();
iter++) {
- PTRACE(4, "AudioInputCore\tDetected Device: " << iter->type << "/" << iter->source << "/" << iter->device);
+ PTRACE(4, "AudioInputCore\tDetected Device: " << *iter);
}
}
@@ -369,7 +369,7 @@
void AudioInputCore::internal_set_audioinput_device(const AudioInputDevice & audioinput_device)
{
- PTRACE(4, "AudioInputCore\tSetting device: " << audioinput_device.type << "/" << audioinput_device.source << "/" << audioinput_device.device);
+ PTRACE(4, "AudioInputCore\tSetting device: " << audioinput_device);
if (preview_config.active)
preview_manager.stop();
@@ -432,7 +432,7 @@
}
else {
- PTRACE(1, "AudioInputCore\tTried to set unexisting device " << audioinput_device.type << "/" << audioinput_device.source << "/" << audioinput_device.device);
+ PTRACE(1, "AudioInputCore\tTried to set unexisting device " << audioinput_device);
internal_set_fallback();
}
}
@@ -464,10 +464,10 @@
void AudioInputCore::internal_set_fallback()
{
- PTRACE(1, "AudioInputCore\tFalling back to " << AUDIO_INPUT_FALLBACK_DEVICE_TYPE << "/" << AUDIO_INPUT_FALLBACK_DEVICE_SOURCE << "/" << AUDIO_INPUT_FALLBACK_DEVICE_DEVICE);
current_device.type = AUDIO_INPUT_FALLBACK_DEVICE_TYPE;
current_device.source = AUDIO_INPUT_FALLBACK_DEVICE_SOURCE;
- current_device.device = AUDIO_INPUT_FALLBACK_DEVICE_DEVICE;
+ current_device.name = AUDIO_INPUT_FALLBACK_DEVICE_NAME;
+ PTRACE(1, "AudioInputCore\tFalling back to " << current_device);
internal_set_device (current_device);
}
@@ -484,7 +484,7 @@
if ( ( desired_device.type == audioinput_device.type ) &&
( desired_device.source == audioinput_device.source ) &&
- ( desired_device.device == audioinput_device.device ) ) {
+ ( desired_device.name == audioinput_device.name ) ) {
internal_set_audioinput_device(desired_device);
}
@@ -505,12 +505,12 @@
if ((*iter)->has_device (source, device, audioinput_device)) {
if ( ( current_device.type == audioinput_device.type ) &&
( current_device.source == audioinput_device.source ) &&
- ( current_device.device == audioinput_device.device ) ) {
+ ( current_device.name == audioinput_device.name ) ) {
AudioInputDevice new_audioinput_device;
new_audioinput_device.type = AUDIO_INPUT_FALLBACK_DEVICE_TYPE;
new_audioinput_device.source = AUDIO_INPUT_FALLBACK_DEVICE_SOURCE;
- new_audioinput_device.device = AUDIO_INPUT_FALLBACK_DEVICE_DEVICE;
+ new_audioinput_device.name = AUDIO_INPUT_FALLBACK_DEVICE_NAME;
internal_set_audioinput_device( new_audioinput_device);
}
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 Sun May 18 13:08:23 2008
@@ -51,9 +51,9 @@
#include "ptbuildopts.h"
#include "ptlib.h"
-#define AUDIO_INPUT_FALLBACK_DEVICE_TYPE "NULL"
+#define AUDIO_INPUT_FALLBACK_DEVICE_TYPE "NULL"
#define AUDIO_INPUT_FALLBACK_DEVICE_SOURCE "NULL"
-#define AUDIO_INPUT_FALLBACK_DEVICE_DEVICE "NULL"
+#define AUDIO_INPUT_FALLBACK_DEVICE_NAME "NULL"
namespace Ekiga
{
Modified: trunk/lib/engine/audioinput/skel/audioinput-gmconf-bridge.cpp
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-gmconf-bridge.cpp (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-gmconf-bridge.cpp Sun May 18 13:08:23 2008
@@ -62,31 +62,24 @@
PTRACE(4, "AudioInputCoreConfBridge\tUpdating device");
- AudioInputDevice audioinput_device;
+ AudioInputDevice device;
if (gm_conf_entry_get_string (entry) == NULL) {
PTRACE(1, "AudioInputCoreConfBridge\t" << AUDIO_DEVICES_KEY "input_device" << " is NULL");
}
else {
- std::string config_string = gm_conf_entry_get_string (entry);
-
- unsigned type_sep = config_string.find_first_of("/");
- unsigned source_sep = config_string.find_first_of("/", type_sep + 1);
-
- audioinput_device.type = config_string.substr ( 0, type_sep );
- audioinput_device.source = config_string.substr ( type_sep + 1, source_sep - type_sep - 1);
- audioinput_device.device = config_string.substr ( source_sep + 1, config_string.size() - source_sep );
+ device.SetFromString(gm_conf_entry_get_string (entry));
}
- if ( (audioinput_device.type == "" ) ||
- (audioinput_device.source == "") ||
- (audioinput_device.device == "" ) ) {
+ if ( (device.type == "" ) ||
+ (device.source == "") ||
+ (device.name == "" ) ) {
PTRACE(1, "AudioInputCore\tTried to set malformed device");
- audioinput_device.type = AUDIO_INPUT_FALLBACK_DEVICE_TYPE;
- audioinput_device.source = AUDIO_INPUT_FALLBACK_DEVICE_SOURCE;
- audioinput_device.device = AUDIO_INPUT_FALLBACK_DEVICE_DEVICE;
+ device.type = AUDIO_INPUT_FALLBACK_DEVICE_TYPE;
+ device.source = AUDIO_INPUT_FALLBACK_DEVICE_SOURCE;
+ device.name = AUDIO_INPUT_FALLBACK_DEVICE_NAME;
}
- audioinput_core.set_audioinput_device (audioinput_device);
+ audioinput_core.set_audioinput_device (device);
}
}
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 Sun May 18 13:08:23 2008
@@ -36,14 +36,13 @@
#ifndef __AUDIOINPUT_INFO_H__
#define __AUDIOINPUT_INFO_H__
+
+#include "device-def.h"
#include <string>
+
namespace Ekiga
{
- typedef struct AudioInputDevice {
- std::string type;
- std::string source;
- std::string device;
- };
+ class AudioInputDevice : public Device {};
typedef struct AudioInputConfig {
unsigned volume;
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 Sun May 18 13:08:23 2008
@@ -37,7 +37,7 @@
#define DEVICE_TYPE "NULL"
#define DEVICE_SOURCE "NULL"
-#define DEVICE_DEVICE "NULL"
+#define DEVICE_NAME "NULL"
GMAudioOutputManager_null::GMAudioOutputManager_null (Ekiga::ServiceCore & _core)
: core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
@@ -51,7 +51,7 @@
Ekiga::AudioOutputDevice device;
device.type = DEVICE_TYPE;
device.source = DEVICE_SOURCE;
- device.device = DEVICE_DEVICE;
+ device.name = DEVICE_NAME;
devices.push_back(device);
}
@@ -60,9 +60,9 @@
{
if ( ( device.type == DEVICE_TYPE ) &&
( device.source == DEVICE_SOURCE) &&
- ( device.device == DEVICE_DEVICE) ) {
+ ( device.name == DEVICE_NAME) ) {
- PTRACE(4, "GMAudioOutputManager_null\tSetting Device[" << primarySecondary << "] " << device.source << "/" << device.device);
+ PTRACE(4, "GMAudioOutputManager_null\tSetting Device[" << primarySecondary << "] " << device);
current_state[primarySecondary].device = device;
return true;
}
@@ -73,7 +73,7 @@
{
Ekiga::AudioOutputConfig audiooutput_config;
- PTRACE(4, "GMAudioOutputManager_null\tOpening Device[" << primarySecondary << "] " << current_state[primarySecondary].device.source << "/" << current_state[primarySecondary].device.device);
+ PTRACE(4, "GMAudioOutputManager_null\tOpening Device[" << primarySecondary << "] " << current_state[primarySecondary].device);
PTRACE(4, "GMAudioOutputManager_null\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state[primarySecondary].channels = channels;
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 Sun May 18 13:08:23 2008
@@ -71,7 +71,7 @@
for (PINDEX j = 0; devices_array[j] != NULL; j++) {
- device.device = devices_array[j];
+ device.name = devices_array[j];
devices.push_back(device);
}
free (devices_array);
@@ -84,7 +84,7 @@
{
if ( device.type == DEVICE_TYPE ) {
- PTRACE(4, "GMAudioOutputManager_ptlib\tSetting Device[" << primarySecondary << "] " << device.source << "/" << device.device);
+ PTRACE(4, "GMAudioOutputManager_ptlib\tSetting Device[" << primarySecondary << "] " << device);
current_state[primarySecondary].device = device;
return true;
}
@@ -97,7 +97,7 @@
unsigned volume;
Ekiga::AudioOutputConfig audiooutput_config;
- PTRACE(4, "GMAudioOutputManager_ptlib\tOpening Device " << current_state[primarySecondary].device.source << "/" << current_state[primarySecondary].device.device);
+ PTRACE(4, "GMAudioOutputManager_ptlib\tOpening Device " << current_state[primarySecondary].device);
PTRACE(4, "GMAudioOutputManager_ptlib\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state[primarySecondary].channels = channels;
@@ -105,7 +105,7 @@
current_state[primarySecondary].bits_per_sample = bits_per_sample;
output_device[primarySecondary] = PSoundChannel::CreateOpenedChannel (current_state[primarySecondary].device.source,
- current_state[primarySecondary].device.device,
+ current_state[primarySecondary].device.name,
PSoundChannel::Player,
channels,
samplerate,
@@ -134,7 +134,7 @@
void GMAudioOutputManager_ptlib::close(Ekiga::AudioOutputPrimarySecondary primarySecondary)
{
- PTRACE(4, "GMAudioOutputManager_ptlib\tClosing device[" << primarySecondary << "] " << current_state[primarySecondary].device.source << "/" << current_state[primarySecondary].device.device);
+ PTRACE(4, "GMAudioOutputManager_ptlib\tClosing device[" << primarySecondary << "] " << current_state[primarySecondary].device);
if (output_device[primarySecondary]) {
delete output_device[primarySecondary];
output_device[primarySecondary] = NULL;
@@ -191,7 +191,7 @@
if (sink == "alsa") {
device.type = DEVICE_TYPE;
device.source = "ALSA";
- device.device = device_name;
+ device.name = device_name;
return true;
}
/* if (source == "oss") {
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 Sun May 18 13:08:23 2008
@@ -147,7 +147,7 @@
for (std::vector<AudioOutputDevice>::iterator iter = audiooutput_devices.begin ();
iter != audiooutput_devices.end ();
iter++) {
- PTRACE(4, "AudioOutputCore\tDetected Device: " << iter->type << "/" << iter->source << "/" << iter->device);
+ PTRACE(4, "AudioOutputCore\tDetected Device: " << *iter);
}
}
@@ -155,7 +155,7 @@
void AudioOutputCore::set_audiooutput_device(AudioOutputPrimarySecondary primarySecondary, const AudioOutputDevice & audiooutput_device)
{
- PTRACE(4, "AudioOutputCore\tSetting device[" << primarySecondary << "]: " << audiooutput_device.type << "/" << audiooutput_device.source << "/" << audiooutput_device.device);
+ PTRACE(4, "AudioOutputCore\tSetting device[" << primarySecondary << "]: " << audiooutput_device);
PWaitAndSignal m_sec(var_mutex[secondary]);
@@ -170,12 +170,12 @@
case secondary:
if ( (audiooutput_device.type == current_device[primary].type) &&
(audiooutput_device.source == current_device[primary].source) &&
- (audiooutput_device.device == current_device[primary].device) )
+ (audiooutput_device.name == current_device[primary].name) )
{
current_manager[secondary] = NULL;
current_device[secondary].type = "";
current_device[secondary].source = "";
- current_device[secondary].device = "";
+ current_device[secondary].name = "";
}
else {
internal_set_device (secondary, audiooutput_device);
@@ -299,12 +299,12 @@
if ( (audiooutput_device.type == current_device[secondary].type) &&
(audiooutput_device.source == current_device[secondary].source) &&
- (audiooutput_device.device == current_device[secondary].device) )
+ (audiooutput_device.name == current_device[secondary].name) )
{
current_manager[secondary] = NULL;
current_device[secondary].type = "";
current_device[secondary].source = "";
- current_device[secondary].device = "";
+ current_device[secondary].name = "";
}
internal_set_device(primary, audiooutput_device);
@@ -333,14 +333,14 @@
}
else {
if (primarySecondary == primary) {
- PTRACE(1, "AudioOutputCore\tTried to set unexisting primary device " << audiooutput_device.type << "/" << audiooutput_device.source << "/" << audiooutput_device.device);
+ PTRACE(1, "AudioOutputCore\tTried to set unexisting primary device " << audiooutput_device);
internal_set_primary_fallback();
}
else {
- PTRACE(1, "AudioOutputCore\tTried to set unexisting secondary device " << audiooutput_device.type << "/" << audiooutput_device.source << "/" << audiooutput_device.device);
+ PTRACE(1, "AudioOutputCore\tTried to set unexisting secondary device " << audiooutput_device);
current_device[secondary].type = "";
current_device[secondary].source = "";
- current_device[secondary].device = "";
+ current_device[secondary].name = "";
}
}
@@ -444,10 +444,10 @@
void AudioOutputCore::internal_set_primary_fallback()
{
- PTRACE(1, "AudioOutputCore\tFalling back to " << AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE << "/" << AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE << "/" << AUDIO_OUTPUT_FALLBACK_DEVICE_DEVICE);
- current_device[primary].type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
+ current_device[primary].type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
current_device[primary].source = AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE;
- current_device[primary].device = AUDIO_OUTPUT_FALLBACK_DEVICE_DEVICE;
+ current_device[primary].name = AUDIO_OUTPUT_FALLBACK_DEVICE_NAME;
+ PTRACE(1, "AudioOutputCore\tFalling back to " << current_device[primary]);
internal_set_device(primary, current_device[primary]);
}
@@ -464,7 +464,7 @@
if ( ( desired_primary_device.type == audiooutput_device.type ) &&
( desired_primary_device.source == audiooutput_device.source ) &&
- ( desired_primary_device.device == audiooutput_device.device ) ) {
+ ( desired_primary_device.name == audiooutput_device.name ) ) {
internal_set_prim_audiooutput_device(desired_primary_device);
}
@@ -485,12 +485,12 @@
if ((*iter)->has_device (sink, device, audiooutput_device)) {
if ( (audiooutput_device.type == current_device[primary].type) &&
(audiooutput_device.source == current_device[primary].source) &&
- (audiooutput_device.device == current_device[primary].device) ) {
+ (audiooutput_device.name == current_device[primary].name) ) {
AudioOutputDevice new_audiooutput_device;
- new_audiooutput_device.type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
+ new_audiooutput_device.type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
new_audiooutput_device.source = AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE;
- new_audiooutput_device.device = AUDIO_OUTPUT_FALLBACK_DEVICE_DEVICE;
+ new_audiooutput_device.name = AUDIO_OUTPUT_FALLBACK_DEVICE_NAME;
internal_set_prim_audiooutput_device(new_audiooutput_device);
}
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 Sun May 18 13:08:23 2008
@@ -53,7 +53,7 @@
#define AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE "NULL"
#define AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE "NULL"
-#define AUDIO_OUTPUT_FALLBACK_DEVICE_DEVICE "NULL"
+#define AUDIO_OUTPUT_FALLBACK_DEVICE_NAME "NULL"
namespace Ekiga
{
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-gmconf-bridge.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-gmconf-bridge.cpp (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-gmconf-bridge.cpp Sun May 18 13:08:23 2008
@@ -79,61 +79,48 @@
PTRACE(4, "AudioOutputCoreConfBridge\tUpdating device");
- AudioOutputDevice audiooutput_device;
+ AudioOutputDevice device;
if (gm_conf_entry_get_string (entry) == NULL) {
PTRACE(1, "AudioOutputCoreConfBridge\t" << AUDIO_DEVICES_KEY "output_device" << " is NULL");
}
else {
- std::string config_string = gm_conf_entry_get_string (entry);
- unsigned type_sep = config_string.find_first_of("/");
- unsigned source_sep = config_string.find_first_of("/", type_sep + 1);
-
- audiooutput_device.type = config_string.substr ( 0, type_sep );
- audiooutput_device.source = config_string.substr ( type_sep + 1, source_sep - type_sep - 1);
- audiooutput_device.device = config_string.substr ( source_sep + 1, config_string.size() - source_sep );
+ device.SetFromString(gm_conf_entry_get_string (entry));
}
- if ( (audiooutput_device.type == "" ) ||
- (audiooutput_device.source == "") ||
- (audiooutput_device.device == "" ) ) {
+ if ( (device.type == "" ) ||
+ (device.source == "") ||
+ (device.name == "" ) ) {
PTRACE(1, "AudioOutputCore\tTried to set malformed device");
- audiooutput_device.type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
- audiooutput_device.source = AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE;
- audiooutput_device.device = AUDIO_OUTPUT_FALLBACK_DEVICE_DEVICE;
+ device.type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
+ device.source = AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE;
+ device.name = AUDIO_OUTPUT_FALLBACK_DEVICE_NAME;
}
- audioinput_core.set_audiooutput_device (primary, audiooutput_device);
+ audioinput_core.set_audiooutput_device (primary, device);
}
if (key == SOUND_EVENTS_KEY "output_device") {
PTRACE(4, "AudioOutputCoreConfBridge\tUpdating device");
- AudioOutputDevice audiooutput_device;
+ AudioOutputDevice device;
if (gm_conf_entry_get_string (entry) == NULL) {
PTRACE(1, "AudioOutputCoreConfBridge\t" << AUDIO_DEVICES_KEY "output_device" << " is NULL");
}
else {
- std::string config_string = gm_conf_entry_get_string (entry);
-
- unsigned type_sep = config_string.find_first_of("/");
- unsigned source_sep = config_string.find_first_of("/", type_sep + 1);
-
- audiooutput_device.type = config_string.substr ( 0, type_sep );
- audiooutput_device.source = config_string.substr ( type_sep + 1, source_sep - type_sep - 1);
- audiooutput_device.device = config_string.substr ( source_sep + 1, config_string.size() - source_sep );
+ device.SetFromString(gm_conf_entry_get_string (entry));
}
- if ( (audiooutput_device.type == "" ) ||
- (audiooutput_device.source == "") ||
- (audiooutput_device.device == "" ) ) {
+ if ( (device.type == "" ) ||
+ (device.source == "") ||
+ (device.name == "" ) ) {
PTRACE(1, "AudioOutputCore\tTried to set malformed device");
- audiooutput_device.type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
- audiooutput_device.source = AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE;
- audiooutput_device.device = AUDIO_OUTPUT_FALLBACK_DEVICE_DEVICE;
+ device.type = AUDIO_OUTPUT_FALLBACK_DEVICE_TYPE;
+ device.source = AUDIO_OUTPUT_FALLBACK_DEVICE_SOURCE;
+ device.name = AUDIO_OUTPUT_FALLBACK_DEVICE_NAME;
}
- audioinput_core.set_audiooutput_device (secondary, audiooutput_device);
+ audioinput_core.set_audiooutput_device (secondary, device);
}
if ( (key == SOUND_EVENTS_KEY "busy_tone_sound") ||
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 Sun May 18 13:08:23 2008
@@ -37,13 +37,11 @@
#ifndef __AUDIOOUTPUT_INFO_H__
#define __AUDIOOUTPUT_INFO_H__
+#include "device-def.h"
+
namespace Ekiga
{
- typedef struct AudioOutputDevice {
- std::string type;
- std::string source;
- std::string device;
- };
+ class AudioOutputDevice : public Device {};
typedef struct AudioOutputConfig {
unsigned volume;
Modified: trunk/lib/engine/display/common/display-manager-common.cpp
==============================================================================
--- trunk/lib/engine/display/common/display-manager-common.cpp (original)
+++ trunk/lib/engine/display/common/display-manager-common.cpp Sun May 18 13:08:23 2008
@@ -138,14 +138,14 @@
if (devices_nbr <= 1) {
if (!local)
- local_display_info.display = REMOTE_VIDEO;
+ local_display_info.mode = REMOTE_VIDEO;
else
- local_display_info.display = LOCAL_VIDEO;
+ local_display_info.mode = LOCAL_VIDEO;
- runtime.run_in_main (sigc::bind (display_mode_changed.make_slot (), local_display_info.display));
+ runtime.run_in_main (sigc::bind (videooutput_mode_changed.make_slot (), local_display_info.mode));
}
- current_frame.display = local_display_info.display;
+ current_frame.mode = local_display_info.mode;
current_frame.zoom = local_display_info.zoom;
first_frame_received = true;
@@ -176,15 +176,15 @@
var_mutex.Signal();
- if ((local_display_info.display == UNSET) || (local_display_info.zoom == 0) || (!local_display_info.config_info_set)) {
+ if ((local_display_info.mode == UNSET) || (local_display_info.zoom == 0) || (!local_display_info.config_info_set)) {
PTRACE(4, "GMVideoOutputManager\tDisplay and zoom variable not set yet, not opening display");
return;
}
- if ((local_display_info.display == LOCAL_VIDEO) && !local)
+ if ((local_display_info.mode == LOCAL_VIDEO) && !local)
return;
- if ((local_display_info.display == REMOTE_VIDEO) && local)
+ if ((local_display_info.mode == REMOTE_VIDEO) && local)
return;
run_thread.Signal();
@@ -194,7 +194,7 @@
void GMVideoOutputManager::init()
{
/* State for last frame */
- last_frame.display = UNSET;
+ last_frame.mode = UNSET;
last_frame.local_width = 0;
last_frame.local_height = 0;
last_frame.remote_width = 0;
@@ -230,15 +230,15 @@
get_display_info(local_display_info);
if ((!local_display_info.widget_info_set) || (!local_display_info.config_info_set) ||
- (local_display_info.display == UNSET) || (local_display_info.zoom == 0)) {
+ (local_display_info.mode == UNSET) || (local_display_info.zoom == 0)) {
PTRACE(4, "GMVideoOutputManager\tWidget not yet realized or gconf info not yet set, not opening display");
return false;
}
- if ( last_frame.display != current_frame.display || last_frame.zoom != current_frame.zoom )
+ if ( last_frame.mode != current_frame.mode || last_frame.zoom != current_frame.zoom )
return true;
- switch (current_frame.display) {
+ switch (current_frame.mode) {
case LOCAL_VIDEO:
return ( last_frame.local_width != current_frame.local_width || last_frame.local_height != current_frame.local_height
|| local_display_info.x != last_frame.embedded_x || local_display_info.y != last_frame.embedded_y );
@@ -275,7 +275,7 @@
if (frame_display_change_needed ())
setup_frame_display ();
- switch (current_frame.display)
+ switch (current_frame.mode)
{
case LOCAL_VIDEO:
if (lframeStore.GetSize() > 0)
Modified: trunk/lib/engine/display/common/display-manager-common.h
==============================================================================
--- trunk/lib/engine/display/common/display-manager-common.h (original)
+++ trunk/lib/engine/display/common/display-manager-common.h Sun May 18 13:08:23 2008
@@ -54,7 +54,7 @@
typedef struct {
- DisplayMode display;
+ VideoOutputMode mode;
unsigned int remote_width;
unsigned int remote_height;
Modified: trunk/lib/engine/display/dx/display-main-dx.cpp
==============================================================================
--- trunk/lib/engine/display/dx/display-main-dx.cpp (original)
+++ trunk/lib/engine/display/dx/display-main-dx.cpp Sun May 18 13:08:23 2008
@@ -45,16 +45,16 @@
char **/*argv*/[])
{
bool result = false;
- Ekiga::DisplayCore *display_core = NULL;
+ Ekiga::VideoOutputCore *videooutput_core = NULL;
- display_core
- = dynamic_cast<Ekiga::DisplayCore*>(core.get ("display-core"));
+ videooutput_core
+ = dynamic_cast<Ekiga::VideoOutputCore*>(core.get ("videooutput-core"));
- if (display_core != NULL) {
+ if (videooutput_core != NULL) {
GMVideoOutputManager_dx *videooutput_manager = new GMVideoOutputManager_dx(core);
- display_core->add_manager (*videooutput_manager);
+ videooutput_core->add_manager (*videooutput_manager);
result = true;
}
Modified: trunk/lib/engine/display/dx/display-manager-dx.cpp
==============================================================================
--- trunk/lib/engine/display/dx/display-manager-dx.cpp (original)
+++ trunk/lib/engine/display/dx/display-manager-dx.cpp Sun May 18 13:08:23 2008
@@ -72,7 +72,7 @@
// runtime.run_in_main (force_redraw.make_slot ()); //FIXME: check
- switch (current_frame.display) {
+ switch (current_frame.mode) {
case LOCAL_VIDEO:
runtime.run_in_main (sigc::bind (display_size_changed.make_slot (), (unsigned) (current_frame.local_width * current_frame.zoom / 100), (unsigned) (current_frame.local_height * current_frame.zoom / 100)));
break;
@@ -94,22 +94,22 @@
}
if ( (!local_display_info.widget_info_set) || (!local_display_info.config_info_set)
- || (local_display_info.display == UNSET) || (local_display_info.zoom == 0) || (current_frame.zoom == 0)) {
+ || (local_display_info.mode == UNSET) || (local_display_info.zoom == 0) || (current_frame.zoom == 0)) {
PTRACE(4, "GMVideoOutputManager_DX\tWidget not yet realized or gconf info not yet set, not opening display");
return;
}
close_frame_display ();
- runtime.run_in_main (sigc::bind (display_mode_changed.make_slot (), current_frame.display));
+ runtime.run_in_main (sigc::bind (videooutput_mode_changed.make_slot (), current_frame.mode));
- HwAccelStatus hw_accel_status = NONE;
+ VideoOutputAccel videooutput_accel = VO_ACCEL_NONE;
- switch (current_frame.display) {
+ switch (current_frame.mode) {
case LOCAL_VIDEO:
PTRACE(4, "GMVideoOutputManager_DX\tOpening LOCAL_VIDEO display with image of " << current_frame.local_width << "x" << current_frame.local_height);
dxWindow = new DXWindow();
- hw_accel_status = (HwAccelStatus) dxWindow->Init (local_display_info.hwnd,
+ videooutput_accel = (VideoOutputAccel) dxWindow->Init (local_display_info.hwnd,
local_display_info.x,
local_display_info.y,
(int) (current_frame.local_width * current_frame.zoom / 100),
@@ -120,7 +120,7 @@
last_frame.embedded_x = local_display_info.x;
last_frame.embedded_y = local_display_info.y;
- last_frame.display = LOCAL_VIDEO;
+ last_frame.mode = LOCAL_VIDEO;
last_frame.local_width = current_frame.local_width;
last_frame.local_height = current_frame.local_height;
last_frame.zoom = current_frame.zoom;
@@ -129,7 +129,7 @@
case REMOTE_VIDEO:
PTRACE(4, "GMVideoOutputManager_DX\tOpening REMOTE_VIDEO display with image of " << current_frame.remote_width << "x" << current_frame.remote_height);
dxWindow = new DXWindow();
- hw_accel_status = (HwAccelStatus) dxWindow->Init (local_display_info.hwnd,
+ videooutput_accel = (VideoOutputAccel) dxWindow->Init (local_display_info.hwnd,
local_display_info.x,
local_display_info.y,
(int) (current_frame.remote_width * current_frame.zoom / 100),
@@ -140,7 +140,7 @@
last_frame.embedded_x = local_display_info.x;
last_frame.embedded_y = local_display_info.y;
- last_frame.display = REMOTE_VIDEO;
+ last_frame.mode = REMOTE_VIDEO;
last_frame.remote_width = current_frame.remote_width;
last_frame.remote_height = current_frame.remote_height;
last_frame.zoom = current_frame.zoom;
@@ -149,13 +149,13 @@
case FULLSCREEN:
case PIP:
case PIP_WINDOW:
- PTRACE(4, "GMVideoOutputManager_DX\tOpening display " << current_frame.display << " with images of "
+ PTRACE(4, "GMVideoOutputManager_DX\tOpening display " << current_frame.mode << " with images of "
<< current_frame.local_width << "x" << current_frame.local_height << "(local) and "
<< current_frame.remote_width << "x" << current_frame.remote_height << "(remote)");
dxWindow = new DXWindow();
- hw_accel_status = (HwAccelStatus) dxWindow->Init ((current_frame.display == PIP) ? local_display_info.hwnd : NULL,
- (current_frame.display == PIP) ? local_display_info.x : 0,
- (current_frame.display == PIP) ? local_display_info.y : 0,
+ videooutput_accel = (VideoOutputAccel) dxWindow->Init ((current_frame.mode == PIP) ? local_display_info.hwnd : NULL,
+ (current_frame.mode == PIP) ? local_display_info.x : 0,
+ (current_frame.mode == PIP) ? local_display_info.y : 0,
(int) (current_frame.remote_width * current_frame.zoom / 100),
(int) (current_frame.remote_height * current_frame.zoom / 100),
current_frame.remote_width,
@@ -163,13 +163,13 @@
current_frame.local_width,
current_frame.local_height);
- if (dxWindow && current_frame.display == FULLSCREEN)
+ if (dxWindow && current_frame.mode == FULLSCREEN)
dxWindow->ToggleFullscreen ();
last_frame.embedded_x = local_display_info.x;
last_frame.embedded_y = local_display_info.y;
- last_frame.display = current_frame.display;
+ last_frame.mode = current_frame.mode;
last_frame.local_width = current_frame.local_width;
last_frame.local_height = current_frame.local_height;
last_frame.remote_width = current_frame.remote_width;
@@ -182,7 +182,7 @@
return;
break;
}
- PTRACE (4, "GMVideoDisplay_DX\tSetup display " << current_frame.display << " with zoom value of " << current_frame.zoom );
+ PTRACE (4, "GMVideoDisplay_DX\tSetup display " << current_frame.mode << " with zoom value of " << current_frame.zoom );
if (local_display_info.on_top && dxWindow)
dxWindow->ToggleOntop ();
@@ -190,7 +190,7 @@
// if (!status)
// close_frame_display ();
- runtime.run_in_main (sigc::bind (device_opened.make_slot (), hw_accel_status));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), videooutput_accel));
}
void
@@ -227,7 +227,7 @@
if (dxWindow)
dxWindow->ProcessEvents();
- if (current_frame.display == FULLSCREEN && dxWindow && !dxWindow->IsFullScreen ())
+ if (current_frame.mode == FULLSCREEN && dxWindow && !dxWindow->IsFullScreen ())
runtime.run_in_main (sigc::bind (fullscreen_mode_changed.make_slot (), OFF));
if (dxWindow) {
Modified: trunk/lib/engine/display/skel/display-core.cpp
==============================================================================
--- trunk/lib/engine/display/skel/display-core.cpp (original)
+++ trunk/lib/engine/display/skel/display-core.cpp Sun May 18 13:08:23 2008
@@ -46,19 +46,19 @@
using namespace Ekiga;
-DisplayCore::DisplayCore ()
+VideoOutputCore::VideoOutputCore ()
{
PWaitAndSignal m(var_mutex);
- display_stats.rx_width = display_stats.rx_height = display_stats.rx_fps = 0;
- display_stats.tx_width = display_stats.tx_height = display_stats.tx_fps = 0;
- display_stats.rx_frames = 0;
- display_stats.tx_frames = 0;
+ videooutput_stats.rx_width = videooutput_stats.rx_height = videooutput_stats.rx_fps = 0;
+ videooutput_stats.tx_width = videooutput_stats.tx_height = videooutput_stats.tx_fps = 0;
+ videooutput_stats.rx_frames = 0;
+ videooutput_stats.tx_frames = 0;
number_times_started = 0;
- display_core_conf_bridge = NULL;
+ videooutput_core_conf_bridge = NULL;
}
-DisplayCore::~DisplayCore ()
+VideoOutputCore::~VideoOutputCore ()
{
#ifdef __GNUC__
std::cout << __PRETTY_FUNCTION__ << std::endl;
@@ -66,34 +66,34 @@
PWaitAndSignal m(var_mutex);
- if (display_core_conf_bridge)
- delete display_core_conf_bridge;
+ if (videooutput_core_conf_bridge)
+ delete videooutput_core_conf_bridge;
}
-void DisplayCore::setup_conf_bridge ()
+void VideoOutputCore::setup_conf_bridge ()
{
PWaitAndSignal m(var_mutex);
- display_core_conf_bridge = new DisplayCoreConfBridge (*this);
+ videooutput_core_conf_bridge = new VideoOutputCoreConfBridge (*this);
}
-void DisplayCore::add_manager (VideoOutputManager &manager)
+void VideoOutputCore::add_manager (VideoOutputManager &manager)
{
PWaitAndSignal m(var_mutex);
managers.insert (&manager);
manager_added.emit (manager);
- manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &DisplayCore::on_device_opened), &manager));
- manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &DisplayCore::on_device_closed), &manager));
- manager.display_mode_changed.connect (sigc::bind (sigc::mem_fun (this, &DisplayCore::on_display_mode_changed), &manager));
- manager.fullscreen_mode_changed.connect (sigc::bind (sigc::mem_fun (this, &DisplayCore::on_fullscreen_mode_changed), &manager));
- manager.display_size_changed.connect (sigc::bind (sigc::mem_fun (this, &DisplayCore::on_display_size_changed), &manager));
- manager.logo_update_required.connect (sigc::bind (sigc::mem_fun (this, &DisplayCore::on_logo_update_required), &manager));
+ manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &VideoOutputCore::on_device_opened), &manager));
+ manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &VideoOutputCore::on_device_closed), &manager));
+ manager.videooutput_mode_changed.connect (sigc::bind (sigc::mem_fun (this, &VideoOutputCore::on_videooutput_mode_changed), &manager));
+ manager.fullscreen_mode_changed.connect (sigc::bind (sigc::mem_fun (this, &VideoOutputCore::on_fullscreen_mode_changed), &manager));
+ manager.display_size_changed.connect (sigc::bind (sigc::mem_fun (this, &VideoOutputCore::on_display_size_changed), &manager));
+ manager.logo_update_required.connect (sigc::bind (sigc::mem_fun (this, &VideoOutputCore::on_logo_update_required), &manager));
}
-void DisplayCore::visit_managers (sigc::slot<bool, VideoOutputManager &> visitor)
+void VideoOutputCore::visit_managers (sigc::slot<bool, VideoOutputManager &> visitor)
{
bool go_on = true;
@@ -104,7 +104,7 @@
}
-void DisplayCore::start ()
+void VideoOutputCore::start ()
{
PWaitAndSignal m(var_mutex);
@@ -121,7 +121,7 @@
}
}
-void DisplayCore::stop ()
+void VideoOutputCore::stop ()
{
PWaitAndSignal m(var_mutex);
@@ -140,13 +140,13 @@
iter++) {
(*iter)->close ();
}
- display_stats.rx_width = display_stats.rx_height = display_stats.rx_fps = 0;
- display_stats.tx_width = display_stats.tx_height = display_stats.tx_fps = 0;
- display_stats.rx_frames = 0;
- display_stats.tx_frames = 0;
+ videooutput_stats.rx_width = videooutput_stats.rx_height = videooutput_stats.rx_fps = 0;
+ videooutput_stats.tx_width = videooutput_stats.tx_height = videooutput_stats.tx_fps = 0;
+ videooutput_stats.rx_frames = 0;
+ videooutput_stats.tx_frames = 0;
}
-void DisplayCore::set_frame_data (const char *data,
+void VideoOutputCore::set_frame_data (const char *data,
unsigned width,
unsigned height,
bool local,
@@ -155,14 +155,14 @@
var_mutex.Wait ();
if (local) {
- display_stats.tx_frames++;
- display_stats.tx_width = width;
- display_stats.tx_height = height;
+ videooutput_stats.tx_frames++;
+ videooutput_stats.tx_width = width;
+ videooutput_stats.tx_height = height;
}
else {
- display_stats.rx_frames++;
- display_stats.rx_width = width;
- display_stats.rx_height = height;
+ videooutput_stats.rx_frames++;
+ videooutput_stats.rx_width = width;
+ videooutput_stats.rx_height = height;
}
GTimeVal current_time;
@@ -172,10 +172,10 @@
+ ((current_time.tv_usec - last_stats.tv_usec) / 1000);
if (milliseconds > 2000) {
- display_stats.tx_fps = round ((display_stats.tx_frames * 1000) / milliseconds);
- display_stats.rx_fps = round ((display_stats.rx_frames * 1000) / milliseconds);
- display_stats.rx_frames = 0;
- display_stats.tx_frames = 0;
+ videooutput_stats.tx_fps = round ((videooutput_stats.tx_frames * 1000) / milliseconds);
+ videooutput_stats.rx_fps = round ((videooutput_stats.rx_frames * 1000) / milliseconds);
+ videooutput_stats.rx_frames = 0;
+ videooutput_stats.tx_frames = 0;
g_get_current_time (&last_stats);
}
@@ -188,7 +188,7 @@
}
}
-void DisplayCore::set_display_info (const DisplayInfo & _display_info)
+void VideoOutputCore::set_display_info (const DisplayInfo & _display_info)
{
PWaitAndSignal m(var_mutex);
@@ -200,32 +200,32 @@
}
-void DisplayCore::on_device_opened (HwAccelStatus hw_accel_status, VideoOutputManager *manager)
+void VideoOutputCore::on_device_opened (VideoOutputAccel videooutput_accel, VideoOutputManager *manager)
{
- device_opened.emit (*manager, hw_accel_status);
+ device_opened.emit (*manager, videooutput_accel);
}
-void DisplayCore::on_device_closed ( VideoOutputManager *manager)
+void VideoOutputCore::on_device_closed ( VideoOutputManager *manager)
{
device_closed.emit (*manager);
}
-void DisplayCore::on_display_mode_changed (DisplayMode display, VideoOutputManager *manager)
+void VideoOutputCore::on_videooutput_mode_changed (VideoOutputMode mode, VideoOutputManager *manager)
{
- display_mode_changed.emit (*manager, display);
+ videooutput_mode_changed.emit (*manager, mode);
}
-void DisplayCore::on_fullscreen_mode_changed ( FSToggle toggle, VideoOutputManager *manager)
+void VideoOutputCore::on_fullscreen_mode_changed ( FSToggle toggle, VideoOutputManager *manager)
{
fullscreen_mode_changed.emit (*manager, toggle);
}
-void DisplayCore::on_display_size_changed ( unsigned width, unsigned height, VideoOutputManager *manager)
+void VideoOutputCore::on_display_size_changed ( unsigned width, unsigned height, VideoOutputManager *manager)
{
display_size_changed.emit (*manager, width, height);
}
-void DisplayCore::on_logo_update_required (VideoOutputManager *manager)
+void VideoOutputCore::on_logo_update_required (VideoOutputManager *manager)
{
logo_update_required.emit (*manager);
}
Modified: trunk/lib/engine/display/skel/display-core.h
==============================================================================
--- trunk/lib/engine/display/skel/display-core.h (original)
+++ trunk/lib/engine/display/skel/display-core.h Sun May 18 13:08:23 2008
@@ -34,8 +34,8 @@
*
*/
-#ifndef __DISPLAY_CORE_H__
-#define __DISPLAY_CORE_H__
+#ifndef __VIDEOOUTPUT_CORE_H__
+#define __VIDEOOUTPUT_CORE_H__
#include "services.h"
@@ -56,7 +56,7 @@
{
/**
- * @defgroup display Video Display
+ * @defgroup videooutput
* @{
*/
@@ -64,7 +64,7 @@
/** Core object for the video display support
*/
- class DisplayCore
+ class VideoOutputCore
: public Service
{
@@ -72,11 +72,11 @@
/* The constructor
*/
- DisplayCore ();
+ VideoOutputCore ();
/* The destructor
*/
- ~DisplayCore ();
+ ~VideoOutputCore ();
void setup_conf_bridge();
@@ -86,28 +86,28 @@
* @return The service name.
*/
const std::string get_name () const
- { return "display-core"; }
+ { return "videooutput-core"; }
/** Returns the description of the service.
* @return The service description.
*/
const std::string get_description () const
- { return "\tDisplay Core managing Display Manager objects"; }
+ { return "VideoOutput Core managing VideoOutput Manager objects"; }
- /** Adds a VideoOutputManager to the DisplayCore service.
+ /** Adds a VideoOutputManager to the VideoOutputCore service.
* @param The manager to be added.
*/
void add_manager (VideoOutputManager &manager);
/** Triggers a callback for all Ekiga::VideoOutputManager sources of the
- * DisplayCore service.
+ * VideoOutputCore service.
*/
void visit_managers (sigc::slot<bool, VideoOutputManager &> visitor);
/** This signal is emitted when a Ekiga::VideoOutputManager has been
- * added to the DisplayCore Service.
+ * added to the VideoOutputCore Service.
*/
sigc::signal<void, VideoOutputManager &> manager_added;
@@ -130,35 +130,35 @@
/** See display-manager.h for the API
*/
- sigc::signal<void, VideoOutputManager &, HwAccelStatus> device_opened;
+ sigc::signal<void, VideoOutputManager &, VideoOutputAccel> device_opened;
sigc::signal<void, VideoOutputManager &> device_closed;
- sigc::signal<void, VideoOutputManager &, DisplayMode> display_mode_changed;
+ sigc::signal<void, VideoOutputManager &, VideoOutputMode> videooutput_mode_changed;
sigc::signal<void, VideoOutputManager &, FSToggle> fullscreen_mode_changed;
sigc::signal<void, VideoOutputManager &, unsigned, unsigned> display_size_changed;
sigc::signal<void, VideoOutputManager &> logo_update_required;
/*** Statistics ***/
- void get_display_stats (DisplayStats & _display_stats) {
- _display_stats = display_stats;
+ void get_videooutput_stats (VideoOutputStats & _videooutput_stats) {
+ _videooutput_stats = videooutput_stats;
};
private:
- void on_device_opened (HwAccelStatus hw_accel_status, VideoOutputManager *manager);
+ void on_device_opened (VideoOutputAccel videooutput_accel, VideoOutputManager *manager);
void on_device_closed (VideoOutputManager *manager);
- void on_display_mode_changed (DisplayMode display, VideoOutputManager *manager);
+ void on_videooutput_mode_changed (VideoOutputMode mode, VideoOutputManager *manager);
void on_fullscreen_mode_changed (FSToggle toggle, VideoOutputManager *manager);
void on_display_size_changed ( unsigned width, unsigned height, VideoOutputManager *manager);
void on_logo_update_required (VideoOutputManager *manager);
std::set<VideoOutputManager *> managers;
- DisplayStats display_stats;
+ VideoOutputStats videooutput_stats;
GTimeVal last_stats;
int number_times_started;
PMutex var_mutex; /* Protect start, stop and number_times_started */
- DisplayCoreConfBridge* display_core_conf_bridge;
+ VideoOutputCoreConfBridge* videooutput_core_conf_bridge;
};
/**
* @}
Modified: trunk/lib/engine/display/skel/display-gmconf-bridge.cpp
==============================================================================
--- trunk/lib/engine/display/skel/display-gmconf-bridge.cpp (original)
+++ trunk/lib/engine/display/skel/display-gmconf-bridge.cpp Sun May 18 13:08:23 2008
@@ -44,11 +44,11 @@
using namespace Ekiga;
-DisplayCoreConfBridge::DisplayCoreConfBridge (Ekiga::Service & _service)
+VideoOutputCoreConfBridge::VideoOutputCoreConfBridge (Ekiga::Service & _service)
: Ekiga::ConfBridge (_service)
{
Ekiga::ConfKeys keys;
- property_changed.connect (sigc::mem_fun (this, &DisplayCoreConfBridge::on_property_changed));
+ property_changed.connect (sigc::mem_fun (this, &VideoOutputCoreConfBridge::on_property_changed));
keys.push_back (VIDEO_DISPLAY_KEY "video_view");
keys.push_back (VIDEO_DISPLAY_KEY "zoom");
@@ -60,24 +60,24 @@
load (keys);
}
-void DisplayCoreConfBridge::on_property_changed (std::string key, GmConfEntry *entry)
+void VideoOutputCoreConfBridge::on_property_changed (std::string key, GmConfEntry *entry)
{
- DisplayCore & display_core = (DisplayCore &) service;
+ VideoOutputCore & display_core = (VideoOutputCore &) service;
if (key == VIDEO_DISPLAY_KEY "video_view") {
DisplayInfo display_info;
- PTRACE(4, "DisplayCoreConfBridge\tUpdating video view");
+ PTRACE(4, "VideoOutputCoreConfBridge\tUpdating video view");
if (( gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view") < 0) || ( gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view") > 4))
gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", 0);
- display_info.display = (DisplayMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view");
+ display_info.mode = (VideoOutputMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view");
display_core.set_display_info(display_info);
}
else if ( (key == VIDEO_DISPLAY_KEY "zoom") ) {
DisplayInfo display_info;
- PTRACE(4, "DisplayCoreConfBridge\tUpdating zoom");
+ PTRACE(4, "VideoOutputCoreConfBridge\tUpdating zoom");
display_info.zoom = gm_conf_get_int (VIDEO_DISPLAY_KEY "zoom");
if ((display_info.zoom != 100) && (display_info.zoom != 50) && (display_info.zoom != 200)) {
@@ -90,7 +90,7 @@
}
else {
- PTRACE(4, "DisplayCoreConfBridge\tUpdating Video Settings");
+ PTRACE(4, "VideoOutputCoreConfBridge\tUpdating Video Settings");
DisplayInfo display_info;
display_info.on_top = gm_conf_get_bool (VIDEO_DISPLAY_KEY "stay_on_top");
Modified: trunk/lib/engine/display/skel/display-gmconf-bridge.h
==============================================================================
--- trunk/lib/engine/display/skel/display-gmconf-bridge.h (original)
+++ trunk/lib/engine/display/skel/display-gmconf-bridge.h Sun May 18 13:08:23 2008
@@ -34,20 +34,20 @@
*
*/
-#ifndef __DISPLAY_GMCONF_BRIDGE_H__
-#define __DISPLAY_GMCONF_BRIDGE_H__
+#ifndef __VIDEOOUTPUT_GMCONF_BRIDGE_H__
+#define __VIDEOOUTPUT_GMCONF_BRIDGE_H__
#include "services.h"
#include "gmconf-bridge.h"
namespace Ekiga
{
- class DisplayCoreConfBridge
+ class VideoOutputCoreConfBridge
: public Ekiga::ConfBridge
{
public:
- DisplayCoreConfBridge (Ekiga::Service & service);
+ VideoOutputCoreConfBridge (Ekiga::Service & service);
void on_property_changed (std::string key, GmConfEntry *value);
};
Modified: trunk/lib/engine/display/skel/display-info.h
==============================================================================
--- trunk/lib/engine/display/skel/display-info.h (original)
+++ trunk/lib/engine/display/skel/display-info.h Sun May 18 13:08:23 2008
@@ -64,7 +64,7 @@
PIP_WINDOW,
FULLSCREEN,
UNSET
- } DisplayMode;
+ } VideoOutputMode;
/* Toggle operations for Fullscreen */
typedef enum {
@@ -76,12 +76,12 @@
/* Video Acceleration Status */
typedef enum {
-
- NONE,
- REMOTE_ONLY,
- ALL,
- NO_VIDEO
- } HwAccelStatus;
+
+ VO_ACCEL_NONE,
+ VO_ACCEL_REMOTE_ONLY,
+ VO_ACCEL_ALL,
+ VO_ACCEL_NO_VIDEO
+ } VideoOutputAccel;
typedef struct {
@@ -93,7 +93,7 @@
unsigned tx_width;
unsigned tx_height;
unsigned tx_frames;
- } DisplayStats;
+ } VideoOutputStats;
class DisplayInfo
{
@@ -116,7 +116,7 @@
allow_pip_sw_scaling = true;
sw_scaling_algorithm = 0;
- display = UNSET;
+ mode = UNSET;
zoom = 0;
};
@@ -142,7 +142,7 @@
allow_pip_sw_scaling = rhs.allow_pip_sw_scaling;
sw_scaling_algorithm = rhs.sw_scaling_algorithm;
}
- if (rhs.display != UNSET) display = rhs.display;
+ if (rhs.mode != UNSET) mode = rhs.mode;
if (rhs.zoom != 0) zoom = rhs.zoom;
};
@@ -164,7 +164,7 @@
bool allow_pip_sw_scaling;
unsigned int sw_scaling_algorithm;
- DisplayMode display;
+ VideoOutputMode mode;
unsigned int zoom;
};
Modified: trunk/lib/engine/display/skel/display-manager.h
==============================================================================
--- trunk/lib/engine/display/skel/display-manager.h (original)
+++ trunk/lib/engine/display/skel/display-manager.h Sun May 18 13:08:23 2008
@@ -101,13 +101,13 @@
/** This signal is emitted when a video output device is opened.
* @param hw_accel_status actual hardware acceleration support active on the video output device opened).
*/
- sigc::signal<void, HwAccelStatus> device_opened;
+ sigc::signal<void, VideoOutputAccel> device_opened;
/** This signal is emitted when a video output device is closed.
*/
sigc::signal<void> device_closed;
- sigc::signal<void, DisplayMode> display_mode_changed;
+ sigc::signal<void, VideoOutputMode> videooutput_mode_changed;
sigc::signal<void, FSToggle> fullscreen_mode_changed;
sigc::signal<void, unsigned, unsigned> display_size_changed;
sigc::signal<void> logo_update_required;
Modified: trunk/lib/engine/display/x/display-main-x.cpp
==============================================================================
--- trunk/lib/engine/display/x/display-main-x.cpp (original)
+++ trunk/lib/engine/display/x/display-main-x.cpp Sun May 18 13:08:23 2008
@@ -45,16 +45,16 @@
char **/*argv*/[])
{
bool result = false;
- Ekiga::DisplayCore *display_core = NULL;
+ Ekiga::VideoOutputCore *videooutput_core = NULL;
- display_core
- = dynamic_cast<Ekiga::DisplayCore*>(core.get ("display-core"));
+ videooutput_core
+ = dynamic_cast<Ekiga::VideoOutputCore*>(core.get ("videooutput-core"));
- if (display_core != NULL) {
+ if (videooutput_core != NULL) {
GMVideoOutputManager_x *videooutput_manager = new GMVideoOutputManager_x(core);
- display_core->add_manager (*videooutput_manager);
+ videooutput_core->add_manager (*videooutput_manager);
result = true;
}
Modified: trunk/lib/engine/display/x/display-manager-x.cpp
==============================================================================
--- trunk/lib/engine/display/x/display-manager-x.cpp (original)
+++ trunk/lib/engine/display/x/display-manager-x.cpp Sun May 18 13:08:23 2008
@@ -75,7 +75,7 @@
bool
GMVideoOutputManager_x::frame_display_change_needed ()
{
- switch (current_frame.display)
+ switch (current_frame.mode)
{
case LOCAL_VIDEO:
if (!lxWindow)
@@ -109,7 +109,7 @@
get_display_info(local_display_info);
- switch (current_frame.display) {
+ switch (current_frame.mode) {
case LOCAL_VIDEO:
runtime.run_in_main (sigc::bind (display_size_changed.make_slot (), (unsigned) (current_frame.local_width * current_frame.zoom / 100), (unsigned) (current_frame.local_height * current_frame.zoom / 100)));
break;
@@ -131,20 +131,20 @@
}
if ((!local_display_info.widget_info_set) || (!local_display_info.config_info_set) ||
- (local_display_info.display == UNSET) || (local_display_info.zoom == 0) || (current_frame.zoom == 0)) {
+ (local_display_info.mode == UNSET) || (local_display_info.zoom == 0) || (current_frame.zoom == 0)) {
PTRACE(4, "GMVideoOutputManager_X\tWidget not yet realized or gconf info not yet set, not opening display");
return;
}
close_frame_display ();
- runtime.run_in_main (sigc::bind (display_mode_changed.make_slot (), current_frame.display));
+ runtime.run_in_main (sigc::bind (videooutput_mode_changed.make_slot (), current_frame.mode));
pip_window_available = false;
- HwAccelStatus hw_accel_status = NONE;
+ VideoOutputAccel videooutput_accel = VO_ACCEL_NONE;
- switch (current_frame.display) {
+ switch (current_frame.mode) {
// LOCAL_VIDEO ------------------------------------------------------------------
case LOCAL_VIDEO:
PTRACE(4, "GMVideoOutputManager_X\tOpening LOCAL_VIDEO display with image of " << current_frame.local_width << "x" << current_frame.local_height);
@@ -160,18 +160,18 @@
(int) (current_frame.local_height * current_frame.zoom / 100),
current_frame.local_width,
current_frame.local_height)) {
- hw_accel_status = ALL;
+ videooutput_accel = VO_ACCEL_ALL;
PTRACE(4, "GMVideoOutputManager_X\tLOCAL_VIDEO: Successfully opened XV Window");
}
else {
delete lxWindow;
lxWindow = NULL;
- hw_accel_status = NONE;
+ videooutput_accel = VO_ACCEL_NONE;
PTRACE(4, "GMVideoOutputManager_X\tLOCAL_VIDEO: Could not open XV Window");
}
}
#endif
- if (hw_accel_status == NONE) {
+ if (videooutput_accel == VO_ACCEL_NONE) {
PTRACE(3, "GMVideoOutputManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
? " since HW acceleration was deactivated by configuration"
: " since HW acceleration failed to initalize"));
@@ -192,7 +192,7 @@
delete lxWindow;
lxWindow = NULL;
video_disabled = true;
- hw_accel_status = NO_VIDEO;
+ videooutput_accel = VO_ACCEL_NO_VIDEO;
PTRACE(1, "GMVideoOutputManager_X\tLOCAL_VIDEO: Could not open X Window - no video");
}
}
@@ -200,7 +200,7 @@
last_frame.embedded_x = local_display_info.x;
last_frame.embedded_y = local_display_info.y;
- last_frame.display = LOCAL_VIDEO;
+ last_frame.mode = LOCAL_VIDEO;
last_frame.local_width = current_frame.local_width;
last_frame.local_height = current_frame.local_height;
last_frame.zoom = current_frame.zoom;
@@ -221,19 +221,19 @@
(int) (current_frame.remote_height * current_frame.zoom / 100),
current_frame.remote_width,
current_frame.remote_height)) {
- hw_accel_status = ALL;
+ videooutput_accel = VO_ACCEL_ALL;
PTRACE(4, "GMVideoOutputManager_X\tREMOTE_VIDEO: Successfully opened XV Window");
}
else {
delete rxWindow;
rxWindow = NULL;
- hw_accel_status = NONE;
+ videooutput_accel = VO_ACCEL_NONE;
PTRACE(1, "GMVideoOutputManager_X\tLOCAL_VIDEO: Could not open XV Window");
}
}
#endif
- if (hw_accel_status == NONE) {
+ if (videooutput_accel == VO_ACCEL_NONE) {
PTRACE(3, "GMVideoOutputManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
? " since HW acceleration was deactivated by configuration"
: " since HW acceleration failed to initalize"));
@@ -254,7 +254,7 @@
delete rxWindow;
rxWindow = NULL;
video_disabled = true;
- hw_accel_status = NO_VIDEO;
+ videooutput_accel = VO_ACCEL_NO_VIDEO;
PTRACE(1, "GMVideoOutputManager_X\tREMOTE_VIDEO: Could not open X Window - no video");
}
}
@@ -262,7 +262,7 @@
last_frame.embedded_x = local_display_info.x;
last_frame.embedded_y = local_display_info.y;
- last_frame.display = REMOTE_VIDEO;
+ last_frame.mode = REMOTE_VIDEO;
last_frame.remote_width = current_frame.remote_width;
last_frame.remote_height = current_frame.remote_height;
last_frame.zoom = current_frame.zoom;
@@ -272,43 +272,43 @@
case FULLSCREEN:
case PIP:
case PIP_WINDOW:
- PTRACE(4, "GMVideoOutputManager_X\tOpening display " << current_frame.display << " with images of "
+ PTRACE(4, "GMVideoOutputManager_X\tOpening display " << current_frame.mode << " with images of "
<< current_frame.local_width << "x" << current_frame.local_height << "(local) and "
<< current_frame.remote_width << "x" << current_frame.remote_height << "(remote)");
#ifdef HAVE_XV
if (!local_display_info.disable_hw_accel) {
rxWindow = new XVWindow ();
if (rxWindow->Init ( rDisplay,
- (current_frame.display == PIP) ? local_display_info.window : DefaultRootWindow (rDisplay),
- (current_frame.display == PIP) ? local_display_info.gc : NULL,
- (current_frame.display == PIP) ? local_display_info.x : 0,
- (current_frame.display == PIP) ? local_display_info.y : 0,
+ (current_frame.mode == PIP) ? local_display_info.window : DefaultRootWindow (rDisplay),
+ (current_frame.mode == PIP) ? local_display_info.gc : NULL,
+ (current_frame.mode == PIP) ? local_display_info.x : 0,
+ (current_frame.mode == PIP) ? local_display_info.y : 0,
(int) (current_frame.remote_width * current_frame.zoom / 100),
(int) (current_frame.remote_height * current_frame.zoom / 100),
current_frame.remote_width,
current_frame.remote_height)) {
- hw_accel_status = REMOTE_ONLY;
+ videooutput_accel = VO_ACCEL_REMOTE_ONLY;
PTRACE(4, "GMVideoOutputManager_X\tPIP: Successfully opened remote XV Window");
}
else
{
delete rxWindow;
rxWindow = NULL;
- hw_accel_status = NONE;
+ videooutput_accel = VO_ACCEL_NONE;
PTRACE(1, "GMVideoOutputManager_X\tPIP: Could not open remote XV Window");
}
}
#endif
- if (hw_accel_status == NONE) {
+ if (videooutput_accel == VO_ACCEL_NONE) {
PTRACE(3, "GMVideoOutputManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
? " since HW acceleration was deactivated by configuration"
: " since HW acceleration failed to initalize"));
rxWindow = new XWindow ();
if (rxWindow->Init ( rDisplay,
- (current_frame.display == PIP) ? local_display_info.window : DefaultRootWindow (rDisplay),
- (current_frame.display == PIP) ? local_display_info.gc : NULL,
- (current_frame.display == PIP) ? local_display_info.x : 0,
- (current_frame.display == PIP) ? local_display_info.y : 0,
+ (current_frame.mode == PIP) ? local_display_info.window : DefaultRootWindow (rDisplay),
+ (current_frame.mode == PIP) ? local_display_info.gc : NULL,
+ (current_frame.mode == PIP) ? local_display_info.x : 0,
+ (current_frame.mode == PIP) ? local_display_info.y : 0,
(int) (current_frame.remote_width * current_frame.zoom / 100),
(int) (current_frame.remote_height * current_frame.zoom / 100),
current_frame.remote_width,
@@ -320,14 +320,14 @@
delete rxWindow;
rxWindow = NULL;
video_disabled = true;
- hw_accel_status = NO_VIDEO;
+ videooutput_accel = VO_ACCEL_NO_VIDEO;
PTRACE(1, "GMVideoOutputManager_X\tPIP: Could not open remote X Window - no video");
}
}
#ifdef HAVE_XV
- if (hw_accel_status == REMOTE_ONLY) {
+ if (videooutput_accel == VO_ACCEL_REMOTE_ONLY) {
lxWindow = new XVWindow();
if (lxWindow->Init ( rxWindow->GetDisplay (),
rxWindow->GetWindowHandle (),
@@ -338,7 +338,7 @@
(int) (current_frame.remote_height * current_frame.zoom / 100 / 3),
current_frame.local_width,
current_frame.local_height)) {
- hw_accel_status = ALL;
+ videooutput_accel = VO_ACCEL_ALL;
pip_window_available = true;
PTRACE(4, "GMVideoOutputManager_X\tPIP: Successfully opened local XV Window");
}
@@ -350,14 +350,14 @@
}
}
#endif
- if ((hw_accel_status != ALL) && (local_display_info.allow_pip_sw_scaling)) {
+ if ((videooutput_accel != VO_ACCEL_ALL) && (local_display_info.allow_pip_sw_scaling)) {
PTRACE(3, "GMVideoOutputManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
? " since HW acceleration was deactivated by configuration"
: " since HW acceleration failed to initalize"));
lxWindow = new XWindow ();
if (lxWindow->Init ( lDisplay,
rxWindow->GetWindowHandle (),
- (current_frame.display == PIP) ? local_display_info.gc : NULL,
+ (current_frame.mode == PIP) ? local_display_info.gc : NULL,
(int) (current_frame.remote_width * current_frame.zoom / 100 * 2 / 3),
(int) (current_frame.remote_height * current_frame.zoom / 100 * 2 / 3),
(int) (current_frame.remote_width * current_frame.zoom / 100 / 3),
@@ -376,9 +376,9 @@
}
}
- if ((hw_accel_status != ALL) && (!local_display_info.allow_pip_sw_scaling)) {
+ if ((videooutput_accel != VO_ACCEL_ALL) && (!local_display_info.allow_pip_sw_scaling)) {
PTRACE(3, "GMVideoOutputManager_X\tNot opening PIP window since HW acceleration is not available and SW fallback is disabled by configuration");
- hw_accel_status = ALL;
+ videooutput_accel = VO_ACCEL_ALL;
}
if (rxWindow && lxWindow) {
@@ -387,15 +387,15 @@
lxWindow->RegisterMaster (rxWindow);
}
- if (rxWindow && current_frame.display == FULLSCREEN)
+ if (rxWindow && current_frame.mode == FULLSCREEN)
rxWindow->ToggleFullscreen ();
- if ((current_frame.display != PIP_WINDOW) && (current_frame.display != FULLSCREEN)) {
+ if ((current_frame.mode != PIP_WINDOW) && (current_frame.mode != FULLSCREEN)) {
last_frame.embedded_x = local_display_info.x;
last_frame.embedded_y = local_display_info.y;
}
- last_frame.display = current_frame.display;
+ last_frame.mode = current_frame.mode;
last_frame.local_width = current_frame.local_width;
last_frame.local_height = current_frame.local_height;
last_frame.remote_width = current_frame.remote_width;
@@ -417,7 +417,7 @@
rxWindow->ToggleOntop ();
}
- runtime.run_in_main (sigc::bind (device_opened.make_slot (), hw_accel_status));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), videooutput_accel));
}
void
@@ -452,10 +452,10 @@
if (lxWindow)
lxWindow->ProcessEvents();
- if ((current_frame.display == LOCAL_VIDEO) && (lxWindow))
+ if ((current_frame.mode == LOCAL_VIDEO) && (lxWindow))
lxWindow->PutFrame ((uint8_t *) frame, width, height);
- if ((current_frame.display == REMOTE_VIDEO) && (rxWindow))
+ if ((current_frame.mode == REMOTE_VIDEO) && (rxWindow))
rxWindow->PutFrame ((uint8_t *) frame, width, height);
}
@@ -473,7 +473,7 @@
if (lxWindow)
lxWindow->ProcessEvents();
- if (current_frame.display == FULLSCREEN && rxWindow && !rxWindow->IsFullScreen ())
+ if (current_frame.mode == FULLSCREEN && rxWindow && !rxWindow->IsFullScreen ())
runtime.run_in_main (sigc::bind (fullscreen_mode_changed.make_slot (), OFF));
if (rxWindow && (update_required.remote || (!update_required.remote && !update_required.local)))
Modified: trunk/lib/engine/engine.cpp
==============================================================================
--- trunk/lib/engine/engine.cpp (original)
+++ trunk/lib/engine/engine.cpp Sun May 18 13:08:23 2008
@@ -100,32 +100,32 @@
{
core = new Ekiga::ServiceCore;
- /* VidInputCore depends on DisplayCore and must this *
+ /* VideoInputCore depends on VideoOutputCore and must this *
* be constructed thereafter */
Ekiga::PresenceCore *presence_core = new Ekiga::PresenceCore;
Ekiga::ContactCore *contact_core = new Ekiga::ContactCore;
Ekiga::CallCore *call_core = new Ekiga::CallCore;
- Ekiga::DisplayCore *display_core = new Ekiga::DisplayCore;
- Ekiga::VidInputCore *vidinput_core = new Ekiga::VidInputCore(*runtime, *display_core);
+ Ekiga::VideoOutputCore *videooutput_core = new Ekiga::VideoOutputCore;
+ Ekiga::VideoInputCore *videoinput_core = new Ekiga::VideoInputCore(*runtime, *videooutput_core);
Ekiga::AudioOutputCore *audiooutput_core = new Ekiga::AudioOutputCore(*runtime);
Ekiga::AudioInputCore *audioinput_core = new Ekiga::AudioInputCore(*runtime, *audiooutput_core);
Ekiga::HalCore *hal_core = new Ekiga::HalCore;
/* The last item in the following list will be destroyed first. *
- * - VidInputCore must be destroyed before DisplayCore since its *
- * PreviewManager may call functions of DisplayCore. *
+ * - VideoInputCore must be destroyed before VideoOutputCore since its *
+ * PreviewManager may call functions of VideoOutputCore. *
* - The runtime should be destroyed last since other core *
* components may still call runtime functions until destroyed *
- * (e.g. DisplayCore). */
+ * (e.g. VideoOutputCore). */
core->add (*runtime);
core->add (*contact_core);
core->add (*presence_core);
core->add (*call_core);
- core->add (*display_core);
- core->add (*vidinput_core);
+ core->add (*videooutput_core);
+ core->add (*videoinput_core);
core->add (*audiooutput_core);
core->add (*audioinput_core);
core->add (*hal_core);
@@ -149,7 +149,7 @@
}
#endif
- if (!vidinput_mlogo_init (*core, &argc, &argv)) {
+ if (!videoinput_mlogo_init (*core, &argc, &argv)) {
delete core;
return;
}
@@ -164,7 +164,7 @@
return;
}
- if (!vidinput_ptlib_init (*core, &argc, &argv)) {
+ if (!videoinput_ptlib_init (*core, &argc, &argv)) {
delete core;
return;
}
@@ -244,14 +244,14 @@
return;
}
- display_core->setup_conf_bridge();
- vidinput_core->setup_conf_bridge();
+ videooutput_core->setup_conf_bridge();
+ videoinput_core->setup_conf_bridge();
audiooutput_core->setup_conf_bridge();
audioinput_core->setup_conf_bridge();
sigc::connection conn;
- conn = hal_core->video_input_device_added.connect (sigc::mem_fun (vidinput_core, &Ekiga::VidInputCore::add_device));
- conn = hal_core->video_input_device_removed.connect (sigc::mem_fun (vidinput_core, &Ekiga::VidInputCore::remove_device));
+ conn = hal_core->video_input_device_added.connect (sigc::mem_fun (videoinput_core, &Ekiga::VideoInputCore::add_device));
+ conn = hal_core->video_input_device_removed.connect (sigc::mem_fun (videoinput_core, &Ekiga::VideoInputCore::remove_device));
conn = hal_core->audio_output_device_added.connect (sigc::mem_fun (audiooutput_core, &Ekiga::AudioOutputCore::add_device));
conn = hal_core->audio_output_device_removed.connect (sigc::mem_fun (audiooutput_core, &Ekiga::AudioOutputCore::remove_device));
conn = hal_core->audio_input_device_added.connect (sigc::mem_fun (audioinput_core, &Ekiga::AudioInputCore::add_device));
Added: trunk/lib/engine/framework/device-def.h
==============================================================================
--- (empty file)
+++ trunk/lib/engine/framework/device-def.h Sun May 18 13:08:23 2008
@@ -0,0 +1,128 @@
+/*
+ * Ekiga -- A VoIP and Video-Conferencing application
+ * Copyright (C) 2000-2008 Damien Sandras
+
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version. This program is distributed in the hope
+ * that it will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Ekiga is licensed under the GPL license and as a special exception, you
+ * have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination, without
+ * applying the requirements of the GNU GPL to the OPAL, OpenH323 and PWLIB
+ * programs, as long as you do follow the requirements of the GNU GPL for all
+ * the rest of the software thus combined.
+ */
+
+
+/*
+ * device-def.h - description
+ * ------------------------------------------
+ * begin : written in 2008 by Matthias Schneider
+ * copyright : (c) 2008 by Matthias Schneider
+ * description : declaration of an object representing a device
+ *
+ */
+
+#ifndef __DEVICE_DEFINITION_H__
+#define __DEVICE_DEFINITION_H__
+
+#include <string>
+#include <iostream>
+
+namespace Ekiga
+{
+ /**
+ * @addtogroup services
+ * @{
+ */
+ class Device
+ {
+ public:
+ /** The backend type.
+ * The backend type like "PTLIB", "NULL", etc.
+ */
+ std::string type;
+
+ /** The device source.
+ * The device source like "V4L", "ALSA", "DC", "OSS", etc.
+ */
+ std::string source;
+
+ /** The device name.
+ * The device name like "Logitech Quickcam Zoom"
+ */
+ std::string name;
+
+ /** Set the device identifier from a consendes string.
+ * Set the device identifier from a condensed string like "type/source/name"
+ * Used for setting devices from the saved gmconf configuration.
+ * @param str the string from which to set the device identifier.
+ */
+ void SetFromString(std::string str)
+ {
+ unsigned type_sep = str.find_first_of("/");
+ unsigned source_sep = str.find_first_of("/", type_sep + 1);
+
+ type = str.substr ( 0, type_sep );
+ source = str.substr ( type_sep + 1, source_sep - type_sep - 1);
+ name = str.substr ( source_sep + 1, str.size() - source_sep );
+ }
+
+ /** Get a condensed string of the device identifier.
+ * Return a condesned string in the form "type/source/name".
+ * Used when storing the device identifier in gmconf.
+ * @return the string in the format "type/source/name".
+ */
+ std::string GetString() const
+ {
+ return (type + "/" + source + "/" + name);
+ }
+
+ Device & operator= (const Device & rhs)
+ {
+ type = rhs.type;
+ source = rhs.source;
+ name = rhs.name;
+ return *this;
+ }
+
+ bool operator==( const Device & rhs ) const
+ {
+ if ( (type == rhs.type) &&
+ (source == rhs.source) &&
+ (name == rhs.name) )
+ return true;
+ else
+ return false;
+ }
+
+ bool operator!=( const Device & rhs ) const
+ {
+ if ( (type != rhs.type) ||
+ (source != rhs.source) ||
+ (name != rhs.name) )
+ return true;
+ else
+ return false;
+ }
+
+ friend std::ostream& operator <<(std::ostream & stream, const Device & device){
+ stream << device.type << "/" << device.source << "/" << device.name;
+ return stream;
+ }
+ };
+ /**
+ * @}
+ */
+
+};
+#endif
Modified: trunk/lib/engine/hal/dbus/hal-main-dbus.h
==============================================================================
--- trunk/lib/engine/hal/dbus/hal-main-dbus.h (original)
+++ trunk/lib/engine/hal/dbus/hal-main-dbus.h Sun May 18 13:08:23 2008
@@ -31,7 +31,7 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : code to hook the Moving Logo vidinput manager
+ * description : code to hook the DBus HAL manager
* into the main program
*
*/
Modified: trunk/lib/engine/hal/dbus/hal-manager-dbus.h
==============================================================================
--- trunk/lib/engine/hal/dbus/hal-manager-dbus.h (original)
+++ trunk/lib/engine/hal/dbus/hal-manager-dbus.h Sun May 18 13:08:23 2008
@@ -30,7 +30,7 @@
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
* description : Declaration of the interface of a hal core.
- * A hal core manages VidInputManagers.
+ * A hal core manages HalManagers.
*
*/
Modified: trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.cpp
==============================================================================
--- trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.cpp (original)
+++ trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.cpp Sun May 18 13:08:23 2008
@@ -41,21 +41,21 @@
#include "vidinput-manager-mlogo.h"
bool
-vidinput_mlogo_init (Ekiga::ServiceCore &core,
+videoinput_mlogo_init (Ekiga::ServiceCore &core,
int */*argc*/,
char **/*argv*/[])
{
bool result = false;
- Ekiga::VidInputCore *vidinput_core = NULL;
+ Ekiga::VideoInputCore *videoinput_core = NULL;
- vidinput_core
- = dynamic_cast<Ekiga::VidInputCore*>(core.get ("vidinput-core"));
+ videoinput_core
+ = dynamic_cast<Ekiga::VideoInputCore*>(core.get ("videoinput-core"));
- if (vidinput_core != NULL) {
+ if (videoinput_core != NULL) {
GMVideoInputManager_mlogo *videoinput_manager = new GMVideoInputManager_mlogo(core);
- vidinput_core->add_manager (*videoinput_manager);
+ videoinput_core->add_manager (*videoinput_manager);
result = true;
}
Modified: trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.h
==============================================================================
--- trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.h (original)
+++ trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.h Sun May 18 13:08:23 2008
@@ -31,18 +31,18 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : code to hook the Moving Logo vidinput manager
+ * description : code to hook the Moving Logo videoinput manager
* into the main program
*
*/
-#ifndef __VIDINPUT_MAIN_MLOGO_H__
-#define __VIDINPUT_MAIN_MLOGO_H__
+#ifndef __VIDEOINPUT_MAIN_MLOGO_H__
+#define __VIDEOINPUT_MAIN_MLOGO_H__
#include "services.h"
-bool vidinput_mlogo_init (Ekiga::ServiceCore &core,
- int *argc,
- char **argv[]);
+bool videoinput_mlogo_init (Ekiga::ServiceCore &core,
+ int *argc,
+ char **argv[]);
#endif
Modified: trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.cpp
==============================================================================
--- trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.cpp (original)
+++ trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.cpp Sun May 18 13:08:23 2008
@@ -37,9 +37,9 @@
#include "vidinput-manager-mlogo.h"
#include "icon.h"
-#define DEVICE_TYPE "Moving Logo"
+#define DEVICE_TYPE "Moving Logo"
#define DEVICE_SOURCE "Moving Logo"
-#define DEVICE_DEVICE "Moving Logo"
+#define DEVICE_NAME "Moving Logo"
GMVideoInputManager_mlogo::GMVideoInputManager_mlogo (Ekiga::ServiceCore & _core)
: core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
@@ -47,20 +47,20 @@
current_state.opened = false;
}
-void GMVideoInputManager_mlogo::get_devices(std::vector <Ekiga::VidInputDevice> & devices)
+void GMVideoInputManager_mlogo::get_devices(std::vector <Ekiga::VideoInputDevice> & devices)
{
- Ekiga::VidInputDevice device;
+ Ekiga::VideoInputDevice device;
device.type = DEVICE_TYPE;
device.source = DEVICE_SOURCE;
- device.device = DEVICE_DEVICE;
+ device.name = DEVICE_NAME;
devices.push_back(device);
}
-bool GMVideoInputManager_mlogo::set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format)
+bool GMVideoInputManager_mlogo::set_device (const Ekiga::VideoInputDevice & device, int channel, Ekiga::VideoInputFormat format)
{
if ( ( device.type == DEVICE_TYPE ) &&
( device.source == DEVICE_SOURCE) &&
- ( device.device == DEVICE_DEVICE) ) {
+ ( device.name == DEVICE_NAME) ) {
PTRACE(4, "GMVideoInputManager_mlogo\tSetting Device Moving Logo");
current_state.device = device;
@@ -188,7 +188,7 @@
}
}
-bool GMVideoInputManager_mlogo::has_device (const std::string & /*source*/, const std::string & /*device_name*/, unsigned /*capabilities*/, Ekiga::VidInputDevice & /*device*/)
+bool GMVideoInputManager_mlogo::has_device (const std::string & /*source*/, const std::string & /*device_name*/, unsigned /*capabilities*/, Ekiga::VideoInputDevice & /*device*/)
{
return false;
}
Modified: trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.h
==============================================================================
--- trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.h (original)
+++ trunk/lib/engine/vidinput/mlogo/vidinput-manager-mlogo.h Sun May 18 13:08:23 2008
@@ -29,14 +29,14 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : Declaration of the interface of a vidinput core.
+ * description : Declaration of the interface of a videoinput core.
* A vidinput core manages VideoInputManagers.
*
*/
-#ifndef __VIDINPUT_MANAGER_MLOGO_H__
-#define __VIDINPUT_MANAGER_MLOGO_H__
+#ifndef __VIDEOINPUT_MANAGER_MLOGO_H__
+#define __VIDEOINPUT_MANAGER_MLOGO_H__
#include "vidinput-core.h"
#include "vidinput-manager.h"
@@ -46,7 +46,7 @@
#include <ptclib/delaychan.h>
/**
- * @addtogroup vidinput
+ * @addtogroup videoinput
* @{
*/
@@ -71,9 +71,9 @@
* @param uri an uri
* @return true if a Ekiga::Call could be created
*/
- virtual void get_devices(std::vector <Ekiga::VidInputDevice> & devices);
+ virtual void get_devices(std::vector <Ekiga::VideoInputDevice> & devices);
- virtual bool set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format);
+ virtual bool set_device (const Ekiga::VideoInputDevice & device, int channel, Ekiga::VideoInputFormat format);
virtual bool open (unsigned width, unsigned height, unsigned fps);
@@ -83,7 +83,7 @@
unsigned & width,
unsigned & height);
- virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VidInputDevice & device);
+ virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VideoInputDevice & device);
protected:
void CopyYUVArea (const char* srcFrame,
Modified: trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.cpp
==============================================================================
--- trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.cpp (original)
+++ trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.cpp Sun May 18 13:08:23 2008
@@ -41,21 +41,21 @@
#include "vidinput-manager-ptlib.h"
bool
-vidinput_ptlib_init (Ekiga::ServiceCore &core,
+videoinput_ptlib_init (Ekiga::ServiceCore &core,
int */*argc*/,
char **/*argv*/[])
{
bool result = false;
- Ekiga::VidInputCore *vidinput_core = NULL;
+ Ekiga::VideoInputCore *videoinput_core = NULL;
- vidinput_core
- = dynamic_cast<Ekiga::VidInputCore*>(core.get ("vidinput-core"));
+ videoinput_core
+ = dynamic_cast<Ekiga::VideoInputCore*>(core.get ("videoinput-core"));
- if (vidinput_core != NULL) {
+ if (videoinput_core != NULL) {
- GMVideoInputManager_ptlib *vidinput_manager = new GMVideoInputManager_ptlib(core);
+ GMVideoInputManager_ptlib *videoinput_manager = new GMVideoInputManager_ptlib(core);
- vidinput_core->add_manager (*vidinput_manager);
+ videoinput_core->add_manager (*videoinput_manager);
result = true;
}
Modified: trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.h
==============================================================================
--- trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.h (original)
+++ trunk/lib/engine/vidinput/ptlib/vidinput-main-ptlib.h Sun May 18 13:08:23 2008
@@ -31,17 +31,17 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : code to hook the PTLIB vidinput manager
+ * description : code to hook the PTLIB videoinput manager
* into the main program
*
*/
-#ifndef __VIDINPUT_MAIN_PTLIB_H__
-#define __VIDINPUT_MAIN_PTLIB_H__
+#ifndef __VIDEOINPUT_MAIN_PTLIB_H__
+#define __VIDEOINPUT_MAIN_PTLIB_H__
#include "services.h"
-bool vidinput_ptlib_init (Ekiga::ServiceCore &core,
+bool videoinput_ptlib_init (Ekiga::ServiceCore &core,
int *argc,
char **argv[]);
Modified: trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp
==============================================================================
--- trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp (original)
+++ trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.cpp Sun May 18 13:08:23 2008
@@ -48,14 +48,14 @@
expectedFrameSize = 0;
}
-void GMVideoInputManager_ptlib::get_devices(std::vector <Ekiga::VidInputDevice> & devices)
+void GMVideoInputManager_ptlib::get_devices(std::vector <Ekiga::VideoInputDevice> & devices)
{
PStringArray video_sources;
PStringArray video_devices;
char **sources_array;
char **devices_array;
- Ekiga::VidInputDevice device;
+ Ekiga::VideoInputDevice device;
device.type = DEVICE_TYPE;
video_sources = PVideoInputDevice::GetDriverNames ();
@@ -71,7 +71,7 @@
for (PINDEX j = 0; devices_array[j] != NULL; j++) {
- device.device = devices_array[j];
+ device.name = devices_array[j];
devices.push_back(device);
}
free (devices_array);
@@ -80,11 +80,11 @@
free (sources_array);
}
-bool GMVideoInputManager_ptlib::set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format)
+bool GMVideoInputManager_ptlib::set_device (const Ekiga::VideoInputDevice & device, int channel, Ekiga::VideoInputFormat format)
{
if ( device.type == DEVICE_TYPE ) {
- PTRACE(4, "GMVideoInputManager_ptlib\tSetting Device " << device.source << "/" << device.device);
+ PTRACE(4, "GMVideoInputManager_ptlib\tSetting Device " << device);
current_state.device = device;
current_state.channel = channel;
current_state.format = format;
@@ -100,7 +100,7 @@
int whiteness, brightness, colour, contrast, hue;
Ekiga::VidInputConfig vidinput_config;
- PTRACE(4, "GMVideoInputManager_ptlib\tOpening Device " << current_state.device.source << "/" << current_state.device.device);
+ PTRACE(4, "GMVideoInputManager_ptlib\tOpening Device " << current_state.device);
PTRACE(4, "GMVideoInputManager_ptlib\tOpening Device with " << width << "x" << height << "/" << fps);
current_state.width = width;
@@ -109,7 +109,7 @@
expectedFrameSize = (width * height * 3) >> 1;
pvideo_format = (PVideoDevice::VideoFormat)current_state.format;
- input_device = PVideoInputDevice::CreateOpenedDevice (current_state.device.source, current_state.device.device, FALSE);
+ input_device = PVideoInputDevice::CreateOpenedDevice (current_state.device.source, current_state.device.name, FALSE);
Ekiga::VideoInputErrorCodes error_code = Ekiga::VI_ERROR_NONE;
if (!input_device)
@@ -148,7 +148,7 @@
void GMVideoInputManager_ptlib::close()
{
- PTRACE(4, "GMVideoInputManager_ptlib\tClosing device " << current_state.device.source << "/" << current_state.device.device);
+ PTRACE(4, "GMVideoInputManager_ptlib\tClosing device " << current_state.device);
if (input_device) {
delete input_device;
input_device = NULL;
@@ -210,19 +210,19 @@
input_device->SetContrast(contrast << 8);
}
-bool GMVideoInputManager_ptlib::has_device(const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VidInputDevice & device)
+bool GMVideoInputManager_ptlib::has_device(const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VideoInputDevice & device)
{
if (source == "video4linux") {
if (capabilities & 0x01) {
device.type = DEVICE_TYPE;
device.source = "V4L";
- device.device = device_name;
+ device.name = device_name;
return true;
}
if (capabilities & 0x02) {
device.type = DEVICE_TYPE;
device.source = "V4L2";
- device.device = device_name;
+ device.name = device_name;
return true;
}
return false;
Modified: trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h
==============================================================================
--- trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h (original)
+++ trunk/lib/engine/vidinput/ptlib/vidinput-manager-ptlib.h Sun May 18 13:08:23 2008
@@ -29,14 +29,14 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : declaration of the interface of a vidinput core.
- * A vidinput core manages VideoInputManagers.
+ * description : declaration of the interface of a videoinput core.
+ * A videoinput core manages VideoInputManagers.
*
*/
-#ifndef __VIDINPUT_MANAGER_PTLIB_H__
-#define __VIDINPUT_MANAGER_PTLIB_H__
+#ifndef __VIDEOINPUT_MANAGER_PTLIB_H__
+#define __VIDEOINPUT_MANAGER_PTLIB_H__
#include "vidinput-manager.h"
#include "runtime.h"
@@ -44,7 +44,7 @@
#include "ptbuildopts.h"
#include <ptlib/videoio.h>
/**
- * @addtogroup vidinput
+ * @addtogroup videoinput
* @{
*/
@@ -69,9 +69,9 @@
* @param uri an uri
* @return true if a Ekiga::Call could be created
*/
- virtual void get_devices(std::vector <Ekiga::VidInputDevice> & devices);
+ virtual void get_devices(std::vector <Ekiga::VideoInputDevice> & devices);
- virtual bool set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format);
+ virtual bool set_device (const Ekiga::VideoInputDevice & device, int channel, Ekiga::VideoInputFormat format);
virtual bool open (unsigned width, unsigned height, unsigned fps);
@@ -86,7 +86,7 @@
virtual void set_whiteness (unsigned whiteness );
virtual void set_contrast (unsigned contrast );
- virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VidInputDevice & device);
+ virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VideoInputDevice & device);
protected:
Ekiga::ServiceCore & core;
Modified: trunk/lib/engine/vidinput/skel/vidinput-core.cpp
==============================================================================
--- trunk/lib/engine/vidinput/skel/vidinput-core.cpp (original)
+++ trunk/lib/engine/vidinput/skel/vidinput-core.cpp Sun May 18 13:08:23 2008
@@ -44,10 +44,10 @@
using namespace Ekiga;
-PreviewManager::PreviewManager (VidInputCore& _vidinput_core, DisplayCore& _display_core)
+PreviewManager::PreviewManager (VideoInputCore& _videoinput_core, VideoOutputCore& _videooutput_core)
: PThread (1000, NoAutoDeleteThread, HighestPriority, "PreviewManager"),
- vidinput_core (_vidinput_core),
- display_core (_display_core)
+ videoinput_core (_videoinput_core),
+ videooutput_core (_videooutput_core)
{
frame = NULL;
// Since windows does not like to restart a thread that
@@ -68,7 +68,7 @@
stop_thread = false;
frame = (char*) malloc (unsigned (width * height * 3 / 2));
- display_core.start();
+ videooutput_core.start();
this->Restart ();
thread_sync_point.Wait ();
}
@@ -85,7 +85,7 @@
free (frame);
frame = NULL;
}
- display_core.stop();
+ videooutput_core.stop();
}
void PreviewManager::Main ()
@@ -100,8 +100,8 @@
unsigned height = 144;;
while (!stop_thread) {
- vidinput_core.get_frame_data(frame, width, height);
- display_core.set_frame_data(frame, width, height, true, 1);
+ videoinput_core.get_frame_data(frame, width, height);
+ videooutput_core.set_frame_data(frame, width, height, true, 1);
// We have to sleep some time outside the mutex lock
// to give other threads time to get the mutex
@@ -110,9 +110,9 @@
}
}
-VidInputCore::VidInputCore (Ekiga::Runtime & _runtime, DisplayCore& _display_core)
+VideoInputCore::VideoInputCore (Ekiga::Runtime & _runtime, VideoOutputCore& _videooutput_core)
: runtime (_runtime),
- preview_manager(*this, _display_core)
+ preview_manager(*this, _videooutput_core)
{
PWaitAndSignal m_var(var_mutex);
PWaitAndSignal m_set(set_mutex);
@@ -146,10 +146,10 @@
new_stream_settings.contrast = 0;
current_manager = NULL;
- vidinput_core_conf_bridge = NULL;
+ videoinput_core_conf_bridge = NULL;
}
-VidInputCore::~VidInputCore ()
+VideoInputCore::~VideoInputCore ()
{
#ifdef __GNUC__
std::cout << __PRETTY_FUNCTION__ << std::endl;
@@ -157,29 +157,29 @@
PWaitAndSignal m(var_mutex);
- if (vidinput_core_conf_bridge)
- delete vidinput_core_conf_bridge;
+ if (videoinput_core_conf_bridge)
+ delete videoinput_core_conf_bridge;
}
-void VidInputCore::setup_conf_bridge ()
+void VideoInputCore::setup_conf_bridge ()
{
PWaitAndSignal m(var_mutex);
- vidinput_core_conf_bridge = new VidInputCoreConfBridge (*this);
+ videoinput_core_conf_bridge = new VideoInputCoreConfBridge (*this);
}
-void VidInputCore::add_manager (VideoInputManager &manager)
+void VideoInputCore::add_manager (VideoInputManager &manager)
{
managers.insert (&manager);
manager_added.emit (manager);
- manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_device_opened), &manager));
- manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_device_closed), &manager));
- manager.device_error.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_device_error), &manager));
+ manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &VideoInputCore::on_device_opened), &manager));
+ manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &VideoInputCore::on_device_closed), &manager));
+ manager.device_error.connect (sigc::bind (sigc::mem_fun (this, &VideoInputCore::on_device_error), &manager));
}
-void VidInputCore::visit_managers (sigc::slot<bool, VideoInputManager &> visitor)
+void VideoInputCore::visit_managers (sigc::slot<bool, VideoInputManager &> visitor)
{
PWaitAndSignal m(var_mutex);
bool go_on = true;
@@ -190,35 +190,35 @@
go_on = visitor (*(*iter));
}
-void VidInputCore::get_vidinput_devices (std::vector <VidInputDevice> & vidinput_devices)
+void VideoInputCore::get_devices (std::vector <VideoInputDevice> & devices)
{
PWaitAndSignal m(var_mutex);
- vidinput_devices.clear();
+ devices.clear();
for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++)
- (*iter)->get_devices (vidinput_devices);
+ (*iter)->get_devices (devices);
if (PTrace::CanTrace(4)) {
- for (std::vector<VidInputDevice>::iterator iter = vidinput_devices.begin ();
- iter != vidinput_devices.end ();
+ for (std::vector<VideoInputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- PTRACE(4, "VidInputCore\tDetected Device: " << iter->type << "/" << iter->source << "/" << iter->device);
+ PTRACE(4, "VidInputCore\tDetected Device: " << *iter);
}
}
}
-void VidInputCore::set_vidinput_device(const VidInputDevice & vidinput_device, int channel, VideoFormat format)
+void VideoInputCore::set_device(const VideoInputDevice & device, int channel, VideoInputFormat format)
{
PWaitAndSignal m(var_mutex);
- internal_set_vidinput_device(vidinput_device, channel, format);
- desired_device = vidinput_device;
+ internal_set_vidinput_device(device, channel, format);
+ desired_device = device;
}
-void VidInputCore::set_preview_config (unsigned width, unsigned height, unsigned fps)
+void VideoInputCore::set_preview_config (unsigned width, unsigned height, unsigned fps)
{
PWaitAndSignal m(var_mutex);
@@ -243,7 +243,7 @@
}
-void VidInputCore::start_preview ()
+void VideoInputCore::start_preview ()
{
PWaitAndSignal m(var_mutex);
@@ -256,7 +256,7 @@
preview_config.active = true;
}
-void VidInputCore::stop_preview ()
+void VideoInputCore::stop_preview ()
{
PWaitAndSignal m(var_mutex);
@@ -270,7 +270,7 @@
preview_config.active = false;
}
-void VidInputCore::set_stream_config (unsigned width, unsigned height, unsigned fps)
+void VideoInputCore::set_stream_config (unsigned width, unsigned height, unsigned fps)
{
PWaitAndSignal m(var_mutex);
@@ -287,7 +287,7 @@
}
}
-void VidInputCore::start_stream ()
+void VideoInputCore::start_stream ()
{
PWaitAndSignal m(var_mutex);
@@ -310,7 +310,7 @@
stream_config.active = true;
}
-void VidInputCore::stop_stream ()
+void VideoInputCore::stop_stream ()
{
PWaitAndSignal m(var_mutex);
@@ -335,7 +335,7 @@
stream_config.active = false;
}
-void VidInputCore::get_frame_data (char *data,
+void VideoInputCore::get_frame_data (char *data,
unsigned & width,
unsigned & height)
{
@@ -361,7 +361,7 @@
}
}
-void VidInputCore::apply_settings()
+void VideoInputCore::apply_settings()
{
PWaitAndSignal m_set(set_mutex);
if (preview_config.active && !stream_config.active) {
@@ -413,7 +413,7 @@
}
}
-void VidInputCore::set_colour (unsigned colour)
+void VideoInputCore::set_colour (unsigned colour)
{
PWaitAndSignal m(set_mutex);
if (preview_config.active && !stream_config.active)
@@ -423,7 +423,7 @@
new_stream_settings.colour = colour;
}
-void VidInputCore::set_brightness (unsigned brightness)
+void VideoInputCore::set_brightness (unsigned brightness)
{
PWaitAndSignal m(set_mutex);
if (preview_config.active && !stream_config.active)
@@ -433,7 +433,7 @@
new_stream_settings.brightness = brightness;
}
-void VidInputCore::set_whiteness (unsigned whiteness)
+void VideoInputCore::set_whiteness (unsigned whiteness)
{
PWaitAndSignal m(set_mutex);
if (preview_config.active && !stream_config.active)
@@ -443,7 +443,7 @@
new_stream_settings.whiteness = whiteness;
}
-void VidInputCore::set_contrast (unsigned contrast)
+void VideoInputCore::set_contrast (unsigned contrast)
{
PWaitAndSignal m(set_mutex);
if (preview_config.active && !stream_config.active)
@@ -453,26 +453,26 @@
new_stream_settings.contrast = contrast ;
}
-void VidInputCore::on_device_opened (VidInputDevice device,
+void VideoInputCore::on_device_opened (VideoInputDevice device,
VidInputConfig vidinput_config,
VideoInputManager *manager)
{
device_opened.emit (*manager, device, vidinput_config);
}
-void VidInputCore::on_device_closed (VidInputDevice device, VideoInputManager *manager)
+void VideoInputCore::on_device_closed (VideoInputDevice device, VideoInputManager *manager)
{
device_closed.emit (*manager, device);
}
-void VidInputCore::on_device_error (VidInputDevice device, VideoInputErrorCodes error_code, VideoInputManager *manager)
+void VideoInputCore::on_device_error (VideoInputDevice device, VideoInputErrorCodes error_code, VideoInputManager *manager)
{
device_error.emit (*manager, device, error_code);
}
-void VidInputCore::internal_set_vidinput_device(const VidInputDevice & vidinput_device, int channel, VideoFormat format)
+void VideoInputCore::internal_set_vidinput_device(const VideoInputDevice & device, int channel, VideoInputFormat format)
{
- PTRACE(4, "VidInputCore\tSetting device: " << vidinput_device.type << "/" << vidinput_device.source << "/" << vidinput_device.device);
+ PTRACE(4, "VidInputCore\tSetting device: " << device);
if (preview_config.active && !stream_config.active)
preview_manager.stop();
@@ -480,7 +480,7 @@
if (preview_config.active || stream_config.active)
internal_close();
- internal_set_device (vidinput_device, channel, format);
+ internal_set_device (device, channel, format);
if (preview_config.active && !stream_config.active) {
internal_open(preview_config.width, preview_config.height, preview_config.fps);
@@ -491,7 +491,7 @@
internal_open(stream_config.width, stream_config.height, stream_config.fps);
}
-void VidInputCore::internal_open (unsigned width, unsigned height, unsigned fps)
+void VideoInputCore::internal_open (unsigned width, unsigned height, unsigned fps)
{
PTRACE(4, "VidInputCore\tOpening device with " << width << "x" << height << "/" << fps );
@@ -503,13 +503,13 @@
}
}
-void VidInputCore::internal_set_device (const VidInputDevice & vidinput_device, int channel, VideoFormat format)
+void VideoInputCore::internal_set_device (const VideoInputDevice & device, int channel, VideoInputFormat format)
{
current_manager = NULL;
for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
- if ((*iter)->set_device (vidinput_device, channel, format)) {
+ if ((*iter)->set_device (device, channel, format)) {
current_manager = (*iter);
}
}
@@ -518,10 +518,10 @@
// we se the default device. The default device
// MUST ALWAYS be loaded and openable
if (current_manager) {
- current_device = vidinput_device;
+ current_device = device;
}
else {
- PTRACE(1, "VidInputCore\tTried to set unexisting device " << vidinput_device.type << "/" << vidinput_device.source << "/" << vidinput_device.device);
+ PTRACE(1, "VidInputCore\tTried to set unexisting device " << device);
internal_set_fallback();
}
@@ -529,67 +529,67 @@
current_format = format;
}
-void VidInputCore::internal_close()
+void VideoInputCore::internal_close()
{
PTRACE(4, "VidInputCore\tClosing current device");
if (current_manager)
current_manager->close();
}
-void VidInputCore::internal_set_fallback ()
+void VideoInputCore::internal_set_fallback ()
{
- PTRACE(3, "VidInputCore\tFalling back to " << VIDEO_INPUT_FALLBACK_DEVICE_TYPE << "/" << VIDEO_INPUT_FALLBACK_DEVICE_SOURCE << "/" << VIDEO_INPUT_FALLBACK_DEVICE_DEVICE);
- current_device.type = VIDEO_INPUT_FALLBACK_DEVICE_TYPE;
+ current_device.type = VIDEO_INPUT_FALLBACK_DEVICE_TYPE;
current_device.source = VIDEO_INPUT_FALLBACK_DEVICE_SOURCE;
- current_device.device = VIDEO_INPUT_FALLBACK_DEVICE_DEVICE;
+ current_device.name = VIDEO_INPUT_FALLBACK_DEVICE_NAME;
+ PTRACE(3, "VidInputCore\tFalling back to " << current_device);
internal_set_device(current_device, current_channel, current_format);
}
-void VidInputCore::add_device (const std::string & source, const std::string & device, unsigned capabilities, HalManager* /*manager*/)
+void VideoInputCore::add_device (const std::string & source, const std::string & device_name, unsigned capabilities, HalManager* /*manager*/)
{
- PTRACE(0, "VidInputCore\tAdding Device " << device);
+ PTRACE(0, "VidInputCore\tAdding Device " << device_name);
PWaitAndSignal m(var_mutex);
- VidInputDevice vidinput_device;
+ VideoInputDevice device;
for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
- if ((*iter)->has_device (source, device, capabilities, vidinput_device)) {
+ if ((*iter)->has_device (source, device_name, capabilities, device)) {
- if ( ( desired_device.type == vidinput_device.type ) &&
- ( desired_device.source == vidinput_device.source ) &&
- ( desired_device.device == vidinput_device.device ) ) {
- internal_set_vidinput_device(vidinput_device, current_channel, current_format);
+ if ( ( desired_device.type == device.type ) &&
+ ( desired_device.source == device.source ) &&
+ ( desired_device.name == device.name ) ) {
+ internal_set_vidinput_device(device, current_channel, current_format);
}
- runtime.run_in_main (sigc::bind (device_added.make_slot (), vidinput_device));
+ runtime.run_in_main (sigc::bind (device_added.make_slot (), device));
}
}
}
-void VidInputCore::remove_device (const std::string & source, const std::string & device, unsigned capabilities, HalManager* /*manager*/)
+void VideoInputCore::remove_device (const std::string & source, const std::string & device_name, unsigned capabilities, HalManager* /*manager*/)
{
- PTRACE(0, "VidInputCore\tRemoving Device " << device);
+ PTRACE(0, "VidInputCore\tRemoving Device " << device_name);
PWaitAndSignal m(var_mutex);
- VidInputDevice vidinput_device;
+ VideoInputDevice device;
for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
- if ((*iter)->has_device (source, device, capabilities, vidinput_device)) {
- if ( ( current_device.type == vidinput_device.type ) &&
- ( current_device.source == vidinput_device.source ) &&
- ( current_device.device == vidinput_device.device ) ) {
-
- VidInputDevice new_vidinput_device;
- new_vidinput_device.type = VIDEO_INPUT_FALLBACK_DEVICE_TYPE;
- new_vidinput_device.source = VIDEO_INPUT_FALLBACK_DEVICE_SOURCE;
- new_vidinput_device.device = VIDEO_INPUT_FALLBACK_DEVICE_DEVICE;
- internal_set_vidinput_device(new_vidinput_device, current_channel, current_format);
+ if ((*iter)->has_device (source, device_name, capabilities, device)) {
+ if ( ( current_device.type == device.type ) &&
+ ( current_device.source == device.source ) &&
+ ( current_device.name == device.name ) ) {
+
+ VideoInputDevice new_device;
+ new_device.type = VIDEO_INPUT_FALLBACK_DEVICE_TYPE;
+ new_device.source = VIDEO_INPUT_FALLBACK_DEVICE_SOURCE;
+ new_device.name = VIDEO_INPUT_FALLBACK_DEVICE_NAME;
+ internal_set_vidinput_device(new_device, current_channel, current_format);
}
- runtime.run_in_main (sigc::bind (device_removed.make_slot (), vidinput_device));
+ runtime.run_in_main (sigc::bind (device_removed.make_slot (), device));
}
}
}
Modified: trunk/lib/engine/vidinput/skel/vidinput-core.h
==============================================================================
--- trunk/lib/engine/vidinput/skel/vidinput-core.h (original)
+++ trunk/lib/engine/vidinput/skel/vidinput-core.h Sun May 18 13:08:23 2008
@@ -29,13 +29,13 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : Declaration of the interface of a vidinput core.
- * A vidinput core manages VidInputManagers.
+ * description : Declaration of the interface of a videoinput core.
+ * A videoinput core manages VideoInputManagers.
*
*/
-#ifndef __VIDINPUT_CORE_H__
-#define __VIDINPUT_CORE_H__
+#ifndef __VIDEOINPUT_CORE_H__
+#define __VIDEOINPUT_CORE_H__
#include "services.h"
#include "runtime.h"
@@ -51,9 +51,9 @@
#include "ptbuildopts.h"
#include "ptlib.h"
-#define VIDEO_INPUT_FALLBACK_DEVICE_TYPE "Moving Logo"
+#define VIDEO_INPUT_FALLBACK_DEVICE_TYPE "Moving Logo"
#define VIDEO_INPUT_FALLBACK_DEVICE_SOURCE "Moving Logo"
-#define VIDEO_INPUT_FALLBACK_DEVICE_DEVICE "Moving Logo"
+#define VIDEO_INPUT_FALLBACK_DEVICE_NAME "Moving Logo"
namespace Ekiga
{
@@ -66,14 +66,14 @@
};
class VideoInputManager;
- class VidInputCore;
+ class VideoInputCore;
class PreviewManager : public PThread
{
PCLASSINFO(PreviewManager, PThread);
public:
- PreviewManager(VidInputCore& _vidinput_core, DisplayCore& _display_core);
+ PreviewManager(VideoInputCore& _videoinput_core, VideoOutputCore& _videooutput_core);
~PreviewManager();
virtual void start(unsigned width, unsigned height);
virtual void stop();
@@ -84,8 +84,8 @@
char* frame;
PMutex quit_mutex; /* To exit */
PSyncPoint thread_sync_point;
- VidInputCore& vidinput_core;
- DisplayCore& display_core;
+ VideoInputCore & videoinput_core;
+ VideoOutputCore & videooutput_core;
};
/**
@@ -97,7 +97,7 @@
/** Core object for the video vidinput support
*/
- class VidInputCore
+ class VideoInputCore
: public Service
{
@@ -105,11 +105,11 @@
/* The constructor
*/
- VidInputCore (Ekiga::Runtime & _runtime, DisplayCore& _display_core);
+ VideoInputCore (Ekiga::Runtime & _runtime, VideoOutputCore& _videooutput_core);
/* The destructor
*/
- ~VidInputCore ();
+ ~VideoInputCore ();
void setup_conf_bridge();
@@ -119,35 +119,35 @@
* @return The service name.
*/
const std::string get_name () const
- { return "vidinput-core"; }
+ { return "videoinput-core"; }
/** Returns the description of the service.
* @return The service description.
*/
const std::string get_description () const
- { return "\tVidInput Core managing VideoInput Manager objects"; }
+ { return "\tVideoInput Core managing VideoInput Manager objects"; }
- /** Adds a VidInputManager to the VidInputCore service.
+ /** Adds a VideoInputManager to the VideoInputCore service.
* @param The manager to be added.
*/
void add_manager (VideoInputManager &manager);
/** Triggers a callback for all Ekiga::VideoInputManager sources of the
- * VidInputCore service.
+ * VideoInputCore service.
*/
void visit_managers (sigc::slot<bool, VideoInputManager &> visitor);
/** This signal is emitted when a Ekiga::VideoInputManager has been
- * added to the VidInputCore Service.
+ * added to the VideoInputCore Service.
*/
sigc::signal<void, VideoInputManager &> manager_added;
- void get_vidinput_devices(std::vector <VidInputDevice> & vidinput_devices);
+ void get_devices(std::vector <VideoInputDevice> & devices);
- void set_vidinput_device(const VidInputDevice & vidinput_device, int channel, VideoFormat format);
+ void set_device(const VideoInputDevice & device, int channel, VideoInputFormat format);
/* To transmit a user specified image, pass a pointer to a raw YUV image*/
void set_image_data (unsigned width, unsigned height, const char* data);
@@ -176,30 +176,30 @@
void set_whiteness (unsigned whiteness);
void set_contrast (unsigned contrast);
- void add_device (const std::string & source, const std::string & device, unsigned capabilities, HalManager* manager);
- void remove_device (const std::string & source, const std::string & device, unsigned capabilities, HalManager* manager);
+ void add_device (const std::string & source, const std::string & device_name, unsigned capabilities, HalManager* manager);
+ void remove_device (const std::string & source, const std::string & device_name, unsigned capabilities, HalManager* manager);
/*** VidInput Related Signals ***/
/** See vidinput-manager.h for the API
*/
- sigc::signal<void, VideoInputManager &, VidInputDevice &, VidInputConfig&> device_opened;
- sigc::signal<void, VideoInputManager &, VidInputDevice &> device_closed;
- sigc::signal<void, VideoInputManager &, VidInputDevice &, VideoInputErrorCodes> device_error;
- sigc::signal<void, VidInputDevice> device_added;
- sigc::signal<void, VidInputDevice> device_removed;
+ sigc::signal<void, VideoInputManager &, VideoInputDevice &, VidInputConfig&> device_opened;
+ sigc::signal<void, VideoInputManager &, VideoInputDevice &> device_closed;
+ sigc::signal<void, VideoInputManager &, VideoInputDevice &, VideoInputErrorCodes> device_error;
+ sigc::signal<void, VideoInputDevice> device_added;
+ sigc::signal<void, VideoInputDevice> device_removed;
private:
- void on_device_opened (VidInputDevice device,
+ void on_device_opened (VideoInputDevice device,
VidInputConfig vidinput_config,
VideoInputManager *manager);
- void on_device_closed (VidInputDevice device, VideoInputManager *manager);
- void on_device_error (VidInputDevice device, VideoInputErrorCodes error_code, VideoInputManager *manager);
+ void on_device_closed (VideoInputDevice device, VideoInputManager *manager);
+ void on_device_error (VideoInputDevice device, VideoInputErrorCodes error_code, VideoInputManager *manager);
- void internal_set_vidinput_device(const VidInputDevice & vidinput_device, int channel, VideoFormat format);
+ void internal_set_vidinput_device(const VideoInputDevice & vidinput_device, int channel, VideoInputFormat format);
void internal_open (unsigned width, unsigned height, unsigned fps);
void internal_close();
- void internal_set_device (const VidInputDevice & vidinput_device, int channel, VideoFormat format);
+ void internal_set_device (const VideoInputDevice & vidinput_device, int channel, VideoInputFormat format);
void internal_set_fallback ();
void apply_settings();
@@ -215,16 +215,16 @@
VidInputConfig new_preview_settings;
VideoInputManager* current_manager;
- VidInputDevice desired_device;
- VidInputDevice current_device;
- Ekiga::VideoFormat current_format;
+ VideoInputDevice desired_device;
+ VideoInputDevice current_device;
+ Ekiga::VideoInputFormat current_format;
int current_channel;
PMutex var_mutex; /* To protect variables that are read and written */
PMutex set_mutex; /* To protect variables that are read and written */
PreviewManager preview_manager;
- VidInputCoreConfBridge* vidinput_core_conf_bridge;
+ VideoInputCoreConfBridge* videoinput_core_conf_bridge;
};
/**
* @}
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 Sun May 18 13:08:23 2008
@@ -44,11 +44,11 @@
using namespace Ekiga;
-VidInputCoreConfBridge::VidInputCoreConfBridge (Ekiga::Service & _service)
+VideoInputCoreConfBridge::VideoInputCoreConfBridge (Ekiga::Service & _service)
: Ekiga::ConfBridge (_service)
{
Ekiga::ConfKeys keys;
- property_changed.connect (sigc::mem_fun (this, &VidInputCoreConfBridge::on_property_changed));
+ property_changed.connect (sigc::mem_fun (this, &VideoInputCoreConfBridge::on_property_changed));
keys.push_back (VIDEO_DEVICES_KEY "size");
keys.push_back (VIDEO_DEVICES_KEY "max_frame_rate");
@@ -60,9 +60,9 @@
load (keys);
}
-void VidInputCoreConfBridge::on_property_changed (std::string key, GmConfEntry * /*entry*/)
+void VideoInputCoreConfBridge::on_property_changed (std::string key, GmConfEntry * /*entry*/)
{
- VidInputCore & vidinput_core = (VidInputCore &) service;
+ VideoInputCore & videoinput_core = (VideoInputCore &) service;
if ( (key == VIDEO_DEVICES_KEY "size") ||
(key == VIDEO_DEVICES_KEY "max_frame_rate") ) {
@@ -80,9 +80,9 @@
PTRACE(1, "VidInputCoreConfBridge\t" << VIDEO_DEVICES_KEY "max_frame_rate" << " out of range, ajusting to 30");
max_frame_rate = 30;
}
- vidinput_core.set_preview_config (VideoSizes[size].width,
- VideoSizes[size].height,
- max_frame_rate);
+ videoinput_core.set_preview_config (VideoSizes[size].width,
+ VideoSizes[size].height,
+ max_frame_rate);
}
else if ( (key == VIDEO_DEVICES_KEY "input_device") ||
(key == VIDEO_DEVICES_KEY "channel") ||
@@ -90,47 +90,38 @@
PTRACE(4, "VidInputCoreConfBridge\tUpdating device");
- VidInputDevice vidinput_device;
+ VideoInputDevice device;
if (gm_conf_get_string (VIDEO_DEVICES_KEY "input_device") == NULL) {
PTRACE(1, "VidInputCoreConfBridge\t" << VIDEO_DEVICES_KEY "input_device" << " is NULL");
}
else {
- std::string config_string = gm_conf_get_string (VIDEO_DEVICES_KEY "input_device");
-
- unsigned type_sep = config_string.find_first_of("/");
- unsigned source_sep = config_string.find_first_of("/", type_sep + 1);
-
- vidinput_device.type = config_string.substr ( 0, type_sep );
- vidinput_device.source = config_string.substr ( type_sep + 1, source_sep - type_sep - 1);
- vidinput_device.device = config_string.substr ( source_sep + 1, config_string.size() - source_sep );
+ device.SetFromString(gm_conf_get_string (VIDEO_DEVICES_KEY "input_device"));
}
- if ( (vidinput_device.type == "" ) ||
- (vidinput_device.source == "") ||
- (vidinput_device.device == "" ) ) {
+ if ( (device.type == "" ) ||
+ (device.source == "") ||
+ (device.name == "" ) ) {
PTRACE(1, "VidinputCore\tTried to set malformed device");
- vidinput_device.type = VIDEO_INPUT_FALLBACK_DEVICE_TYPE;
- vidinput_device.source = VIDEO_INPUT_FALLBACK_DEVICE_SOURCE;
- vidinput_device.device = VIDEO_INPUT_FALLBACK_DEVICE_DEVICE;
+ device.type = VIDEO_INPUT_FALLBACK_DEVICE_TYPE;
+ device.source = VIDEO_INPUT_FALLBACK_DEVICE_SOURCE;
+ device.name = VIDEO_INPUT_FALLBACK_DEVICE_NAME;
}
unsigned video_format = gm_conf_get_int (VIDEO_DEVICES_KEY "format");
- if (video_format >= NumVideoFormats) {
+ if (video_format >= VI_FORMAT_MAX) {
PTRACE(1, "VidInputCoreConfBridge\t" << VIDEO_DEVICES_KEY "format" << " out of range, ajusting to 3");
video_format = 3;
}
- vidinput_core.set_vidinput_device (vidinput_device,
- gm_conf_get_int (VIDEO_DEVICES_KEY "channel"),
- (VideoFormat) video_format);
+ videoinput_core.set_device (device, gm_conf_get_int (VIDEO_DEVICES_KEY "channel") ,(VideoInputFormat) video_format);
}
else if (key == VIDEO_DEVICES_KEY "enable_preview") {
PTRACE(4, "VidInputCoreConfBridge\tUpdating preview");
if (gm_conf_get_bool ( VIDEO_DEVICES_KEY "enable_preview"))
- vidinput_core.start_preview();
+ videoinput_core.start_preview();
else
- vidinput_core.stop_preview();
+ videoinput_core.stop_preview();
}
else if (key == VIDEO_DEVICES_KEY "image") {
PTRACE(4, "VidInputCoreConfBridge\tUpdating image");
Modified: trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.h
==============================================================================
--- trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.h (original)
+++ trunk/lib/engine/vidinput/skel/vidinput-gmconf-bridge.h Sun May 18 13:08:23 2008
@@ -34,20 +34,20 @@
*
*/
-#ifndef __VIDINPUT_GMCONF_BRIDGE_H__
-#define __VIDINPUT_GMCONF_BRIDGE_H__
+#ifndef __VIDEOINPUT_GMCONF_BRIDGE_H__
+#define __VIDEOINPUT_GMCONF_BRIDGE_H__
#include "services.h"
#include "gmconf-bridge.h"
namespace Ekiga
{
- class VidInputCoreConfBridge
+ class VideoInputCoreConfBridge
: public Ekiga::ConfBridge
{
public:
- VidInputCoreConfBridge (Ekiga::Service & service);
+ VideoInputCoreConfBridge (Ekiga::Service & service);
void on_property_changed (std::string key, GmConfEntry *value);
};
Modified: trunk/lib/engine/vidinput/skel/vidinput-info.h
==============================================================================
--- trunk/lib/engine/vidinput/skel/vidinput-info.h (original)
+++ trunk/lib/engine/vidinput/skel/vidinput-info.h Sun May 18 13:08:23 2008
@@ -29,13 +29,15 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : Declaration of the interface of a vidinput core.
- * A vidinput core manages VidInputManagers.
+ * description : Declaration of the interface of a videoinput core.
+ * A vidinput core manages VideoInputManagers.
*
*/
-#ifndef __VIDINPUT_INFO_H__
-#define __VIDINPUT_INFO_H__
+#ifndef __VIDEOINPUT_INFO_H__
+#define __VIDEOINPUT_INFO_H__
+
+#include "device-def.h"
#define GM_4CIF_WIDTH 704
#define GM_4CIF_HEIGHT 576
@@ -54,10 +56,11 @@
{
#define NB_VIDEO_SIZES 5
- const static struct {
+ static const struct {
int width;
int height;
- }
+ }
+
VideoSizes[NB_VIDEO_SIZES] = {
{ GM_QCIF_WIDTH, GM_QCIF_HEIGHT },
{ GM_CIF_WIDTH, GM_CIF_HEIGHT },
@@ -66,19 +69,15 @@
{ GM_4SIF_WIDTH, GM_4SIF_HEIGHT },
};
- enum VideoFormat {
- PAL,
- NTSC,
- SECAM,
- Auto,
- NumVideoFormats
+ enum VideoInputFormat {
+ VI_FORMAT_PAL = 0,
+ VI_FORMAT_NTSC,
+ VI_FORMAT_SECAM,
+ VI_FORMAT_Auto,
+ VI_FORMAT_MAX
};
- typedef struct VidInputDevice {
- std::string type;
- std::string source;
- std::string device;
- };
+ class VideoInputDevice : public Device {};
typedef struct VidInputConfig {
unsigned whiteness;
@@ -97,7 +96,6 @@
VI_ERROR_FPS,
VI_ERROR_SCALE
};
-
};
#endif
Modified: trunk/lib/engine/vidinput/skel/vidinput-manager.h
==============================================================================
--- trunk/lib/engine/vidinput/skel/vidinput-manager.h (original)
+++ trunk/lib/engine/vidinput/skel/vidinput-manager.h Sun May 18 13:08:23 2008
@@ -74,7 +74,7 @@
* Add it to the list of devices already collected by the core.
* @param devices a vector of device names to be filled by the manager.
*/
- virtual void get_devices (std::vector <VidInputDevice> & devices) = 0;
+ virtual void get_devices (std::vector <VideoInputDevice> & devices) = 0;
/** Set the current device.
* Must be called before opening the device.
@@ -85,7 +85,7 @@
* @param format the video formar to be used (PAL, NTSC, ...).
*/
- virtual bool set_device (const VidInputDevice & device, int channel, VideoFormat format) = 0;
+ virtual bool set_device (const VideoInputDevice & device, int channel, VideoInputFormat format) = 0;
/** Open the device.
* The device must be opened before calling get_frame_data and set_* functions.
@@ -150,7 +150,7 @@
* @param device in case the device is supported by the manager, this structure will be filled with the device details.
* @return true if the device is supported by the manager.
*/
- virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, VidInputDevice & device) = 0;
+ virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, VideoInputDevice & device) = 0;
/*** API to act on VidInputDevice events ***/
@@ -159,18 +159,18 @@
* @param device the video input device that was opened.
* @param config the current video input device configuration (current brightness, colour, etc.).
*/
- sigc::signal<void, VidInputDevice, VidInputConfig> device_opened;
+ sigc::signal<void, VideoInputDevice, VidInputConfig> device_opened;
/** This signal is emitted when a video input device is closed.
* @param device the video input device that was closed.
*/
- sigc::signal<void, VidInputDevice> device_closed;
+ sigc::signal<void, VideoInputDevice> device_closed;
/** This signal is emitted when an error occurs when opening a video input device.
* @param device the video input device that caused the error.
* @param error_code the video input device error code.
*/
- sigc::signal<void, VidInputDevice, VideoInputErrorCodes> device_error;
+ sigc::signal<void, VideoInputDevice, VideoInputErrorCodes> device_error;
protected:
typedef struct ManagerState {
@@ -178,8 +178,8 @@
unsigned width;
unsigned height;
unsigned fps;
- VidInputDevice device;
- VideoFormat format;
+ VideoInputDevice device;
+ VideoInputFormat format;
int channel;
};
ManagerState current_state;
Modified: trunk/pixmaps/conv-icon.pl
==============================================================================
--- trunk/pixmaps/conv-icon.pl (original)
+++ trunk/pixmaps/conv-icon.pl Sun May 18 13:08:23 2008
@@ -47,8 +47,8 @@
print OUTFILE "
/* Generated by conf-icon.pl */
-const static unsigned gm_icon_width = 72;
-const static unsigned gm_icon_height = 72;
+static const unsigned gm_icon_width = 72;
+static const unsigned gm_icon_height = 72;
#ifdef __SUNPRO_C
#pragma align 4 (gm_icon_yuv)
Modified: trunk/pixmaps/icon.h
==============================================================================
--- trunk/pixmaps/icon.h (original)
+++ trunk/pixmaps/icon.h Sun May 18 13:08:23 2008
@@ -1,7 +1,7 @@
/* Generated by conf-icon.pl */
-const static unsigned gm_icon_width = 72;
-const static unsigned gm_icon_height = 72;
+static const unsigned gm_icon_width = 72;
+static const unsigned gm_icon_height = 72;
#ifdef __SUNPRO_C
#pragma align 4 (gm_icon_yuv)
Modified: trunk/src/devices/videoinput.cpp
==============================================================================
--- trunk/src/devices/videoinput.cpp (original)
+++ trunk/src/devices/videoinput.cpp Sun May 18 13:08:23 2008
@@ -68,7 +68,7 @@
PVideoInputDevice_EKIGA::PVideoInputDevice_EKIGA (Ekiga::ServiceCore & _core)
-: core (_core), vidinput_core (*(dynamic_cast<Ekiga::VidInputCore *> (_core.get ("vidinput-core"))))
+: core (_core), videoinput_core (*(dynamic_cast<Ekiga::VideoInputCore *> (_core.get ("videoinput-core"))))
{
opened = false;
}
@@ -84,8 +84,8 @@
bool start_immediate)
{
if (start_immediate) {
- vidinput_core.set_stream_config(frameWidth, frameHeight, frameRate);
- vidinput_core.start_stream();
+ videoinput_core.set_stream_config(frameWidth, frameHeight, frameRate);
+ videoinput_core.start_stream();
}
opened = true;
@@ -103,7 +103,7 @@
bool
PVideoInputDevice_EKIGA::Close ()
{
- vidinput_core.stop_stream();
+ videoinput_core.stop_stream();
opened = false;
return true;
@@ -113,8 +113,8 @@
bool
PVideoInputDevice_EKIGA::Start ()
{
- vidinput_core.set_stream_config(frameWidth, frameHeight, frameRate);
- vidinput_core.start_stream();
+ videoinput_core.set_stream_config(frameWidth, frameHeight, frameRate);
+ videoinput_core.start_stream();
return true;
}
@@ -161,7 +161,7 @@
{
unsigned width;
unsigned height;
- vidinput_core.get_frame_data((char*)frame, width, height);
+ videoinput_core.get_frame_data((char*)frame, width, height);
*i = width * height * 3 / 2;
@@ -174,7 +174,7 @@
{
unsigned width;
unsigned height;
- vidinput_core.get_frame_data((char*)frame, width, height);
+ videoinput_core.get_frame_data((char*)frame, width, height);
*i = width * height * 3 / 2;
return true;
Modified: trunk/src/devices/videoinput.h
==============================================================================
--- trunk/src/devices/videoinput.h (original)
+++ trunk/src/devices/videoinput.h Sun May 18 13:08:23 2008
@@ -178,7 +178,7 @@
protected:
Ekiga::ServiceCore & core;
- Ekiga::VidInputCore & vidinput_core;
+ Ekiga::VideoInputCore & videoinput_core;
bool opened;
};
Modified: trunk/src/devices/videooutput.cpp
==============================================================================
--- trunk/src/devices/videooutput.cpp (original)
+++ trunk/src/devices/videooutput.cpp Sun May 18 13:08:23 2008
@@ -78,7 +78,7 @@
/* The Methods */
PVideoOutputDevice_EKIGA::PVideoOutputDevice_EKIGA (Ekiga::ServiceCore & _core)
-: core (_core), display_core (*(dynamic_cast<Ekiga::DisplayCore *> (_core.get ("display-core"))))
+: core (_core), videooutput_core (*(dynamic_cast<Ekiga::VideoOutputCore *> (_core.get ("videooutput-core"))))
{
PWaitAndSignal m(videoDisplay_mutex);
@@ -96,7 +96,7 @@
if (is_active)
devices_nbr = PMAX (0, devices_nbr-1);
if (devices_nbr == 0) {
- display_core.stop();
+ videooutput_core.stop();
}
}
@@ -149,13 +149,13 @@
return FALSE;
if (devices_nbr == 0)
- display_core.start();
+ videooutput_core.start();
/* Device is now open */
if (!is_active) {
is_active = TRUE;
devices_nbr = PMIN (2, devices_nbr+1);
}
- display_core.set_frame_data((const char*) data, width, height, (device_id == LOCAL), devices_nbr);
+ videooutput_core.set_frame_data((const char*) data, width, height, (device_id == LOCAL), devices_nbr);
return TRUE;
}
Modified: trunk/src/devices/videooutput.h
==============================================================================
--- trunk/src/devices/videooutput.h (original)
+++ trunk/src/devices/videooutput.h Sun May 18 13:08:23 2008
@@ -141,7 +141,7 @@
enum {REMOTE, LOCAL};
Ekiga::ServiceCore & core;
- Ekiga::DisplayCore & display_core;
+ Ekiga::VideoOutputCore & videooutput_core;
};
#endif
Modified: trunk/src/endpoints/opal-main.cpp
==============================================================================
--- trunk/src/endpoints/opal-main.cpp (original)
+++ trunk/src/endpoints/opal-main.cpp Sun May 18 13:08:23 2008
@@ -63,13 +63,10 @@
Ekiga::ContactCore *contact_core = NULL;
Ekiga::PresenceCore *presence_core = NULL;
Ekiga::CallCore *call_core = NULL;
- Ekiga::DisplayCore *display_core = NULL;
- //GMDisplayManager *displayManager = new GMDisplayManager_X(core);
contact_core = dynamic_cast<Ekiga::ContactCore *> (core.get ("contact-core"));
presence_core = dynamic_cast<Ekiga::PresenceCore *> (core.get ("presence-core"));
call_core = dynamic_cast<Ekiga::CallCore *> (core.get ("call-core"));
- display_core = dynamic_cast<Ekiga::DisplayCore *> (core.get ("display-core"));
GMManager *manager = new GMManager (core);
GMSIPEndpoint *sipEP = manager->GetSIPEndpoint ();
@@ -92,12 +89,5 @@
else
return false;
-/* if (display_core != NULL)
- display_core->add_manager (*displayManager);
- else
- return false;
-*/
-
-
return result;
}
Modified: trunk/src/gui/assistant.cpp
==============================================================================
--- trunk/src/gui/assistant.cpp (original)
+++ trunk/src/gui/assistant.cpp Sun May 18 13:08:23 2008
@@ -127,13 +127,13 @@
}
void
-get_audio_output_devices_list (Ekiga::ServiceCore *core,
+get_audiooutput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list);
void
-get_audio_input_devices_list (Ekiga::ServiceCore *core,
+get_audioinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list);
void
-get_video_devices_list (Ekiga::ServiceCore *core,
+get_videoinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list);
gchar**
@@ -198,43 +198,42 @@
}
}
-void on_vidinputdevice_added_cb (const Ekiga::VidInputDevice & vidinput_device, EkigaAssistant *assistant)
+void on_videoinput_device_added_cb (const Ekiga::VideoInputDevice & device, EkigaAssistant *assistant)
{
- std::string device = vidinput_device.type + "/" + vidinput_device.source + "/" + vidinput_device.device;
- add_combo_box (GTK_COMBO_BOX (assistant->priv->video_device), device.c_str());
+ std::string device_string = device.GetString();
+ add_combo_box (GTK_COMBO_BOX (assistant->priv->video_device), device_string.c_str());
}
-void on_vidinputdevice_removed_cb (const Ekiga::VidInputDevice & vidinput_device, EkigaAssistant *assistant)
+void on_videoinput_device_removed_cb (const Ekiga::VideoInputDevice & device, EkigaAssistant *assistant)
{
-
- std::string device = vidinput_device.type + "/" + vidinput_device.source + "/" + vidinput_device.device;
- remove_combo_box (GTK_COMBO_BOX (assistant->priv->video_device), device.c_str());
+ std::string device_string = device.GetString();
+ remove_combo_box (GTK_COMBO_BOX (assistant->priv->video_device), device_string.c_str());
}
-void on_audioinputdevice_added_cb (const Ekiga::AudioInputDevice & audioinput_device, EkigaAssistant *assistant)
+void on_audioinput_device_added_cb (const Ekiga::AudioInputDevice & device, EkigaAssistant *assistant)
{
- std::string device = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.device;
- add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), device.c_str());
+ std::string device_string = device.GetString();
+ add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), device_string.c_str());
}
-void on_audioinputdevice_removed_cb (const Ekiga::AudioInputDevice & audioinput_device, EkigaAssistant *assistant)
+void on_audioinput_device_removed_cb (const Ekiga::AudioInputDevice & device, EkigaAssistant *assistant)
{
- std::string device = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.device;
- remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), device.c_str());
+ std::string device_string = device.GetString();
+ remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), device_string.c_str());
}
-void on_audiooutputdevice_added_cb (const Ekiga::AudioOutputDevice & audiooutput_device, EkigaAssistant *assistant)
+void on_audiooutput_device_added_cb (const Ekiga::AudioOutputDevice & device, EkigaAssistant *assistant)
{
- std::string device = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.device;
- add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), device.c_str());
- add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), device.c_str());
+ std::string device_string = device.GetString();
+ add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), device_string.c_str());
+ add_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), device_string.c_str());
}
-void on_audiooutputdevice_removed_cb (const Ekiga::AudioOutputDevice & audiooutput_device, EkigaAssistant *assistant)
+void on_audiooutput_device_removed_cb (const Ekiga::AudioOutputDevice & device, EkigaAssistant *assistant)
{
- std::string device = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.device;
- remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), device.c_str());
- remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), device.c_str());
+ std::string device_string = device.GetString();
+ remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), device_string.c_str());
+ remove_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), device_string.c_str());
}
@@ -760,14 +759,14 @@
*/
std::vector <std::string> device_list;
- get_audio_output_devices_list (assistant->priv->core, device_list);
+ get_audiooutput_devices_list (assistant->priv->core, device_list);
array = convert_string_list(device_list);
update_combo_box (GTK_COMBO_BOX (assistant->priv->audio_ringer), array, ringer);
update_combo_box (GTK_COMBO_BOX (assistant->priv->audio_player), array, player);
g_free (array);
- get_audio_input_devices_list (assistant->priv->core, device_list);
+ get_audioinput_devices_list (assistant->priv->core, device_list);
array = convert_string_list(device_list);
update_combo_box (GTK_COMBO_BOX (assistant->priv->audio_recorder), array, recorder);
g_free (array);
@@ -848,7 +847,7 @@
gchar** array;
gchar* current_plugin;
- get_video_devices_list (assistant->priv->core, device_list);
+ get_videoinput_devices_list (assistant->priv->core, device_list);
array = convert_string_list (device_list);
current_plugin = gm_conf_get_string (VIDEO_DEVICES_KEY "input_device");
update_combo_box (GTK_COMBO_BOX (assistant->priv->video_device),
@@ -875,90 +874,70 @@
// FIXME: duplicate to gm_prefs_window_get_video_devices_list
void
-get_audio_output_devices_list (Ekiga::ServiceCore *core,
+get_audiooutput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list)
{
Ekiga::AudioOutputCore *audiooutput_core = dynamic_cast<Ekiga::AudioOutputCore *> (core->get ("audiooutput-core"));
- Ekiga::AudioOutputDevice audiooutput_device;
- std::vector <Ekiga::AudioOutputDevice> audiooutput_devices;
+ std::vector <Ekiga::AudioOutputDevice> devices;
- std::string device_string;
device_list.clear();
+ audiooutput_core->get_audiooutput_devices(devices);
- audiooutput_core->get_audiooutput_devices(audiooutput_devices);
-
- for (std::vector<Ekiga::AudioOutputDevice>::iterator iter = audiooutput_devices.begin ();
- iter != audiooutput_devices.end ();
+ for (std::vector<Ekiga::AudioOutputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- audiooutput_device = (*iter);
- device_string = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.device;
- device_list.push_back(device_string);
+ device_list.push_back(iter->GetString());
}
if (device_list.size() == 0) {
- device_string = _("No device found");
- device_list.push_back(device_string);
+ device_list.push_back(_("No device found"));
}
-
}
void
-get_audio_input_devices_list (Ekiga::ServiceCore *core,
+get_audioinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list)
{
Ekiga::AudioInputCore *audioinput_core = dynamic_cast<Ekiga::AudioInputCore *> (core->get ("audioinput-core"));
- Ekiga::AudioInputDevice audioinput_device;
- std::vector <Ekiga::AudioInputDevice> audioinput_devices;
+ std::vector <Ekiga::AudioInputDevice> devices;
- std::string device_string;
device_list.clear();
+ audioinput_core->get_audioinput_devices(devices);
- audioinput_core->get_audioinput_devices(audioinput_devices);
-
- for (std::vector<Ekiga::AudioInputDevice>::iterator iter = audioinput_devices.begin ();
- iter != audioinput_devices.end ();
+ for (std::vector<Ekiga::AudioInputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- audioinput_device = (*iter);
- device_string = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.device;
- device_list.push_back(device_string);
+ device_list.push_back(iter->GetString());
}
if (device_list.size() == 0) {
- device_string = _("No device found");
- device_list.push_back(device_string);
+ device_list.push_back(_("No device found"));
}
-
}
void
-get_video_devices_list (Ekiga::ServiceCore *core,
+get_videoinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list)
{
- Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (core->get ("vidinput-core"));
- std::vector <Ekiga::VidInputDevice> vidinput_devices;
- Ekiga::VidInputDevice vidinput_device;
+ Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (core->get ("videoinput-core"));
+ std::vector <Ekiga::VideoInputDevice> devices;
- std::string device_string;
device_list.clear();
+ videoinput_core->get_devices(devices);
- vidinput_core->get_vidinput_devices(vidinput_devices);
-
- for (std::vector<Ekiga::VidInputDevice>::iterator iter = vidinput_devices.begin ();
- iter != vidinput_devices.end ();
+ for (std::vector<Ekiga::VideoInputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- vidinput_device = (*iter);
- device_string = vidinput_device.type + "/" + vidinput_device.source + "/" + vidinput_device.device;
- device_list.push_back(device_string);
+ device_list.push_back(iter->GetString());
}
if (device_list.size() == 0) {
- device_string = _("No device found");
- device_list.push_back(device_string);
+ device_list.push_back(_("No device found"));
}
}
@@ -1283,23 +1262,23 @@
G_CALLBACK (gtk_widget_hide), NULL);
sigc::connection conn;
- Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (core->get ("vidinput-core"));
+ Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (core->get ("videoinput-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->device_added.connect (sigc::bind (sigc::ptr_fun (on_vidinputdevice_added_cb), assistant));
+ conn = videoinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_added_cb), assistant));
assistant->priv->connections.push_back (conn);
- conn = vidinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_vidinputdevice_removed_cb), assistant));
+ conn = videoinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_removed_cb), assistant));
assistant->priv->connections.push_back (conn);
- conn = audioinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audioinputdevice_added_cb), assistant));
+ conn = audioinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audioinput_device_added_cb), assistant));
assistant->priv->connections.push_back (conn);
- conn = audioinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audioinputdevice_removed_cb), assistant));
+ conn = audioinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audioinput_device_removed_cb), assistant));
assistant->priv->connections.push_back (conn);
- conn = audiooutput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audiooutputdevice_added_cb), assistant));
+ conn = audiooutput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audiooutput_device_added_cb), assistant));
assistant->priv->connections.push_back (conn);
- conn = audiooutput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audiooutputdevice_removed_cb), assistant));
+ conn = audiooutput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audiooutput_device_removed_cb), assistant));
assistant->priv->connections.push_back (conn);
return GTK_WIDGET (assistant);
Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp (original)
+++ trunk/src/gui/main.cpp Sun May 18 13:08:23 2008
@@ -658,17 +658,17 @@
if (mw->current_call) {
- DisplayStats display_stats;
- Ekiga::DisplayCore *display_core = dynamic_cast<Ekiga::DisplayCore *> (mw->core.get ("display-core"));
- display_core->get_display_stats(display_stats);
+ VideoOutputStats videooutput_stats;
+ Ekiga::VideoOutputCore *videooutput_core = dynamic_cast<Ekiga::VideoOutputCore *> (mw->core.get ("videooutput-core"));
+ videooutput_core->get_videooutput_stats(videooutput_stats);
msg = g_strdup_printf (_("A:%.1f/%.1f V:%.1f/%.1f FPS:%d/%d"),
mw->current_call->get_transmitted_audio_bandwidth (),
mw->current_call->get_received_audio_bandwidth (),
mw->current_call->get_transmitted_video_bandwidth (),
mw->current_call->get_received_video_bandwidth (),
- display_stats.tx_fps,
- display_stats.rx_fps);
+ videooutput_stats.tx_fps,
+ videooutput_stats.rx_fps);
gdk_threads_enter ();
gm_main_window_push_info_message (GTK_WIDGET (self), msg);
if (mw->current_call)
@@ -959,7 +959,7 @@
*/
void
-on_videooutput_device_opened_cb (Ekiga::VideoOutputManager & /* manager */, HwAccelStatus /* hw_accel_status */, gpointer /*self*/)
+on_videooutput_device_opened_cb (Ekiga::VideoOutputManager & /* manager */, VideoOutputAccel /* accel */, gpointer /*self*/)
{
}
@@ -969,11 +969,11 @@
}
void
-on_display_mode_changed_cb (Ekiga::VideoOutputManager & /* manager */, DisplayMode display, gpointer self)
+on_videooutput_mode_changed_cb (Ekiga::VideoOutputManager & /* manager */, VideoOutputMode mode, gpointer self)
{
GmMainWindow *mw = gm_mw_get_mw (GTK_WIDGET (self));
- gtk_radio_menu_select_with_id (mw->main_menu, "local_video", display);
+ gtk_radio_menu_select_with_id (mw->main_menu, "local_video", mode);
}
void
@@ -1002,7 +1002,7 @@
void
on_videoinput_device_opened_cb (Ekiga::VideoInputManager & /* manager */,
- Ekiga::VidInputDevice & /* device */,
+ Ekiga::VideoInputDevice & /* device */,
Ekiga::VidInputConfig & config,
gpointer self)
{
@@ -1025,7 +1025,7 @@
void
-on_videoinput_device_closed_cb (Ekiga::VideoInputManager & /* manager */, Ekiga::VidInputDevice & /*device*/, gpointer self)
+on_videoinput_device_closed_cb (Ekiga::VideoInputManager & /* manager */, Ekiga::VideoInputDevice & /*device*/, gpointer self)
{
GmMainWindow *mw = NULL;
g_return_if_fail (self != NULL);
@@ -1040,7 +1040,7 @@
void
on_videoinput_device_error_cb (Ekiga::VideoInputManager & /* manager */,
- Ekiga::VidInputDevice & device,
+ Ekiga::VideoInputDevice & device,
Ekiga::VideoInputErrorCodes error_code,
gpointer self)
{
@@ -1050,7 +1050,7 @@
dialog_title =
g_strdup_printf (_("Error while accessing video device %s"),
- (const char *) device.device.c_str());
+ (const char *) device.name.c_str());
tmp_msg = g_strdup (_("A moving logo will be transmitted during calls. Notice that you can always transmit a given image or the moving logo by choosing \"Picture\" as video plugin and \"Moving logo\" or \"Static picture\" as device."));
switch (error_code) {
@@ -1138,7 +1138,7 @@
dialog_title =
g_strdup_printf (_("Error while opening audio input device %s"),
- (const char *) device.device.c_str());
+ (const char *) device.name.c_str());
tmp_msg = g_strdup (_("Only silence will be transmitted."));
switch (error_code) {
@@ -1223,7 +1223,7 @@
dialog_title =
g_strdup_printf (_("Error while opening audio output device %s"),
- (const char *) device.device.c_str());
+ (const char *) device.name.c_str());
tmp_msg = g_strdup (_("No incoming sound will be played."));
switch (error_code) {
@@ -2543,8 +2543,8 @@
#endif
display_info.widget_info_set = TRUE;
- Ekiga::DisplayCore *display_core = dynamic_cast<Ekiga::DisplayCore *> (mw->core.get ("display-core"));
- display_core->set_display_info(display_info);
+ Ekiga::VideoOutputCore *videooutput_core = dynamic_cast<Ekiga::VideoOutputCore *> (mw->core.get ("videooutput-core"));
+ videooutput_core->set_display_info(display_info);
return FALSE;
}
@@ -2620,12 +2620,12 @@
mw = gm_mw_get_mw (GTK_WIDGET (data));
g_return_if_fail (mw != NULL);
- Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (mw->core.get ("vidinput-core"));
+ Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (mw->core.get ("videoinput-core"));
- vidinput_core->set_whiteness ((unsigned) GTK_ADJUSTMENT (mw->adj_whiteness)->value);
- vidinput_core->set_brightness ((unsigned) GTK_ADJUSTMENT (mw->adj_brightness)->value);
- vidinput_core->set_colour ((unsigned) GTK_ADJUSTMENT (mw->adj_colour)->value);
- vidinput_core->set_contrast ((unsigned) GTK_ADJUSTMENT (mw->adj_contrast)->value);
+ videoinput_core->set_whiteness ((unsigned) GTK_ADJUSTMENT (mw->adj_whiteness)->value);
+ videoinput_core->set_brightness ((unsigned) GTK_ADJUSTMENT (mw->adj_brightness)->value);
+ videoinput_core->set_colour ((unsigned) GTK_ADJUSTMENT (mw->adj_colour)->value);
+ videoinput_core->set_contrast ((unsigned) GTK_ADJUSTMENT (mw->adj_contrast)->value);
}
@@ -3279,21 +3279,21 @@
GmMainWindow *mw = gm_mw_get_mw (main_window);
g_return_if_fail (mw != NULL);
- DisplayMode display_mode;
+ VideoOutputMode videooutput_mode;
switch (toggle) {
case OFF:
if (gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view") == FULLSCREEN) {
- display_mode = (DisplayMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen");
- gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", display_mode);
+ videooutput_mode = (VideoOutputMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen");
+ gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", videooutput_mode);
}
break;
case ON:
if (gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view") != FULLSCREEN) {
- display_mode = (DisplayMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view");
- gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen", display_mode);
+ videooutput_mode = (VideoOutputMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view");
+ gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen", videooutput_mode);
gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", FULLSCREEN);
}
break;
@@ -3302,13 +3302,13 @@
default:
if (gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view") == FULLSCREEN) {
- display_mode = (DisplayMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen");
- gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", display_mode);
+ videooutput_mode = (VideoOutputMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen");
+ gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", videooutput_mode);
}
else {
- display_mode = (DisplayMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view");
- gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen", display_mode);
+ videooutput_mode = (VideoOutputMode) gm_conf_get_int (VIDEO_DISPLAY_KEY "video_view");
+ gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view_before_fullscreen", videooutput_mode);
gm_conf_set_int (VIDEO_DISPLAY_KEY "video_view", FULLSCREEN);
}
break;
@@ -3876,36 +3876,36 @@
(GDestroyNotify) g_free);
/* New Display Engine signals */
- Ekiga::DisplayCore *display_core = dynamic_cast<Ekiga::DisplayCore *> (mw->core.get ("display-core"));
+ Ekiga::VideoOutputCore *videooutput_core = dynamic_cast<Ekiga::VideoOutputCore *> (mw->core.get ("videooutput-core"));
- conn = display_core->device_opened.connect (sigc::bind (sigc::ptr_fun (on_videooutput_device_opened_cb), (gpointer) window));
+ conn = videooutput_core->device_opened.connect (sigc::bind (sigc::ptr_fun (on_videooutput_device_opened_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = display_core->device_closed.connect (sigc::bind (sigc::ptr_fun (on_videooutput_device_closed_cb), (gpointer) window));
+ conn = videooutput_core->device_closed.connect (sigc::bind (sigc::ptr_fun (on_videooutput_device_closed_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = display_core->logo_update_required.connect (sigc::bind (sigc::ptr_fun (on_logo_update_required_cb), (gpointer) window));
+ conn = videooutput_core->logo_update_required.connect (sigc::bind (sigc::ptr_fun (on_logo_update_required_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = display_core->display_size_changed.connect (sigc::bind (sigc::ptr_fun (on_display_size_changed_cb), (gpointer) window));
+ conn = videooutput_core->display_size_changed.connect (sigc::bind (sigc::ptr_fun (on_display_size_changed_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = display_core->display_mode_changed.connect (sigc::bind (sigc::ptr_fun (on_display_mode_changed_cb), (gpointer) window));
+ conn = videooutput_core->videooutput_mode_changed.connect (sigc::bind (sigc::ptr_fun (on_videooutput_mode_changed_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = display_core->fullscreen_mode_changed.connect (sigc::bind (sigc::ptr_fun (on_fullscreen_mode_changed_cb), (gpointer) window));
+ conn = videooutput_core->fullscreen_mode_changed.connect (sigc::bind (sigc::ptr_fun (on_fullscreen_mode_changed_cb), (gpointer) window));
mw->connections.push_back (conn);
- /* New VidInput Engine signals */
- Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (mw->core.get ("vidinput-core"));
+ /* New VideoInput Engine signals */
+ Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (mw->core.get ("videoinput-core"));
- conn = vidinput_core->device_opened.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_opened_cb), (gpointer) window));
+ conn = videoinput_core->device_opened.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_opened_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = vidinput_core->device_closed.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_closed_cb), (gpointer) window));
+ conn = videoinput_core->device_closed.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_closed_cb), (gpointer) window));
mw->connections.push_back (conn);
- conn = vidinput_core->device_error.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_error_cb), (gpointer) window));
+ conn = videoinput_core->device_error.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_error_cb), (gpointer) window));
mw->connections.push_back (conn);
/* New AudioInput Engine signals */
Modified: trunk/src/gui/preferences.cpp
==============================================================================
--- trunk/src/gui/preferences.cpp (original)
+++ trunk/src/gui/preferences.cpp Sun May 18 13:08:23 2008
@@ -312,11 +312,11 @@
gpointer data);
void
-gm_prefs_window_get_audio_output_devices_list (Ekiga::ServiceCore *core,
+gm_prefs_window_get_audiooutput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list);
void
-gm_prefs_window_get_audio_input_devices_list (Ekiga::ServiceCore *core,
+gm_prefs_window_get_audioinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list);
gchar**
@@ -762,7 +762,7 @@
/* Add all the fields for the audio manager */
std::vector <std::string> device_list;
- gm_prefs_window_get_audio_output_devices_list (pw->core, device_list);
+ gm_prefs_window_get_audiooutput_devices_list (pw->core, device_list);
array = gm_prefs_window_convert_string_list(device_list);
pw->sound_events_output =
gnome_prefs_string_option_menu_new (subsection, _("Ringing Device"), (const gchar **)array, SOUND_EVENTS_KEY "output_device", _("Select the ringing audio device to use"), 0);
@@ -771,7 +771,7 @@
g_free (array);
/* The recorder */
- gm_prefs_window_get_audio_input_devices_list (pw->core, device_list);
+ gm_prefs_window_get_audioinput_devices_list (pw->core, device_list);
array = gm_prefs_window_convert_string_list(device_list);
pw->audio_recorder =
gnome_prefs_string_option_menu_new (subsection, _("Input device:"), (const gchar **)array, AUDIO_DEVICES_KEY "input_device", _("Select the audio input device to use"), 2);
@@ -784,90 +784,72 @@
void
-gm_prefs_window_get_video_devices_list (Ekiga::ServiceCore *core,
+gm_prefs_window_get_videoinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list)
{
- Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (core->get ("vidinput-core"));
- std::vector <Ekiga::VidInputDevice> vidinput_devices;
- Ekiga::VidInputDevice vidinput_device;
+ Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (core->get ("videoinput-core"));
+ std::vector <Ekiga::VideoInputDevice> devices;
- std::string device_string;
device_list.clear();
+ videoinput_core->get_devices(devices);
- vidinput_core->get_vidinput_devices(vidinput_devices);
-
- for (std::vector<Ekiga::VidInputDevice>::iterator iter = vidinput_devices.begin ();
- iter != vidinput_devices.end ();
+ for (std::vector<Ekiga::VideoInputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- vidinput_device = (*iter);
- device_string = vidinput_device.type + "/" + vidinput_device.source + "/" + vidinput_device.device;
- device_list.push_back(device_string);
+ device_list.push_back(iter->GetString());
}
if (device_list.size() == 0) {
- device_string = _("No device found");
- device_list.push_back(device_string);
+ device_list.push_back(_("No device found"));
}
}
void
-gm_prefs_window_get_audio_output_devices_list (Ekiga::ServiceCore *core,
+gm_prefs_window_get_audiooutput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list)
{
Ekiga::AudioOutputCore *audiooutput_core = dynamic_cast<Ekiga::AudioOutputCore *> (core->get ("audiooutput-core"));
- Ekiga::AudioOutputDevice audiooutput_device;
- std::vector <Ekiga::AudioOutputDevice> audiooutput_devices;
+ std::vector <Ekiga::AudioOutputDevice> devices;
std::string device_string;
device_list.clear();
- audiooutput_core->get_audiooutput_devices(audiooutput_devices);
+ audiooutput_core->get_audiooutput_devices(devices);
- for (std::vector<Ekiga::AudioOutputDevice>::iterator iter = audiooutput_devices.begin ();
- iter != audiooutput_devices.end ();
+ for (std::vector<Ekiga::AudioOutputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- audiooutput_device = (*iter);
- device_string = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.device;
- device_list.push_back(device_string);
+ device_list.push_back(iter->GetString());
}
if (device_list.size() == 0) {
- device_string = _("No device found");
- device_list.push_back(device_string);
+ device_list.push_back(_("No device found"));
}
-
}
void
-gm_prefs_window_get_audio_input_devices_list (Ekiga::ServiceCore *core,
+gm_prefs_window_get_audioinput_devices_list (Ekiga::ServiceCore *core,
std::vector<std::string> & device_list)
{
Ekiga::AudioInputCore *audioinput_core = dynamic_cast<Ekiga::AudioInputCore *> (core->get ("audioinput-core"));
- Ekiga::AudioInputDevice audioinput_device;
- std::vector <Ekiga::AudioInputDevice> audioinput_devices;
+ std::vector <Ekiga::AudioInputDevice> devices;
- std::string device_string;
device_list.clear();
+ audioinput_core->get_audioinput_devices(devices);
- audioinput_core->get_audioinput_devices(audioinput_devices);
-
- for (std::vector<Ekiga::AudioInputDevice>::iterator iter = audioinput_devices.begin ();
- iter != audioinput_devices.end ();
+ for (std::vector<Ekiga::AudioInputDevice>::iterator iter = devices.begin ();
+ iter != devices.end ();
iter++) {
- audioinput_device = (*iter);
- device_string = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.device;
- device_list.push_back(device_string);
+ device_list.push_back(iter->GetString());
}
if (device_list.size() == 0) {
- device_string = _("No device found");
- device_list.push_back(device_string);
+ device_list.push_back(_("No device found"));
}
-
}
@@ -937,7 +919,7 @@
/* The video device */
- gm_prefs_window_get_video_devices_list (pw->core, device_list);
+ gm_prefs_window_get_videoinput_devices_list (pw->core, device_list);
array = gm_prefs_window_convert_string_list(device_list);
pw->video_device =
gnome_prefs_string_option_menu_new (subsection, _("Input device:"), (const gchar **)array, VIDEO_DEVICES_KEY "input_device", _("Select the video input device to use. If an error occurs when using this device a test picture will be transmitted."), 0);
@@ -1343,59 +1325,59 @@
g_free (file_name);
}
-void on_vidinputdevice_added_cb (const Ekiga::VidInputDevice & vidinput_device, GtkWidget *prefs_window)
+void on_videoinput_device_added_cb (const Ekiga::VideoInputDevice & device, GtkWidget *prefs_window)
{
GmPreferencesWindow *pw = NULL;
g_return_if_fail (prefs_window != NULL);
pw = gm_pw_get_pw (prefs_window);
- std::string device = vidinput_device.type + "/" + vidinput_device.source + "/" + vidinput_device.device;
- gnome_prefs_string_option_menu_add (pw->video_device, device.c_str());
+ std::string device_string = device.type + "/" + device.source + "/" + device.name;
+ gnome_prefs_string_option_menu_add (pw->video_device, device_string.c_str());
}
-void on_vidinputdevice_removed_cb (const Ekiga::VidInputDevice & vidinput_device, GtkWidget *prefs_window)
+void on_videoinput_device_removed_cb (const Ekiga::VideoInputDevice & device, GtkWidget *prefs_window)
{
GmPreferencesWindow *pw = NULL;
g_return_if_fail (prefs_window != NULL);
pw = gm_pw_get_pw (prefs_window);
- std::string device = vidinput_device.type + "/" + vidinput_device.source + "/" + vidinput_device.device;
- gnome_prefs_string_option_menu_remove(pw->video_device, device.c_str());
+ std::string device_string = device.type + "/" + device.source + "/" + device.name;
+ gnome_prefs_string_option_menu_remove(pw->video_device, device_string.c_str());
}
-void on_audioinputdevice_added_cb (const Ekiga::AudioInputDevice & audioinput_device, GtkWidget *prefs_window)
+void on_audioinput_device_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;
+ std::string device = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.name;
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)
+void on_audioinput_device_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;
+ std::string device = audioinput_device.type + "/" + audioinput_device.source + "/" + audioinput_device.name;
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)
+void on_audiooutput_device_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;
+ std::string device = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.name;
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)
+void on_audiooutput_device_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;
+ std::string device = audiooutput_device.type + "/" + audiooutput_device.source + "/" + audiooutput_device.name;
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());
}
@@ -1413,7 +1395,7 @@
std::vector <std::string> device_list;
/* The player */
- gm_prefs_window_get_audio_output_devices_list (pw->core, device_list);
+ gm_prefs_window_get_audiooutput_devices_list (pw->core, device_list);
array = gm_prefs_window_convert_string_list(device_list);
gnome_prefs_string_option_menu_update (pw->audio_player,
(const gchar **)array,
@@ -1424,7 +1406,7 @@
g_free (array);
/* The recorder */
- gm_prefs_window_get_audio_input_devices_list (pw->core, device_list);
+ gm_prefs_window_get_audioinput_devices_list (pw->core, device_list);
array = gm_prefs_window_convert_string_list(device_list);
gnome_prefs_string_option_menu_update (pw->audio_recorder,
(const gchar **)array,
@@ -1433,7 +1415,7 @@
/* The Video player */
- gm_prefs_window_get_video_devices_list (pw->core, device_list);
+ gm_prefs_window_get_videoinput_devices_list (pw->core, device_list);
array = gm_prefs_window_convert_string_list(device_list);
gnome_prefs_string_option_menu_update (pw->video_device,
(const gchar **)array,
@@ -1618,23 +1600,23 @@
G_CALLBACK (delete_window_cb), NULL);
sigc::connection conn;
- Ekiga::VidInputCore *vidinput_core = dynamic_cast<Ekiga::VidInputCore *> (core->get ("vidinput-core"));
+ Ekiga::VideoInputCore *videoinput_core = dynamic_cast<Ekiga::VideoInputCore *> (core->get ("videoinput-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->device_added.connect (sigc::bind (sigc::ptr_fun (on_vidinputdevice_added_cb), window));
+ conn = videoinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_added_cb), window));
pw->connections.push_back (conn);
- conn = vidinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_vidinputdevice_removed_cb), window));
+ conn = videoinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_videoinput_device_removed_cb), window));
pw->connections.push_back (conn);
- conn = audioinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audioinputdevice_added_cb), window));
+ conn = audioinput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audioinput_device_added_cb), window));
pw->connections.push_back (conn);
- conn = audioinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audioinputdevice_removed_cb), window));
+ conn = audioinput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audioinput_device_removed_cb), window));
pw->connections.push_back (conn);
- conn = audiooutput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audiooutputdevice_added_cb), window));
+ conn = audiooutput_core->device_added.connect (sigc::bind (sigc::ptr_fun (on_audiooutput_device_added_cb), window));
pw->connections.push_back(conn);
- conn = audiooutput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audiooutputdevice_removed_cb), window));
+ conn = audiooutput_core->device_removed.connect (sigc::bind (sigc::ptr_fun (on_audiooutput_device_removed_cb), window));
pw->connections.push_back (conn);
return window;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]