ekiga r6253 - in trunk: . lib/engine/audioinput/null lib/engine/audioinput/ptlib lib/engine/audioinput/skel lib/engine/audiooutput/null lib/engine/audiooutput/ptlib lib/engine/audiooutput/skel lib/engine/display/common lib/engine/display/dx lib/engine/display/skel lib/engine/display/x lib/engine/vidinput/mlogo lib/engine/vidinput/ptlib lib/engine/vidinput/skel src/gui
- From: mschneid svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r6253 - in trunk: . lib/engine/audioinput/null lib/engine/audioinput/ptlib lib/engine/audioinput/skel lib/engine/audiooutput/null lib/engine/audiooutput/ptlib lib/engine/audiooutput/skel lib/engine/display/common lib/engine/display/dx lib/engine/display/skel lib/engine/display/x lib/engine/vidinput/mlogo lib/engine/vidinput/ptlib lib/engine/vidinput/skel src/gui
- Date: Mon, 12 May 2008 17:41:08 +0100 (BST)
Author: mschneid
Date: Mon May 12 16:41:07 2008
New Revision: 6253
URL: http://svn.gnome.org/viewvc/ekiga?rev=6253&view=rev
Log:
Some alignment of function names in the managers.
Basis for more documenting.
Modified:
trunk/ChangeLog
trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp
trunk/lib/engine/audioinput/null/audioinput-manager-null.h
trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp
trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.h
trunk/lib/engine/audioinput/skel/audioinput-core.cpp
trunk/lib/engine/audioinput/skel/audioinput-manager.h
trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp
trunk/lib/engine/audiooutput/null/audiooutput-manager-null.h
trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp
trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.h
trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp
trunk/lib/engine/audiooutput/skel/audiooutput-manager.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/dx/display-manager-dx.h
trunk/lib/engine/display/skel/display-core.cpp
trunk/lib/engine/display/skel/display-core.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/display/x/display-manager-x.h
trunk/lib/engine/vidinput/mlogo/vidinput-main-mlogo.cpp
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-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-manager.h
trunk/src/gui/main.cpp
Modified: trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp
==============================================================================
--- trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp (original)
+++ trunk/lib/engine/audioinput/null/audioinput-manager-null.cpp Mon May 12 16:41:07 2008
@@ -1,4 +1,3 @@
-
/*
* Ekiga -- A VoIP and Video-Conferencing application
* Copyright (C) 2000-2008 Damien Sandras
@@ -46,23 +45,23 @@
current_state.opened = false;
}
-void GMAudioInputManager_null::get_audioinput_devices(std::vector <Ekiga::AudioInputDevice> & audioinput_devices)
+void GMAudioInputManager_null::get_devices(std::vector <Ekiga::AudioInputDevice> & devices)
{
- Ekiga::AudioInputDevice audioinput_device;
- audioinput_device.type = DEVICE_TYPE;
- audioinput_device.source = DEVICE_SOURCE;
- audioinput_device.device = DEVICE_DEVICE;
- audioinput_devices.push_back(audioinput_device);
+ Ekiga::AudioInputDevice device;
+ device.type = DEVICE_TYPE;
+ device.source = DEVICE_SOURCE;
+ device.device = DEVICE_DEVICE;
+ devices.push_back(device);
}
-bool GMAudioInputManager_null::set_audioinput_device (const Ekiga::AudioInputDevice & audioinput_device)
+bool GMAudioInputManager_null::set_device (const Ekiga::AudioInputDevice & device)
{
- if ( ( audioinput_device.type == DEVICE_TYPE ) &&
- ( audioinput_device.source == DEVICE_SOURCE) &&
- ( audioinput_device.device == DEVICE_DEVICE) ) {
+ if ( ( device.type == DEVICE_TYPE ) &&
+ ( device.source == DEVICE_SOURCE) &&
+ ( device.device == DEVICE_DEVICE) ) {
- PTRACE(4, "GMAudioInputManager_null\tSetting Device " << audioinput_device.source << "/" << audioinput_device.device);
- current_state.audioinput_device = audioinput_device;
+ PTRACE(4, "GMAudioInputManager_null\tSetting Device " << device.source << "/" << device.device);
+ current_state.device = device;
return true;
}
return false;
@@ -72,7 +71,7 @@
{
Ekiga::AudioInputConfig audioinput_config;
- PTRACE(4, "GMAudioInputManager_null\tOpening Device " << current_state.audioinput_device.source << "/" << current_state.audioinput_device.device);
+ PTRACE(4, "GMAudioInputManager_null\tOpening Device " << current_state.device.source << "/" << current_state.device.device);
PTRACE(4, "GMAudioInputManager_null\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state.channels = channels;
@@ -80,12 +79,12 @@
current_state.bits_per_sample = bits_per_sample;
current_state.opened = true;
- m_Pacing.Restart();
+ adaptive_delay.Restart();
audioinput_config.volume = 0;
audioinput_config.modifyable = false;
- runtime.run_in_main (sigc::bind (audioinputdevice_opened.make_slot (), current_state.audioinput_device, audioinput_config));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, audioinput_config));
return true;
}
@@ -93,7 +92,7 @@
void GMAudioInputManager_null::close()
{
current_state.opened = false;
- runtime.run_in_main (sigc::bind (audioinputdevice_closed.make_slot (), current_state.audioinput_device));
+ runtime.run_in_main (sigc::bind (device_closed.make_slot (), current_state.device));
}
@@ -109,12 +108,12 @@
bytes_read = size;
- m_Pacing.Delay(size * 8 / current_state.bits_per_sample * 1000 / current_state.samplerate);
-
+ adaptive_delay.Delay(size * 8 / current_state.bits_per_sample * 1000 / current_state.samplerate);
+
return true;
}
-bool GMAudioInputManager_null::has_device(const std::string & /*source*/, const std::string & /*device*/, Ekiga::AudioInputDevice & /*audioinput_device*/)
+bool GMAudioInputManager_null::has_device(const std::string & /*source*/, const std::string & /*device_name*/, Ekiga::AudioInputDevice & /*device*/)
{
return false;
}
Modified: trunk/lib/engine/audioinput/null/audioinput-manager-null.h
==============================================================================
--- trunk/lib/engine/audioinput/null/audioinput-manager-null.h (original)
+++ trunk/lib/engine/audioinput/null/audioinput-manager-null.h Mon May 12 16:41:07 2008
@@ -71,9 +71,9 @@
* @param uri an uri
* @return true if a Ekiga::Call could be created
*/
- virtual bool set_audioinput_device (const Ekiga::AudioInputDevice & audioinput_device);
+ virtual bool set_device (const Ekiga::AudioInputDevice & device);
- virtual void get_audioinput_devices(std::vector <Ekiga::AudioInputDevice> & audioinput_devices);
+ virtual void get_devices(std::vector <Ekiga::AudioInputDevice> & devices);
virtual bool open (unsigned channels, unsigned samplerate, unsigned bits_per_sample);
@@ -84,13 +84,13 @@
unsigned & bytes_read);
- virtual bool has_device (const std::string & source, const std::string & device, Ekiga::AudioInputDevice & audioinput_device);
+ virtual bool has_device (const std::string & source, const std::string & device_name, Ekiga::AudioInputDevice & device);
protected:
Ekiga::ServiceCore & core;
Ekiga::Runtime & runtime;
- PAdaptiveDelay m_Pacing;
+ PAdaptiveDelay adaptive_delay;
};
/**
* @}
Modified: trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp
==============================================================================
--- trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp (original)
+++ trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.cpp Mon May 12 16:41:07 2008
@@ -48,30 +48,30 @@
expectedFrameSize = 0;
}
-void GMAudioInputManager_ptlib::get_audioinput_devices(std::vector <Ekiga::AudioInputDevice> & audioinput_devices)
+void GMAudioInputManager_ptlib::get_devices(std::vector <Ekiga::AudioInputDevice> & devices)
{
PStringArray audio_sources;
PStringArray audio_devices;
char **sources_array;
char **devices_array;
- Ekiga::AudioInputDevice audioinput_device;
- audioinput_device.type = DEVICE_TYPE;
+ Ekiga::AudioInputDevice device;
+ device.type = DEVICE_TYPE;
audio_sources = PSoundChannel::GetDriverNames ();
sources_array = audio_sources.ToCharArray ();
for (PINDEX i = 0; sources_array[i] != NULL; i++) {
- audioinput_device.source = sources_array[i];
+ device.source = sources_array[i];
- if (audioinput_device.source != "EKIGA") {
- audio_devices = PSoundChannel::GetDeviceNames (audioinput_device.source, PSoundChannel::Recorder);
+ if (device.source != "EKIGA") {
+ audio_devices = PSoundChannel::GetDeviceNames (device.source, PSoundChannel::Recorder);
devices_array = audio_devices.ToCharArray ();
for (PINDEX j = 0; devices_array[j] != NULL; j++) {
- audioinput_device.device = devices_array[j];
- audioinput_devices.push_back(audioinput_device);
+ device.device = devices_array[j];
+ devices.push_back(device);
}
free (devices_array);
}
@@ -79,12 +79,12 @@
free (sources_array);
}
-bool GMAudioInputManager_ptlib::set_audioinput_device (const Ekiga::AudioInputDevice & audioinput_device)
+bool GMAudioInputManager_ptlib::set_device (const Ekiga::AudioInputDevice & device)
{
- if ( audioinput_device.type == DEVICE_TYPE ) {
+ if ( device.type == DEVICE_TYPE ) {
- PTRACE(4, "GMAudioInputManager_ptlib\tSetting Device " << audioinput_device.source << "/" << audioinput_device.device);
- current_state.audioinput_device = audioinput_device;
+ PTRACE(4, "GMAudioInputManager_ptlib\tSetting Device " << device.source << "/" << device.device);
+ current_state.device = device;
return true;
}
@@ -96,15 +96,15 @@
unsigned volume;
Ekiga::AudioInputConfig audioinput_config;
- PTRACE(4, "GMAudioInputManager_ptlib\tOpening Device " << current_state.audioinput_device.source << "/" << current_state.audioinput_device.device);
+ PTRACE(4, "GMAudioInputManager_ptlib\tOpening Device " << current_state.device.source << "/" << current_state.device.device);
PTRACE(4, "GMAudioInputManager_ptlib\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state.channels = channels;
current_state.samplerate = samplerate;
current_state.bits_per_sample = bits_per_sample;
- input_device = PSoundChannel::CreateOpenedChannel (current_state.audioinput_device.source,
- current_state.audioinput_device.device,
+ input_device = PSoundChannel::CreateOpenedChannel (current_state.device.source,
+ current_state.device.device,
PSoundChannel::Recorder,
channels,
samplerate,
@@ -116,7 +116,7 @@
if (error_code != Ekiga::AUDIO_ERR_NONE) {
PTRACE(1, "GMAudioInputManager_ptlib\tEncountered error " << error_code << " while opening device ");
- runtime.run_in_main (sigc::bind (audioinputdevice_error.make_slot (), current_state.audioinput_device, error_code));
+ runtime.run_in_main (sigc::bind (device_error.make_slot (), current_state.device, error_code));
return false;
}
@@ -126,20 +126,20 @@
audioinput_config.volume = volume;
audioinput_config.modifyable = true;
- runtime.run_in_main (sigc::bind (audioinputdevice_opened.make_slot (), current_state.audioinput_device, audioinput_config));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, audioinput_config));
return true;
}
void GMAudioInputManager_ptlib::close()
{
- PTRACE(4, "GMAudioInputManager_ptlib\tClosing device " << current_state.audioinput_device.source << "/" << current_state.audioinput_device.device);
+ PTRACE(4, "GMAudioInputManager_ptlib\tClosing device " << current_state.device.source << "/" << current_state.device.device);
if (input_device) {
delete input_device;
input_device = NULL;
}
current_state.opened = false;
- runtime.run_in_main (sigc::bind (audioinputdevice_closed.make_slot (), current_state.audioinput_device));
+ runtime.run_in_main (sigc::bind (device_closed.make_slot (), current_state.device));
}
void GMAudioInputManager_ptlib::set_buffer_size (unsigned buffer_size, unsigned num_buffers)
@@ -170,7 +170,7 @@
}
else {
PTRACE(1, "GMAudioInputManager_ptlib\tEncountered error while trying to read data");
- runtime.run_in_main (sigc::bind (audioinputdevice_error.make_slot (), current_state.audioinput_device, Ekiga::AUDIO_ERR_READ));
+ runtime.run_in_main (sigc::bind (device_error.make_slot (), current_state.device, Ekiga::AUDIO_ERR_READ));
}
}
return ret;
@@ -183,18 +183,18 @@
input_device->SetVolume(volume);
}
-bool GMAudioInputManager_ptlib::has_device(const std::string & source, const std::string & device, Ekiga::AudioInputDevice & audioinput_device)
+bool GMAudioInputManager_ptlib::has_device(const std::string & source, const std::string & device_name, Ekiga::AudioInputDevice & device)
{
if (source == "alsa") {
- audioinput_device.type = DEVICE_TYPE;
- audioinput_device.source = "ALSA";
- audioinput_device.device = device;
+ device.type = DEVICE_TYPE;
+ device.source = "ALSA";
+ device.device = device_name;
return true;
}
/* if (source == "oss") {
- audioinput_device.type = DEVICE_TYPE;
- audioinput_device.source = "OSS";
- audioinput_device.device = device;
+ device.type = DEVICE_TYPE;
+ device.source = "OSS";
+ device.device = device;
return true;
}*/
return false;
Modified: trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.h
==============================================================================
--- trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.h (original)
+++ trunk/lib/engine/audioinput/ptlib/audioinput-manager-ptlib.h Mon May 12 16:41:07 2008
@@ -69,9 +69,9 @@
* @param uri an uri
* @return true if a Ekiga::Call could be created
*/
- virtual bool set_audioinput_device (const Ekiga::AudioInputDevice & audioinput_device);
+ virtual bool set_device (const Ekiga::AudioInputDevice & device);
- virtual void get_audioinput_devices(std::vector <Ekiga::AudioInputDevice> & audioinput_devices);
+ virtual void get_devices(std::vector <Ekiga::AudioInputDevice> & devices);
virtual bool open (unsigned channels, unsigned samplerate, unsigned bits_per_sample);
@@ -85,7 +85,7 @@
virtual void set_volume (unsigned /* volume */ );
- virtual bool has_device (const std::string & source, const std::string & device, Ekiga::AudioInputDevice & audioinput_device);
+ virtual bool has_device (const std::string & source, const std::string & device_name, Ekiga::AudioInputDevice & device);
protected:
Ekiga::ServiceCore & core;
Modified: trunk/lib/engine/audioinput/skel/audioinput-core.cpp
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-core.cpp (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-core.cpp Mon May 12 16:41:07 2008
@@ -165,9 +165,9 @@
managers.insert (&manager);
manager_added.emit (manager);
- manager.audioinputdevice_error.connect (sigc::bind (sigc::mem_fun (this, &AudioInputCore::on_audioinputdevice_error), &manager));
- manager.audioinputdevice_opened.connect (sigc::bind (sigc::mem_fun (this, &AudioInputCore::on_audioinputdevice_opened), &manager));
- manager.audioinputdevice_closed.connect (sigc::bind (sigc::mem_fun (this, &AudioInputCore::on_audioinputdevice_closed), &manager));
+ manager.device_error.connect (sigc::bind (sigc::mem_fun (this, &AudioInputCore::on_audioinputdevice_error), &manager));
+ manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &AudioInputCore::on_audioinputdevice_opened), &manager));
+ manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &AudioInputCore::on_audioinputdevice_closed), &manager));
}
@@ -191,7 +191,7 @@
for (std::set<AudioInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++)
- (*iter)->get_audioinput_devices (audioinput_devices);
+ (*iter)->get_devices (audioinput_devices);
if (PTrace::CanTrace(4)) {
for (std::vector<AudioInputDevice>::iterator iter = audioinput_devices.begin ();
@@ -421,7 +421,7 @@
for (std::set<AudioInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
- if ((*iter)->set_audioinput_device (audioinput_device)) {
+ if ((*iter)->set_device (audioinput_device)) {
current_manager = (*iter);
}
}
Modified: trunk/lib/engine/audioinput/skel/audioinput-manager.h
==============================================================================
--- trunk/lib/engine/audioinput/skel/audioinput-manager.h (original)
+++ trunk/lib/engine/audioinput/skel/audioinput-manager.h Mon May 12 16:41:07 2008
@@ -48,13 +48,6 @@
* @{
*/
- typedef struct ManagerState {
- bool opened;
- unsigned channels;
- unsigned samplerate;
- unsigned bits_per_sample;
- AudioInputDevice audioinput_device;
- };
class AudioInputManager
@@ -80,29 +73,36 @@
* @return true if a Ekiga::Call could be created
*/
- virtual void get_audioinput_devices (std::vector <AudioInputDevice> & audioinput_devices) = 0;
+ virtual void get_devices (std::vector <AudioInputDevice> & _devices) = 0;
- virtual bool set_audioinput_device (const AudioInputDevice & audioinput_device) = 0;
+ virtual bool set_device (const AudioInputDevice & device) = 0;
virtual bool open (unsigned channels, unsigned samplerate, unsigned bits_per_sample) = 0;
+ virtual void close() {};
+
virtual void set_buffer_size (unsigned /*buffer_size*/, unsigned /*num_buffers*/) {};
virtual bool get_frame_data (char *data,
unsigned size,
unsigned & bytes_read) = 0;
- virtual void close() {};
-
- virtual void set_volume (unsigned /* volume */ ) {};
+ virtual void set_volume (unsigned /* volume */ ) {};
- virtual bool has_device (const std::string & source, const std::string & device, AudioInputDevice & audioinput_device) = 0;
+ virtual bool has_device (const std::string & source, const std::string & device_name, AudioInputDevice & device) = 0;
- sigc::signal<void, AudioInputDevice, AudioInputErrorCodes> audioinputdevice_error;
- sigc::signal<void, AudioInputDevice, AudioInputConfig> audioinputdevice_opened;
- sigc::signal<void, AudioInputDevice> audioinputdevice_closed;
+ sigc::signal<void, AudioInputDevice, AudioInputErrorCodes> device_error;
+ sigc::signal<void, AudioInputDevice, AudioInputConfig> device_opened;
+ sigc::signal<void, AudioInputDevice> device_closed;
protected:
+ typedef struct ManagerState {
+ bool opened;
+ unsigned channels;
+ unsigned samplerate;
+ unsigned bits_per_sample;
+ AudioInputDevice device;
+ };
ManagerState current_state;
};
/**
Modified: trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp (original)
+++ trunk/lib/engine/audiooutput/null/audiooutput-manager-null.cpp Mon May 12 16:41:07 2008
@@ -1,4 +1,3 @@
-
/*
* Ekiga -- A VoIP and Video-Conferencing application
* Copyright (C) 2000-2008 Damien Sandras
@@ -47,24 +46,24 @@
current_state[Ekiga::secondary].opened = false;
}
-void GMAudioOutputManager_null::get_audiooutput_devices(std::vector <Ekiga::AudioOutputDevice> & audiooutput_devices)
+void GMAudioOutputManager_null::get_devices(std::vector <Ekiga::AudioOutputDevice> & devices)
{
- Ekiga::AudioOutputDevice audiooutput_device;
- audiooutput_device.type = DEVICE_TYPE;
- audiooutput_device.source = DEVICE_SOURCE;
- audiooutput_device.device = DEVICE_DEVICE;
- audiooutput_devices.push_back(audiooutput_device);
+ Ekiga::AudioOutputDevice device;
+ device.type = DEVICE_TYPE;
+ device.source = DEVICE_SOURCE;
+ device.device = DEVICE_DEVICE;
+ devices.push_back(device);
}
-bool GMAudioOutputManager_null::set_audiooutput_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & audiooutput_device)
+bool GMAudioOutputManager_null::set_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & device)
{
- if ( ( audiooutput_device.type == DEVICE_TYPE ) &&
- ( audiooutput_device.source == DEVICE_SOURCE) &&
- ( audiooutput_device.device == DEVICE_DEVICE) ) {
+ if ( ( device.type == DEVICE_TYPE ) &&
+ ( device.source == DEVICE_SOURCE) &&
+ ( device.device == DEVICE_DEVICE) ) {
- PTRACE(4, "GMAudioOutputManager_null\tSetting Device[" << primarySecondary << "] " << audiooutput_device.source << "/" << audiooutput_device.device);
- current_state[primarySecondary].audiooutput_device = audiooutput_device;
+ PTRACE(4, "GMAudioOutputManager_null\tSetting Device[" << primarySecondary << "] " << device.source << "/" << device.device);
+ current_state[primarySecondary].device = device;
return true;
}
return false;
@@ -74,7 +73,7 @@
{
Ekiga::AudioOutputConfig audiooutput_config;
- PTRACE(4, "GMAudioOutputManager_null\tOpening Device[" << primarySecondary << "] " << current_state[primarySecondary].audiooutput_device.source << "/" << current_state[primarySecondary].audiooutput_device.device);
+ PTRACE(4, "GMAudioOutputManager_null\tOpening Device[" << primarySecondary << "] " << current_state[primarySecondary].device.source << "/" << current_state[primarySecondary].device.device);
PTRACE(4, "GMAudioOutputManager_null\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state[primarySecondary].channels = channels;
@@ -82,12 +81,12 @@
current_state[primarySecondary].bits_per_sample = bits_per_sample;
current_state[primarySecondary].opened = true;
- m_Pacing[primarySecondary].Restart();
+ adaptive_delay[primarySecondary].Restart();
audiooutput_config.volume = 0;
audiooutput_config.modifyable = false;
- runtime.run_in_main (sigc::bind (audiooutputdevice_opened.make_slot (), primarySecondary, current_state[primarySecondary].audiooutput_device, audiooutput_config));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), primarySecondary, current_state[primarySecondary].device, audiooutput_config));
return true;
}
@@ -95,7 +94,7 @@
void GMAudioOutputManager_null::close(Ekiga::AudioOutputPrimarySecondary primarySecondary)
{
current_state[primarySecondary].opened = false;
- runtime.run_in_main (sigc::bind (audiooutputdevice_closed.make_slot (), primarySecondary, current_state[primarySecondary].audiooutput_device));
+ runtime.run_in_main (sigc::bind (device_closed.make_slot (), primarySecondary, current_state[primarySecondary].device));
}
@@ -111,11 +110,11 @@
written = size;
- m_Pacing[primarySecondary].Delay(size * 8 / current_state[primarySecondary].bits_per_sample * 1000 / current_state[primarySecondary].samplerate);
+ adaptive_delay[primarySecondary].Delay(size * 8 / current_state[primarySecondary].bits_per_sample * 1000 / current_state[primarySecondary].samplerate);
return true;
}
-bool GMAudioOutputManager_null::has_device(const std::string & /*sink*/, const std::string & /*device*/, Ekiga::AudioOutputDevice & /*audiooutput_device*/)
+bool GMAudioOutputManager_null::has_device(const std::string & /*sink*/, const std::string & /*device_name*/, Ekiga::AudioOutputDevice & /*device*/)
{
return false;
}
Modified: trunk/lib/engine/audiooutput/null/audiooutput-manager-null.h
==============================================================================
--- trunk/lib/engine/audiooutput/null/audiooutput-manager-null.h (original)
+++ trunk/lib/engine/audiooutput/null/audiooutput-manager-null.h Mon May 12 16:41:07 2008
@@ -71,9 +71,9 @@
* @return true if a Ekiga::Call could be created
*/
- virtual void get_audiooutput_devices (std::vector <Ekiga::AudioOutputDevice> & audiooutput_devices);
+ virtual void get_devices (std::vector <Ekiga::AudioOutputDevice> & devices);
- virtual bool set_audiooutput_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & audiooutput_device);
+ virtual bool set_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & device);
virtual bool open (Ekiga::AudioOutputPrimarySecondary primarySecondary, unsigned channels, unsigned samplerate, unsigned bits_per_sample);
@@ -83,13 +83,13 @@
char *data,
unsigned size,
unsigned & written);
- virtual bool has_device (const std::string & sink, const std::string & device, Ekiga::AudioOutputDevice & audiooutput_device);
+ virtual bool has_device (const std::string & sink, const std::string & device_name, Ekiga::AudioOutputDevice & device);
protected:
Ekiga::ServiceCore & core;
Ekiga::Runtime & runtime;
- PAdaptiveDelay m_Pacing[2];
+ PAdaptiveDelay adaptive_delay[2];
};
/**
Modified: trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp (original)
+++ trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.cpp Mon May 12 16:41:07 2008
@@ -49,30 +49,30 @@
output_device[Ekiga::secondary] = NULL;
}
-void GMAudioOutputManager_ptlib::get_audiooutput_devices(std::vector <Ekiga::AudioOutputDevice> & audiooutput_devices)
+void GMAudioOutputManager_ptlib::get_devices(std::vector <Ekiga::AudioOutputDevice> & devices)
{
PStringArray audio_sources;
PStringArray audio_devices;
char **sources_array;
char **devices_array;
- Ekiga::AudioOutputDevice audiooutput_device;
- audiooutput_device.type = DEVICE_TYPE;
+ Ekiga::AudioOutputDevice device;
+ device.type = DEVICE_TYPE;
audio_sources = PSoundChannel::GetDriverNames ();
sources_array = audio_sources.ToCharArray ();
for (PINDEX i = 0; sources_array[i] != NULL; i++) {
- audiooutput_device.source = sources_array[i];
+ device.source = sources_array[i];
- if (audiooutput_device.source != "EKIGA") {
- audio_devices = PSoundChannel::GetDeviceNames (audiooutput_device.source, PSoundChannel::Player);
+ if (device.source != "EKIGA") {
+ audio_devices = PSoundChannel::GetDeviceNames (device.source, PSoundChannel::Player);
devices_array = audio_devices.ToCharArray ();
for (PINDEX j = 0; devices_array[j] != NULL; j++) {
- audiooutput_device.device = devices_array[j];
- audiooutput_devices.push_back(audiooutput_device);
+ device.device = devices_array[j];
+ devices.push_back(device);
}
free (devices_array);
}
@@ -80,12 +80,12 @@
free (sources_array);
}
-bool GMAudioOutputManager_ptlib::set_audiooutput_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & audiooutput_device)
+bool GMAudioOutputManager_ptlib::set_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & device)
{
- if ( audiooutput_device.type == DEVICE_TYPE ) {
+ if ( device.type == DEVICE_TYPE ) {
- PTRACE(4, "GMAudioOutputManager_ptlib\tSetting Device[" << primarySecondary << "] " << audiooutput_device.source << "/" << audiooutput_device.device);
- current_state[primarySecondary].audiooutput_device = audiooutput_device;
+ PTRACE(4, "GMAudioOutputManager_ptlib\tSetting Device[" << primarySecondary << "] " << device.source << "/" << device.device);
+ current_state[primarySecondary].device = device;
return true;
}
@@ -97,15 +97,15 @@
unsigned volume;
Ekiga::AudioOutputConfig audiooutput_config;
- PTRACE(4, "GMAudioOutputManager_ptlib\tOpening Device " << current_state[primarySecondary].audiooutput_device.source << "/" << current_state[primarySecondary].audiooutput_device.device);
+ PTRACE(4, "GMAudioOutputManager_ptlib\tOpening Device " << current_state[primarySecondary].device.source << "/" << current_state[primarySecondary].device.device);
PTRACE(4, "GMAudioOutputManager_ptlib\tOpening Device with " << channels << "-" << samplerate << "/" << bits_per_sample);
current_state[primarySecondary].channels = channels;
current_state[primarySecondary].samplerate = samplerate;
current_state[primarySecondary].bits_per_sample = bits_per_sample;
- output_device[primarySecondary] = PSoundChannel::CreateOpenedChannel (current_state[primarySecondary].audiooutput_device.source,
- current_state[primarySecondary].audiooutput_device.device,
+ output_device[primarySecondary] = PSoundChannel::CreateOpenedChannel (current_state[primarySecondary].device.source,
+ current_state[primarySecondary].device.device,
PSoundChannel::Player,
channels,
samplerate,
@@ -117,7 +117,7 @@
if (error_code != Ekiga::_AUDIO_ERR_NONE) {
PTRACE(1, "GMAudioOutputManager_ptlib\tEncountered error " << error_code << " while opening device[" << primarySecondary << "]");
- runtime.run_in_main (sigc::bind (audiooutputdevice_error.make_slot (), primarySecondary, current_state[primarySecondary].audiooutput_device, error_code));
+ runtime.run_in_main (sigc::bind (device_error.make_slot (), primarySecondary, current_state[primarySecondary].device, error_code));
return false;
}
@@ -127,20 +127,20 @@
audiooutput_config.volume = volume;
audiooutput_config.modifyable = true;
- runtime.run_in_main (sigc::bind (audiooutputdevice_opened.make_slot (), primarySecondary, current_state[primarySecondary].audiooutput_device, audiooutput_config));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), primarySecondary, current_state[primarySecondary].device, audiooutput_config));
return true;
}
void GMAudioOutputManager_ptlib::close(Ekiga::AudioOutputPrimarySecondary primarySecondary)
{
- PTRACE(4, "GMAudioOutputManager_ptlib\tClosing device[" << primarySecondary << "] " << current_state[primarySecondary].audiooutput_device.source << "/" << current_state[primarySecondary].audiooutput_device.device);
+ PTRACE(4, "GMAudioOutputManager_ptlib\tClosing device[" << primarySecondary << "] " << current_state[primarySecondary].device.source << "/" << current_state[primarySecondary].device.device);
if (output_device[primarySecondary]) {
delete output_device[primarySecondary];
output_device[primarySecondary] = NULL;
}
current_state[primarySecondary].opened = false;
- runtime.run_in_main (sigc::bind (audiooutputdevice_closed.make_slot (), primarySecondary, current_state[primarySecondary].audiooutput_device));
+ runtime.run_in_main (sigc::bind (device_closed.make_slot (), primarySecondary, current_state[primarySecondary].device));
}
void GMAudioOutputManager_ptlib::set_buffer_size (Ekiga::AudioOutputPrimarySecondary primarySecondary, unsigned buffer_size, unsigned num_buffers)
@@ -172,7 +172,7 @@
}
else {
PTRACE(1, "GMAudioOutputManager_ptlib\tEncountered error while trying to write data");
- runtime.run_in_main (sigc::bind (audiooutputdevice_error.make_slot (), primarySecondary, current_state[primarySecondary].audiooutput_device, Ekiga::_AUDIO_ERR_WRITE));
+ runtime.run_in_main (sigc::bind (device_error.make_slot (), primarySecondary, current_state[primarySecondary].device, Ekiga::_AUDIO_ERR_WRITE));
}
}
@@ -186,18 +186,18 @@
output_device[primarySecondary]->SetVolume(volume);
}
-bool GMAudioOutputManager_ptlib::has_device(const std::string & sink, const std::string & device, Ekiga::AudioOutputDevice & audiooutput_device)
+bool GMAudioOutputManager_ptlib::has_device(const std::string & sink, const std::string & device_name, Ekiga::AudioOutputDevice & device)
{
if (sink == "alsa") {
- audiooutput_device.type = DEVICE_TYPE;
- audiooutput_device.source = "ALSA";
- audiooutput_device.device = device;
+ device.type = DEVICE_TYPE;
+ device.source = "ALSA";
+ device.device = device_name;
return true;
}
/* if (source == "oss") {
- audiooutput_device.type = DEVICE_TYPE;
- audiooutput_device.source = "OSS";
- audiooutput_device.device = device;
+ device.type = DEVICE_TYPE;
+ device.source = "OSS";
+ device.device = device_name;
return true;
}*/
return false;
Modified: trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.h
==============================================================================
--- trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.h (original)
+++ trunk/lib/engine/audiooutput/ptlib/audiooutput-manager-ptlib.h Mon May 12 16:41:07 2008
@@ -70,9 +70,9 @@
* @return true if a Ekiga::Call could be created
*/
- virtual void get_audiooutput_devices (std::vector <Ekiga::AudioOutputDevice> & audiooutput_devices);
+ virtual void get_devices (std::vector <Ekiga::AudioOutputDevice> & devices);
- virtual bool set_audiooutput_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & audiooutput_device);
+ virtual bool set_device (Ekiga::AudioOutputPrimarySecondary primarySecondary, const Ekiga::AudioOutputDevice & device);
virtual bool open (Ekiga::AudioOutputPrimarySecondary primarySecondary, unsigned channels, unsigned samplerate, unsigned bits_per_sample);
@@ -87,7 +87,7 @@
virtual void set_volume (Ekiga::AudioOutputPrimarySecondary primarySecondary, unsigned volume );
- virtual bool has_device (const std::string & sink, const std::string & device, Ekiga::AudioOutputDevice & audiooutput_device);
+ virtual bool has_device (const std::string & sink, const std::string & device_name, Ekiga::AudioOutputDevice & device);
protected:
Ekiga::ServiceCore & core;
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-core.cpp Mon May 12 16:41:07 2008
@@ -89,9 +89,9 @@
managers.insert (&manager);
manager_added.emit (manager);
- manager.audiooutputdevice_error.connect (sigc::bind (sigc::mem_fun (this, &AudioOutputCore::on_audiooutputdevice_error), &manager));
- manager.audiooutputdevice_opened.connect (sigc::bind (sigc::mem_fun (this, &AudioOutputCore::on_audiooutputdevice_opened), &manager));
- manager.audiooutputdevice_closed.connect (sigc::bind (sigc::mem_fun (this, &AudioOutputCore::on_audiooutputdevice_closed), &manager));
+ manager.device_error.connect (sigc::bind (sigc::mem_fun (this, &AudioOutputCore::on_audiooutputdevice_error), &manager));
+ manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &AudioOutputCore::on_audiooutputdevice_opened), &manager));
+ manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &AudioOutputCore::on_audiooutputdevice_closed), &manager));
}
void AudioOutputCore::visit_managers (sigc::slot<bool, AudioOutputManager &> visitor)
@@ -141,7 +141,7 @@
for (std::set<AudioOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++)
- (*iter)->get_audiooutput_devices (audiooutput_devices);
+ (*iter)->get_devices (audiooutput_devices);
if (PTrace::CanTrace(4)) {
for (std::vector<AudioOutputDevice>::iterator iter = audiooutput_devices.begin ();
@@ -323,7 +323,7 @@
for (std::set<AudioOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
- if ((*iter)->set_audiooutput_device (primarySecondary, audiooutput_device)) {
+ if ((*iter)->set_device (primarySecondary, audiooutput_device)) {
current_manager[primarySecondary] = (*iter);
}
}
Modified: trunk/lib/engine/audiooutput/skel/audiooutput-manager.h
==============================================================================
--- trunk/lib/engine/audiooutput/skel/audiooutput-manager.h (original)
+++ trunk/lib/engine/audiooutput/skel/audiooutput-manager.h Mon May 12 16:41:07 2008
@@ -47,16 +47,6 @@
* @addtogroup vidinput
* @{
*/
-
- typedef struct ManagerState {
- bool opened;
- unsigned channels;
- unsigned samplerate;
- unsigned bits_per_sample;
- AudioOutputDevice audiooutput_device;
- };
-
-
class AudioOutputManager
{
@@ -80,30 +70,37 @@
* @return true if a Ekiga::Call could be created
*/
- virtual void get_audiooutput_devices (std::vector <AudioOutputDevice> & audiooutput_devices) = 0;
+ virtual void get_devices (std::vector <AudioOutputDevice> & devices) = 0;
- virtual bool set_audiooutput_device (AudioOutputPrimarySecondary primarySecondary, const AudioOutputDevice & audiooutput_device) = 0;
+ virtual bool set_device (AudioOutputPrimarySecondary primarySecondary, const AudioOutputDevice & device) = 0;
virtual bool open (AudioOutputPrimarySecondary primarySecondary, unsigned channels, unsigned samplerate, unsigned bits_per_sample) = 0;
virtual void set_buffer_size (AudioOutputPrimarySecondary /*primarySecondary*/, unsigned /*buffer_size*/, unsigned /*num_buffers*/) {};
virtual bool set_frame_data (AudioOutputPrimarySecondary primarySecondary,
- char *data,
+ char *data,
unsigned size,
- unsigned & written) = 0;
+ unsigned & written) = 0;
- virtual void close(AudioOutputPrimarySecondary /*primarySecondary*/) {};
+ virtual void close (AudioOutputPrimarySecondary /*primarySecondary*/) {};
virtual void set_volume (AudioOutputPrimarySecondary /*primarySecondary*/, unsigned /* volume */ ) {};
- virtual bool has_device (const std::string & sink, const std::string & device, AudioOutputDevice & audiooutput_device) = 0;
-
- sigc::signal<void, AudioOutputPrimarySecondary, AudioOutputDevice, AudioOutputErrorCodes> audiooutputdevice_error;
- sigc::signal<void, AudioOutputPrimarySecondary, AudioOutputDevice, AudioOutputConfig> audiooutputdevice_opened;
- sigc::signal<void, AudioOutputPrimarySecondary, AudioOutputDevice> audiooutputdevice_closed;
+ virtual bool has_device (const std::string & sink, const std::string & device_name, AudioOutputDevice & device) = 0;
+
+ sigc::signal<void, AudioOutputPrimarySecondary, AudioOutputDevice, AudioOutputErrorCodes> device_error;
+ sigc::signal<void, AudioOutputPrimarySecondary, AudioOutputDevice, AudioOutputConfig> device_opened;
+ sigc::signal<void, AudioOutputPrimarySecondary, AudioOutputDevice> device_closed;
protected:
+ typedef struct ManagerState {
+ bool opened;
+ unsigned channels;
+ unsigned samplerate;
+ unsigned bits_per_sample;
+ AudioOutputDevice device;
+ };
ManagerState current_state[2];
};
/**
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 Mon May 12 16:41:07 2008
@@ -46,24 +46,24 @@
#include "display-manager-common.h"
/* The functions */
-GMDisplayManager::GMDisplayManager(Ekiga::ServiceCore & _core)
- : PThread (1000, NoAutoDeleteThread, HighestPriority, "GMDisplayManager"),
+GMVideoOutputManager::GMVideoOutputManager(Ekiga::ServiceCore & _core)
+ : PThread (1000, NoAutoDeleteThread, HighestPriority, "GMVideoOutputManager"),
core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
{
}
-GMDisplayManager::~GMDisplayManager ()
+GMVideoOutputManager::~GMVideoOutputManager ()
{
}
-void GMDisplayManager::start ()
+void GMVideoOutputManager::start ()
{
init_thread = true;
run_thread.Signal();
thread_initialised.Wait();
}
-void GMDisplayManager::stop ()
+void GMVideoOutputManager::stop ()
{
uninit_thread = true;
@@ -72,7 +72,7 @@
}
void
-GMDisplayManager::Main ()
+GMVideoOutputManager::Main ()
{
bool do_sync = false;
bool initialised_thread = false;
@@ -120,7 +120,7 @@
var_mutex.Signal ();
}
-void GMDisplayManager::set_frame_data (unsigned width,
+void GMVideoOutputManager::set_frame_data (unsigned width,
unsigned height,
const char* data,
bool local,
@@ -159,7 +159,7 @@
memcpy (lframeStore.GetPointer(), data, (width * height * 3) >> 1);
if (update_required.local)
- PTRACE(3, "GMDisplayManager\tSkipped earlier local frame");
+ PTRACE(3, "GMVideoOutputManager\tSkipped earlier local frame");
update_required.local = true;
}
else {
@@ -171,14 +171,14 @@
memcpy (rframeStore.GetPointer(), data, (width * height * 3) >> 1);
if (update_required.remote)
- PTRACE(3, "GMDisplayManager\tSkipped earlier remote frame");
+ PTRACE(3, "GMVideoOutputManager\tSkipped earlier remote frame");
update_required.remote = true;
}
var_mutex.Signal();
if ((local_display_info.display == UNSET) || (local_display_info.zoom == 0) || (!local_display_info.config_info_set)) {
- PTRACE(4, "GMDisplayManager\tDisplay and zoom variable not set yet, not opening display");
+ PTRACE(4, "GMVideoOutputManager\tDisplay and zoom variable not set yet, not opening display");
return;
}
@@ -192,7 +192,7 @@
}
-void GMDisplayManager::init()
+void GMVideoOutputManager::init()
{
/* State for last frame */
last_frame.display = UNSET;
@@ -217,14 +217,14 @@
}
-void GMDisplayManager::uninit () {
+void GMVideoOutputManager::uninit () {
/* This is common to all output classes */
lframeStore.SetSize (0);
rframeStore.SetSize (0);
}
bool
-GMDisplayManager::frame_display_change_needed ()
+GMVideoOutputManager::frame_display_change_needed ()
{
DisplayInfo local_display_info;
@@ -232,7 +232,7 @@
if ((!local_display_info.widget_info_set) || (!local_display_info.config_info_set) ||
(local_display_info.display == UNSET) || (local_display_info.zoom == 0)) {
- PTRACE(4, "GMDisplayManager\tWidget not yet realized or gconf info not yet set, not opening display");
+ PTRACE(4, "GMVideoOutputManager\tWidget not yet realized or gconf info not yet set, not opening display");
return false;
}
@@ -268,7 +268,7 @@
}
UpdateRequired
-GMDisplayManager::redraw ()
+GMVideoOutputManager::redraw ()
{
UpdateRequired sync_required;
sync_required = update_required;
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 Mon May 12 16:41:07 2008
@@ -73,25 +73,25 @@
} UpdateRequired;
-class GMDisplayManager
+class GMVideoOutputManager
: public PThread,
- public Ekiga::DisplayManager
+ public Ekiga::VideoOutputManager
{
- PCLASSINFO(GMDisplayManager, PThread);
+ PCLASSINFO(GMVideoOutputManager, PThread);
public:
/* DESCRIPTION : The constructor.
* BEHAVIOR : Initialises the VideoDisplay_embedded.
* PRE : /
*/
- GMDisplayManager (Ekiga::ServiceCore & core);
+ GMVideoOutputManager (Ekiga::ServiceCore & core);
/* DESCRIPTION : The destructor.
* BEHAVIOR : /
* PRE : /
*/
- virtual ~GMDisplayManager (void);
+ virtual ~GMVideoOutputManager (void);
virtual void start ();
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 Mon May 12 16:41:07 2008
@@ -52,9 +52,9 @@
if (display_core != NULL) {
- GMDisplayManager_dx *display_manager = new GMDisplayManager_dx(core);
+ GMVideoOutputManager_dx *videooutput_manager = new GMVideoOutputManager_dx(core);
- display_core->add_manager (*display_manager);
+ display_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 Mon May 12 16:41:07 2008
@@ -37,8 +37,8 @@
#include "display-manager-dx.h"
-GMDisplayManager_dx::GMDisplayManager_dx (Ekiga::ServiceCore & _core)
-: GMDisplayManager(_core)
+GMVideoOutputManager_dx::GMVideoOutputManager_dx (Ekiga::ServiceCore & _core)
+: GMVideoOutputManager(_core)
{
dxWindow = NULL;
@@ -47,7 +47,7 @@
thread_created.Wait ();
}
-GMDisplayManager_dx::~GMDisplayManager_dx ()
+GMVideoOutputManager_dx::~GMVideoOutputManager_dx ()
{
end_thread = true;
run_thread.Signal();
@@ -55,16 +55,16 @@
}
bool
-GMDisplayManager_dx::frame_display_change_needed ()
+GMVideoOutputManager_dx::frame_display_change_needed ()
{
if (!dxWindow)
return true;
- return GMDisplayManager::frame_display_change_needed ();
+ return GMVideoOutputManager::frame_display_change_needed ();
}
void
-GMDisplayManager_dx::setup_frame_display ()
+GMVideoOutputManager_dx::setup_frame_display ()
{
DisplayInfo local_display_info;
@@ -88,14 +88,14 @@
break;
case UNSET:
default:
- PTRACE (1, "GMDisplayManager_DX\tDisplay variable not set");
+ PTRACE (1, "GMVideoOutputManager_DX\tDisplay variable not set");
return;
break;
}
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)) {
- PTRACE(4, "GMDisplayManager_DX\tWidget not yet realized or gconf info not yet set, not opening display");
+ PTRACE(4, "GMVideoOutputManager_DX\tWidget not yet realized or gconf info not yet set, not opening display");
return;
}
@@ -107,7 +107,7 @@
switch (current_frame.display) {
case LOCAL_VIDEO:
- PTRACE(4, "GMDisplayManager_DX\tOpening LOCAL_VIDEO display with image of " << current_frame.local_width << "x" << current_frame.local_height);
+ 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,
local_display_info.x,
@@ -127,7 +127,7 @@
break;
case REMOTE_VIDEO:
- PTRACE(4, "GMDisplayManager_DX\tOpening REMOTE_VIDEO display with image of " << current_frame.remote_width << "x" << current_frame.remote_height);
+ 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,
local_display_info.x,
@@ -149,7 +149,7 @@
case FULLSCREEN:
case PIP:
case PIP_WINDOW:
- PTRACE(4, "GMDisplayManager_DX\tOpening display " << current_frame.display << " with images of "
+ PTRACE(4, "GMVideoOutputManager_DX\tOpening display " << current_frame.display << " 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();
@@ -194,7 +194,7 @@
}
void
-GMDisplayManager_dx::close_frame_display ()
+GMVideoOutputManager_dx::close_frame_display ()
{
runtime.run_in_main (sigc::bind (hw_accel_status_changed.make_slot (), NO_VIDEO));
@@ -206,7 +206,7 @@
}
void
-GMDisplayManager_dx::display_frame (const char *frame,
+GMVideoOutputManager_dx::display_frame (const char *frame,
unsigned width,
unsigned height)
{
@@ -217,7 +217,7 @@
}
void
-GMDisplayManager_dx::display_pip_frames (const char *local_frame,
+GMVideoOutputManager_dx::display_pip_frames (const char *local_frame,
unsigned lf_width,
unsigned lf_height,
const char *remote_frame,
@@ -240,7 +240,7 @@
}
void
-GMDisplayManager_dx::sync (UpdateRequired sync_required)
+GMVideoOutputManager_dx::sync (UpdateRequired sync_required)
{
if (dxWindow)
dxWindow->Sync();
Modified: trunk/lib/engine/display/dx/display-manager-dx.h
==============================================================================
--- trunk/lib/engine/display/dx/display-manager-dx.h (original)
+++ trunk/lib/engine/display/dx/display-manager-dx.h Mon May 12 16:41:07 2008
@@ -44,13 +44,13 @@
#include "display-manager-common.h"
#include "dxwindow.h"
-class GMDisplayManager_dx
- : public GMDisplayManager
+class GMVideoOutputManager_dx
+ : public GMVideoOutputManager
{
public:
- GMDisplayManager_dx (Ekiga::ServiceCore & _core);
+ GMVideoOutputManager_dx (Ekiga::ServiceCore & _core);
- ~GMDisplayManager_dx ();
+ ~GMVideoOutputManager_dx ();
/* DESCRIPTION : /
* BEHAVIOR : Returns TRUE if the given settings require a
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 Mon May 12 16:41:07 2008
@@ -30,7 +30,7 @@
* begin : written in 2007 by Matthias Schneider
* copyright : (c) 2007 by Matthias Schneider
* description : declaration of the interface of a display core.
- * A display core manages DisplayManagers.
+ * A display core manages VideoOutputManagers.
*
*/
@@ -77,7 +77,7 @@
display_core_conf_bridge = new DisplayCoreConfBridge (*this);
}
-void DisplayCore::add_manager (DisplayManager &manager)
+void DisplayCore::add_manager (VideoOutputManager &manager)
{
PWaitAndSignal m(var_mutex);
@@ -92,11 +92,11 @@
}
-void DisplayCore::visit_managers (sigc::slot<bool, DisplayManager &> visitor)
+void DisplayCore::visit_managers (sigc::slot<bool, VideoOutputManager &> visitor)
{
bool go_on = true;
- for (std::set<DisplayManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoOutputManager *>::iterator iter = managers.begin ();
iter != managers.end () && go_on;
iter++)
go_on = visitor (*(*iter));
@@ -113,7 +113,7 @@
g_get_current_time (&last_stats);
- for (std::set<DisplayManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
(*iter)->start ();
@@ -134,7 +134,7 @@
if (number_times_started != 0)
return;
- for (std::set<DisplayManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
(*iter)->stop ();
@@ -180,7 +180,7 @@
var_mutex.Signal ();
- for (std::set<DisplayManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
(*iter)->set_frame_data (width, height, data, local, devices_nbr);
@@ -191,7 +191,7 @@
{
PWaitAndSignal m(var_mutex);
- for (std::set<DisplayManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoOutputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
(*iter)->set_display_info (_display_info);
@@ -199,27 +199,27 @@
}
-void DisplayCore::on_display_mode_changed (DisplayMode display, DisplayManager *manager)
+void DisplayCore::on_display_mode_changed (DisplayMode display, VideoOutputManager *manager)
{
display_mode_changed.emit (*manager, display);
}
-void DisplayCore::on_fullscreen_mode_changed ( FSToggle toggle, DisplayManager *manager)
+void DisplayCore::on_fullscreen_mode_changed ( FSToggle toggle, VideoOutputManager *manager)
{
fullscreen_mode_changed.emit (*manager, toggle);
}
-void DisplayCore::on_display_size_changed ( unsigned width, unsigned height, DisplayManager *manager)
+void DisplayCore::on_display_size_changed ( unsigned width, unsigned height, VideoOutputManager *manager)
{
display_size_changed.emit (*manager, width, height);
}
-void DisplayCore::on_hw_accel_status_changed (HwAccelStatus hw_accel_status, DisplayManager *manager)
+void DisplayCore::on_hw_accel_status_changed (HwAccelStatus hw_accel_status, VideoOutputManager *manager)
{
hw_accel_status_changed.emit (*manager, hw_accel_status);
}
-void DisplayCore::on_logo_update_required (DisplayManager *manager)
+void DisplayCore::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 Mon May 12 16:41:07 2008
@@ -60,7 +60,7 @@
* @{
*/
- class DisplayManager;
+ class VideoOutputManager;
/** Core object for the video display support
*/
@@ -96,20 +96,20 @@
{ return "\tDisplay Core managing Display Manager objects"; }
- /** Adds a DisplayManager to the DisplayCore service.
+ /** Adds a VideoOutputManager to the DisplayCore service.
* @param The manager to be added.
*/
- void add_manager (DisplayManager &manager);
+ void add_manager (VideoOutputManager &manager);
- /** Triggers a callback for all Ekiga::DisplayManager sources of the
+ /** Triggers a callback for all Ekiga::VideoOutputManager sources of the
* DisplayCore service.
*/
- void visit_managers (sigc::slot<bool, DisplayManager &> visitor);
+ void visit_managers (sigc::slot<bool, VideoOutputManager &> visitor);
- /** This signal is emitted when a Ekiga::DisplayManager has been
+ /** This signal is emitted when a Ekiga::VideoOutputManager has been
* added to the DisplayCore Service.
*/
- sigc::signal<void, DisplayManager &> manager_added;
+ sigc::signal<void, VideoOutputManager &> manager_added;
/*** Display Management ***/
@@ -130,24 +130,24 @@
/** See display-manager.h for the API
*/
- sigc::signal<void, DisplayManager &, DisplayMode> display_mode_changed;
- sigc::signal<void, DisplayManager &, FSToggle> fullscreen_mode_changed;
- sigc::signal<void, DisplayManager &, unsigned, unsigned> display_size_changed;
- sigc::signal<void, DisplayManager &, HwAccelStatus> hw_accel_status_changed;
- sigc::signal<void, DisplayManager &> logo_update_required;
+ sigc::signal<void, VideoOutputManager &, DisplayMode> display_mode_changed;
+ sigc::signal<void, VideoOutputManager &, FSToggle> fullscreen_mode_changed;
+ sigc::signal<void, VideoOutputManager &, unsigned, unsigned> display_size_changed;
+ sigc::signal<void, VideoOutputManager &, HwAccelStatus> hw_accel_status_changed;
+ sigc::signal<void, VideoOutputManager &> logo_update_required;
/*** Statistics ***/
void get_display_stats (DisplayStats & _display_stats) {
_display_stats = display_stats;
};
private:
- void on_display_mode_changed (DisplayMode display, DisplayManager *manager);
- void on_fullscreen_mode_changed (FSToggle toggle, DisplayManager *manager);
- void on_display_size_changed ( unsigned width, unsigned height, DisplayManager *manager);
- void on_hw_accel_status_changed (HwAccelStatus hw_accel_status, DisplayManager *manager);
- void on_logo_update_required (DisplayManager *manager);
+ void on_display_mode_changed (DisplayMode display, VideoOutputManager *manager);
+ void on_fullscreen_mode_changed (FSToggle toggle, VideoOutputManager *manager);
+ void on_display_size_changed ( unsigned width, unsigned height, VideoOutputManager *manager);
+ void on_hw_accel_status_changed (HwAccelStatus hw_accel_status, VideoOutputManager *manager);
+ void on_logo_update_required (VideoOutputManager *manager);
- std::set<DisplayManager *> managers;
+ std::set<VideoOutputManager *> managers;
DisplayStats display_stats;
GTimeVal last_stats;
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 Mon May 12 16:41:07 2008
@@ -35,8 +35,8 @@
*/
-#ifndef __DISPLAY_MANAGER_H__
-#define __DISPLAY_MANAGER_H__
+#ifndef __VIDEOOUTPUT_MANAGER_H__
+#define __VIDEOOUTPUT_MANAGER_H__
#include "display-core.h"
@@ -48,18 +48,18 @@
* @{
*/
- class DisplayManager
+ class VideoOutputManager
{
public:
/* The constructor
*/
- DisplayManager () {}
+ VideoOutputManager () {}
/* The destructor
*/
- ~DisplayManager () {}
+ ~VideoOutputManager () {}
/*
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 Mon May 12 16:41:07 2008
@@ -52,9 +52,9 @@
if (display_core != NULL) {
- GMDisplayManager_x *display_manager = new GMDisplayManager_x(core);
+ GMVideoOutputManager_x *videooutput_manager = new GMVideoOutputManager_x(core);
- display_core->add_manager (*display_manager);
+ display_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 Mon May 12 16:41:07 2008
@@ -43,8 +43,8 @@
#include "xvwindow.h"
#endif
-GMDisplayManager_x::GMDisplayManager_x (Ekiga::ServiceCore & _core)
-: GMDisplayManager(_core)
+GMVideoOutputManager_x::GMVideoOutputManager_x (Ekiga::ServiceCore & _core)
+: GMVideoOutputManager(_core)
{
/* Internal stuff */
lxWindow = NULL;
@@ -60,7 +60,7 @@
thread_created.Wait ();
}
-GMDisplayManager_x::~GMDisplayManager_x ()
+GMVideoOutputManager_x::~GMVideoOutputManager_x ()
{
end_thread = true;
run_thread.Signal();
@@ -73,7 +73,7 @@
}
bool
-GMDisplayManager_x::frame_display_change_needed ()
+GMVideoOutputManager_x::frame_display_change_needed ()
{
switch (current_frame.display)
{
@@ -95,12 +95,12 @@
default:
break;
}
- return GMDisplayManager::frame_display_change_needed ();
+ return GMVideoOutputManager::frame_display_change_needed ();
}
void
-GMDisplayManager_x::setup_frame_display ()
+GMVideoOutputManager_x::setup_frame_display ()
{
DisplayInfo local_display_info;
@@ -125,14 +125,14 @@
break;
case UNSET:
default:
- PTRACE (1, "GMDisplayManager_X\tDisplay variable not set");
+ PTRACE (1, "GMVideoOutputManager_X\tDisplay variable not set");
return;
break;
}
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)) {
- PTRACE(4, "GMDisplayManager_X\tWidget not yet realized or gconf info not yet set, not opening display");
+ PTRACE(4, "GMVideoOutputManager_X\tWidget not yet realized or gconf info not yet set, not opening display");
return;
}
@@ -147,7 +147,7 @@
switch (current_frame.display) {
// LOCAL_VIDEO ------------------------------------------------------------------
case LOCAL_VIDEO:
- PTRACE(4, "GMDisplayManager_X\tOpening LOCAL_VIDEO display with image of " << current_frame.local_width << "x" << current_frame.local_height);
+ PTRACE(4, "GMVideoOutputManager_X\tOpening LOCAL_VIDEO display with image of " << current_frame.local_width << "x" << current_frame.local_height);
#ifdef HAVE_XV
if (!local_display_info.disable_hw_accel) {
lxWindow = new XVWindow ();
@@ -161,18 +161,18 @@
current_frame.local_width,
current_frame.local_height)) {
hw_accel_status = ALL;
- PTRACE(4, "GMDisplayManager_X\tLOCAL_VIDEO: Successfully opened XV Window");
+ PTRACE(4, "GMVideoOutputManager_X\tLOCAL_VIDEO: Successfully opened XV Window");
}
else {
delete lxWindow;
lxWindow = NULL;
hw_accel_status = NONE;
- PTRACE(4, "GMDisplayManager_X\tLOCAL_VIDEO: Could not open XV Window");
+ PTRACE(4, "GMVideoOutputManager_X\tLOCAL_VIDEO: Could not open XV Window");
}
}
#endif
if (hw_accel_status == NONE) {
- PTRACE(3, "GMDisplayManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
+ 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 ();
@@ -186,14 +186,14 @@
current_frame.local_width,
current_frame.local_height)) {
lxWindow->SetSwScalingAlgo(local_display_info.sw_scaling_algorithm);
- PTRACE(4, "GMDisplayManager_X\tLOCAL_VIDEO: Successfully opened X Window");
+ PTRACE(4, "GMVideoOutputManager_X\tLOCAL_VIDEO: Successfully opened X Window");
}
else {
delete lxWindow;
lxWindow = NULL;
video_disabled = true;
hw_accel_status = NO_VIDEO;
- PTRACE(1, "GMDisplayManager_X\tLOCAL_VIDEO: Could not open X Window - no video");
+ PTRACE(1, "GMVideoOutputManager_X\tLOCAL_VIDEO: Could not open X Window - no video");
}
}
@@ -208,7 +208,7 @@
// REMOTE_VIDEO ----------------------------------------------------------------
case REMOTE_VIDEO:
- PTRACE(4, "GMDisplayManager_X\tOpening REMOTE_VIDEO display with image of " << current_frame.remote_width << "x" << current_frame.remote_height);
+ PTRACE(4, "GMVideoOutputManager_X\tOpening REMOTE_VIDEO display with image of " << current_frame.remote_width << "x" << current_frame.remote_height);
#ifdef HAVE_XV
if (!local_display_info.disable_hw_accel) {
rxWindow = new XVWindow ();
@@ -222,19 +222,19 @@
current_frame.remote_width,
current_frame.remote_height)) {
hw_accel_status = ALL;
- PTRACE(4, "GMDisplayManager_X\tREMOTE_VIDEO: Successfully opened XV Window");
+ PTRACE(4, "GMVideoOutputManager_X\tREMOTE_VIDEO: Successfully opened XV Window");
}
else {
delete rxWindow;
rxWindow = NULL;
hw_accel_status = NONE;
- PTRACE(1, "GMDisplayManager_X\tLOCAL_VIDEO: Could not open XV Window");
+ PTRACE(1, "GMVideoOutputManager_X\tLOCAL_VIDEO: Could not open XV Window");
}
}
#endif
if (hw_accel_status == NONE) {
- PTRACE(3, "GMDisplayManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
+ 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 ();
@@ -248,14 +248,14 @@
current_frame.remote_width,
current_frame.remote_height)) {
rxWindow->SetSwScalingAlgo(local_display_info.sw_scaling_algorithm);
- PTRACE(4, "GMDisplayManager_X\tREMOTE_VIDEO: Successfully opened X Window");
+ PTRACE(4, "GMVideoOutputManager_X\tREMOTE_VIDEO: Successfully opened X Window");
}
else {
delete rxWindow;
rxWindow = NULL;
video_disabled = true;
hw_accel_status = NO_VIDEO;
- PTRACE(1, "GMDisplayManager_X\tREMOTE_VIDEO: Could not open X Window - no video");
+ PTRACE(1, "GMVideoOutputManager_X\tREMOTE_VIDEO: Could not open X Window - no video");
}
}
@@ -272,7 +272,7 @@
case FULLSCREEN:
case PIP:
case PIP_WINDOW:
- PTRACE(4, "GMDisplayManager_X\tOpening display " << current_frame.display << " with images of "
+ PTRACE(4, "GMVideoOutputManager_X\tOpening display " << current_frame.display << " 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
@@ -288,19 +288,19 @@
current_frame.remote_width,
current_frame.remote_height)) {
hw_accel_status = REMOTE_ONLY;
- PTRACE(4, "GMDisplayManager_X\tPIP: Successfully opened remote XV Window");
+ PTRACE(4, "GMVideoOutputManager_X\tPIP: Successfully opened remote XV Window");
}
else
{
delete rxWindow;
rxWindow = NULL;
hw_accel_status = NONE;
- PTRACE(1, "GMDisplayManager_X\tPIP: Could not open remote XV Window");
+ PTRACE(1, "GMVideoOutputManager_X\tPIP: Could not open remote XV Window");
}
}
#endif
if (hw_accel_status == NONE) {
- PTRACE(3, "GMDisplayManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
+ 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 ();
@@ -314,14 +314,14 @@
current_frame.remote_width,
current_frame.remote_height)) {
rxWindow->SetSwScalingAlgo(local_display_info.sw_scaling_algorithm);
- PTRACE(4, "GMDisplayManager_X\tPIP: Successfully opened remote X Window");
+ PTRACE(4, "GMVideoOutputManager_X\tPIP: Successfully opened remote X Window");
}
else {
delete rxWindow;
rxWindow = NULL;
video_disabled = true;
hw_accel_status = NO_VIDEO;
- PTRACE(1, "GMDisplayManager_X\tPIP: Could not open remote X Window - no video");
+ PTRACE(1, "GMVideoOutputManager_X\tPIP: Could not open remote X Window - no video");
}
}
@@ -340,18 +340,18 @@
current_frame.local_height)) {
hw_accel_status = ALL;
pip_window_available = true;
- PTRACE(4, "GMDisplayManager_X\tPIP: Successfully opened local XV Window");
+ PTRACE(4, "GMVideoOutputManager_X\tPIP: Successfully opened local XV Window");
}
else {
delete lxWindow;
lxWindow = NULL;
pip_window_available = false;
- PTRACE(1, "GMDisplayManager_X\tPIP: Could not open local XV Window");
+ PTRACE(1, "GMVideoOutputManager_X\tPIP: Could not open local XV Window");
}
}
#endif
if ((hw_accel_status != ALL) && (local_display_info.allow_pip_sw_scaling)) {
- PTRACE(3, "GMDisplayManager_X\tFalling back to SW" << ((local_display_info.disable_hw_accel)
+ 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 ();
@@ -366,18 +366,18 @@
current_frame.local_height)) {
lxWindow->SetSwScalingAlgo(local_display_info.sw_scaling_algorithm);
pip_window_available = true;
- PTRACE(4, "GMDisplayManager_X\tPIP: Successfully opened local X Window");
+ PTRACE(4, "GMVideoOutputManager_X\tPIP: Successfully opened local X Window");
}
else {
delete lxWindow;
lxWindow = NULL;
pip_window_available = false;
- PTRACE(4, "GMDisplayManager_X\tPIP: Could not open local X Window - picture-in-picture disabled");
+ PTRACE(4, "GMVideoOutputManager_X\tPIP: Could not open local X Window - picture-in-picture disabled");
}
}
if ((hw_accel_status != ALL) && (!local_display_info.allow_pip_sw_scaling)) {
- PTRACE(3, "GMDisplayManager_X\tNot opening PIP window since HW acceleration is not available and SW fallback is disabled by configuration");
+ 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;
}
@@ -421,7 +421,7 @@
}
void
-GMDisplayManager_x::close_frame_display ()
+GMVideoOutputManager_x::close_frame_display ()
{
runtime.run_in_main (sigc::bind (hw_accel_status_changed.make_slot (), NO_VIDEO));
@@ -442,7 +442,7 @@
}
void
-GMDisplayManager_x::display_frame (const char *frame,
+GMVideoOutputManager_x::display_frame (const char *frame,
unsigned width,
unsigned height)
{
@@ -460,7 +460,7 @@
}
void
-GMDisplayManager_x::display_pip_frames (const char *local_frame,
+GMVideoOutputManager_x::display_pip_frames (const char *local_frame,
unsigned lf_width,
unsigned lf_height,
const char *remote_frame,
@@ -484,7 +484,7 @@
}
void
-GMDisplayManager_x::sync (UpdateRequired sync_required)
+GMVideoOutputManager_x::sync (UpdateRequired sync_required)
{
if (rxWindow && (sync_required.remote || (!sync_required.remote && !sync_required.local))) {
rxWindow->Sync();
Modified: trunk/lib/engine/display/x/display-manager-x.h
==============================================================================
--- trunk/lib/engine/display/x/display-manager-x.h (original)
+++ trunk/lib/engine/display/x/display-manager-x.h Mon May 12 16:41:07 2008
@@ -44,13 +44,13 @@
#include "display-manager-common.h"
#include "xwindow.h"
-class GMDisplayManager_x
- : public GMDisplayManager
+class GMVideoOutputManager_x
+ : public GMVideoOutputManager
{
public:
- GMDisplayManager_x (Ekiga::ServiceCore & _core);
+ GMVideoOutputManager_x (Ekiga::ServiceCore & _core);
- ~GMDisplayManager_x ();
+ ~GMVideoOutputManager_x ();
/* DESCRIPTION : /
* BEHAVIOR : Returns TRUE if the given settings require a
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 Mon May 12 16:41:07 2008
@@ -53,9 +53,9 @@
if (vidinput_core != NULL) {
- GMVidInputManager_mlogo *vidinput_manager = new GMVidInputManager_mlogo(core);
+ GMVideoInputManager_mlogo *videoinput_manager = new GMVideoInputManager_mlogo(core);
- vidinput_core->add_manager (*vidinput_manager);
+ vidinput_core->add_manager (*videoinput_manager);
result = true;
}
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 Mon May 12 16:41:07 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 vidinput core.
- * A vidinput core manages VidInputManagers.
+ * A vidinput core manages VideoInputManagers.
*
*/
@@ -41,29 +41,29 @@
#define DEVICE_SOURCE "Moving Logo"
#define DEVICE_DEVICE "Moving Logo"
-GMVidInputManager_mlogo::GMVidInputManager_mlogo (Ekiga::ServiceCore & _core)
+GMVideoInputManager_mlogo::GMVideoInputManager_mlogo (Ekiga::ServiceCore & _core)
: core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
{
current_state.opened = false;
}
-void GMVidInputManager_mlogo::get_vidinput_devices(std::vector <Ekiga::VidInputDevice> & vidinput_devices)
+void GMVideoInputManager_mlogo::get_devices(std::vector <Ekiga::VidInputDevice> & devices)
{
- Ekiga::VidInputDevice vidinput_device;
- vidinput_device.type = DEVICE_TYPE;
- vidinput_device.source = DEVICE_SOURCE;
- vidinput_device.device = DEVICE_DEVICE;
- vidinput_devices.push_back(vidinput_device);
+ Ekiga::VidInputDevice device;
+ device.type = DEVICE_TYPE;
+ device.source = DEVICE_SOURCE;
+ device.device = DEVICE_DEVICE;
+ devices.push_back(device);
}
-bool GMVidInputManager_mlogo::set_vidinput_device (const Ekiga::VidInputDevice & vidinput_device, int channel, Ekiga::VideoFormat format)
+bool GMVideoInputManager_mlogo::set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format)
{
- if ( ( vidinput_device.type == DEVICE_TYPE ) &&
- ( vidinput_device.source == DEVICE_SOURCE) &&
- ( vidinput_device.device == DEVICE_DEVICE) ) {
+ if ( ( device.type == DEVICE_TYPE ) &&
+ ( device.source == DEVICE_SOURCE) &&
+ ( device.device == DEVICE_DEVICE) ) {
- PTRACE(4, "GMVidInputManager_mlogo\tSetting Device Moving Logo");
- current_state.vidinput_device = vidinput_device;
+ PTRACE(4, "GMVideoInputManager_mlogo\tSetting Device Moving Logo");
+ current_state.device = device;
current_state.channel = channel;
current_state.format = format;
return true;
@@ -71,11 +71,11 @@
return false;
}
-bool GMVidInputManager_mlogo::open (unsigned width, unsigned height, unsigned fps)
+bool GMVideoInputManager_mlogo::open (unsigned width, unsigned height, unsigned fps)
{
Ekiga::VidInputConfig vidinput_config;
- PTRACE(4, "GMVidInputManager_mlogo\tOpening Moving Logo with " << width << "x" << height << "/" << fps);
+ PTRACE(4, "GMVideoInputManager_mlogo\tOpening Moving Logo with " << width << "x" << height << "/" << fps);
current_state.width = width;
current_state.height = height;
current_state.fps = fps;
@@ -88,8 +88,8 @@
memset (background_frame + (current_state.width * current_state.height), 0x7f, (current_state.width*current_state.height) >> 2);
memset (background_frame + (current_state.width * current_state.height) + ((current_state.width*current_state.height) >> 2), 0x7f, (current_state.width*current_state.height) >> 2);
- m_Pacing.Restart();
- m_Pacing.SetMaximumSlip((unsigned )( 500.0 / fps));
+ adaptive_delay.Restart();
+ adaptive_delay.SetMaximumSlip((unsigned )( 500.0 / fps));
current_state.opened = true;
vidinput_config.whiteness = 127;
@@ -97,29 +97,29 @@
vidinput_config.colour = 127;
vidinput_config.contrast = 127;
vidinput_config.modifyable = false;
- runtime.run_in_main (sigc::bind (vidinputdevice_opened.make_slot (), current_state.vidinput_device, vidinput_config));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, vidinput_config));
return true;
}
-void GMVidInputManager_mlogo::close()
+void GMVideoInputManager_mlogo::close()
{
- PTRACE(4, "GMVidInputManager_mlogo\tClosing Moving Logo");
+ PTRACE(4, "GMVideoInputManager_mlogo\tClosing Moving Logo");
free (background_frame);
current_state.opened = false;
- runtime.run_in_main (sigc::bind (vidinputdevice_closed.make_slot (), current_state.vidinput_device));
+ runtime.run_in_main (sigc::bind (device_closed.make_slot (), current_state.device));
}
-bool GMVidInputManager_mlogo::get_frame_data (unsigned & width,
+bool GMVideoInputManager_mlogo::get_frame_data (unsigned & width,
unsigned & height,
char *data)
{
if (!current_state.opened) {
- PTRACE(1, "GMVidInputManager_mlogo\tTrying to get frame from closed device");
+ PTRACE(1, "GMVideoInputManager_mlogo\tTrying to get frame from closed device");
return true;
}
- m_Pacing.Delay (1000 / current_state.fps);
+ adaptive_delay.Delay (1000 / current_state.fps);
memcpy (data, background_frame, (current_state.width * current_state.height * 3) >> 1);
@@ -141,7 +141,7 @@
return true;
}
-void GMVidInputManager_mlogo::CopyYUVArea (const char* srcFrame,
+void GMVideoInputManager_mlogo::CopyYUVArea (const char* srcFrame,
unsigned srcWidth,
unsigned srcHeight,
char* dstFrame,
@@ -188,7 +188,7 @@
}
}
-bool GMVidInputManager_mlogo::has_device (const std::string & /*source*/, const std::string & /*device*/, unsigned /*capabilities*/, Ekiga::VidInputDevice & /*vidinput_device*/)
+bool GMVideoInputManager_mlogo::has_device (const std::string & /*source*/, const std::string & /*device_name*/, unsigned /*capabilities*/, Ekiga::VidInputDevice & /*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 Mon May 12 16:41:07 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 vidinput core.
- * A vidinput core manages VidInputManagers.
+ * A vidinput core manages VideoInputManagers.
*
*/
@@ -50,17 +50,17 @@
* @{
*/
- class GMVidInputManager_mlogo
- : public Ekiga::VidInputManager
+ class GMVideoInputManager_mlogo
+ : public Ekiga::VideoInputManager
{
public:
/* The constructor
*/
- GMVidInputManager_mlogo (Ekiga::ServiceCore & core);
+ GMVideoInputManager_mlogo (Ekiga::ServiceCore & core);
/* The destructor
*/
- ~GMVidInputManager_mlogo () {}
+ ~GMVideoInputManager_mlogo () {}
/*
@@ -71,9 +71,9 @@
* @param uri an uri
* @return true if a Ekiga::Call could be created
*/
- virtual void get_vidinput_devices(std::vector <Ekiga::VidInputDevice> & vidinput_devices);
+ virtual void get_devices(std::vector <Ekiga::VidInputDevice> & devices);
- virtual bool set_vidinput_device (const Ekiga::VidInputDevice & vidinput_device, int channel, Ekiga::VideoFormat format);
+ virtual bool set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format);
virtual bool open (unsigned width, unsigned height, unsigned fps);
@@ -83,7 +83,7 @@
unsigned & height,
char *data);
- virtual bool has_device (const std::string & source, const std::string & device, unsigned capabilities, Ekiga::VidInputDevice & vidinput_device);
+ virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VidInputDevice & device);
protected:
void CopyYUVArea (const char* srcFrame,
@@ -102,7 +102,7 @@
Ekiga::ServiceCore & core;
Ekiga::Runtime & runtime;
- PAdaptiveDelay m_Pacing;
+ PAdaptiveDelay adaptive_delay;
};
/**
* @}
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 Mon May 12 16:41:07 2008
@@ -53,7 +53,7 @@
if (vidinput_core != NULL) {
- GMVidInputManager_ptlib *vidinput_manager = new GMVidInputManager_ptlib(core);
+ GMVideoInputManager_ptlib *vidinput_manager = new GMVideoInputManager_ptlib(core);
vidinput_core->add_manager (*vidinput_manager);
result = true;
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 Mon May 12 16:41:07 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 vidinput core.
- * A vidinput core manages VidInputManagers.
+ * A vidinput core manages VideoInputManagers.
*
*/
@@ -40,7 +40,7 @@
#define DEVICE_TYPE "PTLIB"
-GMVidInputManager_ptlib::GMVidInputManager_ptlib (Ekiga::ServiceCore & _core)
+GMVideoInputManager_ptlib::GMVideoInputManager_ptlib (Ekiga::ServiceCore & _core)
: core (_core), runtime (*(dynamic_cast<Ekiga::Runtime *> (_core.get ("runtime"))))
{
current_state.opened = false;
@@ -48,31 +48,31 @@
expectedFrameSize = 0;
}
-void GMVidInputManager_ptlib::get_vidinput_devices(std::vector <Ekiga::VidInputDevice> & vidinput_devices)
+void GMVideoInputManager_ptlib::get_devices(std::vector <Ekiga::VidInputDevice> & devices)
{
PStringArray video_sources;
PStringArray video_devices;
char **sources_array;
char **devices_array;
- Ekiga::VidInputDevice vidinput_device;
- vidinput_device.type = DEVICE_TYPE;
+ Ekiga::VidInputDevice device;
+ device.type = DEVICE_TYPE;
video_sources = PVideoInputDevice::GetDriverNames ();
sources_array = video_sources.ToCharArray ();
for (PINDEX i = 0; sources_array[i] != NULL; i++) {
- vidinput_device.source = sources_array[i];
+ device.source = sources_array[i];
- if ( (vidinput_device.source != "FakeVideo") &&
- (vidinput_device.source != "EKIGA" ) ) {
- video_devices = PVideoInputDevice::GetDriversDeviceNames (vidinput_device.source);
+ if ( (device.source != "FakeVideo") &&
+ (device.source != "EKIGA" ) ) {
+ video_devices = PVideoInputDevice::GetDriversDeviceNames (device.source);
devices_array = video_devices.ToCharArray ();
for (PINDEX j = 0; devices_array[j] != NULL; j++) {
- vidinput_device.device = devices_array[j];
- vidinput_devices.push_back(vidinput_device);
+ device.device = devices_array[j];
+ devices.push_back(device);
}
free (devices_array);
}
@@ -80,12 +80,12 @@
free (sources_array);
}
-bool GMVidInputManager_ptlib::set_vidinput_device (const Ekiga::VidInputDevice & vidinput_device, int channel, Ekiga::VideoFormat format)
+bool GMVideoInputManager_ptlib::set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format)
{
- if ( vidinput_device.type == DEVICE_TYPE ) {
+ if ( device.type == DEVICE_TYPE ) {
- PTRACE(4, "GMVidInputManager_ptlib\tSetting Device " << vidinput_device.source << "/" << vidinput_device.device);
- current_state.vidinput_device = vidinput_device;
+ PTRACE(4, "GMVideoInputManager_ptlib\tSetting Device " << device.source << "/" << device.device);
+ current_state.device = device;
current_state.channel = channel;
current_state.format = format;
return true;
@@ -94,14 +94,14 @@
return false;
}
-bool GMVidInputManager_ptlib::open (unsigned width, unsigned height, unsigned fps)
+bool GMVideoInputManager_ptlib::open (unsigned width, unsigned height, unsigned fps)
{
PVideoDevice::VideoFormat pvideo_format;
int whiteness, brightness, colour, contrast, hue;
Ekiga::VidInputConfig vidinput_config;
- PTRACE(4, "GMVidInputManager_ptlib\tOpening Device " << current_state.vidinput_device.source << "/" << current_state.vidinput_device.device);
- PTRACE(4, "GMVidInputManager_ptlib\tOpening Device with " << width << "x" << height << "/" << fps);
+ PTRACE(4, "GMVideoInputManager_ptlib\tOpening Device " << current_state.device.source << "/" << current_state.device.device);
+ PTRACE(4, "GMVideoInputManager_ptlib\tOpening Device with " << width << "x" << height << "/" << fps);
current_state.width = width;
current_state.height = height;
@@ -109,7 +109,7 @@
expectedFrameSize = (width * height * 3) >> 1;
pvideo_format = (PVideoDevice::VideoFormat)current_state.format;
- input_device = PVideoInputDevice::CreateOpenedDevice (current_state.vidinput_device.source, current_state.vidinput_device.device, FALSE);
+ input_device = PVideoInputDevice::CreateOpenedDevice (current_state.device.source, current_state.device.device, FALSE);
Ekiga::VidInputErrorCodes error_code = Ekiga::ERR_NONE;
if (!input_device)
@@ -127,8 +127,8 @@
else input_device->Start ();
if (error_code != Ekiga::ERR_NONE) {
- PTRACE(1, "GMVidInputManager_ptlib\tEncountered error " << error_code << " while opening device ");
- runtime.run_in_main (sigc::bind (vidinputdevice_error.make_slot (), current_state.vidinput_device, error_code));
+ PTRACE(1, "GMVideoInputManager_ptlib\tEncountered error " << error_code << " while opening device ");
+ runtime.run_in_main (sigc::bind (device_error.make_slot (), current_state.device, error_code));
return false;
}
@@ -141,29 +141,29 @@
vidinput_config.contrast = contrast >> 8;
vidinput_config.modifyable = true;
- runtime.run_in_main (sigc::bind (vidinputdevice_opened.make_slot (), current_state.vidinput_device, vidinput_config));
+ runtime.run_in_main (sigc::bind (device_opened.make_slot (), current_state.device, vidinput_config));
return true;
}
-void GMVidInputManager_ptlib::close()
+void GMVideoInputManager_ptlib::close()
{
- PTRACE(4, "GMVidInputManager_ptlib\tClosing device " << current_state.vidinput_device.source << "/" << current_state.vidinput_device.device);
+ PTRACE(4, "GMVideoInputManager_ptlib\tClosing device " << current_state.device.source << "/" << current_state.device.device);
if (input_device) {
delete input_device;
input_device = NULL;
}
current_state.opened = false;
- runtime.run_in_main (sigc::bind (vidinputdevice_closed.make_slot (), current_state.vidinput_device));
+ runtime.run_in_main (sigc::bind (device_closed.make_slot (), current_state.device));
}
-bool GMVidInputManager_ptlib::get_frame_data (unsigned & width,
+bool GMVideoInputManager_ptlib::get_frame_data (unsigned & width,
unsigned & height,
char *data)
{
bool ret = false;
if (!current_state.opened) {
- PTRACE(1, "GMVidInputManager_ptlib\tTrying to get frame from closed device");
+ PTRACE(1, "GMVideoInputManager_ptlib\tTrying to get frame from closed device");
return false;
}
@@ -176,53 +176,53 @@
ret = input_device->GetFrameData ((BYTE*)data, &I);
if ((unsigned) I != expectedFrameSize) {
- PTRACE(1, "GMVidInputManager_ptlib\tExpected a frame of " << expectedFrameSize << " bytes but got " << I << " bytes");
+ PTRACE(1, "GMVideoInputManager_ptlib\tExpected a frame of " << expectedFrameSize << " bytes but got " << I << " bytes");
ret = false;
}
return ret;
}
-void GMVidInputManager_ptlib::set_colour (unsigned colour)
+void GMVideoInputManager_ptlib::set_colour (unsigned colour)
{
- PTRACE(4, "GMVidInputManager_ptlib\tSetting colour to " << colour);
+ PTRACE(4, "GMVideoInputManager_ptlib\tSetting colour to " << colour);
if (input_device)
input_device->SetColour(colour << 8);
}
-void GMVidInputManager_ptlib::set_brightness (unsigned brightness)
+void GMVideoInputManager_ptlib::set_brightness (unsigned brightness)
{
- PTRACE(4, "GMVidInputManager_ptlib\tSetting brightness to " << brightness);
+ PTRACE(4, "GMVideoInputManager_ptlib\tSetting brightness to " << brightness);
if (input_device)
input_device->SetBrightness(brightness << 8);
}
-void GMVidInputManager_ptlib::set_whiteness (unsigned whiteness)
+void GMVideoInputManager_ptlib::set_whiteness (unsigned whiteness)
{
- PTRACE(4, "GMVidInputManager_ptlib\tSetting whiteness to " << whiteness);
+ PTRACE(4, "GMVideoInputManager_ptlib\tSetting whiteness to " << whiteness);
if (input_device)
input_device->SetWhiteness(whiteness << 8);
}
-void GMVidInputManager_ptlib::set_contrast (unsigned contrast)
+void GMVideoInputManager_ptlib::set_contrast (unsigned contrast)
{
- PTRACE(4, "GMVidInputManager_ptlib\tSetting contrast to " << contrast);
+ PTRACE(4, "GMVideoInputManager_ptlib\tSetting contrast to " << contrast);
if (input_device)
input_device->SetContrast(contrast << 8);
}
-bool GMVidInputManager_ptlib::has_device(const std::string & source, const std::string & device, unsigned capabilities, Ekiga::VidInputDevice & vidinput_device)
+bool GMVideoInputManager_ptlib::has_device(const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VidInputDevice & device)
{
if (source == "video4linux") {
if (capabilities & 0x01) {
- vidinput_device.type = DEVICE_TYPE;
- vidinput_device.source = "V4L";
- vidinput_device.device = device;
+ device.type = DEVICE_TYPE;
+ device.source = "V4L";
+ device.device = device_name;
return true;
}
if (capabilities & 0x02) {
- vidinput_device.type = DEVICE_TYPE;
- vidinput_device.source = "V4L2";
- vidinput_device.device = device;
+ device.type = DEVICE_TYPE;
+ device.source = "V4L2";
+ device.device = 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 Mon May 12 16:41:07 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 vidinput core.
- * A vidinput core manages VidInputManagers.
+ * A vidinput core manages VideoInputManagers.
*
*/
@@ -48,17 +48,17 @@
* @{
*/
- class GMVidInputManager_ptlib
- : public Ekiga::VidInputManager
+ class GMVideoInputManager_ptlib
+ : public Ekiga::VideoInputManager
{
public:
/* The constructor
*/
- GMVidInputManager_ptlib (Ekiga::ServiceCore & core);
+ GMVideoInputManager_ptlib (Ekiga::ServiceCore & core);
/* The destructor
*/
- ~GMVidInputManager_ptlib () {}
+ ~GMVideoInputManager_ptlib () {}
/*
@@ -69,9 +69,9 @@
* @param uri an uri
* @return true if a Ekiga::Call could be created
*/
- virtual bool set_vidinput_device (const Ekiga::VidInputDevice & vidinput_device, int channel, Ekiga::VideoFormat format);
-
- virtual void get_vidinput_devices(std::vector <Ekiga::VidInputDevice> & vidinput_devices);
+ virtual void get_devices(std::vector <Ekiga::VidInputDevice> & devices);
+
+ virtual bool set_device (const Ekiga::VidInputDevice & device, int channel, Ekiga::VideoFormat format);
virtual bool open (unsigned width, unsigned height, unsigned fps);
@@ -86,7 +86,8 @@
virtual void set_whiteness (unsigned whiteness );
virtual void set_contrast (unsigned contrast );
- virtual bool has_device (const std::string & source, const std::string & device, unsigned capabilities, Ekiga::VidInputDevice & vidinput_device);
+ virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, Ekiga::VidInputDevice & device);
+
protected:
Ekiga::ServiceCore & core;
Ekiga::Runtime & runtime;
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 Mon May 12 16:41:07 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 vidinput core.
- * A vidinput core manages VidInputManagers.
+ * A vidinput core manages VideoInputManagers.
*
*/
@@ -168,23 +168,23 @@
vidinput_core_conf_bridge = new VidInputCoreConfBridge (*this);
}
-void VidInputCore::add_manager (VidInputManager &manager)
+void VidInputCore::add_manager (VideoInputManager &manager)
{
managers.insert (&manager);
manager_added.emit (manager);
- manager.vidinputdevice_error.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_vidinputdevice_error), &manager));
- manager.vidinputdevice_opened.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_vidinputdevice_opened), &manager));
- manager.vidinputdevice_closed.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_vidinputdevice_closed), &manager));
+ manager.device_error.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_vidinputdevice_error), &manager));
+ manager.device_opened.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_vidinputdevice_opened), &manager));
+ manager.device_closed.connect (sigc::bind (sigc::mem_fun (this, &VidInputCore::on_vidinputdevice_closed), &manager));
}
-void VidInputCore::visit_managers (sigc::slot<bool, VidInputManager &> visitor)
+void VidInputCore::visit_managers (sigc::slot<bool, VideoInputManager &> visitor)
{
PWaitAndSignal m(var_mutex);
bool go_on = true;
- for (std::set<VidInputManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end () && go_on;
iter++)
go_on = visitor (*(*iter));
@@ -196,10 +196,10 @@
vidinput_devices.clear();
- for (std::set<VidInputManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++)
- (*iter)->get_vidinput_devices (vidinput_devices);
+ (*iter)->get_devices (vidinput_devices);
if (PTrace::CanTrace(4)) {
for (std::vector<VidInputDevice>::iterator iter = vidinput_devices.begin ();
@@ -453,19 +453,19 @@
new_stream_settings.contrast = contrast ;
}
-void VidInputCore::on_vidinputdevice_error (VidInputDevice vidinput_device, VidInputErrorCodes error_code, VidInputManager *manager)
+void VidInputCore::on_vidinputdevice_error (VidInputDevice vidinput_device, VidInputErrorCodes error_code, VideoInputManager *manager)
{
vidinputdevice_error.emit (*manager, vidinput_device, error_code);
}
void VidInputCore::on_vidinputdevice_opened (VidInputDevice vidinput_device,
VidInputConfig vidinput_config,
- VidInputManager *manager)
+ VideoInputManager *manager)
{
vidinputdevice_opened.emit (*manager, vidinput_device, vidinput_config);
}
-void VidInputCore::on_vidinputdevice_closed (VidInputDevice vidinput_device, VidInputManager *manager)
+void VidInputCore::on_vidinputdevice_closed (VidInputDevice vidinput_device, VideoInputManager *manager)
{
vidinputdevice_closed.emit (*manager, vidinput_device);
}
@@ -506,10 +506,10 @@
void VidInputCore::internal_set_device (const VidInputDevice & vidinput_device, int channel, VideoFormat format)
{
current_manager = NULL;
- for (std::set<VidInputManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
- if ((*iter)->set_vidinput_device (vidinput_device, channel, format)) {
+ if ((*iter)->set_device (vidinput_device, channel, format)) {
current_manager = (*iter);
}
}
@@ -552,7 +552,7 @@
PWaitAndSignal m(var_mutex);
VidInputDevice vidinput_device;
- for (std::set<VidInputManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
if ((*iter)->has_device (source, device, capabilities, vidinput_device)) {
@@ -574,7 +574,7 @@
PWaitAndSignal m(var_mutex);
VidInputDevice vidinput_device;
- for (std::set<VidInputManager *>::iterator iter = managers.begin ();
+ for (std::set<VideoInputManager *>::iterator iter = managers.begin ();
iter != managers.end ();
iter++) {
if ((*iter)->has_device (source, device, capabilities, vidinput_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 Mon May 12 16:41:07 2008
@@ -65,7 +65,7 @@
VidInputConfig settings;
};
- class VidInputManager;
+ class VideoInputManager;
class VidInputCore;
class PreviewManager : public PThread
@@ -126,23 +126,23 @@
* @return The service description.
*/
const std::string get_description () const
- { return "\tVidInput Core managing VidInput Manager objects"; }
+ { return "\tVidInput Core managing VideoInput Manager objects"; }
/** Adds a VidInputManager to the VidInputCore service.
* @param The manager to be added.
*/
- void add_manager (VidInputManager &manager);
+ void add_manager (VideoInputManager &manager);
- /** Triggers a callback for all Ekiga::VidInputManager sources of the
+ /** Triggers a callback for all Ekiga::VideoInputManager sources of the
* VidInputCore service.
*/
- void visit_managers (sigc::slot<bool, VidInputManager &> visitor);
+ void visit_managers (sigc::slot<bool, VideoInputManager &> visitor);
- /** This signal is emitted when a Ekiga::VidInputManager has been
+ /** This signal is emitted when a Ekiga::VideoInputManager has been
* added to the VidInputCore Service.
*/
- sigc::signal<void, VidInputManager &> manager_added;
+ sigc::signal<void, VideoInputManager &> manager_added;
void get_vidinput_devices(std::vector <VidInputDevice> & vidinput_devices);
@@ -183,18 +183,18 @@
/** See vidinput-manager.h for the API
*/
- sigc::signal<void, VidInputManager &, VidInputDevice &, VidInputErrorCodes> vidinputdevice_error;
+ sigc::signal<void, VideoInputManager &, VidInputDevice &, VidInputErrorCodes> vidinputdevice_error;
sigc::signal<void, VidInputDevice> vidinputdevice_added;
sigc::signal<void, VidInputDevice> vidinputdevice_removed;
- sigc::signal<void, VidInputManager &, VidInputDevice &, VidInputConfig&> vidinputdevice_opened;
- sigc::signal<void, VidInputManager &, VidInputDevice &> vidinputdevice_closed;
+ sigc::signal<void, VideoInputManager &, VidInputDevice &, VidInputConfig&> vidinputdevice_opened;
+ sigc::signal<void, VideoInputManager &, VidInputDevice &> vidinputdevice_closed;
private:
- void on_vidinputdevice_error (VidInputDevice vidinput_device, VidInputErrorCodes error_code, VidInputManager *manager);
+ void on_vidinputdevice_error (VidInputDevice vidinput_device, VidInputErrorCodes error_code, VideoInputManager *manager);
void on_vidinputdevice_opened (VidInputDevice vidinput_device,
VidInputConfig vidinput_config,
- VidInputManager *manager);
- void on_vidinputdevice_closed (VidInputDevice vidinput_device, VidInputManager *manager);
+ VideoInputManager *manager);
+ void on_vidinputdevice_closed (VidInputDevice vidinput_device, VideoInputManager *manager);
void internal_set_vidinput_device(const VidInputDevice & vidinput_device, int channel, VideoFormat format);
void internal_open (unsigned width, unsigned height, unsigned fps);
@@ -204,7 +204,7 @@
void apply_settings();
- std::set<VidInputManager *> managers;
+ std::set<VideoInputManager *> managers;
Ekiga::Runtime & runtime;
@@ -214,7 +214,7 @@
VidInputConfig new_stream_settings;
VidInputConfig new_preview_settings;
- VidInputManager* current_manager;
+ VideoInputManager* current_manager;
VidInputDevice desired_device;
VidInputDevice current_device;
Ekiga::VideoFormat current_format;
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 Mon May 12 16:41:07 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 manager
+ * description : Declaration of the interface of a videoinput manager
* implementation backend.
*
*/
-#ifndef __VIDINPUT_MANAGER_H__
-#define __VIDINPUT_MANAGER_H__
+#ifndef __VIDEOINPUT_MANAGER_H__
+#define __VIDEOINPUT_MANAGER_H__
#include "vidinput-core.h"
@@ -44,33 +44,24 @@
{
/**
- * @addtogroup vidinput
+ * @addtogroup videoinput
* @{
*/
- typedef struct ManagerState {
- bool opened;
- unsigned width;
- unsigned height;
- unsigned fps;
- VidInputDevice vidinput_device;
- VideoFormat format;
- int channel;
- };
- class VidInputManager
+ class VideoInputManager
{
public:
/* The constructor
*/
- VidInputManager () {}
+ VideoInputManager () {}
/* The destructor
*/
- ~VidInputManager () {}
+ ~VideoInputManager () {}
/*
@@ -82,35 +73,41 @@
* @return true if a Ekiga::Call could be created
*/
- virtual void get_vidinput_devices (std::vector <VidInputDevice> & vidinput_devices) = 0;
+ virtual void get_devices (std::vector <VidInputDevice> & devices) = 0;
- virtual bool set_vidinput_device (const VidInputDevice & vidinput_device, int channel, VideoFormat format) = 0;
+ virtual bool set_device (const VidInputDevice & device, int channel, VideoFormat format) = 0;
virtual void set_image_data (unsigned /* width */, unsigned /* height */, const char* /*data*/ ) {};
virtual bool open (unsigned width, unsigned height, unsigned fps) = 0;
+ virtual void close() {};
+
virtual bool get_frame_data (unsigned & width,
unsigned & height,
char *data) = 0;
- virtual void close() {};
-
-
virtual void set_colour (unsigned /* colour */ ) {};
virtual void set_brightness (unsigned /* brightness */ ) {};
virtual void set_whiteness (unsigned /* whiteness */ ) {};
virtual void set_contrast (unsigned /* contrast */ ) {};
- virtual bool has_device (const std::string & source, const std::string & device, unsigned capabilities, VidInputDevice & vidinput_device) = 0;
+ virtual bool has_device (const std::string & source, const std::string & device_name, unsigned capabilities, VidInputDevice & device) = 0;
- sigc::signal<void, VidInputDevice, VidInputErrorCodes> vidinputdevice_error;
- sigc::signal<void, VidInputDevice> vidinputdevice_added;
- sigc::signal<void, VidInputDevice> vidinputdevice_removed;
- sigc::signal<void, VidInputDevice, VidInputConfig> vidinputdevice_opened;
- sigc::signal<void, VidInputDevice> vidinputdevice_closed;
+ sigc::signal<void, VidInputDevice, VidInputErrorCodes> device_error;
+ sigc::signal<void, VidInputDevice, VidInputConfig> device_opened;
+ sigc::signal<void, VidInputDevice> device_closed;
protected:
+ typedef struct ManagerState {
+ bool opened;
+ unsigned width;
+ unsigned height;
+ unsigned fps;
+ VidInputDevice device;
+ VideoFormat format;
+ int channel;
+ };
ManagerState current_state;
};
/**
Modified: trunk/src/gui/main.cpp
==============================================================================
--- trunk/src/gui/main.cpp (original)
+++ trunk/src/gui/main.cpp Mon May 12 16:41:07 2008
@@ -959,7 +959,7 @@
*/
void
-on_display_mode_changed_cb (Ekiga::DisplayManager & /* manager */, DisplayMode display, gpointer self)
+on_display_mode_changed_cb (Ekiga::VideoOutputManager & /* manager */, DisplayMode display, gpointer self)
{
GmMainWindow *mw = gm_mw_get_mw (GTK_WIDGET (self));
@@ -967,13 +967,13 @@
}
void
-on_fullscreen_mode_changed_cb (Ekiga::DisplayManager & /* manager */, FSToggle toggle, gpointer self)
+on_fullscreen_mode_changed_cb (Ekiga::VideoOutputManager & /* manager */, FSToggle toggle, gpointer self)
{
gm_main_window_toggle_fullscreen (toggle, GTK_WIDGET (self));
}
void
-on_display_size_changed_cb (Ekiga::DisplayManager & /* manager */, unsigned width, unsigned height, gpointer self)
+on_display_size_changed_cb (Ekiga::VideoOutputManager & /* manager */, unsigned width, unsigned height, gpointer self)
{
GmMainWindow *mw = gm_mw_get_mw (GTK_WIDGET (self));
@@ -991,12 +991,12 @@
}
void
-on_hw_accel_status_changed_cb (Ekiga::DisplayManager & /* manager */, HwAccelStatus /* hw_accel_status */, gpointer /*self*/)
+on_hw_accel_status_changed_cb (Ekiga::VideoOutputManager & /* manager */, HwAccelStatus /* hw_accel_status */, gpointer /*self*/)
{
}
void
-on_vidinputdevice_opened_cb (Ekiga::VidInputManager & /* manager */,
+on_vidinputdevice_opened_cb (Ekiga::VideoInputManager & /* manager */,
Ekiga::VidInputDevice & /* vidinput_device */,
Ekiga::VidInputConfig & vidinput_config,
gpointer self)
@@ -1020,7 +1020,7 @@
void
-on_vidinputdevice_closed_cb (Ekiga::VidInputManager & /* manager */, Ekiga::VidInputDevice & /*vidinput_device*/, gpointer self)
+on_vidinputdevice_closed_cb (Ekiga::VideoInputManager & /* manager */, Ekiga::VidInputDevice & /*vidinput_device*/, gpointer self)
{
GmMainWindow *mw = NULL;
g_return_if_fail (self != NULL);
@@ -1034,7 +1034,7 @@
}
void
-on_vidinputdevice_error_cb (Ekiga::VidInputManager & /* manager */,
+on_vidinputdevice_error_cb (Ekiga::VideoInputManager & /* manager */,
Ekiga::VidInputDevice & vidinput_device,
Ekiga::VidInputErrorCodes error_code,
gpointer self)
@@ -1247,7 +1247,7 @@
}
void
-on_logo_update_required_cb (Ekiga::DisplayManager & /* manager */,
+on_logo_update_required_cb (Ekiga::VideoOutputManager & /* manager */,
gpointer self)
{
gm_main_window_update_logo_have_window (GTK_WIDGET (self));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]