Skip to content

Commit c0723d2

Browse files
committed
Merge branch 'release_0.5.4'
2 parents ccc5850 + c0c132c commit c0723d2

Some content is hidden

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

64 files changed

+1437
-601
lines changed

.gitlab-ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ image: ubuntu:xenial
22

33
before_script:
44
- apt update -qq
5-
- apt install -y build-essential git-core zip subversion cmake libtool clang libxrandr-dev libxi-dev libglm-dev libgsl0-dev libatlas3-base libzmq3-dev libsnappy-dev libgphoto2-dev libglfw3-dev libxinerama-dev libxcursor-dev python3-dev portaudio19-dev yasm
5+
- apt install -y curl wget build-essential git-core zip subversion cmake libtool clang libxrandr-dev libxi-dev libglm-dev libgsl0-dev libatlas3-base libzmq3-dev libsnappy-dev libgphoto2-dev libxinerama-dev libxcursor-dev python3-dev portaudio19-dev yasm libgl1-mesa-dev
66
- git submodule update --init
77
- ./make_deps.sh
88
- rm -rf build && mkdir build && cd build
99
- cmake ..
10+
- make glfw
1011

1112
stages:
1213
- test
1314
- package
15+
- coverity
1416

1517
test:
1618
stage: test
@@ -32,3 +34,14 @@ package:
3234
paths:
3335
- "*.deb"
3436
- "*.tar.bz2"
37+
38+
coverity:
39+
stage: coverity
40+
script:
41+
- wget https://scan.coverity.com/download/linux64 --post-data "token=zkRfEWYxyAeJDlYYg9Hkkg&project=paperManu%2Fsplash" -O coverity_tool.tgz
42+
- tar xvzf coverity_tool.tgz
43+
- $(ls | grep cov-analysis)/bin/cov-build --dir cov-int make -j$(nproc)
44+
- tar caf splash-cov.bz2 cov-int
45+
- curl --form token=zkRfEWYxyAeJDlYYg9Hkkg --form [email protected] --form [email protected] --form description="Splash" https://scan.coverity.com/builds?project=paperManu%2Fsplash
46+
only:
47+
- coverity_scan

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@
3333
path = external/ffmpeg
3434
url = https://git.ffmpeg.org/ffmpeg.git
3535
branch = n3.2.1
36+
[submodule "external/glfw"]
37+
path = external/glfw
38+
url = https://github.com/glfw/glfw.git

.travis.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

CMakeLists.txt

Lines changed: 16 additions & 12 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.5.2
23+
VERSION 0.5.4
2424
LANGUAGES C CXX
2525
)
2626

@@ -47,10 +47,9 @@ find_package(PkgConfig REQUIRED)
4747

4848
# Mandatory dependencies
4949
find_package(Snappy REQUIRED)
50-
pkg_search_module(GLFW REQUIRED glfw3)
5150
pkg_search_module(GSL REQUIRED gsl)
5251
pkg_search_module(ZMQ REQUIRED libzmq)
53-
pkg_check_modules(FFMPEG libavformat libavcodec libavutil libswscale)
52+
pkg_check_modules(FFMPEG REQUIRED libavformat libavcodec libavutil libswscale)
5453

5554
# Optional dependencies
5655
if(UNIX AND NOT APPLE)
@@ -78,13 +77,12 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDATADIR=\\\"${CMAKE_INSTALL_PREFIX}/sh
7877
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSPLASHPREFIX=\\\"${CMAKE_INSTALL_PREFIX}\\\"")
7978

8079
set(HAVE_GPHOTO ${GPHOTO_FOUND})
81-
set(HAVE_FFMPEG ${FFMPEG_FOUND})
8280
set(HAVE_OPENCV ${OPENCV_FOUND})
8381
set(HAVE_PORTAUDIO ${PORTAUDIO_FOUND})
8482
set(HAVE_SHMDATA ${SHMDATA_FOUND})
8583
set(HAVE_PYTHON ${PYTHONLIBS_FOUND})
8684

87-
if (HAVE_FFMPEG AND FFMPEG_libavformat_VERSION LESS 57)
85+
if (FFMPEG_libavformat_VERSION LESS 57)
8886
message(WARNING "FFmpeg version is older than 3.1, support disabled")
8987
set(FFMPEG_FOUND 0)
9088
endif()
@@ -111,6 +109,15 @@ endif()
111109

112110
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/config.h.cmake" "${CMAKE_CURRENT_SOURCE_DIR}/include/config.h")
113111

