Merge branch 'master' into vr

This commit is contained in:
Martin Pulec
2021-02-24 16:10:13 +01:00
463 changed files with 4831 additions and 105454 deletions

View File

@@ -22,7 +22,7 @@ sudo apt install libglew-dev freeglut3-dev libgl1-mesa-dev
sudo apt install libx11-dev
sudo apt install libsdl2-dev
sudo apt install libssl-dev
sudo apt install portaudio19-dev libjack-jackd2-dev libasound-dev libv4l-dev
sudo apt install libasound-dev libjack-jackd2-dev libnatpmp-dev libv4l-dev portaudio19-dev
# for FFmpeg
sudo apt build-dep ffmpeg
@@ -32,7 +32,7 @@ sudo apt --no-install-recommends install asciidoc xmlto
sudo apt install libopencv-dev
sudo apt install libglib2.0-dev libcurl4-nss-dev
sudo apt install libtool # gpujpeg
( mkdir gpujpeg/build && cd gpujpeg/build && CUDA_FLAGS=-D_FORCE_INLINES CXXFLAGS=-std=c++11 CC=$CUDA_HOST_COMPILER ../autogen.sh && make && sudo make install && sudo ldconfig || exit 1 )
( ./bootstrap_gpujpeg.sh -d && mkdir ext-deps/gpujpeg/build && cd ext-deps/gpujpeg/build && CUDA_FLAGS=-D_FORCE_INLINES CXXFLAGS=-std=c++11 CC=$CUDA_HOST_COMPILER ../autogen.sh && make && sudo make install && sudo ldconfig || exit 1 )
( sudo apt install uuid-dev && cd cineform-sdk/ && cmake -DBUILD_TOOLS=OFF . && make CFHDCodecStatic || exit 1 )
sudo apt install qtbase5-dev
sudo chmod 777 /usr/local

10
.github/scripts/Windows/install_natpmp.sh vendored Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh -eu
curl -L http://miniupnp.free.fr/files/download.php?file=libnatpmp-20150609.tar.gz | tar xz
cd libnatpmp-*
cmd /c build.bat
cp natpmp.a /usr/local/lib/libnatpmp.a
cp declspec.h natpmp.h /usr/local/include
cd -
rm -rf libnatpmp-*

View File

@@ -65,6 +65,7 @@ cd /c/live555
make install
cd -
$GITHUB_WORKSPACE/.github/scripts/Windows/install_natpmp.sh
$GITHUB_WORKSPACE/.github/scripts/Windows/install_spout.sh
# Install FFMPEG

View File

@@ -15,7 +15,7 @@ echo "/usr/local/opt/qt/bin" >> $GITHUB_PATH
brew install autoconf automake cppunit libtool pkg-config
brew install ffmpeg portaudio sdl2
brew install imagemagick jack opencv openssl
brew install imagemagick jack libnatpmp opencv openssl
brew install ossp-uuid # for cineform
( cd cineform-sdk/ && cmake -DBUILD_TOOLS=OFF . && make CFHDCodecStatic || exit 1 )
brew install qt

15
.gitmodules vendored
View File

@@ -1,6 +1,15 @@
[submodule "gpujpeg"]
path = gpujpeg
url = https://github.com/CESNET/GPUJPEG.git
[submodule "cineform-sdk"]
path = cineform-sdk
url = https://github.com/gopro/cineform-sdk.git
[submodule "glm"]
path = glm
url = https://github.com/g-truc/glm.git
[submodule "ext-deps/speex"]
path = ext-deps/speex
url = https://gitlab.xiph.org/xiph/speex
[submodule "ext-deps/speexdsp"]
path = ext-deps/speexdsp
url = https://gitlab.xiph.org/xiph/speexdsp
[submodule "ext-deps/zfec"]
path = ext-deps/zfec
url = https://github.com/tahoe-lafs/zfec

View File

@@ -63,34 +63,6 @@ UltraGrid - A High Definition Collaboratory
External libraries
------------------
### libnatpmp
Copyright (c) 2007-2011, Thomas BERNARD
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
### Speex
Copyright 2002-2008 Xiph.org Foundation
@@ -128,3 +100,14 @@ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
### zfec
This package implements an “erasure code”, or “forward error correction code”.
You may use this package under the GNU General Public License, version 2 or, at your option, any later version. You may use this package under the Transitive Grace Period Public Licence, version 1.0 or, at your option, any later version. (You may choose to use this package under the terms of either licence, at your option.) See the file COPYING.GPL for the terms of the GNU General Public License, version 2. See the file COPYING.TGPPL.rst for the terms of the Transitive Grace Period Public Licence, version 1.0.
The most widely known example of an erasure code is the RAID-5 algorithm which makes it so that in the event of the loss of any one hard drive, the stored data can be completely recovered. The algorithm in the zfec package has a similar effect, but instead of recovering from the loss of only a single element, it can be parameterized to choose in advance the number of elements whose loss it can tolerate.
This package is largely based on the old “fec” library by Luigi Rizzo et al., which is a mature and optimized implementation of erasure coding. The zfec package makes several changes from the original “fec” package, including addition of the Python API, refactoring of the C API to support zero-copy operation, a few clean-ups and optimizations of the core code itself, and the addition of a command-line tool named “zfec”.

View File

@@ -28,6 +28,8 @@ GUI_BUNDLE = gui/QT/uv-qt.app
DXT_GLSL_CFLAGS = @DXT_GLSL_CFLAGS@
CUDA_COMPILER = @CUDA_COMPILER@
SYSTEM = @system@
SPEEX_PATH = @SPEEX_PATH@
SPEEXDSP_PATH = @SPEEXDSP_PATH@
GUI_EXE = @GUI_EXE@
GUI_TARGET = @GUI_TARGET@
@@ -57,6 +59,7 @@ GENERATED_HEADERS = @GENERATED_HEADERS@
ALL_INCLUDES = $(wildcard $(srcdir)/src/*.h $(srcdir)/src/*/*.h $(srcdir)/src/*/*/*.h $(srcdir)/src/*.hpp $(srcdir)/src/*/*.hpp) $(wildcard $(srcdir)/unittest/*.h)
COMMON_OBJS = \
ext-deps/zfec/zfec/fec.o \
src/bitstream.o \
src/control_socket.o \
src/debug.o \
@@ -196,8 +199,6 @@ COMMON_OBJS = \
ldgm/src/tanner.o \
ldgm/matrix-gen/matrix-generator.o \
ldgm/matrix-gen/ldpc-matrix.o \
rs/fec.o \
ext-deps/libnatpmp-20150609/libnatpmp.a \
OBJS = @OBJS@ \
$(COMMON_OBJS)
@@ -274,16 +275,6 @@ lib/libug$(DLEXT): src/dir-stamp $(OBJS) $(GENERATED_HEADERS) src/libug.o
"$(CUDA_COMPILER)" $(CUDA_FLAGS) -DEXPORT_DLL_SYMBOLS $(INC) --shared $< -o $<.dll
touch $@
ext-deps/libnatpmp-20150609/libnatpmp.a:
$(MKDIR_P) $(dir $@)
ifeq ($(SYSTEM),Windows)
cd $(srcdir)/ext-deps/libnatpmp-20150609 && cmd /c build.bat
mv $(srcdir)/ext-deps/libnatpmp-20150609/natpmp.a $(dir $@)/libnatpmp.a
else
make -C $(srcdir)/ext-deps/libnatpmp-20150609 libnatpmp.a
[ -f $@ ] || mv $(srcdir)/ext-deps/libnatpmp-20150609/libnatpmp.a $(dir $@)
endif
src/libavcodec_common.o: src/libavcodec_common.c $(ALL_INCLUDES)
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) -Ofast $(INC) -c $< -o $@
@@ -297,31 +288,33 @@ ldgm/src/ldgm-session-gpu.o: ldgm/src/ldgm-session-gpu.cpp $(ALL_INCLUDES)
$(MKDIR_P) $(dir $@)
$(CXX) $(CXXFLAGS) -Isrc/cuda_wrapper -DEXPORT_DLL_SYMBOLS $(INC) -c $< -o $@
ext-deps/zfec/zfec/fec.o: ext-deps/zfec/zfec/fec.c
$(CC) $(CFLAGS) -Wno-old-style-declaration -Wno-missing-declarations -Wno-missing-prototypes -Wno-sign-compare $(INC) -c $< -o $@
SPEEX_FLAGS=-Wno-sign-compare -Wno-unused-parameter -Wno-bad-function-cast -Wno-missing-prototypes -Wno-missing-declarations -O3
src/audio/resample.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DOUTSIDE_SPEEX -DDISABLE_WARNINGS -I. -I $(srcdir)/speex-1.2rc1/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/speex-1.2rc1/libspeex/resample.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEXDSP_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEXDSP_PATH)/libspeexdsp/resample.c -fPIC -DPIC -o $@
src/audio/preprocess.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DOUTSIDE_SPEEX -DDISABLE_WARNINGS -I. -I $(srcdir)/speex-1.2rc1/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/speex-1.2rc1/libspeex/preprocess.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEXDSP_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEXDSP_PATH)/libspeexdsp/preprocess.c -fPIC -DPIC -o $@
src/audio/filterbank.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DOUTSIDE_SPEEX -DDISABLE_WARNINGS -I. -I $(srcdir)/speex-1.2rc1/include/speex -I/include -fvisibility=hidden -c $(srcdir)/speex-1.2rc1/libspeex/filterbank.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEXDSP_PATH)/include/speex -I/include -fvisibility=hidden -c $(srcdir)/$(SPEEXDSP_PATH)/libspeexdsp/filterbank.c -fPIC -DPIC -o $@
src/audio/fftwrap.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DUSE_SMALLFT -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DOUTSIDE_SPEEX -DDISABLE_WARNINGS -I. -I $(srcdir)/speex-1.2rc1/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/speex-1.2rc1/libspeex/fftwrap.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DUSE_SMALLFT -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEX_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEX_PATH)/libspeex/fftwrap.c -fPIC -DPIC -o $@
src/audio/smallft.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DOUTSIDE_SPEEX -DDISABLE_WARNINGS -I. -I $(srcdir)/speex-1.2rc1/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/speex-1.2rc1/libspeex/smallft.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEX_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEX_PATH)/libspeex/smallft.c -fPIC -DPIC -o $@
src/audio/mdf.o:
$(MKDIR_P) $(dir $@)
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFLOATING_POINT -DOUTSIDE_SPEEX -DDISABLE_WARNINGS -I. -I $(srcdir)/speex-1.2rc1/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/speex-1.2rc1/libspeex/mdf.c -fPIC -DPIC -o $@
$(CC) $(CFLAGS) $(SPEEX_FLAGS) $(INC) -DEXPORT="" -DRANDOM_PREFIX=speex -DFIXED_POINT -DDISABLE_WARNINGS -I. -I $(srcdir)/$(SPEEXDSP_PATH)/include/speex -Iinclude -fvisibility=hidden -c $(srcdir)/$(SPEEXDSP_PATH)/libspeexdsp/mdf.c -fPIC -DPIC -o $@
src/audio/capture/coreaudio.o: src/audio/capture/coreaudio.m $(ALL_INCLUDES)
$(MKDIR_P) $(dir $@)
@@ -532,33 +525,33 @@ distcheck:
[ -z "$(GUI_EXE)" ] || $(GUI_EXE) -h
# -------------------------------------------------------------------------------------------------
ag-plugins: ag_plugin/uvReceiverService.zip ag_plugin/uvSenderService.zip
ag-plugins: data/ag_plugin/uvReceiverService.zip data/ag_plugin/uvSenderService.zip
AG_PLUGIN_TX_SCRIPTS = $(srcdir)/ag_plugin/uvSenderService.py \
$(srcdir)/ag_plugin/uvSenderService.svc \
$(srcdir)/ag_plugin/uvSenderService.manifest
AG_PLUGIN_TX_SCRIPTS = $(srcdir)/data/ag_plugin/uvSenderService.py \
$(srcdir)/data/ag_plugin/uvSenderService.svc \
$(srcdir)/data/ag_plugin/uvSenderService.manifest
ag_plugin/uvSenderService.zip: $(AG_PLUGIN_TX_SCRIPTS) $(TARGET)
data/ag_plugin/uvSenderService.zip: $(AG_PLUGIN_TX_SCRIPTS) $(TARGET)
@echo "Creating AccessGrid plugin: uvSenderService.zip"
@rm -f ag_plugin/uvSenderService.zip
@zip -j ag_plugin/uvSenderService.zip $(AG_PLUGIN_TX_SCRIPTS) $(TARGET)
@rm -f data/ag_plugin/uvSenderService.zip
@zip -j data/ag_plugin/uvSenderService.zip $(AG_PLUGIN_TX_SCRIPTS) $(TARGET)
AG_PLUGIN_RX_SCRIPTS = $(srcdir)/ag_plugin/uvReceiverService.py \
$(srcdir)/ag_plugin/uvReceiverService.svc \
$(srcdir)/ag_plugin/uvReceiverService.manifest
AG_PLUGIN_RX_SCRIPTS = $(srcdir)/data/ag_plugin/uvReceiverService.py \
$(srcdir)/data/ag_plugin/uvReceiverService.svc \
$(srcdir)/data/ag_plugin/uvReceiverService.manifest
ag_plugin/uvReceiverService.zip: $(AG_PLUGIN_RX_SCRIPTS) $(TARGET)
data/ag_plugin/uvReceiverService.zip: $(AG_PLUGIN_RX_SCRIPTS) $(TARGET)
$(MKDIR_P) $(dir $@)
@echo "Creating AccessGrid plugin: uvReceiverService.zip"
@rm -f ag_plugin/uvReceiverService.zip
@zip -j ag_plugin/uvReceiverService.zip $(AG_PLUGIN_RX_SCRIPTS) $(TARGET)
@rm -f data/ag_plugin/uvReceiverService.zip
@zip -j data/ag_plugin/uvReceiverService.zip $(AG_PLUGIN_RX_SCRIPTS) $(TARGET)
# -------------------------------------------------------------------------------------------------
clean:
-rm -f $(OBJS) $(GENERAED_HEADERS) $(ULTRAGRID_OBJS) $(TARGET) src/version.h
-rm -f $(TEST_OBJS) bin/run_tests
-rm -f ag_plugin/uvReceiverService.zip ag_plugin/uvSenderService.zip
-rm -f data/ag_plugin/uvReceiverService.zip data/ag_plugin/uvSenderService.zip
-rm -rf $(BUNDLE)
-rm -rf $(GUI_BUNDLE)
-rm -rf $(PERF) src/uv_perf.o

View File

@@ -6,46 +6,18 @@ command -v autoconf >/dev/null 2>&1 || { echo >&2 "Autoconf missing. Aborting.";
[ -d m4 ] || mkdir m4
# find MSVC if CUDA is present but no cl in PATH, don't override --with-cuda-host-compiler if explicit
cuda_host_compiler_arg_present() {
while expr $# \> 0 >/dev/null; do
if expr "x$1" : x--with-cuda-host-compiler >/dev/null; then
echo yes
fi
shift
done
echo no
}
is_win() {
SYS=$(uname -s)
if expr $SYS : "MSYS" >/dev/null; then
echo yes
fi
echo no
}
if [ "$(is_win)" = "yes" -a "$(cuda_host_compiler_arg_present $@)" = no ]; then
CUDA_PRESENT=$(command -v nvcc >/dev/null && echo yes || echo no)
CL_PRESENT=$(command -v cl >/dev/null && echo yes || echo no)
if [ $CUDA_PRESENT = yes -a $CL_PRESENT = no ]; then
VSWHERE="/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"
INSTALL_DIR=$("$VSWHERE" -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
VERSION_FILE="$INSTALL_DIR/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt"
if [ -f "$VERSION_FILE" ]; then
VERSION=$(cat "$VERSION_FILE")
PATH=$PATH:$(cygpath "$INSTALL_DIR/VC/Tools/MSVC/$VERSION/bin/HostX64/x64")
PATH_TO_CL=$(command -v cl.exe)
set -- "$@" "--with-cuda-host-compiler=$PATH_TO_CL"
fi
fi
fi
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd $srcdir
. ./data/scripts/add_cl_if_not_present.sh # add --with-cuda-host-compiler=<cl> to current params (Win)
./data/scripts/install_speex.sh
. ./data/scripts/fetch_submodule.sh
fetch_submodule zfec https://files.pythonhosted.org/packages/1c/bf/b87a31205fcd2e0e4b4c9a3f7bf6f5a231e199bec5f654d7c5ac6fcec349/zfec-1.5.5.tar.gz https://github.com/tahoe-lafs/zfec
# install config.guess config.sub install-sh missing
echo "Running automake..."
RES=$(automake --add-missing -c 2>&1 || true) # actual call will fail - we do not have Makefile.am
if test -n "$RES" -a -z "$(echo $RES | grep Makefile.am)"; then
echo "$RES"
@@ -53,6 +25,7 @@ if test -n "$RES" -a -z "$(echo $RES | grep Makefile.am)"; then
fi
# Running autoreconf is preferred over aclocal/autoheader/autoconf.
# It, however, needs to be a little bit bent because we do not use automake.
echo "Running autoreconf..."
RES=$(autoreconf -i 2>&1 || true)
# check if the error was the expected absence of Makefile.am or something else - then fail
if test -n "$RES" -a -z "$(echo $RES | grep Makefile.am)"; then
@@ -68,6 +41,7 @@ fi
cd $ORIGDIR
echo "Running configure..."
$srcdir/configure $CONFIGURE_OPTS "$@"
cd $ORIGDIR

61
bootstrap_gpujpeg.sh Executable file
View File

@@ -0,0 +1,61 @@
#!/bin/sh -e
SRC_DIR=ext-deps/gpujpeg
BUILD_DIR=$SRC_DIR/build
INSTALL_DIR=$SRC_DIR/install
CMAKE_ARGUMENTS="-DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_POSITION_INDEPENDENT_CODE=ON"
SUDO=
UPDATE=no
DOWNLOAD_ONLY=no
while getopts 'dfhsu' opt; do
case "$opt" in
'h'|'?')
cat <<-EOF
Downlads and builds GPUJPEG to be used with UltraGrid. It is downloaded to $SRC_DIR
and statically built. UltraGrid configure then automatically finds the library with
pkgconfig in $INSTALL_DIR/share/pkgconfig when called from same directory as this script.
Usage:
$0 [-d|-f|-s|-u]
Options:
-d - download only
-f - remove previously downloaded GPUJPEG
-s - causes GPUJPEG to be compiled as a dynamic library and installed system-wide
-u - update previously downloaded GPUJPEG
EOF
exit 0
;;
'd')
DOWNLOAD_ONLY=yes
;;
'f')
rm -rf $SRC_DIR
;;
's')
CMAKE_ARGUMENTS="-DBUILD_SHARED_LIBS=ON"
SUDO=$(command -v sudo || true)
;;
'u')
UPDATE=yes
;;
esac
done
if [ $OPTIND -eq 1 ]; then
echo "See also '$0 -h' for available options."
fi
if [ $UPDATE = yes ]; then
( cd $SRC_DIR; git pull )
else
git clone --depth 1 https://github.com/CESNET/GPUJPEG.git $SRC_DIR
fi
[ $DOWNLOAD_ONLY = yes ] && exit 0
cmake $CMAKE_ARGUMENTS $SRC_DIR -B $BUILD_DIR
cmake --build $BUILD_DIR --parallel
${SUDO}cmake --install $BUILD_DIR
# vim: set noexpandtab:

View File

@@ -27,31 +27,6 @@ AC_C_CHAR_UNSIGNED
AC_HEADER_STDBOOL
PKG_PROG_PKG_CONFIG
AH_BOTTOM([
#ifndef __cplusplus
#ifdef HAVE_STDBOOL_H
# include <stdbool.h>
#else
# ifndef HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
# else
# define _Bool signed char
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif
#endif // ! defined __cplusplus
#undef MIN
#define MIN(a,b) (((a)<(b))?(a):(b))
#undef MAX
#define MAX(a,b) (((a)>(b))?(a):(b))
])
AC_CHECK_HEADERS(stropts.h sys/filio.h sys/wait.h)
# -------------------------------------------------------------------------------------------------
@@ -295,7 +270,7 @@ AC_SUBST(DYLIBBUNDLER)
# Additional macros
# -------------------------------------------------------------------------------------------------
AC_DEFUN([CUDA_MESSAGE], [
if test -z "$cuda_msg_defined"; then
if test -z "$cuda_msg_defined" -a $system != Windows; then
POST_COMPILE_MSG="$POST_COMPILE_MSG\n***\nYou have compiled in sort of CUDA code.\nIn order to use use it compression and \
decompression, you will need to have CUDA libraries visible to your OS.\n\
If not done so, you can accomplish this by adding line:\n\
@@ -690,13 +665,11 @@ AC_ARG_ENABLE(decklink,
[ --disable-decklink disable DeckLink (default is auto)]
[ Requires: DesktopVideo],
[decklink_req=$enableval])
DECKLINK_INC=
DECKLINK_INC=$srcdir/ext-deps/DeckLink
case "$system" in
MacOSX)
if test -z $DECKLINK_INC; then
DECKLINK_INC=$srcdir/DeckLink/Mac
fi
DECKLINK_INC=$DECKLINK_INC/Mac
OLD_LIBS=$LIBS
LIBS="$LIBS -framework CoreFoundation"
AC_LANG_PUSH(C++)
@@ -710,9 +683,7 @@ case "$system" in
AC_LANG_POP(C++)
;;
Windows)
if test -z $DECKLINK_INC; then
DECKLINK_INC=$srcdir/DeckLink/Windows
fi
DECKLINK_INC=$DECKLINK_INC/Windows
SAVED_LIBS=$LIBS
LIBS="$LIBS -lole32"
AC_LANG_PUSH(C++)
@@ -731,9 +702,7 @@ case "$system" in
AC_LANG_POP(C++)
;;
*)
if test -z $DECKLINK_INC; then
DECKLINK_INC=$srcdir/DeckLink/Linux
fi
DECKLINK_INC=$DECKLINK_INC/Linux
AC_CHECK_FILE(${DECKLINK_INC}/DeckLinkAPI.h, FOUND_DECKLINK_H=yes, FOUND_DECKLINK_H=no)
AC_CHECK_FILE(${DECKLINK_INC}/DeckLinkAPIDispatch.cpp, FOUND_DECKLINK_SRC=yes, FOUND_DECKLINK_SRC=no)
@@ -776,6 +745,58 @@ fi
AC_SUBST(DECKLINK_PATH)
# -------------------------------------------------------------------------------------------------
# gpustitch stuff
# -------------------------------------------------------------------------------------------------
GPUSTITCH_OBJ=
GPUSTITCH_INC=
GPUSTITCH_LIB=
GPUSTITCH_PATH=
gpustitch=no
gpustitch_req=auto
AC_ARG_ENABLE(gpustitch,
[ --disable-gpustitch disable gpustitch (default is auto)]
[ Requires: gpustitch],
[gpustitch_req=$enableval])
PKG_CHECK_MODULES([LIBGPUSTITCH], [libgpustitch >= 0.0.1 ], [found_gpustitch=yes], [found_gpustitch=no])
if test "$found_gpustitch" != yes
then
GPUSTITCH_LIB="$GPUSTITCH_LIB -lgpustitch"
SAVED_LIBS=$LIBS
LIBS="$LIBS $GPUSTITCH_LIB"
AC_CHECK_HEADER([libgpustitch/stitcher.hpp])
LIBS=$SAVED_LIBS
if test "$ac_cv_header_libgpustitch_stitcher_hpp" = yes
then
found_gpustitch=yes
else
found_gpustitch=no
fi
fi
if test "$gpustitch_req" != no -a \
"$found_gpustitch" = yes
then
gpustitch=yes
GPUSTITCH_INC="$GPUSTITCH_INC $LIBGPUSTITCH_CFLAGS"
GPUSTITCH_LIB="$GPUSTITCH_LIB $LIBGPUSTITCH_LIBS"
GPUSTITCH_OBJ="src/video_capture/gpustitch.o src/utils/cuda_pix_conv.$CU_OBJ_SUFFIX $CUDA_COMMON_OBJ"
AC_DEFINE([HAVE_GPUSTITCH], [1], [Build with GPUSTITCH support])
ADD_MODULE("vidcap_gpustitch", "$GPUSTITCH_OBJ", "$GPUSTITCH_LIB")
INC="$INC $GPUSTITCH_INC"
CUDA_MESSAGE
fi
if test $gpustitch_req = yes -a $gpustitch = no; then
AC_MSG_ERROR([GPUSTITCH not found]);
fi
# -------------------------------------------------------------------------------------------------
# Bluefish444 stuff
# -------------------------------------------------------------------------------------------------
@@ -1233,7 +1254,7 @@ then
SDL2_LIBS="-lSDL2"
fi
ADD_MODULE("display_sdl2", "$SDL2_OBJ", "$SDL2_LIBS")
SDL_LIB=$SDL2_LIB
SDL_LIB=$SDL2_LIBS
sdl_version=2
sdl=yes
elif test $sdl1_req != no -a $found_sdl1 = yes
@@ -1241,11 +1262,95 @@ then
SDL1_OBJ="src/video_display/sdl.o src/x11_common.o"
AC_DEFINE([HAVE_SDL], [1], [Build with SDL support])
ADD_MODULE("display_sdl", "$SDL1_OBJ", "$SDL1_LIBS")
SDL_LIB="$SDL1_LIB -lX11" # X11 for x11_common.o
SDL_LIB="$SDL1_LIBS -lX11" # X11 for x11_common.o
sdl_version=1
sdl=yes
fi
# ------------------------------------------------------------------------------
# GLM (OpenGL math library)
# ------------------------------------------------------------------------------
GLM_INC=
GLM_DIR=$srcdir/glm
glm=no
PKG_CHECK_MODULES([GLM], [glm], [FOUND_GLM=yes], [FOUND_GLM=no])
if test $FOUND_GLM = yes; then
GLM_INC=$GLM_CFLAGS
glm=yes
else
AC_CHECK_FILE([$GLM_DIR/glm/glm.hpp], [found_glm_hpp=yes], [found_glm_hpp=no])
if test $found_glm_hpp = yes; then
glm=yes
GLM_INC=-I$GLM_DIR
fi
fi
# ------------------------------------------------------------------------------
# Panorama gl display
# ------------------------------------------------------------------------------
panogl_disp=no
AC_ARG_ENABLE(panogl_disp,
[ --disable-panogl_disp disable gl panorama display (default is auto]
[ Requires: sdl2 gl],
[panogl_disp_req=$enableval],
[panogl_disp_req=$build_default]
)
if test $panogl_disp_req = yes; then
if test $sdl = no -o $sdl_version != 2; then
AC_MSG_ERROR([SDL2 not found]);
fi
if test $glm = no; then
AC_MSG_ERROR([GLM not found]);
fi
fi
if test $panogl_disp_req != no -a $sdl = yes -a $sdl_version = 2 -a $glm = yes
then
PANOGL_OBJ="src/video_display/pano_gl.o src/video_display/opengl_utils.o"
AC_DEFINE([HAVE_PANOGL_DISP], [1], [Build with 360 panorama disp support])
PANOGL_LIBS=$SDL_LIB
ADD_MODULE("display_panogl", "$PANOGL_OBJ", "$PANOGL_LIBS")
INC="$INC $GLM_INC"
panogl_disp=yes
fi
# ------------------------------------------------------------------------------
# OpenXR VR gl display
# ------------------------------------------------------------------------------
xrgl_disp=no
AC_ARG_ENABLE(xrgl_disp,
[ --disable-xrgl_disp disable OpenXR VR display (default is auto]
[ Requires: sdl2 gl openxr],
[xrgl_disp_req=$enableval],
[xrgl_disp_req=$build_default]
)
define(xrgl_deps, [openxr])
PKG_CHECK_MODULES([XRGLDISP], [xrgl_deps], [FOUND_XRGL_DEPS=yes], [FOUND_XRGL_DEPS=no])
if test $sdl = no -o $sdl_version != 2 -o $glm = no; then
FOUND_XRGL_DEPS=no
fi
if test $xrgl_disp_req = yes -a $FOUND_XRGL_DEPS = no; then
AC_MSG_ERROR([XRGL deps not found]);
fi
if test $xrgl_disp_req != no -a $FOUND_XRGL_DEPS = yes
then
XRGLDISP_OBJ="src/video_display/openxr_gl.o src/video_display/opengl_utils.o"
AC_DEFINE([HAVE_XRGL_DISP], [1], [Build with OpenXR VR disp support])
XRGLDISP_LIBS+=$SDL_LIB
ADD_MODULE("display_xrgl", "$XRGLDISP_OBJ", "$XRGLDISP_LIBS")
INC="$INC $GLM_INC"
xrgl_disp=yes
fi
# -------------------------------------------------------------------------------------------------
# OpenCV version detection
# -------------------------------------------------------------------------------------------------
@@ -1493,6 +1598,7 @@ then
if test "$FOUND_SDL_MIXER" = yes
then
AC_DEFINE([HAVE_LIBSDL_MIXER], [1], [Build testcard with SDL Mixer support])
TESTCARD_LIB="$SDL_MIXER_LIBS"
fi
@@ -2175,8 +2281,11 @@ AC_ARG_ENABLE(gpujpeg,
[gpujpeg_req=$build_default])
PKG_CHECK_MODULES([LIBGPUJPEG_ANY], [ libgpujpeg ], [ found_gpujpeg_any=yes ], [ found_gpujpeg_any=no ])
PKG_CHECK_MODULES([LIBGPUJPEG], [ libgpujpeg >= 0.11 ], [ found_gpujpeg=yes ], [ found_gpujpeg=no ])
SAVED_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
PKG_CONFIG_PATH="ext-deps/gpujpeg/install/share/pkgconfig:$PKG_CONFIG_PATH"
PKG_CHECK_MODULES([LIBGPUJPEG_ANY], [libgpujpeg], [ found_gpujpeg_any=yes ], [ found_gpujpeg_any=no ])
PKG_CHECK_MODULES([LIBGPUJPEG], [libgpujpeg >= 0.12.0], [ found_gpujpeg=yes ], [ found_gpujpeg=no ])
PKG_CONFIG_PATH=$SAVED_PKG_CONFIG_PATH
if test "$found_gpujpeg_any" = yes -a "$found_gpujpeg" = no; then
AC_MSG_WARN([Old GPUJPEG version found, please upgrade]);
@@ -2408,16 +2517,33 @@ fi
# SPEEX
speex=yes
SPEEX_PATH=speex-1.2rc1
SPEEX_INC=-I$srcdir/${SPEEX_PATH}/include
SPEEX_OBJ="src/audio/resample.o src/audio/preprocess.o src/audio/filterbank.o src/audio/fftwrap.o src/audio/smallft.o src/audio/mdf.o"
SPEEX_OBJ="$SPEEX_OBJ src/audio/echo.o"
SPEEX_PATH=ext-deps/speex
SPEEXDSP_PATH=ext-deps/speexdsp
SPEEX_INC="-I$srcdir/${SPEEX_PATH}/include -I$srcdir/${SPEEXDSP_PATH}/include"
SPEEX_OBJ="src/audio/echo.o src/audio/resample.o src/audio/preprocess.o src/audio/filterbank.o src/audio/fftwrap.o src/audio/smallft.o src/audio/mdf.o"
SPEEX_LIB=
AC_DEFINE([HAVE_SPEEX], [1], [Build with SPEEX support])
SAVED_CFLAGS=$CFLAGS
SAVED_CPPFLAGS=$CPPFLAGS
CFLAGS="$CFLAGS $SPEEX_INC"
CPPFLAGS="$CPPFLAGS $SPEEX_INC"
AC_CHECK_HEADER([speex/speex.h])
AC_CHECK_HEADER([speex/speex_resampler.h])
CFLAGS=$SAVED_CFLAGS
CPPFLAGS=$SAVED_CPPFLAGS
if test "$ac_cv_header_speex_speex_h" != yes -o "$ac_cv_header_speex_speex_resampler_h" != yes; then
AC_MSG_ERROR([Speex/SpeexDSP is a hard dependency, download it into $SPEEX_PATH and $SPEEXDSP_PATH]
[This should be usually automatic - please report to $PACKAGE_BUGREPORT if not sure why getting this.]);
fi
AC_SUBST(SPEEX_INC)
AC_SUBST(SPEEX_LIB)
AC_SUBST(SPEEX_OBJ)
AC_SUBST(SPEEX_PATH)
AC_SUBST(SPEEXDSP_PATH)
# -------------------------------------------------------------------------------------------------
#
@@ -3130,6 +3256,28 @@ if test $vrg_req = yes -a $vrg = no; then
AC_MSG_ERROR([VRG headers or library not found]);
fi
# ---------------------------------------------------------------------
# NAT-PMP
# -----------------------------------
natpmp=no
AC_ARG_ENABLE(natpmp,
[ --disable-natpmp disable NAT-PMP suppport (default is auto)]
[ Requires: natpmp],
[natpmp_req=$enableval],
[natpmp_req=$build_default]
)
AC_CHECK_HEADER(natpmp.h, FOUND_NATPMP_H=yes, FOUND_NATPMP_H=no)
AC_CHECK_LIB(natpmp, initnatpmp, FOUND_NATPMP_L=yes, FOUND_NATPMP_L=no)
if test "$FOUND_NATPMP_H" = yes -a "$FOUND_NATPMP_L" -a $natpmp_req != no; then
LIBS="-lnatpmp $LIBS"
AC_DEFINE([HAVE_NATPMP], [1], [Build with NAT-PMP support])
natpmp=yes
fi
if test $natpmp_req = yes -a $natpmp = no; then
AC_MSG_ERROR([NAT-PMP not found]);
fi
# ---------------------------------------------------------------------
# PCP
# -----------------------------------
@@ -3262,8 +3410,11 @@ RESULT=`add_column "$RESULT" "DELTACAST" $deltacast $?`
RESULT=`add_column "$RESULT" "DirectShow" $dshow $?`
RESULT=`add_column "$RESULT" "DVS" $dvs $?`
RESULT=`add_column "$RESULT" "File input" $file $?`
RESULT=`add_column "$RESULT" "Gpustitch" $gpustitch $?`
RESULT=`add_column "$RESULT" "NDI" $ndi $?`
RESULT=`add_column "$RESULT" "OpenGL" $gl_display $?`
RESULT=`add_column "$RESULT" "OpenXR VR Display" $xrgl_disp $?`
RESULT=`add_column "$RESULT" "Panorama Gl Display" $panogl_disp $?`
RESULT=`add_column "$RESULT" "RTSP capture client" $rtsp $?`
RESULT=`add_column "$RESULT" "SAGE" $sage $?`
RESULT=`add_column "$RESULT" "Screen capture" $screen_cap $?`
@@ -3277,6 +3428,7 @@ RESULT=`end_section "$RESULT"`
# compressions
RESULT=`start_section "$RESULT" "Compressions"`
RESULT=`add_column "$RESULT" "Cineform" $cineform $?`
RESULT=`add_column "$RESULT" "Comprimato J2K" $cmpto_j2k $?`
RESULT=`add_column "$RESULT" "CUDA DXT" $cuda_dxt $?`
RESULT=`add_column "$RESULT" "GPUJPEG" $gpujpeg $?`
@@ -3284,7 +3436,6 @@ RESULT=`add_column "$RESULT" "GPUJPEG transcode to DXT" $gpujpeg_to_dxt $?`
RESULT=`add_column "$RESULT" "Libavcodec (VDP $lavc_hwacc_vdpau, VA $lavc_hwacc_vaapi)" $libavcodec $?`
RESULT=`add_column "$RESULT" "Realtime DXT" $rtdxt $?`
RESULT=`add_column "$RESULT" "UYVY dummy compression" $uyvy $?`
RESULT=`add_column "$RESULT" "Cineform" $cineform $?`
RESULT=`end_section "$RESULT"`
# other
@@ -3293,6 +3444,7 @@ RESULT=`add_column "$RESULT" "Blank capture filter" $blank $?`
RESULT=`add_column "$RESULT" "GPU accelerated LDGM" $ldgm_gpu $?`
RESULT=`add_column "$RESULT" "iHDTV support" $ihdtv $?`
RESULT=`add_column "$RESULT" "MCU-like video mixer" $video_mix $?`
RESULT=`add_column "$RESULT" "NAT-PMP traversal" $natpmp $?`
RESULT=`add_column "$RESULT" "PCP NAT traversal" $pcp $?`
RESULT=`add_column "$RESULT" "Resize capture filter" $resize $?`
RESULT=`add_column "$RESULT" "RTSP server" $rtsp_server $?`

View File

@@ -14,6 +14,9 @@ mkdir tmpinstall
make DESTDIR=tmpinstall install
mv tmpinstall/usr/local $APPDIR
make -C hd-rum-multi
cp hd-rum-multi/hd-rum $APPDIR/bin
# add platform and other Qt plugins if using dynamic libs
# @todo copy only needed ones
# @todo use https://github.com/probonopd/linuxdeployqt

View File

@@ -0,0 +1,46 @@
## This file tries to find cl.exe by using vswhere if nvcc was found in $PATH. This
## is a prerequisity in MSW. Does nothing if cl.exe already in $PATH or given explicitly
## by --with-cuda-host-compiler (obviously also when not in MSW or there is not CUDA).
##
## @note
## This file works with parses arguments passed autogen.sh if the path for cl.exe
## was not given explicitly. Thus it must be sourced by autogen.sh, not executed.
if [ -z "$ORIGDIR" ]; then
echo "Source this file from autogen.sh, not call!"
exit 1
fi
# find MSVC if CUDA is present but no cl in PATH, don't override --with-cuda-host-compiler if explicit
cuda_host_compiler_arg_present() {
while expr $# \> 0 >/dev/null; do
if expr "x$1" : x--with-cuda-host-compiler >/dev/null; then
echo yes
fi
shift
done
echo no
}
is_win() {
SYS=$(uname -s)
if expr $SYS : "MSYS" >/dev/null; then
echo yes
fi
echo no
}
if [ "$(is_win)" = "yes" -a "$(cuda_host_compiler_arg_present $@)" = no ]; then
CUDA_PRESENT=$(command -v nvcc >/dev/null && echo yes || echo no)
CL_PRESENT=$(command -v cl >/dev/null && echo yes || echo no)
if [ $CUDA_PRESENT = yes -a $CL_PRESENT = no ]; then
VSWHERE="/c/Program Files (x86)/Microsoft Visual Studio/Installer/vswhere.exe"
INSTALL_DIR=$("$VSWHERE" -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath)
VERSION_FILE="$INSTALL_DIR/VC/Auxiliary/Build/Microsoft.VCToolsVersion.default.txt"
if [ -f "$VERSION_FILE" ]; then
VERSION=$(cat "$VERSION_FILE")
PATH=$PATH:$(cygpath "$INSTALL_DIR/VC/Tools/MSVC/$VERSION/bin/HostX64/x64")
PATH_TO_CL=$(command -v cl.exe)
set -- "$@" "--with-cuda-host-compiler=$PATH_TO_CL"
fi
fi
fi

View File

@@ -0,0 +1,43 @@
## fetches a submodule
##
## @param $1 name
## @param $2 fallback Gzip URL
## @param $3 fallback Git URL
## @param $4 if set to 1, report submodule update
## @retval 1 submodule was updated (and $4 was set to 1)
## @retval 0 otherwise
fetch_submodule() {
MODULE=$1
FALLBACK_URL=$2
FALLBACK_GIT_URL=$3
SUBMODULE_UPDATED= # assume that submodule have not been updated
printf "Downloading ${MODULE}... "
if ! command -v git >/dev/null; then
if [ ! -d ext-deps/$MODULE ]; then
echo "git not found - trying to download a release"
mkdir -p ext-deps/tmp
curl -L $FALLBACK_URL | tar -C ext-deps/tmp -xz
mv ext-deps/tmp/* ext-deps/$MODULE
rmdir ext-deps/tmp
else
echo "skipped (ext-deps/$MODULE is already present)"
fi
elif ! git branch >/dev/null 2>&1; then
# we are not in UltraGrid git repository but can use git to download
if [ ! -d ext-deps/$MODULE ]; then
echo "git submodule found - trying to clone"
git clone $FALLBACK_GIT_URL ext-deps/$MODULE
else
echo "skipped (ext-deps/$MODULE is already present)"
fi
else
SUBMODULE_UPDATED=`git submodule update --init ext-deps/$module`
if [ -z "$SUBMODULE_UPDATED" ]; then
echo "not needed"
return 0
fi
return ${4:-0}
fi
return 0
}

26
data/scripts/install_speex.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/sh -eu
## Install speex and speexdsp
##
## Normally try to use git submodules present in the repository. If not possible
## it tries to either clone (.git directory stripped) or to download release
## (if git not found).
. $(dirname $0)/fetch_submodule.sh
for module in speex speexdsp; do
set +e
fetch_submodule $module http://downloads.us.xiph.org/releases/speex/${module}-1.2.0.tar.gz https://gitlab.xiph.org/xiph/$module 1
[ $? = 1 ] && SUBMODULE_UPDATED=yes || SUBMODULE_UPDATED=no
set -e
printf "Configuring ${module}... "
if [ -f ext-deps/$module/include/speex/${module}_config_types.h -a $SUBMODULE_UPDATED = no ]; then
echo "not needed"
else
cd ext-deps/$module
./autogen.sh
./configure
cd ../..
fi
done

View File

@@ -8,9 +8,14 @@ There are couple of ways to report a problem:
for reporting bugs. You need to register, but it is only matter
of filling username and password.
In order to allow us detect the problem more precisely, you can send us
also output of diagnostic script (_data/ultragrid-bugreport-collect.sh_
in sources or in program data dir once installed).
If the problem is a crash (segmentation fault, abort), if possible, attach
a core dump (if generated) and the binary (if you compiled by yourself, otherwise
the executable version). If core dump is not generated, a backtrace might have been
generated to standard error output so please attach this. Also the terminal output
containg the error context would be helpful.
If reporting a bug, please use the latest version of UltraGrid (release/nightly) if not
already using that - either a stable release (a release/X.Y branch) or master for source,
in case of a binary package its most recent version. If not using already, please retest
that version and report the bugs against the current one.
If the problem is a crash (SEGV), you can send also a core dump and a
binary (if you compiled by yourself, otherwise package version).

Some files were not shown because too many files have changed in this diff Show More