[mousetrap/ng] Changed to glibmm
- From: Flavio Percoco <flaper src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [mousetrap/ng] Changed to glibmm
- Date: Sun, 1 Nov 2009 21:00:49 +0000 (UTC)
commit 3950852f222fd0cde2820aa2f1b663fd531f71a5
Author: Flavio Percoco Premoli <flaper87 gmail com>
Date: Sun Nov 1 23:16:08 2009 +0100
Changed to glibmm
src/mousetrap/ocvfw/.cproject | 1 +
src/mousetrap/ocvfw/dev/MtpCapture.cpp | 6 +++---
src/mousetrap/ocvfw/dev/MtpCapture.h | 4 ++--
src/mousetrap/ocvfw/dev/setup.py | 18 ++++++++++++++++--
4 files changed, 22 insertions(+), 7 deletions(-)
---
diff --git a/src/mousetrap/ocvfw/.cproject b/src/mousetrap/ocvfw/.cproject
index f988401..db482e3 100644
--- a/src/mousetrap/ocvfw/.cproject
+++ b/src/mousetrap/ocvfw/.cproject
@@ -33,6 +33,7 @@
<listOptionValue builtIn="false" value="/usr/local/include"/>
<listOptionValue builtIn="false" value="/usr/include/opencv"/>
<listOptionValue builtIn="false" value="/usr/include/python2.6"/>
+<listOptionValue builtIn="false" value="/usr/include/glibmm-2.4"/>
<listOptionValue builtIn="false" value="/usr/include/glib-2.0"/>
</option>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.430443262" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
diff --git a/src/mousetrap/ocvfw/dev/MtpCapture.cpp b/src/mousetrap/ocvfw/dev/MtpCapture.cpp
index 15460ad..bd849f4 100644
--- a/src/mousetrap/ocvfw/dev/MtpCapture.cpp
+++ b/src/mousetrap/ocvfw/dev/MtpCapture.cpp
@@ -26,7 +26,7 @@
#include "MtpCamera.h"
#include <stdio.h>
-#include <glib.h>
+#include <glibmm.h>
#include "MtpCapture.h"
@@ -45,10 +45,10 @@ void MtpCapture::set_async(int set_fps, bool set_async) {
async = set_async;
if ( set_async == true)
- g_timeout_add(set_fps, sync);
+ g_timeout_add(set_fps, sync, NULL);
}
-gboolean MtpCapture::sync() {
+gboolean MtpCapture::sync(gpointer p) {
image = webcam.queryFrame();
if (!image)
diff --git a/src/mousetrap/ocvfw/dev/MtpCapture.h b/src/mousetrap/ocvfw/dev/MtpCapture.h
index 5e23aa1..eadb380 100644
--- a/src/mousetrap/ocvfw/dev/MtpCapture.h
+++ b/src/mousetrap/ocvfw/dev/MtpCapture.h
@@ -24,7 +24,7 @@
#include "cv.h"
#include "highgui.h"
-#include <glib.h>
+#include <glibmm.h>
#include "MtpCamera.h"
@@ -64,7 +64,7 @@ public:
/**
* Synchronize the capture quering a new frame.
*/
- gboolean sync();
+ gboolean sync(gpointer p);
/**
* Starts/Stops the asynchronous calls to the sync method.
diff --git a/src/mousetrap/ocvfw/dev/setup.py b/src/mousetrap/ocvfw/dev/setup.py
index c349f9c..d246713 100644
--- a/src/mousetrap/ocvfw/dev/setup.py
+++ b/src/mousetrap/ocvfw/dev/setup.py
@@ -1,9 +1,23 @@
+import os
from distutils.core import setup
from distutils.core import Extension
+os.environ['CC'] = 'g++'
+os.environ['CXX'] = 'g++'
+os.environ['CPP'] = 'g++'
+os.environ['LDSHARED'] = 'g++'
+
module2 = Extension('capture',
- libraries = ['cv', 'highgui', 'cxcore', 'cvaux', 'ml', 'gstreamer-0.10', 'gobject-2.0', 'gmodule-2.0', 'gthread-2.0', 'rt', 'xml2', 'glib-2.0'],
- include_dirs=['/usr/include/opencv', '/usr/include/gstreamer-0.10/', '/usr/include/glib-2.0/', '/usr/lib/glib-2.0/include/', '/usr/include/libxml2/'],
+ libraries = ['cv', 'highgui', 'cxcore', 'cvaux', 'ml', 'gobject-2.0', 'gmodule-2.0', 'gthread-2.0', 'rt', 'xml2', 'glib-2.0', 'glibmm-2.4', 'sigc-2.0'],
+ include_dirs=['/usr/include/opencv',
+ '/usr/include/glib-2.0/',
+ '/usr/lib/glib-2.0/include/',
+ '/usr/include/glibmm-2.4/',
+ '/usr/lib/glibmm-2.4/include/',
+ '/usr/include/libxml2/',
+ '/usr/include/sigc++-2.0/',
+ '/usr/include/sigc++-2.0/sigc++/',
+ '/usr/lib/sigc++-2.0/include'],
sources = ['MtpCamera.cpp', 'MtpCapture.cpp', 'PyMtpCapture.cpp'])
setup(name = 'capture',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]