Skip to content

Commit

Permalink
Merge branch 'release_0.5.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
paperManu committed Jan 30, 2017
2 parents ccc5850 + c0c132c commit c0723d2
Show file tree
Hide file tree
Showing 64 changed files with 1,437 additions and 601 deletions.
15 changes: 14 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ image: ubuntu:xenial

before_script:
- apt update -qq
- 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
- 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
- git submodule update --init
- ./make_deps.sh
- rm -rf build && mkdir build && cd build
- cmake ..
- make glfw

stages:
- test
- package
- coverity

test:
stage: test
Expand All @@ -32,3 +34,14 @@ package:
paths:
- "*.deb"
- "*.tar.bz2"

coverity:
stage: coverity
script:
- wget https://scan.coverity.com/download/linux64 --post-data "token=zkRfEWYxyAeJDlYYg9Hkkg&project=paperManu%2Fsplash" -O coverity_tool.tgz
- tar xvzf coverity_tool.tgz
- $(ls | grep cov-analysis)/bin/cov-build --dir cov-int make -j$(nproc)
- tar caf splash-cov.bz2 cov-int
- curl --form token=zkRfEWYxyAeJDlYYg9Hkkg --form email=emmanueldurand@gmail.com --form file=@splash-cov.bz2 --form description="Splash" https://scan.coverity.com/builds?project=paperManu%2Fsplash
only:
- coverity_scan
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@
path = external/ffmpeg
url = https://git.ffmpeg.org/ffmpeg.git
branch = n3.2.1
[submodule "external/glfw"]
path = external/glfw
url = https://github.com/glfw/glfw.git
43 changes: 0 additions & 43 deletions .travis.yml

This file was deleted.

28 changes: 16 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cmake_minimum_required(VERSION 3.2)
project(
splash
VERSION 0.5.2
VERSION 0.5.4
LANGUAGES C CXX
)

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

# Mandatory dependencies
find_package(Snappy REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
pkg_search_module(GSL REQUIRED gsl)
pkg_search_module(ZMQ REQUIRED libzmq)
pkg_check_modules(FFMPEG libavformat libavcodec libavutil libswscale)
pkg_check_modules(FFMPEG REQUIRED libavformat libavcodec libavutil libswscale)

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

set(HAVE_GPHOTO ${GPHOTO_FOUND})
set(HAVE_FFMPEG ${FFMPEG_FOUND})
set(HAVE_OPENCV ${OPENCV_FOUND})
set(HAVE_PORTAUDIO ${PORTAUDIO_FOUND})
set(HAVE_SHMDATA ${SHMDATA_FOUND})
set(HAVE_PYTHON ${PYTHONLIBS_FOUND})

if (HAVE_FFMPEG AND FFMPEG_libavformat_VERSION LESS 57)
if (FFMPEG_libavformat_VERSION LESS 57)
message(WARNING "FFmpeg version is older than 3.1, support disabled")
set(FFMPEG_FOUND 0)
endif()
Expand All @@ -111,6 +109,15 @@ endif()

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

#
# External sources
#
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
add_subdirectory(external/glfw)

#
# Sources
#
Expand Down Expand Up @@ -143,7 +150,6 @@ if(UNIX AND NOT APPLE) # Package creation on Linux
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libatlas3-base,
libboost-system1.58.0,
libglfw3,
libgphoto2-6,
libgsl2,
libopencv-core2.4v5,
Expand Down Expand Up @@ -194,12 +200,10 @@ function(info_cfg_text
endfunction()

info_cfg_option(GPHOTO_VERSION)
if (FFMPEG_FOUND)
info_cfg_option(FFMPEG_libavformat_VERSION)
info_cfg_option(FFMPEG_libavcodec_VERSION)
info_cfg_option(FFMPEG_libavutil_VERSION)
info_cfg_option(FFMPEG_libswscale_VERSION)
endif()
info_cfg_option(FFMPEG_libavformat_VERSION)
info_cfg_option(FFMPEG_libavcodec_VERSION)
info_cfg_option(FFMPEG_libavutil_VERSION)
info_cfg_option(FFMPEG_libswscale_VERSION)
info_cfg_option(OPENCV_VERSION)
info_cfg_option(PORTAUDIO_VERSION)
info_cfg_option(SHMDATA_VERSION)
Expand Down
23 changes: 23 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
Splash release notes
===================

Splash 0.5.4 (2017-01-30)
-------------------------
New features:
* Added a Mesh gui panel
* Added a Sink base class, and Sink_Shmdata
* Added a Sound_Engine class, Speaker can now output to Jack
* Added the possibility to visually show the camera count
* Added a priorityShift attribute to BaseObject

Improvements:
* Timestamps now contain the date
* Added GLFW as a submodule, statically linked
* Filter now accepts files as shaders
* Now using spinlocks where it makes sense
* Improved Filter contrast and brightness settings
* Added recurring tasks to RootObjects; moved swapTest and pingTest to recurring tasks
* Filter now accepts multiple inputs

Bug fixed:
* Fixed jitter while reading with a queue
* Fixed a crash when creating a texture_image from the gui
* Fixed CI, removed Travis support

Splash 0.5.2 (2017-01-13)
--------------------------
New features:
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Splash, a multi-projector video-mapping software
================================================

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

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

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

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

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

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

git clone git://github.com/paperManu/splash
Expand Down
2 changes: 1 addition & 1 deletion addons/blender/splash/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
bl_info = {
"name": "Splash output",
"author": "Emmanuel Durand",
"version": (0, 5, 2),
"version": (0, 5, 4),
"blender": (2, 72, 0),
"location": "3D View > Toolbox, File > Export",
"description": "Utility tools to connect Blender to the Splash videomapper",
Expand Down
2 changes: 1 addition & 1 deletion addons/blender/splash/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def execute(self, context):


class SplashExportNodeTree(Operator):
"""Exports the Splash node tree from the calling node"""
"""Exports the Splash configuration (following the tree starting from this node)"""
bl_idname = "splash.export_node_tree"
bl_label = "Exports the node tree"

Expand Down
1 change: 1 addition & 0 deletions external/glfw
Submodule glfw added at 999f35
30 changes: 23 additions & 7 deletions include/basetypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ class BaseObject
* - 40 to 49: windows rendering
* \return Return the rendering priority
*/
Priority getRenderingPriority() const { return _renderingPriority; }
Priority getRenderingPriority() const { return (Priority)((int)_renderingPriority + _priorityShift); }

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

protected:
unsigned long _id{0}; //!< Internal ID of the object
std::string _type{"baseobject"}; //!< Internal type
std::string _remoteType{""}; //!< When the object root is a Scene, this is the type of the corresponding object in the World
std::string _name{""}; //!< Object name
unsigned long _id{0}; //!< Internal ID of the object
std::string _type{"baseobject"}; //!< Internal type
std::string _remoteType{""}; //!< When the object root is a Scene, this is the type of the corresponding object in the World
std::string _name{""}; //!< Object name

Priority _renderingPriority{Priority::NO_RENDER}; //!< Rendering priority, if negative the object won't be rendered
int _priorityShift{0}; //!< Shift applied to rendering priority

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

Expand Down Expand Up @@ -593,8 +595,8 @@ class BufferObject : public BaseObject
void updateTimestamp();

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

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

/**
* Add a task repeated at each frame
* \param name Task name
* \param task Task function
*/
void addRecurringTask(const std::string& name, const std::function<void()>& task);

/**
* Remove a recurring task
* \param name Task name
*/
void removeRecurringTask(const std::string& name);

/**
* \brief Execute all the tasks in the queue
*/
Expand Down
1 change: 1 addition & 0 deletions include/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ class Camera : public BaseObject
// Rendering parameters
bool _drawFrame{false};
bool _wireframe{false};
bool _showCameraCount{false};
bool _hidden{false};
bool _flashBG{false};
bool _automaticResize{true};
Expand Down
9 changes: 0 additions & 9 deletions include/config.h.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@
/* Apple Mac OS X operating system not detected */
#cmakedefine01 HAVE_OSX

/* Defined to 1 if ffmpeg is detected */
#cmakedefine01 HAVE_FFMPEG

/* Defined to 1 if ffmpeg 3.x is detected */
#cmakedefine01 HAVE_FFMPEG_3

/* Defined to 1 if ffmpeg 2.8 is detected */
#cmakedefine01 HAVE_FFMPEG_2_8

/* Defined to 1 if libgphoto2 is detected */
#cmakedefine01 HAVE_GPHOTO

Expand Down
1 change: 1 addition & 0 deletions include/controller_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#include "./widget_global_view.h"
#include "./widget_graph.h"
#include "./widget_media.h"
#include "./widget_meshes.h"
#include "./widget_node_view.h"
#include "./widget_template.h"
#include "./widget_text_box.h"
Expand Down
20 changes: 20 additions & 0 deletions include/coretypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,26 @@
namespace Splash
{

/*************/
//! Spinlock, when mutexes have too much overhead
class Spinlock
{
public:
void lock()
{
while (_lock.test_and_set(std::memory_order_acquire))
{
}
}

void unlock() { _lock.clear(std::memory_order_release); }

bool try_lock() { return !_lock.test_and_set(std::memory_order_acquire); }

private:
std::atomic_flag _lock = ATOMIC_FLAG_INIT;
};

/*************/
//! Resizable array, used to hold big buffers (like raw images)
template <typename T>
Expand Down
Loading

0 comments on commit c0723d2

Please sign in to comment.