Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.12.0 preparations, removed Servus dependency #143

Merged
merged 1 commit into from
Dec 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitexternals
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# -*- mode: cmake -*-
# CMake/common https://github.com/Eyescale/CMake.git 11ee9c1
# CMake/common https://github.com/Eyescale/CMake.git 3d5d284
2 changes: 0 additions & 2 deletions .gitsubprojects

This file was deleted.

44 changes: 6 additions & 38 deletions CMake/GitExternal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# update target to bump the tag to the master revision by
# recreating .gitexternals.
# * Provides function
# git_external(<directory> <giturl> <gittag> [VERBOSE,SHALLOW]
# git_external(<directory> <giturl> <gittag> [VERBOSE]
# [RESET <files>])
# which will check out directory in CMAKE_SOURCE_DIR (if relative)
# or in the given absolute path using the given repository and tag
Expand All @@ -18,11 +18,6 @@
# VERBOSE, when present, this option tells the function to output
# information about what operations are being performed by git on
# the repo.
# SHALLOW, when present, causes a shallow clone of depth 1 to be made
# of the specified repo. This may save considerable memory/bandwidth
# when only a specific branch of a repo is required and the full history
# is not required. Note that the SHALLOW option will only work for a branch
# or tag and cannot be used for an arbitrary SHA.
# OPTIONAL, when present, this option makes this operation optional.
# The function will output a warning and return if the repo could not be
# cloned.
Expand Down Expand Up @@ -69,15 +64,8 @@ macro(GIT_EXTERNAL_MESSAGE msg)
endif()
endmacro()

# utility function for printing a list with custom separator
function(JOIN VALUES GLUE OUTPUT)
string (REGEX REPLACE "([^\\]|^);" "\\1${GLUE}" _TMP_STR "${VALUES}")
string (REGEX REPLACE "[\\](.)" "\\1" _TMP_STR "${_TMP_STR}") #fixes escaping
set (${OUTPUT} "${_TMP_STR}" PARENT_SCOPE)
endfunction()

function(GIT_EXTERNAL DIR REPO tag)
cmake_parse_arguments(GIT_EXTERNAL_LOCAL "VERBOSE;SHALLOW;OPTIONAL" "" "RESET" ${ARGN})
cmake_parse_arguments(GIT_EXTERNAL_LOCAL "VERBOSE;OPTIONAL" "" "RESET" ${ARGN})
set(TAG ${tag})
if(GIT_EXTERNAL_TAG AND "${tag}" MATCHES "^[0-9a-f]+$")
set(TAG ${GIT_EXTERNAL_TAG})
Expand Down Expand Up @@ -105,16 +93,9 @@ function(GIT_EXTERNAL DIR REPO tag)

if(NOT EXISTS "${DIR}")
# clone
set(_clone_options --recursive)
if(GIT_EXTERNAL_LOCAL_SHALLOW)
list(APPEND _clone_options --depth 1 --branch ${TAG})
else()
set(_msg_tag "[${TAG}]")
endif()
JOIN("${_clone_options}" " " _msg_text)
message(STATUS "git clone ${_msg_text} ${REPO} ${DIR} ${_msg_tag}")
message(STATUS "git clone --recursive ${REPO} ${DIR} [${TAG}]")
execute_process(
COMMAND "${GIT_EXECUTABLE}" clone ${_clone_options} ${REPO} ${DIR}
COMMAND "${GIT_EXECUTABLE}" clone --recursive ${REPO} ${DIR}
RESULT_VARIABLE nok ERROR_VARIABLE error
WORKING_DIRECTORY "${GIT_EXTERNAL_DIR}")
if(nok)
Expand All @@ -127,21 +108,8 @@ function(GIT_EXTERNAL DIR REPO tag)
endif()

# checkout requested tag
if(NOT GIT_EXTERNAL_LOCAL_SHALLOW)
execute_process(
COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
RESULT_VARIABLE nok ERROR_VARIABLE error
WORKING_DIRECTORY "${DIR}")
if(nok)
message(FATAL_ERROR "git checkout ${TAG} in ${DIR} failed: ${error}\n")
endif()
endif()

# checkout requested tag
execute_process(
COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
RESULT_VARIABLE nok ERROR_VARIABLE error
WORKING_DIRECTORY "${DIR}")
execute_process(COMMAND "${GIT_EXECUTABLE}" checkout -q "${TAG}"
RESULT_VARIABLE nok ERROR_VARIABLE error WORKING_DIRECTORY "${DIR}")
if(nok)
message(FATAL_ERROR "git checkout ${TAG} in ${DIR} failed: ${error}\n")
endif()
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ common_find_package(Qt5Network REQUIRED)
common_find_package(Qt5Qml)
common_find_package(Qt5Quick)
common_find_package(Qt5Widgets REQUIRED)
common_find_package(Servus)
common_find_package_post()

if(NOT Qt5Quick_VERSION VERSION_LESS 5.5)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Deflect

