ekiga r7589 - in trunk/lib/engine: . components/ptlib
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7589 - in trunk/lib/engine: . components/ptlib
- Date: Thu, 22 Jan 2009 13:01:04 +0000 (UTC)
Author: jpuydt
Date: Thu Jan 22 13:01:04 2009
New Revision: 7589
URL: http://svn.gnome.org/viewvc/ekiga?rev=7589&view=rev
Log:
The ptlib audio output code now uses kickstart too
Modified:
trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.cpp
trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.h
trunk/lib/engine/engine.cpp
Modified: trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.cpp
==============================================================================
--- trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.cpp (original)
+++ trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.cpp Thu Jan 22 13:01:04 2009
@@ -31,7 +31,7 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : code to hook the PTLIB audiooutput manager
+ * description : code to hook the PTLIB audiooutput manager
* into the main program
*
*/
@@ -40,22 +40,40 @@
#include "audiooutput-core.h"
#include "audiooutput-manager-ptlib.h"
-bool
-audiooutput_ptlib_init (Ekiga::ServiceCore &core,
- int */*argc*/,
- char **/*argv*/[])
+struct PTLIBAUDIOOUTPUTSpark: public Ekiga::Spark
{
- bool result = false;
- gmref_ptr<Ekiga::AudioOutputCore> audiooutput_core
- = core.get ("audiooutput-core");
+ PTLIBAUDIOOUTPUTSpark (): result(false)
+ {}
- if (audiooutput_core) {
+ bool try_initialize_more (Ekiga::ServiceCore& core,
+ int* /*argc*/,
+ char** /*argv*/[])
+ {
+ gmref_ptr<Ekiga::AudioOutputCore> audiooutput_core = core.get ("audiooutput-core");
- GMAudioOutputManager_ptlib *audiooutput_manager = new GMAudioOutputManager_ptlib(core);
+ if (audiooutput_core) {
- audiooutput_core->add_manager (*audiooutput_manager);
- result = true;
+ GMAudioOutputManager_ptlib *audiooutput_manager = new GMAudioOutputManager_ptlib(core);
+
+ audiooutput_core->add_manager (*audiooutput_manager);
+ result = true;
+ }
+
+ return result;
}
- return result;
+ Ekiga::Spark::state get_state () const
+ { return result?FULL:BLANK; }
+
+ const std::string get_name () const
+ { return "PTLIBAUDIOOUTPUT"; }
+
+ bool result;
+};
+
+void
+audiooutput_ptlib_init (Ekiga::KickStart& kickstart)
+{
+ gmref_ptr<Ekiga::Spark> spark(new PTLIBAUDIOOUTPUTSpark);
+ kickstart.add_spark (spark);
}
Modified: trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.h
==============================================================================
--- trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.h (original)
+++ trunk/lib/engine/components/ptlib/audiooutput-main-ptlib.h Thu Jan 22 13:01:04 2009
@@ -39,10 +39,8 @@
#ifndef __AUDIOOUTPUT_MAIN_PTLIB_H__
#define __AUDIOOUTPUT_MAIN_PTLIB_H__
-#include "services.h"
+#include "kickstart.h"
-bool audiooutput_ptlib_init (Ekiga::ServiceCore &core,
- int *argc,
- char **argv[]);
+void audiooutput_ptlib_init (Ekiga::KickStart& kickstart);
#endif
Modified: trunk/lib/engine/engine.cpp
==============================================================================
--- trunk/lib/engine/engine.cpp (original)
+++ trunk/lib/engine/engine.cpp Thu Jan 22 13:01:04 2009
@@ -206,10 +206,7 @@
return;
}
- if (!audiooutput_ptlib_init (*service_core, &argc, &argv)) {
- delete service_core;
- return;
- }
+ audiooutput_ptlib_init (kickstart);
#ifdef HAVE_DBUS
hal_dbus_init (kickstart);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]