Skip to content

Commit 2c2d61e

Browse files
committed
Merge branch 'release-0.4.10'
2 parents ba87571 + 53f3594 commit 2c2d61e

File tree

17 files changed

+202
-131
lines changed

17 files changed

+202
-131
lines changed

CMakeLists.txt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
cmake_minimum_required(VERSION 3.2)
2121
project(
2222
splash
23-
VERSION 0.4.8
23+
VERSION 0.4.10
2424
LANGUAGES C CXX
2525
)
2626

@@ -31,6 +31,8 @@ if(NOT CMAKE_BUILD_TYPE)
3131
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
3232
endif(NOT CMAKE_BUILD_TYPE)
3333

34+
enable_testing()
35+
3436
#
3537
# Package information
3638
#
@@ -49,14 +51,21 @@ pkg_search_module(GSL REQUIRED gsl)
4951
pkg_search_module(ZMQ REQUIRED libzmq)
5052

5153
# Optional dependencies
52-
set(Python_ADDITIONAL_VERSIONS 3.4 3.5)
53-
find_package(PythonLibs)
54+
if(UNIX AND NOT APPLE)
55+
set(Python_ADDITIONAL_VERSIONS 3.4 3.5)
56+
find_package(PythonLibs)
57+
elseif(APPLE)
58+
pkg_check_modules(PYTHON python3)
59+
set(PYTHONLIBS_VERSION_STRING ${PYTHON_VERSION})
60+
set(PYTHONLIBS_FOUND ${PYTHON_FOUND})
61+
endif()
62+
5463
find_package(Doxygen)
5564
pkg_search_module(GPHOTO libgphoto2)
5665
pkg_check_modules(FFMPEG libavformat libavcodec libavutil libswscale)
5766
pkg_search_module(OPENCV opencv)
5867
pkg_search_module(PORTAUDIO portaudio-2.0)
59-
pkg_search_module(SHMDATA shmdata-1.2)
68+
pkg_search_module(SHMDATA shmdata-1.3)
6069

6170
#
6271
# Configuration

NEWS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Splash release notes
22
===================
33

4+
Splash 0.4.10 (2016-10-28)
5+
-------------------------
6+
Improvements:
7+
* Separated RT scheduling and core affinity options
8+
* Added a template realtime.conf to be put in /etc/security/limits.d
9+
* Cleaned up the threadpool
10+
* Updated shmdata dependency to version 1.3
11+
12+
Bug fixed:
13+
* Fix: issue when deleting an image_shmdata object
14+
* Fix: texture upload loop crash when deleting a texture object
15+
* Fix: freeze of the engine (not the gui) when saving configuration while having a camera selected in the calibration view
16+
* Fix: blending crash issue when using multiple GPUs
17+
* Fix: Controller::getObjectTypes returned the local type, instead of the remote type
18+
* Fix: localhost address is now the default option when none is specified.
19+
* Fix: updated default spawn value
20+
421
Splash 0.4.8 (2016-09-30)
522
-------------------------
623
New features:

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,16 @@ So, let's start with the installation of the dependencies. Firstly download and
118118

119119
The following steps will be using the port command from MacPorts, you may replace it with the brew equivalent if you are more of a Homebrew user. Note that compiling with the Homebrew versions of the libraries has not been tested, so please report issues (and ideally solutions as I do not have a Mac with Homebrew...).
120120

121-
You can now install the command line tools we will need to download and compile the sources:
121+
With MacPorts, install the following packages:
122122

123-
sudo port install automake autoconf libtool cmake git pkgconfig
123+
sudo port install libtool cmake git pkgconfig gstreamer1 python35 gsl zmq glfw glm ffmpeg portaudio snappy
124+
125+
With Homebrew, install the following packages:
126+
127+
brew install libtool cmake git pkgconfig gstreamer1 python45 gsl zmq homebrew/versions/glfw3 glm portaudio ffmpeg snappy libgphoto2
124128

125129
We then install Shmdata, which depends on GStreamer. Note that Shmdata is only needed if you want Splash to communicate with other Shmdata-compatible softwares. If you want to read video files or feed Splash through Syphon, you can skip this step.
126130

127-
sudo port install gstreamer1 python35
128131
git clone https://github.com/nicobou/shmdata
129132
cd shmdata
130133
./autogen.sh && ./configure
@@ -133,8 +136,6 @@ We then install Shmdata, which depends on GStreamer. Note that Shmdata is only n
133136

134137
Install all the other dependencies:
135138

136-
sudo port install gsl zmq glfw glm ffmpeg portaudio snappy
137-
138139
And then grab and install Splash:
139140

140141
git clone https://github.com/paperManu/splash

