Commit e30de057 authored by Wieland Morgenstern's avatar Wieland Morgenstern

Merge branch 'master' into w-m/mac-package

parents 4900fd03 4fee6ee7
name: Build
on: [push]
jobs:
LinuxCuda8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: CMake
run: docker build . --file docker/ci-cuda.dockerfile --tag stitchem-cuda8:latest --build-arg version=8
- name: Build
run: docker run stitchem-cuda8:latest
LinuxCuda9:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: CMake
run: docker build . --file docker/ci-cuda.dockerfile --tag stitchem-cuda9:latest --build-arg version=9
- name: Build
run: docker run stitchem-cuda9:latest
LinuxCuda10:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: CMake
run: docker build . --file docker/ci-cuda.dockerfile --tag stitchem-cuda10:latest --build-arg version=10
- name: Build
run: docker run stitchem-cuda10:latest
LinuxOpenCL:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: CMake
run: docker build . --file docker/ci-opencl.dockerfile --tag stitchem-opencl:latest
- name: Build
run: docker run stitchem-opencl:latest
MacOpenCL:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: Deps
run: brew install bison ceres-solver CMake doxygen faac faad2 ffmpeg glew glfw glm jpeg libpng libtiff ninja opencv@3 qt yasm
- name: CMake
run: mkdir build && cd build && PATH="/usr/local/opt/bison/bin:${PATH}" cmake -DCREATE_BOX_PACKAGE=OFF -DGPU_BACKEND_CUDA=OFF -DGPU_BACKEND_OPENCL=ON -DMACPORTS=OFF -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 -G Ninja ..
- name: Build
run: cd build && ninja
WindowsCuda:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
language: cpp
cache: ccache
matrix:
include:
- name: OpenCL macOS
os: osx
addons:
homebrew:
update: true
packages:
- bison
- ccache
- ceres-solver
- CMake
- doxygen
- faac
- faad2
- ffmpeg
- glew
- glfw
- glm
- jpeg
- libpng
- libtiff
- ninja
- opencv@3
- qt
- yasm
before_install:
- export PATH="/usr/local/opt/bison/bin:/usr/local/opt/ccache/libexec:${PATH}"
script:
- mkdir build
- cd build
- cmake -DCREATE_BOX_PACKAGE=OFF -DGPU_BACKEND_CUDA=OFF -DGPU_BACKEND_OPENCL=ON -DMACPORTS=OFF -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 -G Ninja ..
- ninja
- name: CUDA 8 Linux
dist: xenial
services:
- docker
before_script:
- docker build --tag stitchem-cuda8:latest --file docker/ci.dockerfile --build-arg version=8 .
- docker create -v ${HOME}/.ccache:/ccache --name ccache stitchem-cuda8:latest
script:
- docker run --env CCACHE_DIR=/ccache --volumes-from ccache stitchem-cuda8:latest
- name: CUDA 9 Linux
dist: xenial
services:
- docker
before_script:
- docker build --tag stitchem-cuda9:latest --file docker/ci.dockerfile --build-arg version=9 .
- docker create -v ${HOME}/.ccache:/ccache --name ccache stitchem-cuda9:latest
script:
- docker run --env CCACHE_DIR=/ccache --volumes-from ccache stitchem-cuda9:latest
- name: CUDA 10 Linux
dist: xenial
services:
- docker
before_script:
- docker build --tag stitchem-cuda10:latest --file docker/ci.dockerfile --build-arg version=10 .
- docker create -v ${HOME}/.ccache:/ccache --name ccache stitchem-cuda10:latest
script:
- docker run --env CCACHE_DIR=/ccache --volumes-from ccache stitchem-cuda10:latest
......@@ -137,6 +137,10 @@ endif()
# Use definitions from the cmake folder for find_package
# ----------------------------------------------------------------------------
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
if(APPLE)
list(APPEND CMAKE_PREFIX_PATH /usr/local/opt/opencv@3/share/OpenCV)
include_directories("/usr/local/include")
endif()
# ----------------------------------------------------------------------------
......@@ -168,6 +172,10 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Platform dependent names for lib and output directories
# ----------------------------------------------------------------------------
if(WINDOWS)
set(VCPKG_PATH "${VCPKG_ROOT}\\installed")
include_directories("${VCPKG_PATH}\\${VCPKG_TARGET_TRIPLET}\\include")
list(INSERT CMAKE_MODULE_PATH 0 "${VCPKG_ROOT}/ports/openexr" "${VCPKG_ROOT}/ports/opencv")
set(VS_LIB_CUDA libvideostitch_cuda)
set(VS_LIB_OPENCL libvideostitch_opencl)
set(VS_DISCOVERY libvideostitch-gpudiscovery)
......@@ -224,10 +232,6 @@ endif(NOT CMAKE_EXTERNAL_DEPS)
set(CMAKE_EXTERNAL_LIB "${CMAKE_EXTERNAL_DEPS}/lib")
set(CMAKE_EXTERNAL_INCLUDE "${CMAKE_EXTERNAL_DEPS}/include")
if(NOT EXISTS ${CMAKE_EXTERNAL_DEPS} AND WINDOWS)
message(FATAL_ERROR "external_deps folder not found")
endif()
# ----------------------------------------------------------------------------
# Set binary directory structure manually
# to get bin/Debug/CorePlugins/libav.dylib instead of bin/CorePlugins/Debug/libav.dylib
......
......@@ -103,8 +103,6 @@ endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
option(DISABLE_RTMP "Create RTMP I/O plugin" OFF)
option(DISABLE_PORTAUDIO "Create Portaudio I/O plugin" ${CMAKE_CROSSCOMPILING})
add_subdirectory(src/rtmp)
if(LINUX OR ANDROID)
add_subdirectory(src/v4l2)
endif(LINUX OR ANDROID)
......@@ -114,12 +112,16 @@ if(LINUX OR WINDOWS)
endif(LINUX OR WINDOWS)
if(WINDOWS)
add_subdirectory(src/aja)
find_library(libmfxhw64 libmfx_vs2015 HINTS "${INTEL_MEDIA_SDK_PATH}\\lib\\x64" REQUIRED)
include_directories("${INTEL_MEDIA_SDK_PATH}\\include")
include_directories("${INTEL_MEDIA_SDK_PATH}\\igfx_s3dcontrol\\include")
#add_subdirectory(src/aja)
add_subdirectory(src/decklink)
add_subdirectory(src/magewell)
add_subdirectory(src/magewellpro)
add_subdirectory(src/ximea_2)
endif(WINDOWS)
add_subdirectory(src/rtmp)
# ----------------------------------------------------------------------------
......
......@@ -47,7 +47,7 @@ function(setup_av_plugin PLUGIN_NAME BACKEND_NAME USE_CUDA)
target_include_directories(${PLUGIN_NAME} PRIVATE include)
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/format/include)
target_include_directories(${PLUGIN_NAME} PRIVATE ${CMAKE_EXTERNAL_DEPS}/include/Intel_Media_SDK)
target_include_directories(${PLUGIN_NAME} PRIVATE "${INTEL_MEDIA_SDK_PATH}\\include")
if(USE_CUDA)
target_include_directories(${PLUGIN_NAME} PRIVATE ${CUDA_TOOLKIT_TARGET_DIR}/include)
......@@ -58,15 +58,13 @@ function(setup_av_plugin PLUGIN_NAME BACKEND_NAME USE_CUDA)
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
set(FFMPEG_INCLUDE_PATH ${CMAKE_EXTERNAL_DEPS}/include/ffmpeg)
if(MACPORTS)
set(FFMPEG_INCLUDE_PATH /opt/local/include)
target_include_directories(${PLUGIN_NAME} SYSTEM PRIVATE ${FFMPEG_INCLUDE_PATH})
else()
set(FFMPEG_INCLUDE_PATH /usr/local/include)
endif()
target_include_directories(${PLUGIN_NAME} SYSTEM PRIVATE ${FFMPEG_INCLUDE_PATH})
if(LINUX OR APPLE OR ANDROID)
# VSA-5342: we're using functionality that has been deprecated in ffmpeg 3
target_compile_options(${PLUGIN_NAME} PRIVATE -Wno-deprecated-declarations)
......
......@@ -29,7 +29,7 @@ Copyright(c) 2008-2013 Intel Corporation. All Rights Reserved.
#include <string.h>
#include <functional>
#include "mfx/mfxvideo.h"
#include "mfxvideo.h"
struct mfxAllocatorParams {
virtual ~mfxAllocatorParams(){};
......
......@@ -10,7 +10,7 @@ Copyright(c) 2013 Intel Corporation. All Rights Reserved.
#pragma once
#include "mfx/mfxvideo.h"
#include "mfxvideo.h"
#if defined(WIN32) || defined(WIN64)
#ifndef D3D_SURFACES_SUPPORT
......
......@@ -33,9 +33,7 @@ function(setup_format BACKEND_NAME USE_CUDA)
include_lib_vs_headers(${LIST_NAME})
target_include_directories(${LIST_NAME} PRIVATE include)
target_include_directories(${LIST_NAME} PRIVATE ../include)
set(FFMPEG_INCLUDE_PATH ${CMAKE_EXTERNAL_DEPS}/include/ffmpeg)
target_include_directories(${LIST_NAME} PRIVATE ${FFMPEG_INCLUDE_PATH})
if(LINUX OR APPLE)
# VSA-5342: we're using functionality that has been deprecated in ffmpeg 3
target_compile_options(${LIST_NAME} PRIVATE -Wno-deprecated-declarations)
......@@ -52,10 +50,9 @@ function(setup_format BACKEND_NAME USE_CUDA)
endif()
if(WINDOWS)
set(FFMPEG_LIB_PATH ${CMAKE_EXTERNAL_DEPS}/lib/ffmpeg)
find_library(FFMPEG_avcodec NAMES avcodec PATHS ${FFMPEG_LIB_PATH} NO_DEFAULT_PATH)
find_library(FFMPEG_avformat NAMES avformat PATHS ${FFMPEG_LIB_PATH} NO_DEFAULT_PATH)
find_library(FFMPEG_avutil NAMES avutil PATHS ${FFMPEG_LIB_PATH} NO_DEFAULT_PATH)
find_library(FFMPEG_avcodec NAMES avcodec REQUIRED)
find_library(FFMPEG_avformat NAMES avformat REQUIRED)
find_library(FFMPEG_avutil NAMES avutil REQUIRED)
endif(WINDOWS)
if(APPLE)
......
......@@ -7,7 +7,7 @@ set(PLUGIN_NAME decklink)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/include/DeckLinkAPI_h.h" "${CMAKE_CURRENT_SOURCE_DIR}/DeckLinkAPI_i.c"
COMMAND midl.exe /D _DEBUG /W1 /nologo /char signed /env x64 /iid ${CMAKE_CURRENT_SOURCE_DIR}/DeckLinkAPI_i.c /h "${CMAKE_CURRENT_SOURCE_DIR}/include/DeckLinkAPI_h.h" /tlb "${VS_VAHANA_PLUGIN_DIR}/decklink.tlb" "${CMAKE_EXTERNAL_DEPS}/include/decklink/DeckLinkAPI.idl"
COMMAND midl.exe /D _DEBUG /W1 /nologo /char signed /env x64 /iid ${CMAKE_CURRENT_SOURCE_DIR}/DeckLinkAPI_i.c /h "${CMAKE_CURRENT_SOURCE_DIR}/DeckLinkAPI_h.h" /tlb "${VS_VAHANA_PLUGIN_DIR}/decklink.tlb" "${DECKLINK_PATH}\\DeckLinkAPI.idl"
)
set(SOURCE_FILES
......
......@@ -109,7 +109,7 @@ DeckLinkWriter* DeckLinkWriter::create(const Ptv::Value* config, const std::stri
}
std::shared_ptr<IDeckLinkConfiguration> configuration(tempConfiguration,
VideoStitch::DeckLink::getDefaultDeleter());
configuration->SetFlag(bmdDeckLinkConfigUse1080pNotPsF, true);
configuration->SetFlag(bmdDeckLinkConfigCapture1080pAsPsF, false);
// Retrieve the configuration for duplex mode, could be different from the previous configuration object
// We need it before to enable video output
......
......@@ -15,9 +15,9 @@
#include "libvideostitch/ptv.hpp"
#include <ostream>
#ifdef _MSC_VER
#ifdef DELAY_LOAD_ENABLED
SET_DELAY_LOAD_HOOK
#endif // _MSC_VER
#endif // DELAY_LOAD_ENABLED
/** \name Services for reader plugin. */
//\{
......
......@@ -37,8 +37,7 @@ elseif(APPLE)
find_library(JPEG NAMES jpeg PATHS /usr/local/lib)
endif()
else()
find_library(TURBO_JPEG NAMES turbojpeg turbojpeg.0 PATHS "${CMAKE_EXTERNAL_DEPS}/lib/libjpeg-turbo" NO_DEFAULT_PATH)
find_library(JPEG NAMES jpeg jpeg.62 PATHS "${CMAKE_EXTERNAL_DEPS}/lib/libjpeg-turbo" NO_DEFAULT_PATH)
find_package(JPEG)
endif()
if(APPLE)
......@@ -47,13 +46,11 @@ if(APPLE)
else()
target_include_directories(${PLUGIN_NAME} SYSTEM PRIVATE /usr/local/include)
endif()
elseif(WINDOWS)
target_include_directories(${PLUGIN_NAME} SYSTEM PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/libjpeg-turbo")
endif()
if(APPLE OR LINUX)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${JPEG} ${VS_DISCOVERY})
else()
target_link_libraries(${PLUGIN_NAME} PRIVATE ${TURBO_JPEG} ${JPEG} ${VS_DISCOVERY})
target_link_libraries(${PLUGIN_NAME} PRIVATE ${JPEG_LIBRARIES} ${VS_DISCOVERY})
endif()
link_target_to_libvideostitch(${PLUGIN_NAME})
......@@ -23,13 +23,12 @@ include_lib_vs_headers(${PLUGIN_NAME})
include_discovery_vs_headers(${PLUGIN_NAME})
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
target_include_directories(${PLUGIN_NAME} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/magewell")
target_include_directories(${PLUGIN_NAME} PRIVATE "${MAGEWELL_PATH}\\SDKv2\\Include")
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
find_debug_and_optimized_library(MAGEWELL_STREAM2 "magewell" "LibXIStream2d" "magewell" "LibXIStream2")
find_debug_and_optimized_library(MAGEWELL_PROPERTY "magewell" "LibXIPropertyd" "magewell" "LibXIProperty")
find_library(MAGEWELL_STREAM2 "LibXIStream2" HINTS "${MAGEWELL_PATH}\\SDKv2\\Lib\\x64\\Release")
find_library(MAGEWELL_PROPERTY "LibXIProperty" HINTS "${MAGEWELL_PATH}\\SDKv2\\Lib\\x64\\Release")
target_link_libraries(${PLUGIN_NAME} PRIVATE ${VS_DISCOVERY} ${MAGEWELL_STREAM2} ${MAGEWELL_PROPERTY})
link_target_to_libvideostitch(${PLUGIN_NAME})
target_compile_definitions(${PLUGIN_NAME} PRIVATE _UNICODE UNICODE)
\ No newline at end of file
......@@ -22,12 +22,11 @@ include_lib_vs_headers(${PLUGIN_NAME})
include_discovery_vs_headers(${PLUGIN_NAME})
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
target_include_directories(${PLUGIN_NAME} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/magewellPro")
target_include_directories(${PLUGIN_NAME} PRIVATE "${MAGEWELL_PATH}\\SDKv3\\Include")
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
find_debug_and_optimized_library(MAGEWELL_DEVICE "magewellPro" "LibMWCaptured" "magewellPro" "LibMWCapture")
find_library(MAGEWELL_DEVICE "LibMWCapture" HINTS "${MAGEWELL_PATH}\\SDKv3\\Lib\\x64")
target_link_libraries(${PLUGIN_NAME} PRIVATE ${MAGEWELL_DEVICE} ${VS_DISCOVERY})
link_target_to_libvideostitch(${PLUGIN_NAME})
target_compile_definitions(${PLUGIN_NAME} PRIVATE _UNICODE UNICODE)
\ No newline at end of file
......@@ -25,9 +25,7 @@ target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
if(APPLE)
target_include_directories(${PLUGIN_NAME} PRIVATE "/opt/local/include")
else(APPLE)
target_include_directories(${PLUGIN_NAME} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/libpng")
endif(APPLE)
endif()
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${PNG_LIBRARY} ${VS_DISCOVERY})
......
......@@ -25,14 +25,9 @@ include_discovery_vs_headers(${PLUGIN_NAME})
target_include_directories(${PLUGIN_NAME} PRIVATE include)
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
target_include_directories(${PLUGIN_NAME} PRIVATE ${CMAKE_EXTERNAL_DEPS}/include/portaudio)
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
if(WINDOWS)
find_library(PORTAUDIO NAMES "portaudio_x64" PATHS ${CMAKE_EXTERNAL_DEPS}/lib/portaudio REQUIRED)
else()
find_library(PORTAUDIO NAMES "portaudio" REQUIRED)
endif()
find_library(PORTAUDIO NAMES "portaudio" REQUIRED)
# FIXME: portAudioReader.cpp
if(COMPILER_GCC)
......@@ -41,4 +36,3 @@ endif()
target_link_libraries(${PLUGIN_NAME} PRIVATE ${PORTAUDIO} ${VS_DISCOVERY})
link_target_to_libvideostitch(${PLUGIN_NAME})
\ No newline at end of file
......@@ -220,19 +220,17 @@ endif(LINUX)
target_include_directories(${PLUGIN_NAME} PRIVATE include)
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
target_include_directories(${PLUGIN_NAME} PRIVATE "${INTEL_MEDIA_SDK_PATH}\\include")
if(USE_AVFORMAT)
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/format/include)
endif(USE_AVFORMAT)
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
if(WINDOWS)
find_library(librtmp librtmp HINTS "${CMAKE_EXTERNAL_LIB}/librtmp" REQUIRED NO_DEFAULT_PATH)
find_library(libx264 libx264-148 HINTS "${CMAKE_EXTERNAL_LIB}/x264" REQUIRED NO_DEFAULT_PATH)
find_library(libmp3lame libmp3lame-0 HINTS "${CMAKE_EXTERNAL_LIB}/lame" REQUIRED NO_DEFAULT_PATH)
find_library(libx264 libx264 REQUIRED)
find_library(librtmp librtmp REQUIRED)
find_package(mp3lame CONFIG REQUIRED)
find_library(libmpghip libmpghip-static HINTS "${CMAKE_EXTERNAL_LIB}/lame" REQUIRED NO_DEFAULT_PATH)
find_library(libfaac libfaac HINTS "${CMAKE_EXTERNAL_LIB}/faac" REQUIRED NO_DEFAULT_PATH)
find_library(libmfxhw64 libmfx HINTS "${CMAKE_EXTERNAL_LIB}/Intel_Media_SDK" REQUIRED NO_DEFAULT_PATH)
find_library(libvfaad libfaad2 HINTS "${CMAKE_EXTERNAL_LIB}/faad" REQUIRED NO_DEFAULT_PATH)
set(DirectX_LIB
dxva2
d3d9
......@@ -240,8 +238,50 @@ if(WINDOWS)
d3d11
Ws2_32
Winmm)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${librtmp} ${libx264} ${libmp3lame} ${libfaac} ${libmfxhw64} ${libvfaad} ${libmpghip} ${DirectX_LIB})
target_link_libraries(${PLUGIN_NAME} PRIVATE ${librtmp} ${libx264} mp3lame::mp3lame ${libmfxhw64} ${DirectX_LIB})
set_property(TARGET ${PLUGIN_NAME} APPEND_STRING PROPERTY LINK_FLAGS "/NODEFAULTLIB:libcmt /NODEFAULTLIB:libcmtd")
find_package(Git)
include(ExternalProject)
############################################################
## Build FAAC
############################################################
ExternalProject_Add(faac
GIT_REPOSITORY https://github.com/stitchEm/faac.git
GIT_TAG master
PATCH_COMMAND ""
CONFIGURE_COMMAND echo "Configure faac..."
BUILD_COMMAND msbuild
/p:Configuration=Release,Platform=x64
/m <SOURCE_DIR>/libfaac/libfaac_dll.sln
INSTALL_COMMAND echo "..."
LICENSE_FILES COPYING
)
ExternalProject_Get_Property(faac SOURCE_DIR)
target_include_directories(${PLUGIN_NAME} PRIVATE ${SOURCE_DIR}/include)
set(Faac_LIBRARY ${SOURCE_DIR}/libfaac/ReleaseDLL/libfaac.lib)
############################################################
## Build FAAD2
############################################################
ExternalProject_Add(faad2
GIT_REPOSITORY https://github.com/stitchEm/faad2.git
GIT_TAG xmms2
PATCH_COMMAND ""
CONFIGURE_COMMAND echo "Configure faad2..."
BUILD_COMMAND msbuild
/p:Configuration=Release,Platform=x64
/m <SOURCE_DIR>/libfaad/libfaad2_dll.sln
INSTALL_COMMAND echo "..."
LICENSE_FILES COPYING
)
ExternalProject_Get_Property(faad2 SOURCE_DIR)
add_dependencies(${PLUGIN_NAME} faad2 faac)
set(libfaad ${SOURCE_DIR}/libfaad/ReleaseDLL/libfaad2.lib)
target_include_directories(${PLUGIN_NAME} PRIVATE ${SOURCE_DIR}/include)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${Faac_LIBRARY} ${libfaad} ${CUVID})
endif()
if(LINUX OR ANDROID)
......@@ -267,10 +307,10 @@ if(LINUX OR ANDROID)
endif()
target_link_libraries(${PLUGIN_NAME} PRIVATE ${librtmp} ${libx264} ${libmp3lame} ${libfaac} ${libvfaad})
if(RTMP_QUICKSYNC)
find_library(libmfxhw64 mfxhw64 HINTS ${CMAKE_EXTERNAL_LIB} REQUIRED NO_DEFAULT_PATH)
find_library(igfx_s3dcontrol igfx_s3dcontrol PATH "${INTEL_MEDIA_SDK_PATH}\\igfx_s3dcontrol\\lib\\x64" REQUIRED)
find_library(libva va HINTS ${CMAKE_EXTERNAL_LIB} REQUIRED NO_SYSTEM_ENVIRONMENT_PATH)
find_library(libva_drm va-drm HINTS ${CMAKE_EXTERNAL_LIB} REQUIRED NO_SYSTEM_ENVIRONMENT_PATH)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${libmfxhw64} ${libva} ${libva_drm})
target_link_libraries(${PLUGIN_NAME} PRIVATE ${libmfxhw64} ${libva} ${libva_drm} ${igfx_s3dcontrol})
endif()
endif()
......
......@@ -29,7 +29,7 @@ Copyright(c) 2008-2013 Intel Corporation. All Rights Reserved.
#include <string.h>
#include <functional>
#include "mfx/mfxvideo++.h"
#include "mfxvideo++.h"
struct mfxAllocatorParams {
virtual ~mfxAllocatorParams(){};
......
......@@ -13,7 +13,7 @@ Copyright(c) 2014 Intel Corporation. All Rights Reserved.
#include <stdio.h>
#include "mfx/mfxstructures.h"
#include "mfxstructures.h"
#include <atomic>
#include <mutex>
......
......@@ -10,7 +10,7 @@ Copyright(c) 2013 Intel Corporation. All Rights Reserved.
#pragma once
#include "mfx/mfxvideo++.h"
#include "mfxvideo++.h"
#if defined(WIN32) || defined(WIN64)
#ifndef D3D_SURFACES_SUPPORT
......
......@@ -22,7 +22,7 @@ Copyright(c) 2011-2015 Intel Corporation. All Rights Reserved.
#include "d3dDevice.hpp"
#include "d3dAllocator.hpp"
#include "mfx/igfx_s3dcontrol.h"
#include "igfx_s3dcontrol.h"
#include "atlbase.h"
......
......@@ -7,7 +7,7 @@
#include "audioDecoder.hpp"
#if defined(_WIN32)
#include "faad/faad.h"
#include "faad.h"
#else
#include <neaacdec.h>
#endif
......
......@@ -9,7 +9,7 @@
#include "librtmpIncludes.hpp"
#if defined(_WIN32)
#include "faac/faac.h"
#include "faac.h"
#else
#include <faac.h>
#endif
......
......@@ -11,7 +11,7 @@
extern "C" {
#if defined(_WIN32)
#include "x264/x264.h"
#include "x264.h"
#include <ws2tcpip.h>
#else
#include <unistd.h>
......@@ -22,7 +22,7 @@ extern "C" {
#endif
}
#include "mfx/mfxvideo++.h"
#include "mfxvideo++.h"
#define MFX_IMPL_VIA_MASK(x) (0x0f00 & (x))
#define MSDK_ALIGN16(value) (((value + 15) >> 4) << 4) // round up to a multiple of 16
......
......@@ -11,7 +11,7 @@
extern "C" {
#if defined(_WIN32)
#include "x264/x264.h"
#include "x264.h"
#else
#include <unistd.h>
#include <inttypes.h>
......
......@@ -8,7 +8,7 @@
extern "C" {
#if defined(_WIN32)
#include "x264/x264.h"
#include "x264.h"
#else
#include <inttypes.h>
#include <x264.h>
......
......@@ -421,7 +421,7 @@ char* NvEncoder::metadata(char* enc, char* pend) {
extern "C" {
#if defined(_WIN32)
#include "x264/x264.h"
#include "x264.h"
#else
#include <unistd.h>
#include <inttypes.h>
......
......@@ -9,7 +9,7 @@
extern "C" {
#if defined(_WIN32)
#include "x264/x264.h"
#include "x264.h"
#include <ws2tcpip.h>
#else
#include <unistd.h>
......@@ -20,7 +20,7 @@ extern "C" {
#endif
}
#include "mfx/mfxvideo++.h"
#include "mfxvideo++.h"
#include <thread>
......
......@@ -9,11 +9,7 @@ set(SOURCE_FILES
set(HEADER_FILES
include/tiffOutput.hpp)
if(WINDOWS)
set(PLUGIN_NAME tiff)
else(WINDOWS)
set(PLUGIN_NAME tiffPlugin)
endif(WINDOWS)
set(PLUGIN_NAME tiffPlugin)
vs_add_IO_library(${PLUGIN_NAME} SHARED ${SOURCE_FILES} ${HEADER_FILES} $<TARGET_OBJECTS:common>)
......@@ -24,8 +20,7 @@ target_include_directories(${PLUGIN_NAME} PRIVATE include)
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
if(WINDOWS)
find_library(TIFF NAMES "libtiff" PATHS "${CMAKE_EXTERNAL_DEPS}/lib/libtiff")
target_include_directories(${PLUGIN_NAME} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/libtiff")
find_library(TIFF NAMES "tiff")
elseif(LINUX)
if(CMAKE_CROSSCOMPILING)
target_include_directories(${PLUGIN_NAME} PRIVATE ${CMAKE_EXTERNAL_DEPS}/include/libtiff)
......@@ -41,4 +36,3 @@ endif()
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${TIFF} ${VS_DISCOVERY})
link_target_to_libvideostitch(${PLUGIN_NAME})
\ No newline at end of file
......@@ -21,12 +21,12 @@ vs_add_IO_library(${PLUGIN_NAME} SHARED ${SOURCE_FILES} ${HEADER_FILES} $<TARGET
include_lib_vs_headers(${PLUGIN_NAME})
include_discovery_vs_headers(${PLUGIN_NAME})
target_include_directories(${PLUGIN_NAME} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/ximea")
target_include_directories(${PLUGIN_NAME} PRIVATE ${XIMEA_PATH})
target_include_directories(${PLUGIN_NAME} PRIVATE ../common/include)
set_property(TARGET ${PLUGIN_NAME} PROPERTY CXX_STANDARD 14)
find_library(XIMEA_LIB NAMES "xiapi64" PATHS ${CMAKE_EXTERNAL_DEPS}/lib/Ximea/release/ REQUIRED NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(XIMEA_LIB NAMES "xiapi64" HINTS "${XIMEA_PATH}\\x64" REQUIRED)
target_link_libraries(${PLUGIN_NAME} PRIVATE ${VS_DISCOVERY} ${XIMEA_LIB})
link_target_to_libvideostitch(${PLUGIN_NAME})
......
......@@ -12,9 +12,9 @@
#include "ximeaDiscovery.hpp"
#include "ximeaReader.hpp"
#ifdef _MSC_VER
#ifdef DELAY_LOAD_ENABLED
SET_DELAY_LOAD_HOOK
#endif // _MSC_VER
#endif // DELAY_LOAD_ENABLED
extern "C" VS_PLUGINS_EXPORT VideoStitch::Potential<VideoStitch::Input::Reader>* __cdecl createReaderFn(
const VideoStitch::Ptv::Value* config, VideoStitch::Plugin::VSReaderPlugin::Config runtime) {
......
[license-badge]: https://img.shields.io/badge/license-MIT-green.svg
[license-link]: https://opensource.org/licenses/MIT
[travis-badge]: https://img.shields.io/travis/stitchEm/stitchEm/master.svg?label=Build
[travis-link]: https://travis-ci.org/stitchEm/stitchEm
[actions-badge]: https://github.com/stitchEm/stitchEm/workflows/Build/badge.svg
[actions-link]: https://github.com/stitchEm/stitchEm/actions
[![License][license-badge]][license-link]
[![Build][travis-badge]][travis-link]
[![Build][actions-badge]][actions-link]
Vahana VR & VideoStitch Studio: software to create immersive 360° VR video, live and in post-production.
......@@ -36,4 +36,6 @@ The software can be built on Windows, macOS and Linux. Not all features are avai
The stitchEm project is licensed under the terms of the [MIT License](LICENSE.md).
The repository includes several third-party open source files, which are licensed under their own respective licenses. They are listed in [doc/LICENSE-3RD-PARTY.md](doc/LICENSE-3RD-PARTY.md).
The repository includes several third-party open source files, which are licensed under their own respective licenses. They are listed in [doc/LICENSE-3RD-PARTY-SOURCES.md](doc/LICENSE-3RD-PARTY-SOURCES.md).
The stitchEm software uses code from third-party libraries, listed in [doc/LICENSE-3RD-PARTY-LIBRARIES.md](doc/LICENSE-3RD-PARTY-LIBRARIES.md).
......@@ -71,10 +71,9 @@ if(WINDOWS)
set(EXTERNAL_DEPS
src/../../external_deps/)
include_directories(${EXTERNAL_DEPS}/include)
include_directories(${EXTERNAL_DEPS}/include/OculusSDK)
include_directories(${EXTERNAL_DEPS}/include/openvr)
find_library(OVR NAMES "LibOVR" PATHS ${EXTERNAL_DEPS}/lib/OculusSDK NO_DEFAULT_PATH)
find_library(OPENVR NAMES "openvr_api" PATHS ${EXTERNAL_DEPS}/lib/openvr NO_DEFAULT_PATH)
include_directories("${OCULUS_PATH}\\Include")
find_library(OVR NAMES "LibOVR" HINTS "${OCULUS_PATH}\\Lib\\Windows\\x64\\Release\\VS2015")
find_library(OPENVR NAMES "openvr_api")
add_definitions(-DNOMINMAX)
add_definitions(-D_USE_MATH_DEFINES)
add_definitions(-DUNICODE)
......
#define cuda_io_dir "..\bin\x64\release\core_plugins_cuda"
#define cuda_plugin_dir "core_plugins_cuda"
#define cuda_version GetEnv('CUDA_VERSION')
#define cuda_dir GetEnv('CUDA_INSTALL')
#define cuda_path cuda_dir + "\v" + cuda_version
#define cuda_path "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0"
#define programfiles GetEnv('ProgramW6432')
#define nvsmi_dir programfiles + "\NVIDIA CORPORATION\NVSMI"
; CUDA dependencies
Source: "{#cuda_path}\bin\cudart64_80.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#cuda_path}\bin\cudart64_100.dll"; DestDir: "{app}"; Flags: ignoreversion
; NVML dependency
Source: "{#nvsmi_dir}\nvml.dll"; DestDir: "{app}"; Flags: ignoreversion
......
......@@ -52,9 +52,6 @@ Name: "{group}\{#batchName}"; Filename: "{app}\{#batch}"; IconFilename: "{app}\{
;Name: "{group}\Uninstall {#MyAppName}"; Filename: "{uninstallexe}" ; create a shortcut in the startmenu
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#ExeName}"; WorkingDir: {app}; Tasks: desktopicon
[Run]
Filename: "{app}\vcredist_x64_2013.exe"; Parameters: "/q /norestart"; WorkingDir: "{app}"; StatusMsg: "Installing Microsoft Visual C++ 2013 Redistributable Package (x64)"
[Tasks]
Name: desktopicon; Description: "Create a &desktop icon"; GroupDescription: "Additional icons:"
......
......@@ -43,57 +43,25 @@ Source: "installer\examples\*.vah"; DestDir: "{%HOMEPATH}\{#MyAppName}\Projects"
Source: "{#vah_dir}\decklink.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
Source: "{#vah_dir}\magewell.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
Source: "{#vah_dir}\magewellpro.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
Source: "{#vah_dir}\aja_64.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
Source: "{#vah_dir}\rtmp.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
Source: "{#vah_dir}\portaudio.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
Source: "{#vah_dir}\ximea_64.dll"; DestDir: "{app}\{#vah_plugin_dir}"; Flags: ignoreversion
; Magewell dependencies
Source: "{#bin_dir}\LibXIProperty.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\LibXIStream2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\LibMWCapture.dll"; DestDir: "{app}"; Flags: ignoreversion
;AJA CORVID88 NTV2 dependencies
Source: "{#bin_dir}\ajastuffdll_64.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\classesDLL_64.dll"; DestDir: "{app}"; Flags: ignoreversion
; Point Gray & Ladybug dependencies
;Source: "installer\vcredist_x64_2010.exe"; DestDir: "{app}"; Flags: deleteafterinstall ignoreversion
;Source: "{#bin_dir}\ActiveFlyCap_v100.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "{#bin_dir}\FlyCapture2_v100.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "{#bin_dir}\libiomp5md.dll"; DestDir: "{app}"; Flags: ignoreversion
;Source: "{#bin_dir}\ladybug.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Windows\System32\LibXIProperty.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Windows\System32\LibXIStream2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Windows\System32\LibMWCapture.dll"; DestDir: "{app}"; Flags: ignoreversion
; Ximea dependencies
Source: "{#bin_dir}\vcredist_x64_2012.exe"; DestDir: "{app}"; Flags: deleteafterinstall ignoreversion
;Source: "{#bin_dir}\xi4Api_x64.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\xiapi64.dll"; DestDir: "{app}"; Flags: ignoreversion
; rtmp dependencies
Source: "{#bin_dir}\librtmp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\librtmp-1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libx264-148.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libmp3lame-0.dll"; DestDir: "{app}"; Flags: ignoreversion
; rtmp and Youtube output dependencies
Source: "{#bin_dir}\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\dev\XIMEA\vcredist_2013_x64.exe"; DestDir: "{app}"; Flags: deleteafterinstall ignoreversion
Source: "D:\dev\XIMEA\API\x64\xiapi64.dll"; DestDir: "{app}"; Flags: ignoreversion
; Youtube output dependencies
Source: "{#bin_dir}\roots.pem"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libglog.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libcurl.dll"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#ExeName}"; IconFilename: "{app}\{#ExeName}"
;Name: "{group}\Uninstall {#MyAppName}"; Filename: "{uninstallexe}" ; create a shortcut in the startmenu
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#ExeName}"; Tasks: desktopicon
[Run]
;Filename: "{app}\vcredist_x64_2010.exe"; Parameters: "/q /norestart"; StatusMsg: "Installing Microsoft Visual C++ 2010 Redistributable Package (x64)"
Filename: "{app}\vcredist_x64_2012.exe"; Parameters: "/q /norestart"; StatusMsg: "Installing Microsoft Visual C++ 2012 Redistributable Package (x64)"
Filename: "{app}\vcredist_x64_2013.exe"; Parameters: "/q /norestart"; StatusMsg: "Installing Microsoft Visual C++ 2013 Redistributable Package (x64)"
Filename: {app}\{#ExeName}; Description: "Launch {#MyAppName}"; Flags: nowait postinstall skipifsilent runascurrentuser
[Tasks]
......
#define qt_version GetEnv('QT_VERSION')
#define qt_dir GetEnv('QT_INSTALL')
#define qt_dir_v qt_dir + "\" + qt_version + "\msvc2013_64"
#define qt_dir_v "D:\dev\Qt\5.12.5\msvc2017_64"
#define qt_bin qt_dir_v + "\bin"
#define qt_platform qt_dir_v + "\plugins\platforms"
#define qt_format qt_dir_v + "\plugins\imageformats"
#define qt_audio qt_dir_v + "\plugins\audio"
; rtmp dependencies
Source: "{#bin_dir}\libwinpthread-1.dll"; DestDir: "{app}"; Flags: ignoreversion
#define vcpkg_dir "D:\dev\vcpkg\installed\x64-windows\bin"
; other I/O dependencies
Source: "{#bin_dir}\libtiff-5.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\turbojpeg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\openvr_api.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\portaudio_x64.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\tiff.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\libpng16.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\jpeg62.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\turbojpeg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\openvr_api.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\portaudio_x64.dll"; DestDir: "{app}"; Flags: ignoreversion
; qt dependencies
Source: "{#qt_bin}\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
......@@ -37,15 +33,16 @@ Source: "{#qt_platform}\qoffscreen.dll"; DestDir: "{app}\platforms"; Flags: recu
Source: "{#qt_platform}\qwindows.dll"; DestDir: "{app}\platforms"; Flags: recursesubdirs ignoreversion
; Ceres dependencies
Source: "{#bin_dir}\ceres.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\ceres.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\glog.dll"; DestDir: "{app}"; Flags: ignoreversion
; OpenCV dependencies
Source: "{#bin_dir}\opencv_calib3d310.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\opencv_core310.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\opencv_features2d310.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\opencv_imgproc310.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\opencv_flann310.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\opencv_video310.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\opencv_calib3d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\opencv_core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\opencv_features2d.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\opencv_imgproc.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\opencv_flann.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\opencv_video.dll"; DestDir: "{app}"; Flags: ignoreversion
; VideoStitch internals
Source: "{#bin_dir}\libvideostitch-gpudiscovery.dll"; DestDir: "{app}"; Flags: ignoreversion
......@@ -53,20 +50,20 @@ Source: "{#bin_dir}\libvideostitch.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libvideostitch-gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libvideostitch-base.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\{#ExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\vcredist_x64_2013.exe"; DestDir: "{app}"; Flags: deleteafterinstall ignoreversion
; rtmp dependencies
Source: "{#bin_dir}\librtmp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\librtmp-1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libx264-148.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libmp3lame.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\librtmp.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\libx264-157.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\libmp3lame.dll"; DestDir: "{app}"; Flags: ignoreversion
; ffmpeg dependencies
Source: "{#bin_dir}\avcodec-57.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\avformat-57.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\avresample-3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\avutil-55.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#bin_dir}\libx264-146.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\avcodec-58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\avformat-58.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\avresample-4.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#vcpkg_dir}\avutil-56.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\dev\Visual Studio 2017\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\vcruntime140.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\dev\Visual Studio 2017\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64\msvcp140.dll"; DestDir: "{app}"; Flags: ignoreversion
\ No newline at end of file
......@@ -3,4 +3,4 @@
Source: "{#io_dir}\jpg.dll"; DestDir: "{app}\{#plugin_dir}"; Flags: ignoreversion
Source: "{#io_dir}\png.dll"; DestDir: "{app}\{#plugin_dir}"; Flags: ignoreversion
Source: "{#io_dir}\tiff.dll"; DestDir: "{app}\{#plugin_dir}"; Flags: ignoreversion
Source: "{#io_dir}\tiffPlugin.dll"; DestDir: "{app}\{#plugin_dir}"; Flags: ignoreversion
......@@ -18,7 +18,6 @@ fi
array=("..\..\bin\x64\Release\batchstitcher.exe" "..\..\bin\x64\Release\videostitch-studio.exe" "..\..\bin\x64\Release\videostitch-cmd.exe")
for exe in "${array[@]}" ; do
verpatch.exe /va $exe $vsver4 /pv $vsver4 /s desc "VideoStitch Studio" /s copyright "Copyright VideoStitch SAS 2017" /s product "VideoStitch Studio"
./sign.bat $exe
done
#generate installer
......
......@@ -17,7 +17,6 @@ fi
#set details and sign executables
exe="..\..\bin\x64\Release\VahanaVR.exe"
verpatch.exe /va $exe $vsver4 /pv $vsver4 /s desc "Vahana VR" /s copyright "Copyright VideoStitch SAS 2017" /s product "Vahana VR"
./sign.bat $exe
#generate installer
sed -e "s/__APPVERSION__/$vsver/g" -e "s/__INFOVERSION__/$vsver3/g" -e "s/__GPU__/$1/g" -e "s/__OTHER_GPU__/$optionalGpu/g" VideoStitch64_vahanaVR.iss > tmp.iss
......
signtool sign /v /t http://timestamp.digicert.com /f ../../../../certificate.pfx /p x87h7P20Pc /d "VideoStitch" %1
......@@ -196,7 +196,7 @@ Matrix4 SteamVRRenderer::getHMDMatrixProjectionEye(vr::Hmd_Eye eye) {
return Matrix4();
}
vr::HmdMatrix44_t mat = hmd->GetProjectionMatrix(eye, nearClip, farClip, vr::API_OpenGL);
vr::HmdMatrix44_t mat = hmd->GetProjectionMatrix(eye, nearClip, farClip);
return Matrix4(mat.m[0][0], mat.m[1][0], mat.m[2][0], mat.m[3][0], mat.m[0][1], mat.m[1][1], mat.m[2][1], mat.m[3][1],
mat.m[0][2], mat.m[1][2], mat.m[2][2], mat.m[3][2], mat.m[0][3], mat.m[1][3], mat.m[2][3],
mat.m[3][3]);
......@@ -284,10 +284,11 @@ void SteamVRRenderer::setupDistortion() {
u = x * w;
v = 1 - y * h;
vert.position = Vector2(Xoffset + u, -1 + 2 * y * h);
vr::DistortionCoordinates_t dc0 = hmd->ComputeDistortion(vr::Eye_Left, u, v);
vert.texCoordRed = Vector2(dc0.rfRed[0], 1 - dc0.rfRed[1]);
vert.texCoordGreen = Vector2(dc0.rfGreen[0], 1 - dc0.rfGreen[1]);
vert.texCoordBlue = Vector2(dc0.rfBlue[0], 1 - dc0.rfBlue[1]);
vr::DistortionCoordinates_t *dc0;
hmd->ComputeDistortion(vr::Eye_Left, u, v, dc0);
vert.texCoordRed = Vector2(dc0->rfRed[0], 1 - dc0->rfRed[1]);
vert.texCoordGreen = Vector2(dc0->rfGreen[0], 1 - dc0->rfGreen[1]);
vert.texCoordBlue = Vector2(dc0->rfBlue[0], 1 - dc0->rfBlue[1]);
vertices.push_back(vert);
}
}
......@@ -299,10 +300,11 @@ void SteamVRRenderer::setupDistortion() {
u = x * w;
v = 1 - y * h;
vert.position = Vector2(Xoffset + u, -1 + 2 * y * h);
vr::DistortionCoordinates_t dc0 = hmd->ComputeDistortion(vr::Eye_Right, u, v);
vert.texCoordRed = Vector2(dc0.rfRed[0], 1 - dc0.rfRed[1]);
vert.texCoordGreen = Vector2(dc0.rfGreen[0], 1 - dc0.rfGreen[1]);
vert.texCoordBlue = Vector2(dc0.rfBlue[0], 1 - dc0.rfBlue[1]);
vr::DistortionCoordinates_t *dc0;
hmd->ComputeDistortion(vr::Eye_Right, u, v, dc0);
vert.texCoordRed = Vector2(dc0->rfRed[0], 1 - dc0->rfRed[1]);
vert.texCoordGreen = Vector2(dc0->rfGreen[0], 1 - dc0->rfGreen[1]);
vert.texCoordBlue = Vector2(dc0->rfBlue[0], 1 - dc0->rfBlue[1]);
vertices.push_back(vert);
}
}
......@@ -668,9 +670,10 @@ void SteamVRRenderer::render() {
renderStereoTargets();
renderDistortion();
vr::Texture_t leftEyeTexture = {(void *)leftEyeDesc.resolveTextureId, vr::API_OpenGL, vr::ColorSpace_Gamma};
vr::Texture_t leftEyeTexture = {(void *)leftEyeDesc.resolveTextureId, vr::TextureType_OpenGL, vr::ColorSpace_Gamma};
vr::VRCompositor()->Submit(vr::Eye_Left, &leftEyeTexture);
vr::Texture_t rightEyeTexture = {(void *)rightEyeDesc.resolveTextureId, vr::API_OpenGL, vr::ColorSpace_Gamma};
vr::Texture_t rightEyeTexture = {(void *)rightEyeDesc.resolveTextureId, vr::TextureType_OpenGL,
vr::ColorSpace_Gamma};
vr::VRCompositor()->Submit(vr::Eye_Right, &rightEyeTexture);
}
......@@ -794,9 +797,9 @@ void SteamVRRenderer::renderVideoFrame(vr::Hmd_Eye eye) {
}
}
bool isInputCapturedByAnotherProcess = hmd->IsInputFocusCapturedByAnotherProcess();
bool isInputAvailable = hmd->IsInputAvailable();
if (!isInputCapturedByAnotherProcess) {
if (isInputAvailable) {
// draw the controller axis lines
glUseProgram(controllerTransformProgramID);
glUniformMatrix4fv(controllerMatrixLocation, 1, GL_FALSE, getCurrentViewProjectionMatrix(eye).get());
......@@ -818,7 +821,7 @@ void SteamVRRenderer::renderVideoFrame(vr::Hmd_Eye eye) {
continue;
}
if (isInputCapturedByAnotherProcess &&
if (!isInputAvailable &&
hmd->GetTrackedDeviceClass(trackedDevice) == vr::TrackedDeviceClass_Controller) {
continue;
}
......@@ -872,7 +875,7 @@ void SteamVRRenderer::renderDistortion() {
void SteamVRRenderer::drawControllers() {
// don't draw controllers if somebody else has input focus
if (hmd->IsInputFocusCapturedByAnotherProcess()) {
if (!hmd->IsInputAvailable()) {
return;
}
......@@ -1007,7 +1010,7 @@ void SteamVRRenderer::updateHMDMatrixPose() {
case vr::TrackedDeviceClass_Invalid:
devClassChar[device] = 'I';
break;
case vr::TrackedDeviceClass_Other:
case vr::TrackedDeviceClass_GenericTracker:
devClassChar[device] = 'O';
break;
case vr::TrackedDeviceClass_TrackingReference:
......
......@@ -20,6 +20,7 @@
#define VIDEOSTITCH_YOUTUBE_VAHANA_URL "https://www.youtube.com/playlist?list=PLE5eSxUoYnqgv4S8ayQ5_YsPP8x_MCvvM"
#define VIDEOSTITCH_URL "https://github.com/stitchEm"
#define VIDEOSTITCH_SUPPORT_URL "https://github.com/stitchEm"
#define VIDEOSTITCH_LIBRARIES_URL "https://github.com/stitchEm/stitchEm/blob/master/doc/LICENSE-3RD-PARTY-LIBRARIES.md"
// Color
#define ORAH_COLOR "FF9E00";
......
......@@ -6,10 +6,13 @@
#include <QLabel>
#include <QPushButton>
#include <QDesktopServices>
#include "aboutwindow.hpp"
#include "version.hpp"
#include "common.hpp"
#include "libvideostitch-base/linkhelpers.hpp"
AboutWidget::AboutWidget(QString version, QWidget* const parent) : QWidget(parent) {
setupUi(this);
buttonWebSite->setProperty("vs-button-medium", true);
......@@ -18,6 +21,11 @@ AboutWidget::AboutWidget(QString version, QWidget* const parent) : QWidget(paren
.arg(QCoreApplication::applicationName())
.arg(QCoreApplication::organizationName())
.arg(QDate::currentDate().year()));
labelLibraries->setText(labelLibraries->text()
.arg(QCoreApplication::applicationName())
.arg(formatLink(VIDEOSTITCH_LIBRARIES_URL, "open source libraries.")));
connect(buttonWebSite, &QPushButton::clicked, this, &AboutWidget::onButtonWebSiteClicked);
labelAppVersion->setText(version);
QIcon webIcon(":/live/icons/assets/icon/live/web.png");
......
......@@ -165,6 +165,25 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="labelLibraries">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;%0 uses code from %1&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::TextBrowserInteraction</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
......
......@@ -371,7 +371,6 @@ if(ENABLE_YOUTUBE_OUTPUT)
find_debug_and_optimized_library(GGJSON "googleapis/debug" "googleapis_json" "googleapis/release" "googleapis_json")
find_debug_and_optimized_library(GGJSONPB "googleapis/debug" "googleapis_jsonplayback" "googleapis/release" "googleapis_jsonplayback")
find_debug_and_optimized_library(GGSCRIBES "googleapis/debug" "googleapis_scribes" "googleapis/release" "googleapis_scribes")
find_library(GLOG NAMES "libglog" PATHS "${CMAKE_EXTERNAL_LIB}/glog")
find_library(CURL NAMES "libcurl" PATHS "${CMAKE_EXTERNAL_LIB}/curl")
endif(WINDOWS)
......@@ -453,7 +452,7 @@ endif()
if(WINDOWS)
if(ENABLE_YOUTUBE_OUTPUT)
target_include_directories(${VS_VAHANA_BIN} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include/youtubeapi")
target_link_libraries(${VS_VAHANA_BIN} PRIVATE ${GGJSON} ${GGJSONPB} ${GGSCRIBES} ${GLOG} ${CURL} ${JSON})
target_link_libraries(${VS_VAHANA_BIN} PRIVATE ${GGJSON} ${GGJSONPB} ${GGSCRIBES} ${CURL} ${JSON})
endif()
target_link_libraries(${VS_VAHANA_BIN} PRIVATE ${OVR} ${OPENVR})
endif(WINDOWS)
......
......@@ -20,29 +20,30 @@ endif (NOT CUDA_FOUND)
# TODO: extract find_library + find_package
if (WINDOWS)
find_library(GLEW NAMES glew32s PATHS ${CMAKE_EXTERNAL_DEPS}/lib/GL NO_DEFAULT_PATH)
find_library(GLEW "glew32" PATH "${VCPKG_PATH}\\${VCPKG_TARGET_TRIPLET}-static\\lib" NO_DEFAULT_PATH)
include_directories("${VCPKG_PATH}\\${VCPKG_TARGET_TRIPLET}-static\\include")
include_directories(${OPENGL_INCLUDE_DIRS})
include_directories(${OPENCV_INCLUDE_DIRS})
include_directories("${NVIDIA_VIDEO_CODEC}\\include")
find_library(CUDA cuda PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" NO_DEFAULT_PATH)
find_library(CUDART cudart PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" NO_DEFAULT_PATH)
find_library(CUVID nvcuvid PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" NO_DEFAULT_PATH)
find_library(CUVID nvcuvid PATHS "${NVIDIA_VIDEO_CODEC}\\Lib\\x64")
find_library(NVML nvml PATHS "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" NO_DEFAULT_PATH)
endif(WINDOWS)
if (LINUX)
if(LINUX)
set(CUDA_PROPAGATE_HOST_FLAGS "FALSE")
if(TEGRA_DEMO)
set(LINUX_CUDA_PATH ${CUDA_TOOLKIT_TARGET_DIR}/lib)
find_library(GLEW_LIBRARIES GLEW NO_CMAKE_FIND_ROOT_PATH)
find_library(OPENGL_LIBRARIES GL NO_CMAKE_FIND_ROOT_PATH)
else(TEGRA_DEMO)
else()
find_package(GLEW)
find_library(CUDA cuda PATHS "${LINUX_CUDA_PATH}/stubs")
find_library(CUDART cudart PATHS ${LINUX_CUDA_PATH})
find_library(NVML nvidia-ml PATHS "${LINUX_CUDA_PATH}/stubs")
endif(TEGRA_DEMO)
endif()
include_directories(${CMAKE_EXTERNAL_DEPS}/include)
link_directories(${LINUX_CUDA_PATH})
find_library(CUVID nvcuvid)
endif(LINUX)
......
if(WINDOWS)
find_debug_and_optimized_library(OpenCV_CORE_LIBS "opencv2/Debug" "opencv_core310d" "opencv2/Release" "opencv_core310")
find_debug_and_optimized_library(OpenCV_CALIB_LIBS "opencv2/Debug" "opencv_calib3d310d" "opencv2/Release" "opencv_calib3d310")
find_debug_and_optimized_library(OpenCV_FEATURES_LIBS "opencv2/Debug" "opencv_features2d310d" "opencv2/Release" "opencv_features2d310")
find_debug_and_optimized_library(OpenCV_IMGCODECS_LIBS "opencv2/Debug" "opencv_imgcodecs310d" "opencv2/Release" "opencv_imgcodecs310")
find_debug_and_optimized_library(OpenCV_IMGPROC_LIBS "opencv2/Debug" "opencv_imgproc310d" "opencv2/Release" "opencv_imgproc310")
find_debug_and_optimized_library(OpenCV_FLANN_LIBS "opencv2/Debug" "opencv_flann310d" "opencv2/Release" "opencv_flann310")
find_debug_and_optimized_library(OpenCV_VIDEO_LIBS "opencv2/Debug" "opencv_video310d" "opencv2/Release" "opencv_video310")
set(OpenCV_LIBRARIES ${OpenCV_CORE_LIBS} ${OpenCV_CALIB_LIBS} ${OpenCV_FEATURES_LIBS} ${OpenCV_IMGPROC_LIBS} ${OpenCV_FLANN_LIBS} ${OpenCV_VIDEO_LIBS})
set(OpenCV_INCLUDE_DIRS ${CMAKE_EXTERNAL_DEPS}/include/opencv2)
endif()
if(LINUX OR ANDROID)
if(LINUX)
find_library(OpenCV_CORE_LIBS NAMES "opencv_core")
find_library(OpenCV_CALIB_LIBS NAMES "opencv_calib3d")
find_library(OpenCV_FEATURES_LIBS NAMES "opencv_features2d")
find_library(OpenCV_IMGPROC_LIBS NAMES "opencv_imgproc")
find_library(OpenCV_FLANN_LIBS NAMES "opencv_flann")
find_library(OpenCV_VIDEO_LIBS NAMES "opencv_video")
else()
find_library(OpenCV_CORE_LIBS NAMES "opencv_core" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_CALIB_LIBS NAMES "opencv_calib3d" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_FEATURES_LIBS NAMES "opencv_features2d" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_IMGPROC_LIBS NAMES "opencv_imgproc" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_FLANN_LIBS NAMES "opencv_flann" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
find_library(OpenCV_VIDEO_LIBS NAMES "opencv_video" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
set(OpenCV_INCLUDE_DIRS ${CMAKE_EXTERNAL_DEPS}/include/opencv2)
endif()
set(OpenCV_LIBRARIES
${OpenCV_CALIB_LIBS}
${OpenCV_FEATURES_LIBS}
${OpenCV_FLANN_LIBS}
${OpenCV_VIDEO_LIBS}
${OpenCV_IMGPROC_LIBS}
${OpenCV_CORE_LIBS})
endif()
if(ANDROID)
find_library(OpenCV_HAL_LIBS NAMES "opencv_hal" PATHS ${CMAKE_EXTERNAL_DEPS}/lib NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
set(OpenCV_LIBRARIES
${OpenCV_LIBRARIES}
${OpenCV_HAL_LIBS})
endif()
if(APPLE)
if(MACPORTS)
find_package(OpenCV REQUIRED core calib3d features2d imgproc flann video PATHS /opt/local NO_DEFAULT_PATH)
else()
find_package(OpenCV REQUIRED core calib3d features2d imgproc flann video PATHS "/usr/local/opt/opencv@3" "/usr/local" NO_DEFAULT_PATH)
endif()
endif()
if(WINDOWS)
return()
endif()
if(APPLE)
if(MACPORTS)
find_path(OpenEXR_ROOT_DIR include/openexr/half.h HINTS /opt/local)
......
......@@ -6,6 +6,6 @@ elseif(LINUX)
elseif(ANDROID)
find_library(PNG_LIBRARY png PATHS ${CMAKE_EXTERNAL_LIB} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
elseif(WINDOWS)
find_debug_and_optimized_library(PNG_LIBRARY "libpng/debug" "libpng" "libpng/release" "libpng")
find_package(PNG REQUIRED)
endif()
......@@ -27,10 +27,6 @@ if(LINUX OR APPLE)
find_package(Threads REQUIRED)
endif(LINUX OR APPLE)
if(WINDOWS)
find_package(Kernel32 REQUIRED)
endif(WINDOWS)
set(R8B_SOURCES
r8bbase.cpp)
......@@ -43,8 +39,4 @@ if(LINUX OR APPLE)
set_target_properties(r8b PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif(LINUX OR APPLE)
if(WINDOWS)
target_link_libraries(r8b Kernel32)
endif(WINDOWS)
set(R8B_LIBRARY r8b PARENT_SCOPE)
\ No newline at end of file
......@@ -50,19 +50,16 @@ include_discovery_vs_headers(${VS_DISCOVERY})
if(NOT ANDROID)
find_package(OpenCL)
endif (NOT ANDROID)
if(OpenCL_FOUND)
endif()
if(OpenCL_FOUND AND GPU_BACKEND_OPENCL)
target_include_directories(${VS_DISCOVERY} PRIVATE ${OpenCL_INCLUDE_DIRS})
target_link_libraries(${VS_DISCOVERY} PUBLIC ${OpenCL_LIBRARY})
# different names on different implementations of find_package(OpenCL)
set(PLATFORM_INDEPENDENT_OPENCL_LIBS ${OpenCL_LIBRARIES} ${OPENCL_LIBRARIES})
target_link_libraries(${VS_DISCOVERY} PRIVATE ${PLATFORM_INDEPENDENT_OPENCL_LIBS})
if(MSVC)
target_link_libraries(${VS_DISCOVERY} PUBLIC ${OpenCL_LIBRARIES})
if(WINDOWS)
target_link_libraries(${VS_DISCOVERY} PRIVATE "DelayImp.lib")
set_target_properties(${VS_DISCOVERY} PROPERTIES LINK_FLAGS "/DELAYLOAD:OpenCL.dll")
endif(MSVC)
endif()
target_compile_definitions(${VS_DISCOVERY} PRIVATE OPENCL_FOUND)
endif(OpenCL_FOUND)
endif()
# ----------------------------------------------------------------------------
# CUDA
......@@ -71,7 +68,7 @@ endif(OpenCL_FOUND)
if(NOT CUDA_FOUND)
include (${CMAKE_SOURCE_DIR}/cmake/getCuda.cmake)
endif (NOT CUDA_FOUND)
if (CUDA_FOUND)
if(CUDA_FOUND)
target_include_directories(${VS_DISCOVERY} PRIVATE ${CUDA_INCLUDE_DIRS})
target_link_libraries(${VS_DISCOVERY} PRIVATE ${CUDA_LIBRARIES})
target_compile_definitions(${VS_DISCOVERY} PRIVATE CUDA_FOUND)
......@@ -143,4 +140,3 @@ if(STAGING)
else()
add_test(NAME ${DEVICE_NAME_TEST} COMMAND ${DEVICE_NAME_TEST})
endif()
// Copyright (c) 2012-2017 VideoStitch SAS
// Copyright (c) 2018 stitchEm
// VideoStitch BackendLibHelper
#include <cassert>
#include "libgpudiscovery/backendLibHelper.hpp"
#include "backendLibLoader.hpp"
......
......@@ -22,6 +22,7 @@
#include <lmerr.h>
#include <PathCch.h>
#define DELAYIMP_INSECURE_WRITABLE_HOOKS
#include "delayimp.h"
#include "winerror.h"
......@@ -232,7 +233,7 @@ FrameworkStatus DevicesInfo::getFrameworkStatus(Framework framework) const {
}
DevicesInfo::DevicesInfo() {
#ifdef _MSC_VER
#ifdef DELAY_LOAD_ENABLED
PfnDliHook currentFailHook = __pfnDliFailureHook2;
__pfnDliFailureHook2 = failDelayHook;
try {
......
......@@ -13,8 +13,9 @@ Using ccache to speed up recompilation is recommended, but not required, on Linu
sudo port install CMake bison doxygen yasm ninja ccache
# Libraries
sudo port install opencv glew gsed jpeg libpng openal \
tiff faac faad2 ceres-solver glfw ffmpeg glm OpenEXR
sudo port install opencv glew gsed jpeg libpng \
tiff faac faad2 ceres-solver glfw glm OpenEXR \
ffmpeg +gpl2 +librtmp +nonfree
```
```
......@@ -24,6 +25,8 @@ cmake -DCREATE_BOX_PACKAGE=OFF \
-DMACPORTS=ON \
-G Ninja \
stitchEm
ninja
```
### Using Homebrew
......@@ -57,11 +60,15 @@ sudo apt install
libturbojpeg0-dev \
libx264-dev \
ninja-build \
ocl-icd-opencl-dev \
opencl-headers \
portaudio19-dev \
qt5-default \
qtmultimedia5-dev \
qttools5-dev \
swig
swig \
wget \
xxd
# Set up gcc-6 and g++-6 as your compiler
sudo apt-get install gcc-6 g++-6
......@@ -80,7 +87,47 @@ export CXX=g++-6
cmake -DGPU_BACKEND_CUDA=ON -DGPU_BACKEND_OPENCL=ON \
-G Ninja \
stitchEm
ninja
```
## Building on windows
You need visual studio 2017, QT >= 5.9 and CUDA 10
Install [vcpkg](https://github.com/microsoft/vcpkg)
Then installs all of this:
```
./vcpkg install --triplet x64 ceres eigen3 ffmpeg[avresample,core,gpl,x264,opencl] gflags glfw3 glog libjpeg-turbo liblzma libpng librtmp libwebp mp3lame opencl opencv3 openexr opengl openssl openvr portaudio protobuf tiff x264 zlib glm
./vcpkg install glew:x64-windows-static
```
* install manually [bison/flex](https://sourceforge.net/projects/winflexbison/files) and put the executables in the PATH
* install manually [Intel SDK 2017](https://software.intel.com/en-us/media-sdk)
* install manually [Magewell SDK](http://www.magewell.com/files/sdk/Magewell_Capture_SDK_3.3.1.1004.zip)
* install manually [Oculus SDK (1.4.0)](https://developer.oculus.com/downloads/package/oculus-sdk-for-windows/1.4.0)
* install manually [Decklink SDK](https://www.blackmagicdesign.com/developer/product/capture-and-playback) v10.9.12
* install manually [XIMEA SDK](https://www.ximea.com/support/documents/4)
clone the repo and create a directory next to it, and configure with cmake:
```
git clone https://github.com/stitchEm/stitchEm.git
mkdir build
cd build
cmake -G "Visual Studio 15 2017 Win64" \
-DCMAKE_TOOLCHAIN_FILE=PATH_TO_YOUR_vcpkg_REPOSITORY\scripts\buildsystems\vcpkg.cmake \
-DQt5_DIR=PATH_TO_QT_5\msvc2017\lib\cmake\Qt5 \
-DGPU_BACKEND_CUDA=ON \
-DGPU_BACKEND_OPENCL=OFF \
-DCUDA_LOCAL_ARCH_ONLY=ON \
-DVCPKG_ROOT="PATH_TO_YOUR_vcpkg_REPOSITORY" \
-DVCPKG_TARGET_TRIPLET="x64-windows" \
-DMAGEWELL_PATH="PATH_TO_MAGEWELL_SDK" \
-DXIMEA_PATH="PATH_TO_XIMEA_API" \
-DDECKLINK_PATH="PATH_TO_DECK_LINK_OVR" \
-DINTEL_MEDIA_SDK_PATH="PATH_TO_INTEL_SDK" \
..\stitchEm\
```
Then open the generated project with visual studio and build it.
## CMake flags
......
The stitchEm software uses code from these third-party libraries:
| Library | Homepage | License | Source Code |
|---------|----------|---------|-------------|
| ceres solver | http://ceres-solver.org | [BSD](http://ceres-solver.org/license.html) | [ceres-solver.org](http://ceres-solver.org/installation.html) |
| Eigen3 | http://eigen.tuxfamily.org/ | [MPL2](https://www.mozilla.org/en-US/MPL/2.0/) | [bitbucket.org](https://bitbucket.org/eigen/eigen/) |
| faac | http://faac.sourceforge.net | [GPL 2](https://github.com/stitchEm/faac/blob/master/COPYING) | [github.com](https://github.com/stitchEm/faac) |
| faad2 | http://faac.sourceforge.net | [GPL 2](https://github.com/stitchEm/faad2/blob/xmms2/COPYING) | [github.com](https://github.com/stitchEm/faad2) |
| ffmpeg | https://www.ffmpeg.org | [GPL 2](http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) | [ffmpeg.org](https://www.ffmpeg.org/download.html) |
| gflags | https://gflags.github.io/gflags/ | [BSD](https://github.com/gflags/gflags/blob/master/COPYING.txt) | [github.com](https://github.com/gflags/gflags) |
| glog | https://github.com/google/glog | [BSD](https://github.com/google/glog/blob/master/COPYING) | [github.com](https://github.com/google/glog) |
| glew | http://glew.sourceforge.net | [BSD](http://glew.sourceforge.net/glew.txt) | [github.com](https://github.com/nigels-com/glew) |
| glm | https://glm.g-truc.net/0.9.9/index.html | [Happy Bunny](https://glm.g-truc.net/copying.txt) | [github.com](https://github.com/g-truc/glm) |
| jpeg | http://libjpeg.sourceforge.net | [IJG](https://jpegclub.org/reference/libjpeg-license/) | [sourceforge.net](http://sourceforge.net/project/showfiles.php?group_id=159521) |
| jpeg-turbo | http://www.libjpeg-turbo.org | [BSD](https://github.com/libjpeg-turbo/libjpeg-turbo/blob/master/LICENSE.md) | [github.com](https://github.com/libjpeg-turbo/libjpeg-turbo) |
| mp3lame | http://lame.sourceforge.net | [LGPL](http://lame.sourceforge.net/license.txt) | [sourceforge.net](http://lame.sourceforge.net/download.php) |
| OpenEXR | https://www.openexr.com/ | [BSD](https://www.openexr.com/license.html) | [openexr.com](https://www.openexr.com/downloads.html) |
| OpenSSL | https://www.openssl.org | [Apache](https://www.openssl.org/source/license.html) | [github.com](https://github.com/openssl/openssl) |
| OpenVR | http://steamvr.com | [BSD](https://github.com/ValveSoftware/openvr/blob/master/LICENSE) | [github.com](https://github.com/ValveSoftware/openvr) |
| png | http://www.libpng.org/pub/png/libpng.html | [libpng](http://www.libpng.org/pub/png/src/libpng-LICENSE.txt) | [sourceforge.net](https://sourceforge.net/projects/libpng/files/) |
| PortAudio | http://www.portaudio.com | [MIT](http://www.portaudio.com/license.html)| [portaudio.com](http://www.portaudio.com/download.html) |
| Protobuf | https://developers.google.com/protocol-buffers/ | [BSD](https://github.com/protocolbuffers/protobuf/blob/master/LICENSE) | [github.com](https://github.com/protocolbuffers/protobuf) |
| rtmp | https://rtmpdump.mplayerhq.hu | [LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) | [ffmpeg.org](https://git.ffmpeg.org/rtmpdump) |
| tiff | http://simplesystems.org/libtiff/ | [BSD](http://www.libtiff.org/misc.html) | [remotesensing.org](ftp://ftp.remotesensing.org/pub/libtiff) |
| OpenCV | https://opencv.org/ | [BSD](https://opencv.org/license/) | [github.com](https://github.com/opencv/opencv) |
| Qt | https://qt.io/ | [LGPL](https://doc.qt.io/qt-5/lgpl.html) | [qt.io](https://wiki.qt.io/Get_the_Source) |
| x264 | https://www.videolan.org/developers/x264.html | [GPL](https://www.gnu.org/licenses/gpl-2.0.html) | [videolan.org](https://code.videolan.org/videolan/x264.git) |
......@@ -5,6 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
bison \
ccache \
clang \
doxygen \
flex \
git \
......@@ -22,13 +23,16 @@ RUN apt update && apt install -y \
librtmp-dev \
libx264-dev \
ninja-build \
ocl-icd-opencl-dev \
opencl-headers \
portaudio19-dev \
python-pip \
qt5-default \
qtmultimedia5-dev \
qttools5-dev \
swig \
wget
wget \
xxd
RUN pip install cmake
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
RUN apt-key add 7fa2af80.pub
......
......@@ -4,14 +4,16 @@ ENV CUDA=10.1.105-1
ENV CUDA_APT=10-1
ENV CUDA_SHORT=10.1
ENV CUDA_INSTALLER=cuda-repo-ubuntu1804_${CUDA}_amd64.deb
ENV NV_LIB=libnvidia-compute-418
RUN wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/${CUDA_INSTALLER}
RUN dpkg -i ${CUDA_INSTALLER}
RUN apt update -qq && apt install -y \
cuda-core-${CUDA_APT} \
cuda-compiler-${CUDA_APT} \
cuda-cudart-dev-${CUDA_APT} \
cuda-cufft-dev-${CUDA_APT} \
cuda-nvml-dev-${CUDA_APT}
cuda-nvml-dev-${CUDA_APT} \
${NV_LIB}
ENV CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
ENV PATH=${PATH}:${CUDA_HOME}/bin
......
......@@ -4,6 +4,7 @@ ENV CUDA=8.0.61-1
ENV CUDA_APT=8-0
ENV CUDA_SHORT=8.0
ENV CUDA_INSTALLER=cuda-repo-ubuntu1604_${CUDA}_amd64.deb
ENV NV_DRIVER=nvidia-418
RUN apt update && apt install -y gcc-5 g++-5
ENV CC=gcc-5
......@@ -16,6 +17,10 @@ RUN apt update -qq && apt install -y \
cuda-cudart-dev-${CUDA_APT} \
cuda-cufft-dev-${CUDA_APT} \
cuda-nvml-dev-${CUDA_APT}
RUN mkdir /usr/lib/nvidia
RUN apt install -y -o Dpkg::Options::="--force-overwrite" \
${NV_DRIVER}
ENV CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
ENV PATH=${PATH}:${CUDA_HOME}/bin
......
......@@ -4,6 +4,7 @@ ENV CUDA=9.2.148-1
ENV CUDA_APT=9-2
ENV CUDA_SHORT=9.2
ENV CUDA_INSTALLER=cuda-repo-ubuntu1604_${CUDA}_amd64.deb
ENV NV_DRIVER=nvidia-410
RUN wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_INSTALLER}
RUN dpkg -i ${CUDA_INSTALLER}
......@@ -12,6 +13,9 @@ RUN apt update -qq && apt install -y \
cuda-cudart-dev-${CUDA_APT} \
cuda-cufft-dev-${CUDA_APT} \
cuda-nvml-dev-${CUDA_APT}
RUN mkdir /usr/lib/nvidia
RUN apt install -y -o Dpkg::Options::="--force-overwrite" \
${NV_DRIVER}
ENV CUDA_HOME=/usr/local/cuda-${CUDA_SHORT}
ENV PATH=${PATH}:${CUDA_HOME}/bin
......
......@@ -5,5 +5,5 @@ ADD . stitchEm
WORKDIR stitchEm
RUN echo ${CUDA_SHORT} > cuda.version
WORKDIR build
RUN cmake -DCMAKE_BUILD_TYPE=Release -DRTMP_NVENC=OFF -DCUDA_TARGET_ARCH="50" -G Ninja ..
RUN cmake -DCMAKE_BUILD_TYPE=Release -DRTMP_NVENC=OFF -DCUDA_TARGET_ARCH="50" -DGPU_BACKEND_CUDA=ON -DGPU_BACKEND_OPENCL=OFF -DDISABLE_OPENCL_SPIR=ON -G Ninja ..
CMD ninja
ARG version
FROM stitchem/stitchem-base:latest
ADD . stitchEm
WORKDIR stitchEm
WORKDIR build
RUN cmake -DCMAKE_BUILD_TYPE=Release -DGPU_BACKEND_CUDA=OFF -DGPU_BACKEND_OPENCL=ON -DDISABLE_OPENCL_SPIR=ON -G Ninja ..
CMD ninja
......@@ -691,7 +691,7 @@ endif()
# ----------------------------------------------------------------------------
# Calibration && AutoCrop && CameraAmbisonics
# ----------------------------------------------------------------------------
find_package(OpenCV)
find_package(OpenCV REQUIRED)
add_subdirectory(src/calibration)
add_subdirectory(src/autocrop)
......
......@@ -136,9 +136,21 @@ cuda_include_directories(src ${CMAKE_EXTERNAL_DEPS}/include)
cuda_include_directories(${VS_DISCOVERY_PUBLIC_HEADERS_DIR})
cuda_include_directories(${VS_LIB_PUBLIC_HEADERS_DIR})
if(MSVC)
string(FIND ${CMAKE_CXX_FLAGS_RELEASE} "/GL" CONTAINS_GL_FLAG)
# /GL option will cause CUDA runtime errors when building with Visual Studio 2017 and CUDA 10.2
STRING(REPLACE " /GL" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endif()
# CMake object libs don't work with CUDA
cuda_compile(BACKEND_OBJECTS_CUDA ${CUDA_SOURCES})
if(MSVC)
if (CONTAINS_GL_FLAG GREATER 0)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
endif()
endif()
add_library(${VS_LIB_OBJECTS_CUDA} OBJECT ${CORE_LIB_SOURCES} ${CORE_LIB_HEADERS} ${CUDA_BACKEND_SOURCES} ${CUDA_BACKEND_HEADERS})
add_cppcheck(${VS_LIB_OBJECTS_CUDA} VS)
......@@ -148,9 +160,9 @@ if(ANDROID)
vs_lib_link_libraries("CUDA" ${GLEW} log)
message(STATUS "CUDA_LIBRARIES = ${CUDA_LIBRARIES}")
else()
vs_lib_link_libraries("PUBLIC_CUDA" ${CUDART} ${CUDA_LIBRARIES} ${NVTX})
vs_lib_link_libraries("CUDA" ${CUDART} ${NVTX})
vs_lib_link_libraries("CUDA" ${OpenGL} ${OPENGL_LIBRARIES} ${GLEW_LIBRARIES} ${GLEW})
vs_lib_link_libraries("PUBLIC_CUDA" ${NVML})
vs_lib_link_libraries("PUBLIC_CUDA" ${NVML} ${CUDA_LIBRARIES})
if(CMAKE_CROSSCOMPILING)
# needed by ceres
vs_lib_link_libraries("CUDA" -fopenmp)
......@@ -161,5 +173,5 @@ else()
else()
vs_lib_link_libraries("PUBLIC_CUDA" ${CUDA})
endif()
endif(ANDROID)
endif()
option(DISABLE_OPENCL_SPIR "Skip OpenCL offline compilation and ship kernel sources")
option(CL_ARGS_WORKAROUND "Redefining functions to support OpenCL limitation in parameters format")
if(DISABLE_OPENCL_SPIR)
message(WARNING "Careful: OpenCL offline compilation disabled. Binary will contain all OpenCL kernel sources as plain text!")
else(DISABLE_OPENCL_SPIR)
if(NOT DISABLE_OPENCL_SPIR)
if (LINUX OR ANDROID)
message("No Alternative OpenCL SPIR compiler for Linux")
else(LINUX OR ANDROID)
else()
option(ALTERNATIVE_OPENCL_SPIR "GENERATE an alternative SPIR that will be used if something goes wrong with the main SPIR" ON)
endif(LINUX OR ANDROID)
endif(DISABLE_OPENCL_SPIR)
endif()
endif()
set(CL_BACKEND_SOURCES
src/backend/cl/bilateral/bilateral.cpp
......@@ -92,7 +90,6 @@ add_cppcheck(${VS_LIB_OBJECTS_OPENCL} VS)
# Add compile definitions
# ----------------------------------------------------------------------------
if(DISABLE_OPENCL_SPIR)
message(WARNING "Careful: OpenCL offline compilation disabled. Binary will contain all OpenCL kernel sources as plain text!")
target_compile_definitions(${VS_LIB_OBJECTS_OPENCL} PRIVATE "DISABLE_OPENCL_SPIR")
endif()
if(CL_ARGS_WORKAROUND)
......
......@@ -27,7 +27,9 @@
#ifdef _MSC_VER
#include <libgpudiscovery/delayLoad.hpp>
#ifdef DELAY_LOAD_ENABLED
SET_DELAY_LOAD_HOOK
#endif // DELAY_LOAD_ENABLED
FARPROC WINAPI delayFailureHook(unsigned dliNotify, PDelayLoadInfo pdli) {
switch (dliNotify) {
case dliFailLoadLib:
......
......@@ -16,10 +16,8 @@ elseif(APPLE)
target_include_directories(${CMD_NAME} PRIVATE /usr/local/include)
endif()
elseif(WINDOWS)
find_library(GLFW glfw3 HINTS "${CMAKE_EXTERNAL_LIB}/glfw" REQUIRED NO_DEFAULT_PATH)
find_library(GLFW glfw3dll REQUIRED)
endif()
target_include_directories(${CMD_NAME} PRIVATE "${CMAKE_EXTERNAL_DEPS}/include")
target_link_libraries(${CMD_NAME} PRIVATE ${VS_DISCOVERY} ${GLFW})
add_cppcheck(${CMD_NAME} VS)
\ No newline at end of file
......@@ -25,6 +25,11 @@ namespace Audio {
typedef std::map<readerid_t, AudioBlock> audioBlockReaderMap_t;
typedef std::map<groupid_t, audioBlockReaderMap_t> audioBlockGroupMap_t;
// originally a vector<audioBlockGroupMap_t>, but this doesn't compile in MSVC
// (https://stackoverflow.com/questions/58700780/vector-of-maps-of-non-copyable-objects-fails-to-compile-in-msvc)
// -> using std::map, where key is audio block index and can be disregarded
typedef std::map<int64_t, audioBlockGroupMap_t> audioBlocks_t;
static const std::string kAudioPipeTag{"audiopipeline"};
class AudioPipeline {
......
......@@ -47,7 +47,7 @@ set(VS_LIB_ROOT_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../..)
if(APPLE)
find_program(OPENCL_OFFLINE_COMPILER openclc
PATHS ${OpenCL_LIBRARY}/Libraries/
PATHS ${OpenCL_LIBRARIES}/Libraries/
/System/Library/Frameworks/OpenCL.framework/Libraries
DOC "OpenCL offline compiler to build spir files from kernel sources")
if (ALTERNATIVE_OPENCL_SPIR)
......
......@@ -619,7 +619,7 @@ template <typename VideoPipeline>
ControllerStatus ControllerImpl<VideoPipeline>::extract(ExtractOutput* extract, bool readFrame) {
// load the acquisition data
std::map<readerid_t, Input::PotentialFrame> inputBuffers;
std::vector<Audio::audioBlockGroupMap_t> audioBlocks;
Audio::audioBlocks_t audioBlocks;
Input::MetadataChunk metadata;
mtime_t date;
......@@ -644,7 +644,7 @@ ControllerStatus ControllerImpl<VideoPipeline>::extract(std::vector<ExtractOutpu
bool readFrame) {
// load the acquisition data
std::map<readerid_t, Input::PotentialFrame> inputBuffers;
std::vector<Audio::audioBlockGroupMap_t> audioBlocks;
Audio::audioBlocks_t audioBlocks;
Input::MetadataChunk metadata;
mtime_t date;
......@@ -734,7 +734,7 @@ ControllerStatus ControllerImpl<VideoPipeline>::stitchAndExtract(Output* output,
// load the acquisition data
std::map<readerid_t, Input::PotentialFrame> inputBuffers;
mtime_t date;
std::vector<Audio::audioBlockGroupMap_t> audioBlocks;
Audio::audioBlocks_t audioBlocks;
Input::MetadataChunk metadata;
if (readFrame) {
......@@ -752,8 +752,8 @@ ControllerStatus ControllerImpl<VideoPipeline>::stitchAndExtract(Output* output,
// process audio
if (statusAudio.ok() || statusAudio.getCode() == Input::ReadStatusCode::TryAgain) {
for (auto& samples : audioBlocks) {
if (!samples.empty()) {
audioPipe->process(samples);
if (!samples.second.empty()) {
audioPipe->process(samples.second);
}
}
}
......
......@@ -82,7 +82,7 @@ Status ControllerInputFrames<destinationColor, readbackType>::load(
std::map<readerid_t, PotentialValue<GPU::HostBuffer<readbackType>>>& processedFrames, mtime_t* date) {
std::map<readerid_t, Input::PotentialFrame> framesFromReader;
processedFrames.clear();
std::vector<Audio::audioBlockGroupMap_t> audioBlocks;
Audio::audioBlocks_t audioBlocks;
mtime_t tempDate = 0;
Input::MetadataChunk metadata;
auto loadStatus = readerController->load(tempDate, framesFromReader, audioBlocks, metadata);
......
......@@ -13,6 +13,7 @@
#include "libvideostitch/logging.hpp"
#include <future>
#include <list>
#include <vector>
#include <unordered_set>
#include <cstdlib>
......@@ -185,7 +186,7 @@ ReaderController::~ReaderController() {
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> ReaderController::load(
mtime_t& date, std::map<readerid_t, Input::PotentialFrame>& frames,
std::vector<Audio::audioBlockGroupMap_t>& audioBlocks, Input::MetadataChunk& metadata) {
Audio::audioBlocks_t& audioBlocks, Input::MetadataChunk& metadata) {
// protect from concurrent seeks
std::lock_guard<std::mutex> lock(inputMutex);
......@@ -369,8 +370,8 @@ Input::ReadStatus ReaderController::loadVideo(mtime_t& date, std::map<readerid_t
/// \param audioBlocks First dimension is the block, second index the input
/// (e.g. audioIn[1][0] => second block of the input 0)
/// \return Code::Ok on success, else an error code
Input::ReadStatus ReaderController::loadAudio(std::vector<Audio::audioBlockGroupMap_t>& audioBlocks, groupid_t gr) {
std::vector<std::map<readerid_t, Audio::Samples>> audioIn;
Input::ReadStatus ReaderController::loadAudio(Audio::audioBlocks_t& audioBlocks, groupid_t gr) {
std::list<std::map<readerid_t, Audio::Samples>> audioIn;
size_t nbSamples = audioPipeDef->getBlockSize();
......@@ -488,9 +489,10 @@ Input::ReadStatus ReaderController::loadAudio(std::vector<Audio::audioBlockGroup
Audio::AudioBlock blk;
// First dimension is the block, second dimension the input (e.g. audioIn[1][0] => second block of the first input)
for (size_t i = 0; i < audioIn.size(); ++i) { // for each block
int64_t audioInIdx = 0;
for (auto& samplesByReader : audioIn) { // for each block
Audio::audioBlockReaderMap_t audioBlockPerReader;
for (auto& readerData : audioIn[i]) { // for each reader
for (auto& readerData : samplesByReader) { // for each reader
readerData.second.setTimestamp(readerData.second.getTimestamp() + audioTimestampOffsets.at(gr));
// find the audio reader corresponding to this block
for (size_t j = 0; j < audioAsyncReaders.at(gr).size(); ++j) {
......@@ -502,17 +504,19 @@ Input::ReadStatus ReaderController::loadAudio(std::vector<Audio::audioBlockGroup
audioBlockPerReader[readerData.first] = std::move(blk);
}
if (i < audioBlocks.size()) {
audioBlocks.at(i)[gr] = std::move(audioBlockPerReader);
if (audioBlocks.find(audioInIdx) != audioBlocks.end()) {
audioBlocks[audioInIdx][gr] = std::move(audioBlockPerReader);
} else {
Audio::audioBlockGroupMap_t audioBlockPerGroup;
audioBlockPerGroup[gr] = std::move(audioBlockPerReader);
audioBlocks.push_back(std::move(audioBlockPerGroup));
audioBlocks[audioInIdx] = std::move(audioBlockPerGroup);
}
audioInIdx++;
}
Logger::verbose(CTRLtag) << "read group " << gr << " " << audioIn.size() << " audio blocks starting at timestamp "
<< audioIn[0].begin()->second.getTimestamp() << std::endl;
<< audioIn.front().begin()->second.getTimestamp() << std::endl;
return Input::ReadStatus::OK();
}
......
......@@ -14,6 +14,7 @@
#include "libvideostitch/inputDef.hpp"
#include "libvideostitch/panoDef.hpp"
#include <list>
#include <mutex>
namespace VideoStitch {
......@@ -54,7 +55,7 @@ class ReaderController {
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> load(
mtime_t&, std::map<readerid_t, Input::PotentialFrame>& frames,
std::vector<Audio::audioBlockGroupMap_t>& audioBlocks, Input::MetadataChunk& imu_metadata);
Audio::audioBlocks_t& audioBlocks, Input::MetadataChunk& imu_metadata);
mtime_t reload(std::map<readerid_t, Input::PotentialFrame>& frames);
void releaseBuffer(std::map<readerid_t, Input::PotentialFrame>& frames);
......@@ -147,7 +148,7 @@ class ReaderController {
private:
Input::ReadStatus loadVideo(mtime_t& date, std::map<readerid_t, Input::PotentialFrame>& frames);
Input::ReadStatus loadAudio(std::vector<Audio::audioBlockGroupMap_t>& audioIn, groupid_t gr);
Input::ReadStatus loadAudio(Audio::audioBlocks_t& audioIn, groupid_t gr);
Input::ReadStatus loadMetadata(Input::MetadataChunk& Measure);
/**
......
......@@ -59,7 +59,7 @@ ControllerStatus DepthControllerImpl::estimateDepth(std::vector<ExtractOutput*>
// load the acquisition data
std::map<readerid_t, Input::PotentialFrame> inputBuffers;
mtime_t date;
std::vector<Audio::audioBlockGroupMap_t> audioBlocks;
Audio::audioBlocks_t audioBlocks;
Input::MetadataChunk metadata;
std::tie(statusVideo, statusAudio, statusMetadata) =
......
......@@ -26,7 +26,6 @@ file(MAKE_DIRECTORY ${VS_TEST_DATA_DIR})
if (WINDOWS)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4100 /wd4244 /wd4245 /wd4267 /wd4305 /wd4309 /wd4324")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LTCG")
STRING(REPLACE "INCREMENTAL" "INCREMENTAL:NO" CMAKE_EXE_LINKER_FLAGS_DEBUG ${CMAKE_EXE_LINKER_FLAGS_DEBUG})
endif(WINDOWS)
......
......@@ -113,7 +113,7 @@ void testAsyncLoading() {
ENSURE(preloadedFrames >= numReaders, "Controller init should start pre-loading at least one frame per reader");
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
Input::MetadataChunk metadata;
mtime_t date;
......
......@@ -117,7 +117,7 @@ void testLoadedDate() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
readerController->load(date, frames, audio, metadata);
......@@ -125,7 +125,7 @@ void testLoadedDate() {
ENSURE_EQ(date, (mtime_t)5 * 1000 * 1000, "ReaderController should take timing information from audio reader");
ENSURE_EQ(audio.empty(), false, "audio should not be empty");
for (auto &audioGr : audio) {
for (auto &blockmap : audioGr) {
for (auto &blockmap : audioGr.second) {
ENSURE_EQ((int)blockmap.second.size(), 2, "Should return a block with two inputs");
ENSURE_EQ((int)blockmap.second.begin()->first, 3, "Check first input id audio");
ENSURE_EQ((int)blockmap.second.rbegin()->first, 4, "Check second input id audio");
......@@ -198,7 +198,7 @@ void testLoadedDateWithAudioReader() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
readerController->load(date, frames, audio, metadata);
......@@ -240,7 +240,7 @@ void testSeekWithImage() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
readerController->load(date, frames, audio, metadata);
......@@ -294,7 +294,7 @@ void testEOSAudio() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> status =
......@@ -326,7 +326,7 @@ void testTryAgainAudio() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> status =
......@@ -357,7 +357,7 @@ void testAudioVideoResync() {
std::map<readerid_t, Input::PotentialFrame> frames;
Input::MetadataChunk metadata;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
std::tuple<Input::ReadStatus, Input::ReadStatus, Input::ReadStatus> status =
......@@ -370,7 +370,7 @@ void testAudioVideoResync() {
auto sr = Audio::getDefaultSamplingRate();
mtime_t blockDuration = (mtime_t)std::round((blockSize * 1000000. / sr));
for (auto &grMap : audio) {
for (auto &readerMap : grMap) {
for (auto &readerMap : grMap.second) {
for (auto &kv : readerMap.second) {
mtime_t tmp = (blockDuration * iBlk);
ENSURE_EQ((mtime_t)(date + tmp), kv.second.getTimestamp(), "test audio video synchro");
......@@ -421,7 +421,7 @@ void testInputGroups(int fps, ReaderClockResolution clockResolution) {
}
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
Input::MetadataChunk metadata;
......@@ -536,7 +536,7 @@ void testCurrentFrame() {
ENSURE(readerController.status());
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t date;
Input::MetadataChunk metadata;
......@@ -660,7 +660,7 @@ void testAudioVideoSynchro() {
auto readerController = Core::ReaderController::create(*panoDef, *audioPipe, readerFactory);
ENSURE(readerController.status());
std::map<readerid_t, Input::PotentialFrame> frames;
std::vector<Audio::audioBlockGroupMap_t> audio;
Audio::audioBlocks_t audio;
mtime_t videoDate;
Input::MetadataChunk metadata;
......@@ -675,15 +675,16 @@ void testAudioVideoSynchro() {
1.5);
ENSURE_EQ(nbAudioBlocksExpected, audio.size(), "Check number of audio blocks at the first load");
// Check that the first audio frame of the audio video group are well synchronized
ENSURE_EQ(videoDate, audio[0].at(audioVideoGrId).at(0).getTimestamp(),
ENSURE_EQ(videoDate, audio.at(0).at(audioVideoGrId).at(0).getTimestamp(),
"Check audio video synchronization of the audio video group");
ENSURE_EQ(videoDate, audio[0].at(audioVideoGrId).at(1).getTimestamp(),
ENSURE_EQ(videoDate, audio.at(0).at(audioVideoGrId).at(1).getTimestamp(),
"Check audio video synchronization of the audio video group");
ENSURE_EQ(videoDate, audio[0].at(audioOnlyGrId).at(2).getTimestamp(),
ENSURE_EQ(videoDate, audio.at(0).at(audioOnlyGrId).at(2).getTimestamp(),
"Check audio video synchronization of the audio video group");
}
for (const Audio::audioBlockGroupMap_t &audioPerGroup : audio) {
for (const auto& pair : audio) {
const Audio::audioBlockGroupMap_t &audioPerGroup = pair.second;
ENSURE_EQ((size_t)2, audioPerGroup.size(), "Check number of groups loaded");
mtime_t timestampAudioVideo = -1;
mtime_t timestampAudioOnly = -1;
......
......@@ -59,7 +59,7 @@ ControllerStatus UndistortControllerImpl::undistort(std::vector<ExtractOutput*>
// load the acquisition data
std::map<readerid_t, Input::PotentialFrame> inputBuffers;
mtime_t date;
std::vector<Audio::audioBlockGroupMap_t> audioBlocks;
Audio::audioBlocks_t audioBlocks;
Input::MetadataChunk metadata;
std::tie(statusVideo, statusAudio, statusMetadata) =
......
......@@ -3,8 +3,5 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(HID hid)
find_debug_and_optimized_library(CERES_LIBS "ceres" "ceres-debug" "ceres" "ceres")
find_library(GLOG NAMES "libglog" PATHS "${CMAKE_EXTERNAL_LIB}/glog")
set(EIGEN3_INCLUDE_DIRS ${CMAKE_EXTERNAL_DEPS}/lib/eigen)
find_library(CERES_LIBS "ceres")
find_library(GLOG NAMES "glog")
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment