ekiga r7591 - in trunk/lib/engine: . components/ptlib
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7591 - in trunk/lib/engine: . components/ptlib
- Date: Thu, 22 Jan 2009 13:01:16 +0000 (UTC)
Author: jpuydt
Date: Thu Jan 22 13:01:16 2009
New Revision: 7591
URL: http://svn.gnome.org/viewvc/ekiga?rev=7591&view=rev
Log:
The ptlib video input code uses kickstart
Modified:
trunk/lib/engine/components/ptlib/videoinput-main-ptlib.cpp
trunk/lib/engine/components/ptlib/videoinput-main-ptlib.h
trunk/lib/engine/engine.cpp
Modified: trunk/lib/engine/components/ptlib/videoinput-main-ptlib.cpp
==============================================================================
--- trunk/lib/engine/components/ptlib/videoinput-main-ptlib.cpp (original)
+++ trunk/lib/engine/components/ptlib/videoinput-main-ptlib.cpp Thu Jan 22 13:01:16 2009
@@ -31,7 +31,7 @@
* ------------------------------------------
* begin : written in 2008 by Matthias Schneider
* copyright : (c) 2008 by Matthias Schneider
- * description : code to hook the PTLIB videoinput manager
+ * description : code to hook the PTLIB videoinput manager
* into the main program
*
*/
@@ -40,22 +40,40 @@
#include "videoinput-core.h"
#include "videoinput-manager-ptlib.h"
-bool
-videoinput_ptlib_init (Ekiga::ServiceCore &core,
- int */*argc*/,
- char **/*argv*/[])
+struct PTLIBVIDEOINPUTSpark: public Ekiga::Spark
{
- bool result = false;
- gmref_ptr<Ekiga::VideoInputCore> videoinput_core
- = core.get ("videoinput-core");
+ PTLIBVIDEOINPUTSpark (): result(false)
+ {}
- if (videoinput_core) {
+ bool try_initialize_more (Ekiga::ServiceCore& core,
+ int* /*argc*/,
+ char** /*argv*/[])
+ {
+ gmref_ptr<Ekiga::VideoInputCore> videoinput_core = core.get ("videoinput-core");
- GMVideoInputManager_ptlib *videoinput_manager = new GMVideoInputManager_ptlib(core);
+ if (videoinput_core) {
- videoinput_core->add_manager (*videoinput_manager);
- result = true;
+ GMVideoInputManager_ptlib *videoinput_manager = new GMVideoInputManager_ptlib(core);
+
+ videoinput_core->add_manager (*videoinput_manager);
+ result = true;
+ }
+
+ return result;
}
- return result;
+ Ekiga::Spark::state get_state () const
+ { return result?FULL:BLANK; }
+
+ const std::string get_name () const
+ { return "PTLIBVIDEOINPUT"; }
+
+ bool result;
+};
+
+void
+videoinput_ptlib_init (Ekiga::KickStart& kickstart)
+{
+ gmref_ptr<Ekiga::Spark> spark(new PTLIBVIDEOINPUTSpark);
+ kickstart.add_spark (spark);
}
Modified: trunk/lib/engine/components/ptlib/videoinput-main-ptlib.h
==============================================================================
--- trunk/lib/engine/components/ptlib/videoinput-main-ptlib.h (original)
+++ trunk/lib/engine/components/ptlib/videoinput-main-ptlib.h Thu Jan 22 13:01:16 2009
@@ -39,10 +39,8 @@
#ifndef __VIDEOINPUT_MAIN_PTLIB_H__
#define __VIDEOINPUT_MAIN_PTLIB_H__
-#include "services.h"
+#include "kickstart.h"
-bool videoinput_ptlib_init (Ekiga::ServiceCore &core,
- int *argc,
- char **argv[]);
+void videoinput_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:16 2009
@@ -196,10 +196,7 @@
return;
}
- if (!videoinput_ptlib_init (*service_core, &argc, &argv)) {
- delete service_core;
- return;
- }
+ videoinput_ptlib_init (kickstart);
audioinput_ptlib_init (kickstart);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]