112+
#
113+
# External sources
114+
#
115+
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
116+
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
117+
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
118+
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
119+
add_subdirectory(external/glfw)
120+
114121
#
115122
# Sources
116123
#
@@ -143,7 +150,6 @@ if(UNIX AND NOT APPLE) # Package creation on Linux
143150
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
144151
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libatlas3-base,
145152
libboost-system1.58.0,
146-
libglfw3,
147153
libgphoto2-6,
148154
libgsl2,
149155
libopencv-core2.4v5,
@@ -194,12 +200,10 @@ function(info_cfg_text
194200
endfunction()
195201

196202
info_cfg_option(GPHOTO_VERSION)
197-
if (FFMPEG_FOUND)
198-
info_cfg_option(FFMPEG_libavformat_VERSION)
199-
info_cfg_option(FFMPEG_libavcodec_VERSION)
200-
info_cfg_option(FFMPEG_libavutil_VERSION)
201-
info_cfg_option(FFMPEG_libswscale_VERSION)
202-
endif()
203+
info_cfg_option(FFMPEG_libavformat_VERSION)
204+
info_cfg_option(FFMPEG_libavcodec_VERSION)
205+
info_cfg_option(FFMPEG_libavutil_VERSION)
206+
info_cfg_option(FFMPEG_libswscale_VERSION)
203207
info_cfg_option(OPENCV_VERSION)
204208
info_cfg_option(PORTAUDIO_VERSION)
205209
info_cfg_option(SHMDATA_VERSION)

NEWS

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

4+
Splash 0.5.4 (2017-01-30)
5+
-------------------------
6+
New features:
7+
* Added a Mesh gui panel
8+
* Added a Sink base class, and Sink_Shmdata
9+
* Added a Sound_Engine class, Speaker can now output to Jack
10+
* Added the possibility to visually show the camera count
11+
* Added a priorityShift attribute to BaseObject
12+
13+
Improvements:
14+
* Timestamps now contain the date
15+
* Added GLFW as a submodule, statically linked
16+
* Filter now accepts files as shaders
17+
* Now using spinlocks where it makes sense
18+
* Improved Filter contrast and brightness settings
19+
* Added recurring tasks to RootObjects; moved swapTest and pingTest to recurring tasks
20+
* Filter now accepts multiple inputs
21+
22+
Bug fixed:
23+
* Fixed jitter while reading with a queue
24+
* Fixed a crash when creating a texture_image from the gui
25+
* Fixed CI, removed Travis support
26+
427
Splash 0.5.2 (2017-01-13)
528
--------------------------
629
New features:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Splash, a multi-projector video-mapping software
22
================================================
33

4-
[![Build status](https://travis-ci.org/paperManu/splash.svg?branch=master)](https://travis-ci.org/paperManu/splash)
4+
[![Build status](https://gitlab.com/sat-metalab/splash/badges/develop/build.svg)](https://gitlab.com/sat-metalab/splash/commits/develop)
55
[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/3544.svg)](https://scan.coverity.com/projects/papermanu-splash)
66

77
For a more complete documentation, go visit the [wiki](https://github.com/paperManu/splash/wiki).
@@ -52,9 +52,6 @@ Installation
5252
Splash relies on a few libraries to get the job done. These libraries are:
5353

5454
- [OpenGL](http://opengl.org), which should be installed by the graphic driver,
55-
- [FFmpeg](http://ffmpeg.org/) to read video files,
56-
- [GLFW](http://glfw.org) to handle the GL context creation,
57-
- [GLM](http://glm.g-truc.net) to ease matrix manipulation,
5855
- [libshmdata](http://code.sat.qc.ca/redmine/projects/libshmdata) to read video flows from a shared memory,
5956
- [GSL](http://gnu.org/software/gsl) (GNU Scientific Library) to compute calibration,
6057
- [ZMQ](http://zeromq.org) to communicate between the various process involved in a Splash session,
@@ -65,6 +62,9 @@ Splash relies on a few libraries to get the job done. These libraries are:
6562

6663
A few more libraries are used as submodules in the git repository:
6764

65+
- [FFmpeg](http://ffmpeg.org/) to read video files,
66+
- [GLFW](http://glfw.org) to handle the GL context creation,
67+
- [GLM](http://glm.g-truc.net) to ease matrix manipulation,
6868
- [ImGui](https://github.com/ocornut/imgui) to draw the GUI,
6969
- [doctest](https://github.com/onqtam/doctest/) to do some unit testing,
7070
- [Piccante](https://github.com/banterle/piccante) to create HDR images,
@@ -84,7 +84,7 @@ You can also compile Splash by hand, especially if you are curious about its int
8484

8585
sudo apt install build-essential git-core subversion cmake automake libtool clang libxrandr-dev libxi-dev
8686
sudo apt install libglm-dev libgsl0-dev libatlas3-base libzmq3-dev libsnappy-dev libgphoto2-dev
87-
sudo apt install libglfw3-dev libxinerama-dev libxcursor-dev python3-dev
87+
sudo apt install libxinerama-dev libxcursor-dev python3-dev yasm
8888
sudo apt install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev portaudio19-dev
8989

9090
git clone git://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, 5, 2),
23+
"version": (0, 5, 4),
2424
"blender": (2, 72, 0),
2525
"location": "3D View > Toolbox, File > Export",
2626
"description": "Utility tools to connect Blender to the Splash videomapper",

addons/blender/splash/operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def execute(self, context):
297297

298298

299299
class SplashExportNodeTree(Operator):
300-
"""Exports the Splash node tree from the calling node"""
300+
"""Exports the Splash configuration (following the tree starting from this node)"""
301301
bl_idname = "splash.export_node_tree"
302302
bl_label = "Exports the node tree"
303303

external/glfw

Submodule glfw added at 999f355

include/basetypes.h

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ class BaseObject
430430
* - 40 to 49: windows rendering
431431
* \return Return the rendering priority
432432
*/
433-
Priority getRenderingPriority() const { return _renderingPriority; }
433+
Priority getRenderingPriority() const { return (Priority)((int)_renderingPriority + _priorityShift); }
434434

435435
/**
436436
* \brief Set the rendering priority for this object
@@ -449,11 +449,13 @@ class BaseObject
449449
bool _savable{true}; //!< True if the object should be saved
450450

451451
protected:
452-
unsigned long _id{0}; //!< Internal ID of the object
453-
std::string _type{"baseobject"}; //!< Internal type
454-
std::string _remoteType{""}; //!< When the object root is a Scene, this is the type of the corresponding object in the World
455-
std::string _name{""}; //!< Object name
452+
unsigned long _id{0}; //!< Internal ID of the object
453+
std::string _type{"baseobject"}; //!< Internal type
454+
std::string _remoteType{""}; //!< When the object root is a Scene, this is the type of the corresponding object in the World
455+
std::string _name{""}; //!< Object name
456+
456457
Priority _renderingPriority{Priority::NO_RENDER}; //!< Rendering priority, if negative the object won't be rendered
458+
int _priorityShift{0}; //!< Shift applied to rendering priority
457459

458460
bool _isConnectedToRemote{false}; //!< True if the object gets data from a World object
459461

@@ -593,8 +595,8 @@ class BufferObject : public BaseObject
593595
void updateTimestamp();
594596

595597
protected:
596-
mutable std::mutex _readMutex; //!< Read mutex locked when the object is read from
597-
mutable std::mutex _writeMutex; //!< Write mutex locked when the object is written to
598+
mutable Spinlock _readMutex; //!< Read mutex locked when the object is read from
599+
mutable Spinlock _writeMutex; //!< Write mutex locked when the object is written to
598600
std::atomic_bool _serializedObjectWaiting{false}; //!< True if a serialized object has been set and waits for processing
599601
int64_t _timestamp{0}; //!< Timestamp
600602
bool _updatedBuffer{false}; //!< True if the BufferObject has been updated
@@ -703,6 +705,7 @@ class RootObject : public BaseObject
703705
// Tasks queue
704706
std::recursive_mutex _taskMutex;
705707
std::list<std::function<void()>> _taskQueue;
708+
std::map<std::string, std::function<void()>> _recurringTasks;
706709

707710
/**
708711
* \brief Wait for a BufferObject update. This does not prevent spurious wakeups.
@@ -724,6 +727,19 @@ class RootObject : public BaseObject
724727
*/
725728
void addTask(const std::function<void()>& task);
726729

730+
/**
731+
* Add a task repeated at each frame
732+
* \param name Task name
733+
* \param task Task function
734+
*/
735+
void addRecurringTask(const std::string& name, const std::function<void()>& task);
736+
737+
/**
738+
* Remove a recurring task
739+
* \param name Task name
740+
*/
741+
void removeRecurringTask(const std::string& name);
742+
727743
/**
728744
* \brief Execute all the tasks in the queue
729745
*/

0 commit comments

Comments
 (0)