Welcome to Deflect, a C++ library for streaming pixels to other Deflect-based
applications, for example
[Tide](https://github.com/BlueBrain/Tide).
Deflect offers a stable API marked with version 1.0 (for the client part).
applications, for example [Tide](https://github.com/BlueBrain/Tide).
Deflect offers a stable API marked with version 1.5 (for the client part).

## Features

Deflect provides the following functionality:

* Stream pixels to a remote Server from one or multiple sources
* Register for receiving events from the Server
* Receive keyboard, mouse and multi-point touch gestures from the Server
* Compressed or uncompressed streaming
* Fast multi-threaded JPEG compression (using libjpeg-turbo)

Expand All @@ -32,8 +32,8 @@ The following applications are provided which make use of the streaming API:
git clone https://github.com/BlueBrain/Deflect.git
mkdir Deflect/build
cd Deflect/build
cmake ..
make
cmake -GNinja ..
ninja
~~~

## ChangeLog
Expand All @@ -47,8 +47,8 @@ system, including all Unix variants. Deflect uses CMake to create a
platform-specific build environment. The following platforms and build
environments are tested:

* Linux: Ubuntu 14.04 and RHEL 6 (Makefile, x64)
* Mac OS X: 10.7 - 10.10 (Makefile, x86_64)
* Linux: Ubuntu 16.04 and RHEL 6 (Makefile, Ninja; x64)
* Mac OS X: 10.7 - 10.10 (Makefile, Ninja; x86_64)

The [latest API documentation](http://bluebrain.github.io/Deflect-0.10/index.html)
The [latest API documentation](http://bluebrain.github.io/Deflect-0.12/index.html)
can be found on [bluebrain.github.io](http://bluebrain.github.io).
4 changes: 0 additions & 4 deletions apps/DesktopStreamer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ set_source_files_properties(MainWindow.cpp PROPERTIES COMPILE_DEFINITIONS
_HOSTS=${DEFLECT_DESKTOPSTREAMER_HOSTS}
)

if(DEFLECT_USE_SERVUS)
list(APPEND DESKTOPSTREAMER_LINK_LIBRARIES Servus)
endif()

set(DESKTOPSTREAMER_APP_NAME desktopstreamer)

if(APPLE)
Expand Down
4 changes: 0 additions & 4 deletions apps/DesktopStreamer/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
# include <deflect/AppNapSuspender.h>
#endif

#ifdef DEFLECT_USE_SERVUS
# include <servus/servus.h>
#endif

#include <QMainWindow>
#include <QTimer>
#include <QTime>
Expand Down
4 changes: 0 additions & 4 deletions deflect/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ if(DEFLECT_USE_LIBJPEGTURBO)
list(APPEND DEFLECT_LINK_LIBRARIES ${LibJpegTurbo_LIBRARIES})
endif()

if(DEFLECT_USE_SERVUS)
list(APPEND DEFLECT_LINK_LIBRARIES Servus)
endif()

common_library(Deflect)

if(Qt5Qml_FOUND AND Qt5Quick_FOUND AND NOT Qt5Quick_VERSION VERSION_LESS 5.4)
Expand Down
1 change: 0 additions & 1 deletion deflect/NetworkProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@

#define NETWORK_PROTOCOL_VERSION 8
#define DEFAULT_PORT_NUMBER 1701
#define SERVUS_SERVICE_NAME "_displaycluster._tcp"

#endif
17 changes: 0 additions & 17 deletions deflect/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,31 +44,17 @@
#include "NetworkProtocol.h"
#include "ServerWorker.h"

#ifdef DEFLECT_USE_SERVUS
# include <servus/servus.h>
#endif

#include <QThread>
#include <stdexcept>

namespace deflect
{
const int Server::defaultPortNumber = DEFAULT_PORT_NUMBER;
const std::string Server::serviceName = SERVUS_SERVICE_NAME;

class Server::Impl
{
public:
Impl()
#ifdef DEFLECT_USE_SERVUS
: servus( Server::serviceName )
#endif
{}

FrameDispatcher pixelStreamDispatcher;
#ifdef DEFLECT_USE_SERVUS
servus::Servus servus;
#endif
};

Server::Server( const int port )
Expand All @@ -79,9 +65,6 @@ Server::Server( const int port )
const auto err = QString( "could not listen on port: %1" ).arg( port );
throw std::runtime_error( err.toStdString( ));
}
#ifdef DEFLECT_USE_SERVUS
_impl->servus.announce( serverPort(), "" );
#endif
}

Server::~Server()
Expand Down
3 changes: 0 additions & 3 deletions deflect/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,6 @@ class DEFLECT_API Server : public QTcpServer
/** The default port number used for Stream connections. */
static const int defaultPortNumber;

/** The zeroconf service name for announcing stream connections. */
static const std::string serviceName;

/**
* Create a new server listening for Stream connections.
* @param port The port to listen on. Must be available.
Expand Down
10 changes: 6 additions & 4 deletions doc/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ Changelog {#Changelog}

## Deflect 0.12

### 0.12.0 (git master)
### 0.12.0 (09-12-2016)

* [143](https://github.com/BlueBrain/Deflect/pull/143):
The non-functional Servus dependency has been removed.
* [142](https://github.com/BlueBrain/Deflect/pull/142):
The DesktopStreamer app uses the full user name as the default stream name.
* [139](https://github.com/BlueBrain/Deflect/pull/139):
OSX: AppNap is now disabled for all QmlStreamers. The AppNapSuspender class
is now available in Deflect library for use in external applications.
is also available in Deflect library for use in external applications.
* [137](https://github.com/BlueBrain/Deflect/pull/137):
Deflect Qt: the offscreen Qml view used by the Qml streamer is now available
as a separate class.
Deflect Qt: the offscreen Qml view used by the Qml streamer is available as a
separate class.
* [133](https://github.com/BlueBrain/Deflect/pull/133):
QmlStreamer: Use asynchronous rendering, add
deflect::qt::QmlStreamer::useAsyncSend() to enable asynchronous image streaming
Expand Down