Skip to content

Commit dc9c7d2

Browse files
author
shalstvedt
committed
Importing a clean copy from the Git repository; git-svn was choking trying to sync commits.
git-svn-id: http://nuicode.svnrepository.com/svn/ccf@1 49704ecc-8926-4d56-a4d4-72374b29732b
0 parents  commit dc9c7d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+8952
-0
lines changed

.gitignore

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*.dylib
2+
*.21
3+
*.dblite
4+
*.o
5+
*.a
6+
*.swp
7+
*.orig
8+
*.dSYM
9+
*.mode1v3
10+
*tehansen.pbxuser
11+
*.core
12+
.DS_Store
13+
build
14+
fusion
15+
ptypes_test
16+
ptypesn_test
17+
18+
# cause of window, try to not show differences...
19+
# but no help for already commited files...
20+
contrib/libevent*

AUTHORS

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
*****************************************
2+
Community Core Fusion (C) 2011 NUI Group.
3+
*****************************************
4+
5+
Fusion Authors:
6+
Scott Halstvedt
7+
8+
This project was based on code originally written by the Movid team. The original AUTHORS contents is listed below. As the Q license does not allow distribution of anything but patches, a complicated patchset is distributed with this software.
9+
10+
-------------------------------------------------------------
11+
Movid Copyright (C) 2010 Movid Authors. All rights reserved.
12+
Movid may be used and distributed under the terms of the Q Public License as appearing in the LICENSE file distributed with this software.
13+
-------------------------------------------------------------
14+
15+
Movid Authors (Copyright Holders):
16+
Mathieu Virbel
17+
Thomas Hansen
18+
Christopher Denter
19+
Seth Sandlers
20+
21+
Movid Contributors:
22+
Bernt Hullen

INSTALL

Whitespace-only changes.

LICENSE

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
*************************************************************
2+
Movid Copyright (C) 2010 Movid Authors (see AUTHORS file distributed with this software). All rights reserved.
3+
Movid may be used and distributed under the terms of the Q Public License as appearing in this file.
4+
*************************************************************
5+
6+
The Q Public License Version 1.0
7+
Copyright (C) 1999 Trolltech AS, Norway.
8+
9+
Everyone is permitted to copy and distribute this license document.
10+
11+
The intent of this license is to establish freedom to share and change the software regulated by this license under the open source model.
12+
13+
This license applies to any software containing a notice placed by the copyright holder saying that it may be distributed under the terms of the Q Public License version 1.0. Such software is herein referred to as the Software. This license covers modification and distribution of the Software, use of third-party application programs based on the Software, and development of free software which uses the Software.
14+
15+
Granted Rights
16+
1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license.
17+
18+
2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed.
19+
20+
3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications:
21+
22+
a. Modifications must not alter or remove any copyright notices in the Software.
23+
24+
b. When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer.
25+
26+
4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions:
27+
28+
a. You must include this license document in the distribution.
29+
30+
b. You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this.
31+
32+
c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license.
33+
34+
5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others.
35+
36+
6. You may develop application programs, reusable components and other software items that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements:
37+
38+
a. You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer.
39+
40+
b. You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose.
41+
42+
c. If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one.
43+
44+
Limitations of Liability
45+
In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise.
46+
47+
No Warranty
48+
The Software and this license document are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
49+
50+
Choice of Law
51+
This license is governed by the Laws of France. Disputes shall be settled by Lille City Court.

README

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
################################################################################
2+
# About
3+
################################################################################
4+
5+
Fusion is a modular daemon designed to facilitate rapid prototyping of multimodal user interfaces.
6+
It was initially written for the Natural User Interface Group as part of Google Summer of Code 2011.
7+
8+
9+
10+
################################################################################
11+
# Features
12+
################################################################################
13+
14+
* Cross-Platform
15+
Fusion is fully cross-platform. It runs on Windows, Linux, MacOSX and FreeBSD.
16+
The same configurations and models apply across platforms, so if your application is
17+
cross-platform, we support it.
18+
19+
* Daemon
20+
Fusion runs as a daemon process. That means you can
21+
launch it on a different headless computer if you want (although currently some things
22+
depend on the daemon running on localhost, and responsiveness could be an issue).
23+
24+
* Threading
25+
With Fusion, you have the ability to enable threading for any module you want.
26+
That means you are finally able to use your Core 2 Duo / Quad Core to its full
27+
potential. Obviously, you can still use non-threaded mode.
28+
29+
* Remote API
30+
Fusion has a JSON API to control all its settings and adjust your pipeline remotely
31+
and on the fly. Interaction events are also served as JSON objects.
32+
33+
* HTML5 Administration
34+
Fusion's web interface makes use of the most recent developments in web
35+
programming with open standards like HTML5. All that is required is a compatible
36+
HTML5 web browser. As of today, Firefox 3.6, Safari and Chromium have successfully
37+
run the web interface.
38+
39+
40+
41+
42+
################################################################################
43+
# Compiling Fusion
44+
################################################################################
45+
46+
Fusion uses the SCons build system (http://www.scons.org/). Quoting the website:
47+
"""SCons is a software construction tool -- that is, a superior alternative to the
48+
classic "Make" build tool that we all know and love."""
49+
50+
This means you have to install SCons to be able to compile Fusion.
51+
The platform specific compile notes below include instruction on how to install
52+
SCons. Once you have SCons installed open a command line in the Fusion directory
53+
(the one with this README in it) and run the following command:
54+
55+
To build fusion (and dependencies if needed) run:
56+
scons
57+
58+
To clean fusion (remove any intermediate files, output libs and executables):
59+
scons -c (or 'scons --clean')
60+
61+
To also clean the dependencies built in contrib:
62+
scons -c --clean-contrib
63+
64+
65+
66+
For more info about SCons, other options, or how to install it on any system,
67+
you can check the SCons user guide at:
68+
http://www.scons.org/doc/production/HTML/scons-user.html
69+
70+
71+
72+
+++++++++++++++++++++++++++++++++++++++++++++++++++
73+
+ Linux Compile Notes
74+
+++++++++++++++++++++++++++++++++++++++++++++++++++
75+
76+
The following instructions are for Ubuntu/Debian.
77+
They should be easily transferable to other linux distributions.
78+
Building from source on these distributions is really easy.
79+
80+
First, you have to install git and the build-tools:
81+
sudo apt-get install git-core build-essential scons
82+
83+
Then, you get the current development version of Fusion:
84+
git clone git://github.com/shalstvedt/Fusion.git
85+
86+
Afterwards, we change to the Fusion repo you just cloned:
87+
cd Fusion
88+
89+
It is time to compile, let's run scons!
90+
scons
91+
92+
Now you should be able to use fusion already. Try the ballworld demo:
93+
./fusion -l config/ballworld/ballworld.cfg
94+
95+
Now that the daemon is running, you can simply open your webbrowser
96+
(needs to be Firefox 3.6 or some other browser with HTML5 and support for
97+
the canvas object. Javascript has to be enabled.) and navigate to the admin interface:
98+
http://127.0.0.1:7500/
99+
100+
101+
+++++++++++++++++++++++++++++++++++++++++++++++++++
102+
+ Windows Compile Notes
103+
+++++++++++++++++++++++++++++++++++++++++++++++++++
104+
105+
To build fusion, you will have to install a couple of things first.
106+
You will need Visual C++ 2010 and scons (which also requires python)
107+
108+
1. install Visual C++ Express 2010 (not needed if you have Visual Studio 2010)
109+
not: must be 2010 version! you can download a free version here (select language to start download):
110+
http://www.microsoft.com/express/Downloads/#2010-Visual-CPP
111+
112+
2. install Python and scons
113+
download and run the following files:
114+
http://python.org/ftp/python/2.7/python-2.7.msi
115+
http://prdownloads.sourceforge.net/scons/scons-2.0.1.win32.exe
116+
117+
OK, you're ready to build. If you installed everything to default locations just run:
118+
scons
119+
120+
If scons command is not found, try:
121+
122+
C:\Python2.7\Scripts\scons
123+
124+
Now you should be able to start fusion. Just double click the fusion executable or run it from the command line to use a config:
125+
fusion -l config/ballworld/ballworld.cfg
126+
127+
Now that the daemon is running, you can simply open your browser
128+
(needs to be Firefox 3.6 or some other browser with HTML5 and support for
129+
the canvas object. Javascript has to be enabled.) and navigate to the admin interface:
130+
http://127.0.0.1:7500/
131+
132+
133+
+++++++++++++++++++++++++++++++++++++++++++++++++++
134+
+ OSX Compile Notes
135+
+++++++++++++++++++++++++++++++++++++++++++++++++++
136+
137+
1. installl scons
138+
download the follwoing file:
139+
http://prdownloads.sourceforge.net/scons/scons-2.0.1.zip
140+
141+
2. unzip the file, open a terminal and navigate to that directory:
142+
cd scons-2.0.1
143+
python setup.py install
144+
145+
You're ready to build, just run:
146+
scons
147+
148+
149+
Note: If you need to build moved as 32bit, you can do so by forcing the -m32 flag on the compilers for both moved and all libs in contrib by running:
150+
CC='gcc -m32' CXX='g++ -m32' scons
151+
152+
Now you should be able to use fusion already. Try the simple-video preset:
153+
./fusion -l config/ballworld/ballworld.cfg
154+
155+
Now that the daemon is running, you can simply open your browser
156+
(needs to be Firefox 3.6 or some other browser with HTML5 and support for
157+
the canvas object. Javascript has to be enabled.) and navigate to the admin interface:
158+
http://127.0.0.1:7500/
159+
160+
161+
********************************************************************************
162+
Fusion incorporates components and ideas from the Movid project. Please see
163+
below for license information on that project.
164+
********************************************************************************
165+
166+
################################################################################
167+
# License
168+
################################################################################
169+
Movid Copyright (C) 2010 Movid Authors (see AUTHORS file). All rights reserved.
170+
Movid may be used and distributed under the terms of the Q Public License as
171+
appearing in the LICENSE file distributed with this software.

SConstruct

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#################################################################
2+
# Command line options to controll build
3+
#################################################################
4+
AddOption( '--clean-contrib',
5+
help='force rebuilding of contrib libraries',
6+
dest='clean-contrib', action="store_true"
7+
)
8+
9+
10+
#################################################################
11+
# Source files list for each target we are building
12+
#################################################################
13+
14+
#source files for the daemon ####################################
15+
daemon_src = [
16+
'src/fusion.cpp',
17+
'contrib/cJSON/cJSON.c'
18+
]
19+
20+
#source files for ccx, core+modules ########################
21+
ccx_src = [
22+
'ccx/ccxDaemon.cpp',
23+
'ccx/ccxDataGenericContainer.cpp',
24+
'ccx/ccxDataStream.cpp',
25+
'ccx/ccxFactory.cpp',
26+
'ccx/ccxLog.cpp',
27+
'ccx/ccxModule.cpp',
28+
'ccx/ccxPipeline.cpp',
29+
'ccx/ccxProperty.cpp',
30+
'ccx/ccxThread.cpp',
31+
'ccx/ccxUtils.cpp',
32+
'src/modules/ccxDebugModule.cpp'
33+
]
34+
35+
#################################################################
36+
# Check some arguments in command line
37+
#################################################################
38+
mode = ARGUMENTS.get('mode', 'normal')
39+
if mode not in ('normal', 'debug'):
40+
print 'Invalid mode <%s>, fallback to normal' % mode
41+
mode = 'normal'
42+
print 'Doing compilation in %s mode' % mode
43+
44+
#################################################################
45+
# Build contrib and configure env for linking against deps
46+
#################################################################
47+
env = SConscript('contrib/SConscript')
48+
49+
#################################################################
50+
# Platform specific settings for build env and OpenCV flags
51+
#################################################################
52+
import sys, os
53+
54+
# WIN32 #########################################################
55+
if sys.platform == 'win32':
56+
#on widnows daemon also needs XgetOpt source file
57+
daemon_src.append('contrib/XgetOpt/XgetOpt.cxx')
58+
59+
#gotta set up msvc compiler and linker for list of options see:
60+
#see http://msdn.microsoft.com/en-us/library/fwkeyyhe(v=VS.71).aspx
61+
#and http://msdn.microsoft.com/en-us/library/y0zzbyt4(VS.80).aspx
62+
env.Append(
63+
CPPDEFINES = ['WIN32'],
64+
CCFLAGS = ['/O2', '/Oi', '/GL', '/EHsc', '/MD'], #mainly optimization
65+
LIBS = ['ws2_32.lib', 'user32.lib'], #ws_32.lib is needed buy libevent
66+
LINKFLAGS = ['/LTCG', '/OPT:REF', '/OPT:ICF']) #mainly optimization
67+
68+
69+
70+
# UNIX #######################################################
71+
else:
72+
73+
#set the compiler if set in ENV, used e.g. to force 32bit by setting to g++ -m32
74+
if os.environ.get('CC'): env.Replace(CC=os.environ['CC'])
75+
if os.environ.get('CXX'): env.Replace(CXX=os.environ['CXX'])
76+
77+
if mode == 'debug':
78+
env.Append(CCFLAGS = ['-ggdb', '-O0'])
79+
80+
81+
82+
83+
#################################################################
84+
# Build Rules for ccx and fusion program
85+
#################################################################
86+
ccx = env.Library('ccx', ccx_src )
87+
env.Append(CPPPATH = ['ccx'])
88+
env.Append(CPPPATH = 'src/modules');
89+
env.Program('fusion', daemon_src + [ccx])

ccx/ccx.h

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// ccx master include
2+
3+
#include "ccxLog.h"
4+
#include "ccxDaemon.h"
5+
#include "ccxPipeline.h"
6+
#include "ccxModule.h"
7+
#include "ccxFactory.h"
8+
#include "ccxProperty.h"
9+
#include "ccxDataStream.h"

0 commit comments

Comments
 (0)