addons/blender/splash/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
bl_info = {
2121
"name": "Splash output",
2222
"author": "Emmanuel Durand",
23-
"version": (0, 4, 8),
23+
"version": (0, 4, 10),
2424
"blender": (2, 72, 0),
2525
"location": "3D View > Toolbox, File > Export",
2626
"description": "Utility tools to connect Blender to the Splash videomapper",

data/config/realtime.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Allows for the realtime group to change process scheduling
2+
#
3+
@realtime - rtprio 99
4+
@realtime - memlock unlimited

include/threadpool.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ class ThreadPool;
4444
class Worker
4545
{
4646
public:
47-
Worker(ThreadPool& s) : pool(s) {}
47+
Worker(ThreadPool& s)
48+
: pool(s)
49+
{
50+
}
4851
void operator()();
4952

5053
private:
@@ -67,7 +70,7 @@ class ThreadPool
6770
void addWorkers(unsigned int nbr);
6871
void setAffinity(const std::vector<int>& cores);
6972
void waitAllThreads();
70-
void waitThreads(std::vector<unsigned int>&);
73+
void waitThreads(std::vector<unsigned int>);
7174

7275
private:
7376
friend class Worker;
@@ -92,8 +95,9 @@ unsigned int ThreadPool::enqueue(F f)
9295
{
9396
unsigned int id;
9497
{
95-
// Acquire lock
96-
queue_mutex.lock();
98+
// Acquire lock
99+
std:;
100+
std::lock_guard<std::mutex> lock(queue_mutex);
97101

98102
id = std::atomic_fetch_add(&nextId, 1u);
99103
if (id == std::numeric_limits<unsigned int>::max())
@@ -102,8 +106,6 @@ unsigned int ThreadPool::enqueue(F f)
102106
// Add the task
103107
tasks.push_back(std::shared_ptr<std::function<void()>>(new std::function<void()>(f)));
104108
tasksId.push_back(id);
105-
106-
queue_mutex.unlock();
107109
}
108110

109111
// Wake up one thread
@@ -117,14 +119,13 @@ template <class F>
117119
void ThreadPool::enqueueWithoutId(F f)
118120
{
119121
{
120-
// Acquire lock
121-
queue_mutex.lock();
122+
// Acquire lock
123+
std:;
124+
std::lock_guard<std::mutex> lock(queue_mutex);
122125

123126
// Add the task
124127
tasks.push_back(std::shared_ptr<std::function<void()>>(new std::function<void()>(f)));
125128
tasksId.push_back(0);
126-
127-
queue_mutex.unlock();
128129
}
129130

130131
// Wake up one thread

include/widget_global_view.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@ class GuiGlobalView : public GuiWidget
4545
void setJoystick(const std::vector<float>& axes, const std::vector<uint8_t>& buttons);
4646
void setScene(std::weak_ptr<Scene> scene) { _scene = scene; }
4747

48-
protected:
49-
std::shared_ptr<Camera> _camera, _guiCamera;
48+
private:
49+
std::shared_ptr<Camera> _camera{nullptr};
50+
std::shared_ptr<Camera> _guiCamera{nullptr};
5051
std::weak_ptr<Scene> _scene;
5152
bool _camerasHidden{false};
5253
bool _beginDrag{true};
5354
bool _noMove{false};
5455

5556
bool _hideCameras{false};
5657
bool _camerasColorized{false};
58+
bool _camerasColorizedPreviousValue{false};
5759

5860
// Size of the view
5961
int _camWidth{0}, _camHeight{0};

include/world.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class World : public RootObject
9898
std::string _executionPath{""};
9999
std::mutex _configurationMutex;
100100
bool _enforceCoreAffinity{false}; //!< If true, World and Scenes have their affinity fixed in specific, separate cores
101+
bool _enforceRealtime{false}; //!< If true, realtime scheduling is asked to the system, if possible
101102

102103
// World parameters
103104
unsigned int _worldFramerate{60};

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ link_directories(${FFMPEG_LIBRARY_DIRS})
5757
link_directories(${PORTAUDIO_LIBRARY_DIRS})
5858
link_directories(${OPENCV_LIBRARY_DIRS})
5959
link_directories(${SNAPPY_LIBRARY_DIRS})
60-
link_directories(${PYTHON_LIBRARIES})
60+
link_directories(${PYTHON_LIBRARY_DIRS})
6161

6262
#
6363
# Targets

src/controller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ map<string, string> ControllerObject::getObjectTypes() const
144144
{
145145
if (!o.second->getSavable())
146146
continue;
147-
types[o.first] = o.second->getType();
147+
types[o.first] = o.second->getRemoteType();
148148
}
149149
for (auto& o : scene->_ghostObjects)
150150
{
151151
if (!o.second->getSavable())
152152
continue;
153-
types[o.first] = o.second->getType();
153+
types[o.first] = o.second->getRemoteType();
154154
}
155155

156156
return types;

0 commit comments

Comments
 (0)