Merge branch 'develop' into debug-to-stderr

This commit is contained in:
Frank Dana
2020-03-23 08:18:19 -04:00
committed by GitHub
104 changed files with 1803 additions and 1905 deletions

22
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 10
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
- enhancement
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as **stale** because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Only close issues
only: issues
# Don't close issues which are assigned to somebody
exemptAssignees: true

View File

@@ -16,15 +16,13 @@ linux-builder:
- unzip artifacts.zip
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
- mkdir -p build; cd build;
- mkdir -p install-x64/python;
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -D"CMAKE_BUILD_TYPE:STRING=Release" -D"USE_SYSTEM_JSONCPP=0" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -D"PYTHON_MODULE_PATH=python" -D"RUBY_MODULE_PATH=ruby" -DCMAKE_BUILD_TYPE:STRING=Release -DUSE_SYSTEM_JSONCPP=0 ../
- make
- make install
- make doc
- ~/auto-update-docs "$CI_PROJECT_DIR/build" "$CI_COMMIT_REF_NAME"
- mv install-x64/lib/python3.4/site-packages/*openshot* install-x64/python
- echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME"
- git log $(git describe --tags --abbrev=0)..HEAD --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
- git log $(git describe --tags --abbrev=0 @^)..@ --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
when: always
except:
- tags
@@ -45,13 +43,11 @@ mac-builder:
- unzip artifacts.zip
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
- mkdir -p build; cd build;
- mkdir -p install-x64/python;
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/qt5/5.5/clang_64 -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/qt5/5.5/clang_64 -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPYTHON_MODULE_PATH=python -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
- make
- make install
- mv install-x64/lib/python3.6/site-packages/*openshot* install-x64/python
- echo -e "CI_PROJECT_NAME:$CI_PROJECT_NAME\nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME\nCI_COMMIT_SHA:$CI_COMMIT_SHA\nCI_JOB_ID:$CI_JOB_ID" > "install-x64/share/$CI_PROJECT_NAME"
- git log $(git describe --tags --abbrev=0)..HEAD --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
- git log $(git describe --tags --abbrev=0 @^)..@ --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
when: always
except:
- tags
@@ -73,14 +69,13 @@ windows-builder-x64:
- $env:RESVGDIR = "C:\msys64\usr"
- $env:Path = "C:\msys64\mingw64\bin;C:\msys64\mingw64\lib;C:\msys64\usr\lib\cmake\UnitTest++;C:\msys64\home\jonathan\depot_tools;C:\msys64\usr;C:\msys64\usr\lib;" + $env:Path;
- New-Item -ItemType Directory -Force -Path build
- New-Item -ItemType Directory -Force -Path build\install-x64\python
- cd build
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x64" -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -D"CMAKE_BUILD_TYPE:STRING=Release" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x64" -D"PYTHON_MODULE_PATH=python" -D"RUBY_MODULE_PATH=ruby" -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -D"CMAKE_BUILD_TYPE:STRING=Release" ../
- mingw32-make install
- Move-Item -Force -path "install-x64\lib\python3.7\site-packages\*openshot*" -destination "install-x64\python\"
- New-Item -path "install-x64/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0)
- git log "$PREV_GIT_LABEL..HEAD" --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0 '@^')
- git log "$PREV_GIT_LABEL..@" --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x64/share/$CI_PROJECT_NAME.log"
when: always
except:
- tags
@@ -102,14 +97,12 @@ windows-builder-x86:
- $env:RESVGDIR = "C:\msys32\usr"
- $env:Path = "C:\msys32\mingw32\bin;C:\msys32\mingw32\lib;C:\msys32\usr\lib\cmake\UnitTest++;C:\msys32\home\jonathan\depot_tools;C:\msys32\usr;C:\msys32\usr\lib;" + $env:Path;
- New-Item -ItemType Directory -Force -Path build
- New-Item -ItemType Directory -Force -Path build\install-x86\python
- cd build
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x86" -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_CXX_FLAGS=-m32" -D"CMAKE_EXE_LINKER_FLAGS=-Wl,--large-address-aware" -D"CMAKE_C_FLAGS=-m32" ../
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR\build\install-x86" -D"PYTHON_MODULE_PATH=python" -D"RUBY_MODULE_PATH=ruby" -G "MSYS Makefiles" -DCMAKE_MAKE_PROGRAM=mingw32-make -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_CXX_FLAGS=-m32" -D"CMAKE_EXE_LINKER_FLAGS=-Wl,--large-address-aware" -D"CMAKE_C_FLAGS=-m32" ../
- mingw32-make install
- Move-Item -Force -path "install-x86\lib\python3.7\site-packages\*openshot*" -destination "install-x86\python\"
- New-Item -path "install-x86/share/" -Name "$CI_PROJECT_NAME" -Value "CI_PROJECT_NAME:$CI_PROJECT_NAME`nCI_COMMIT_REF_NAME:$CI_COMMIT_REF_NAME`nCI_COMMIT_SHA:$CI_COMMIT_SHA`nCI_JOB_ID:$CI_JOB_ID" -ItemType file -force
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0)
- git log "$PREV_GIT_LABEL..HEAD" --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x86/share/$CI_PROJECT_NAME.log"
- $PREV_GIT_LABEL=(git describe --tags --abbrev=0 '@^')
- git log "$PREV_GIT_LABEL..@" --oneline --pretty=format:"%C(auto,yellow)%h%C(auto,magenta)% %C(auto,blue)%>(12,trunc)%ad %C(auto,green)%<(25,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D" --date=short > "install-x86/share/$CI_PROJECT_NAME.log"
when: always
except:
- tags

View File

@@ -35,9 +35,9 @@ addons:
matrix:
include:
- name: "Coverage (Ubuntu 18.04 Bionic)"
- name: "Coverage + FFmpeg 3.4 GCC (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=coverage_ffmpeg3
- BUILD_VERSION=coverage_ffmpeg34
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
- TEST_TARGET=coverage
os: linux
@@ -50,6 +50,7 @@ matrix:
packages:
- *ff_common
- qt5-default
- libjsoncpp-dev
- lcov
- binutils-common # For c++filt
@@ -80,26 +81,9 @@ matrix:
- libavresample4
- libswresample3
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
- name: "FFmpeg 3.4 Clang (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=ffmpeg3
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
dist: bionic
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
packages:
- *ff_common
- qt5-default
- libjsoncpp-dev
- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=clang_ffmpeg3
- BUILD_VERSION=clang_ffmpeg34
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
@@ -115,6 +99,31 @@ matrix:
- qt5-default
- libomp-dev
- name: "FFmpeg 3.2 GCC (Ubuntu 16.04 Xenial)"
env:
- BUILD_VERSION=ffmpeg32
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET="os_test"
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
- sourceline: 'ppa:jon-hedgerows/ffmpeg-backports'
packages:
- *ff_common
- libavcodec57
- libavdevice57
- libavfilter6
- libavformat57
- libavresample3
- libavutil55
- libpostproc54
- libswresample2
- libswscale4
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
env:
- BUILD_VERSION=ffmpeg2
@@ -132,10 +141,10 @@ matrix:
script:
- mkdir -p build; cd build;
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ${CMAKE_EXTRA_ARGS} ../
- cmake -DCMAKE_INSTALL_PREFIX:PATH="$TRAVIS_OS_NAME-x64" -DCMAKE_BUILD_TYPE:STRING="Debug" ${CMAKE_EXTRA_ARGS} ../
- make VERBOSE=1
- make ${TEST_TARGET}
- make install DESTDIR="$BUILD_VERSION"
- make install
- cd ..
after_success:

View File

@@ -40,8 +40,8 @@ For more information, please visit <http://www.openshot.org/>.
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
################ PROJECT VERSION ####################
set(PROJECT_VERSION_FULL "0.2.4-dev1")
set(PROJECT_SO_VERSION 18)
set(PROJECT_VERSION_FULL "0.2.5-dev2")
set(PROJECT_SO_VERSION 19)
# Remove the dash and anything following, to get the #.#.# version for project()
STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}")
@@ -73,9 +73,23 @@ include(FeatureSummary)
# Optional build settings for libopenshot
option(USE_SYSTEM_JSONCPP "Use system installed JsonCpp, if found" ON)
option(DISABLE_BUNDLED_JSONCPP "Don't fall back to bundled JsonCpp" OFF)
option(DISABLE_TESTS "Don't build unit tests" OFF)
option(ENABLE_IWYU "Enable 'Include What You Use' scanner (CMake 3.3+)" OFF)
option(ENABLE_COVERAGE "Enable coverage reporting" OFF)
option(ENABLE_TESTS "Build unit tests (requires UnitTest++)" ON)
option(ENABLE_DOCS "Build API documentation (requires Doxygen)" ON)
# Legacy commandline override
if (DISABLE_TESTS)
if(ENABLE_COVERAGE)
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
set(ENABLE_TESTS ON)
else()
set(ENABLE_TESTS OFF)
endif()
endif()
if(DEFINED ENABLE_TESTS)
set(ENABLE_TESTS ${ENABLE_TESTS} CACHE BOOL "Build unit tests (requires UnitTest++)" FORCE)
endif()
########## Configure Version.h header ##############
configure_file(include/OpenShotVersion.h.in include/OpenShotVersion.h @ONLY)
@@ -83,6 +97,13 @@ configure_file(include/OpenShotVersion.h.in include/OpenShotVersion.h @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/OpenShotVersion.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot)
#### Work around a GCC < 9 bug with handling of _Pragma() in macros
#### See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55578
if ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "9.0.0"))
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -no-integrated-cpp")
endif()
#### Enable C++11 (for std::shared_ptr support)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -92,10 +113,6 @@ IF (WIN32)
SET_PROPERTY(GLOBAL PROPERTY WIN32 "WIN32")
ENDIF(WIN32)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}/include)
############## Code Coverage #########################
if (DISABLE_TESTS AND ENABLE_COVERAGE)
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
@@ -108,7 +125,7 @@ if (ENABLE_COVERAGE)
message(STATUS "Coverage enabled, setting build type to Debug")
endif()
include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()
append_coverage_compiler_flags()
endif()
add_feature_info("Coverage" ENABLE_COVERAGE "analyze test coverage and generate report")
@@ -117,27 +134,33 @@ add_subdirectory(src)
################### DOCUMENTATION ###################
# Find Doxygen (used for documentation)
include(cmake/Modules/UseDoxygen.cmake)
set(DOCS_ENABLED FALSE) # Only set true if Doxygen is found and configured
if (ENABLE_DOCS)
include(cmake/Modules/UseDoxygen.cmake)
# Doxygen was found
if (TARGET doc)
message(STATUS "Doxygen found, documentation target enabled")
message("\nTo compile documentation in doc/html, run: 'make doc'")
# Doxygen was found
if (TARGET doc)
message(STATUS "Doxygen found, documentation target enabled")
set(DOCS_ENABLED TRUE)
# Install docs, if the user builds them with `make doc`
install(CODE "MESSAGE(\"Checking for documentation files to install...\")")
install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")")
# Install docs, if the user builds them with `make doc`
install(CODE "MESSAGE(\"Checking for documentation files to install...\")")
install(CODE "MESSAGE(\"(Compile with 'make doc' command, requires Doxygen)\")")
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
DESTINATION ${CMAKE_INSTALL_DOCDIR}/API
MESSAGE_NEVER # Don't spew about file copies
OPTIONAL ) # No error if the docs aren't found
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc/html/
DESTINATION ${CMAKE_INSTALL_DOCDIR}/API
MESSAGE_NEVER # Don't spew about file copies
OPTIONAL ) # No error if the docs aren't found
endif()
endif()
add_feature_info("Documentation" DOCS_ENABLED "Build API documentation with 'make doc'")
############# PROCESS tests/ DIRECTORY ##############
if(NOT DISABLE_TESTS)
if(ENABLE_TESTS)
set(TESTS_ENABLED TRUE) # May be overridden by tests/CMakeLists.txt
add_subdirectory(tests)
endif()
add_feature_info("Unit tests" TESTS_ENABLED "Compile unit tests for library functions")
############## COVERAGE REPORTING #################
if (ENABLE_COVERAGE)

View File

@@ -59,6 +59,13 @@
# 2019-12-19, FeRD (Frank Dana)
# - Rename Lcov outputs, make filtered file canonical, fix cleanup for targets
#
# 2020-01-19, Bob Apthorpe
# - Added gfortran support
#
# 2020-02-17, FeRD (Frank Dana)
# - Make all add_custom_target()s VERBATIM to auto-escape wildcard characters
# in EXCLUDEs, and remove manual escaping from gcovr targets
#
# USAGE:
#
# 1. Copy this file into your cmake modules path.
@@ -122,12 +129,22 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang")
message(FATAL_ERROR "Clang version must be 3.0.0 or greater! Aborting...")
endif()
elseif(NOT CMAKE_COMPILER_IS_GNUCXX)
message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
if("${CMAKE_Fortran_COMPILER_ID}" MATCHES "[Ff]lang")
# Do nothing; exit conditional without error if true
elseif("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
# Do nothing; exit conditional without error if true
else()
message(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
endif()
endif()
set(COVERAGE_COMPILER_FLAGS "-g -fprofile-arcs -ftest-coverage"
CACHE INTERNAL "")
set(CMAKE_Fortran_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the Fortran compiler during coverage builds."
FORCE )
set(CMAKE_CXX_FLAGS_COVERAGE
${COVERAGE_COMPILER_FLAGS}
CACHE STRING "Flags used by the C++ compiler during coverage builds."
@@ -145,6 +162,7 @@ set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
mark_as_advanced(
CMAKE_Fortran_FLAGS_COVERAGE
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
@@ -154,7 +172,7 @@ if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
message(WARNING "Code coverage results with an optimised (non-Debug) build may be misleading")
endif() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
link_libraries(gcov)
endif()
@@ -242,6 +260,7 @@ function(setup_target_for_coverage_lcov)
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
)
@@ -304,9 +323,8 @@ function(setup_target_for_coverage_gcovr_xml)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
string(REPLACE "*" "\\*" EXCLUDE_REPLACED ${EXCLUDE})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE_REPLACED}")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
add_custom_target(${Coverage_NAME}
@@ -321,6 +339,7 @@ function(setup_target_for_coverage_gcovr_xml)
BYPRODUCTS ${Coverage_NAME}.xml
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
@@ -376,9 +395,8 @@ function(setup_target_for_coverage_gcovr_html)
# Combine excludes to several -e arguments
set(GCOVR_EXCLUDE_ARGS "")
foreach(EXCLUDE ${GCOVR_EXCLUDES})
string(REPLACE "*" "\\*" EXCLUDE_REPLACED ${EXCLUDE})
list(APPEND GCOVR_EXCLUDE_ARGS "-e")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE_REPLACED}")
list(APPEND GCOVR_EXCLUDE_ARGS "${EXCLUDE}")
endforeach()
add_custom_target(${Coverage_NAME}
@@ -393,9 +411,11 @@ function(setup_target_for_coverage_gcovr_html)
-r ${BASEDIR} ${GCOVR_EXCLUDE_ARGS}
--object-directory=${PROJECT_BINARY_DIR}
-o ${Coverage_NAME}/index.html
BYPRODUCTS ${PROJECT_BINARY_DIR}/${Coverage_NAME} # report directory
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
DEPENDS ${Coverage_DEPENDENCIES}
VERBATIM # Protect arguments to commands
COMMENT "Running gcovr to produce HTML code coverage report."
)
@@ -410,5 +430,6 @@ endfunction() # setup_target_for_coverage_gcovr_html
function(append_coverage_compiler_flags)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} ${COVERAGE_COMPILER_FLAGS}" PARENT_SCOPE)
message(STATUS "Appending code coverage compiler flags: ${COVERAGE_COMPILER_FLAGS}")
endfunction() # append_coverage_compiler_flags

View File

@@ -1,43 +1,59 @@
# Locate UNITTEST
# Locate UnitTest++
# This module defines
# UNITTEST++_LIBRARY
# UNITTEST++_FOUND, if false, do not try to link to gdal
# UNITTEST++_INCLUDE_DIR, where to find the headers
# UnitTest++_FOUND, if successful
# UnitTest++_LIBRARIES, the library path
# UnitTest++_INCLUDE_DIRS, where to find the headers
FIND_PATH(UNITTEST++_INCLUDE_DIR UnitTest++.h
${UNITTEST_DIR}/include/unittest++
$ENV{UNITTEST_DIR}/include/unittest++
$ENV{UNITTEST_DIR}/src
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_UnitTest QUIET UnitTest++)
set(UnitTest++_VERSION ${PC_UnitTest_VERSION})
endif()
FIND_PATH(UnitTest++_INCLUDE_DIRS UnitTest++.h
DOC
"Location of UnitTest++ header files"
PATH_SUFFIXES
unittest++
UnitTest++ # Fedora, Arch
unittest-cpp # openSUSE
HINTS
${PC_UnitTest++_INCLUDEDIR}
${PC_UnitTest++_INCLUDE_DIRS}
PATHS
${UnitTest++_ROOT}
${UNITTEST_DIR}
$ENV{UNITTEST_DIR}/src
$ENV{UNITTEST_DIR}
~/Library/Frameworks
/Library/Frameworks
/usr/local/include
/usr/include
/usr/include/unittest++
/usr/include/UnitTest++ # Fedora
/usr/include/unittest-cpp # openSUSE
/usr/local/include/UnitTest++/ # Arch
/sw/include # Fink
/opt/local/include # DarwinPorts
/opt/local/include/UnitTest++
/opt/csw/include # Blastwave
/opt/include
/usr/local
/sw # Fink
/opt
/opt/local # DarwinPorts
/opt/csw # Blastwave
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment]/include
/usr/freeware/include
/usr/freeware
)
FIND_LIBRARY(UNITTEST++_LIBRARY
NAMES unittest++ UnitTest++
PATHS
${UNITTEST_DIR}/lib
$ENV{UNITTEST_DIR}/lib
$ENV{UNITTEST_DIR}/build
FIND_LIBRARY(UnitTest++_LIBRARIES
NAMES unittest++ UnitTest++
DOC
"Location of UnitTest++ shared library"
HINTS
${PC_UnitTest++_LIBDIR}
${PC_UnitTest++_LIBRARY_DIRS}
PATHS
${UnitTest++_ROOT}
${UnitTest++_ROOT}/lib
${UNITTEST_DIR}
$ENV{UNITTEST_DIR}
$ENV{UNITTEST_DIR}/lib
$ENV{UNITTEST_DIR}/build
~/Library/Frameworks
/Library/Frameworks
/usr/local/lib
/usr/lib
/usr/lib64/ # Fedora
/sw/lib
/opt/local/lib
/opt/csw/lib
@@ -46,13 +62,24 @@ FIND_LIBRARY(UNITTEST++_LIBRARY
/usr/freeware/lib64
)
SET(UNITTEST++_FOUND "NO")
IF(UNITTEST++_LIBRARY AND UNITTEST++_INCLUDE_DIR)
SET(UNITTEST++_FOUND "YES")
ENDIF(UNITTEST++_LIBRARY AND UNITTEST++_INCLUDE_DIR)
if(UnitTest++_LIBRARIES AND UnitTest++_INCLUDE_DIRS)
set(UnitTest++_FOUND TRUE)
endif()
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set UNITTEST++_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(UNITTEST++ DEFAULT_MSG
UNITTEST++_LIBRARY UNITTEST++_INCLUDE_DIR)
find_package_handle_standard_args(UnitTest++
REQUIRED_VARS
UnitTest++_LIBRARIES
UnitTest++_INCLUDE_DIRS
VERSION_VAR
UnitTest++_VERSION
)
# Excessive backwards-compatibility paranoia
set(UnitTest++_LIBRARY "${UnitTest++_LIBRARIES}" PARENT_SCOPE)
set(UnitTest++_INCLUDE_DIR "${UnitTest++_INCLUDE_DIRS}" PARENT_SCOPE)
# Even more excessive backwards-compatibility paranoia
set(UNITTEST++_FOUND "${UnitTest++_FOUND}" PARENT_SCOPE)
set(UNITTEST++_LIBRARY "${UnitTest++_LIBRARIES}" PARENT_SCOPE)
set(UNITTEST++_INCLUDE_DIR "${UnitTest++_INCLUDE_DIRS}" PARENT_SCOPE)

View File

@@ -9,7 +9,8 @@ coverage:
ignore:
- "/src/examples"
- "/src/Qt/demo"
- "/thirdparty"
- "/thirdparty/jsoncpp/*.cpp"
- "/thirdparty/jsoncpp/json/*.h"
- "/doc"
- "/cmake"
- "/*.md"

View File

@@ -26,7 +26,7 @@ The following table summarizes our current level of support:
## Supported FFmpeg Versions
* HW accel is supported from FFmpeg version 3.2 (3.3 for nVidia drivers)
* HW accel is supported from FFmpeg version 3.4
* HW accel was removed for nVidia drivers in Ubuntu for FFmpeg 4+
**Notice:** The FFmpeg versions of Ubuntu and PPAs for Ubuntu show the

View File

@@ -110,9 +110,9 @@ namespace openshot {
/// Get and Set JSON methods
virtual std::string Json() = 0; ///< Generate JSON string of this object
virtual void SetJson(std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object
virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() = 0; ///< Generate Json::Value for this object
virtual void SetJsonValue(const Json::Value root) = 0; ///< Load Json::Value into this object
virtual ~CacheBase() = default;
};

View File

@@ -129,9 +129,9 @@ namespace openshot {
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::Value for this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
};
}

View File

@@ -111,9 +111,9 @@ namespace openshot {
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::Value for this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
};
}

View File

@@ -157,10 +157,10 @@ namespace openshot
std::string Name() { return "ChunkReader"; };
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
/// Open the reader. This is required before you can access frames or data from the reader.
void Open();

View File

@@ -187,18 +187,18 @@ namespace openshot {
openshot::ReaderBase* Reader();
/// Override End() method
float End(); ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve.
float End() const; ///< Get end position (in seconds) of clip (trim end of video), which can be affected by the time curve.
void End(float value) { end = value; } ///< Set end position (in seconds) of clip (trim end of video)
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
/// Get all properties for a specific frame (perfect for a UI to display the current state
/// of all properties at any time)
std::string PropertiesJSON(int64_t requested_frame);
std::string PropertiesJSON(int64_t requested_frame) const override;
/// @brief Remove an effect from the clip
/// @param effect Remove an effect from the clip.

View File

@@ -56,10 +56,10 @@ namespace openshot {
std::string previous_properties; ///< This string contains the previous JSON properties
/// Generate JSON for a property
Json::Value add_property_json(std::string name, float value, std::string type, std::string memo, Keyframe* keyframe, float min_value, float max_value, bool readonly, int64_t requested_frame);
Json::Value add_property_json(std::string name, float value, std::string type, std::string memo, const Keyframe* keyframe, float min_value, float max_value, bool readonly, int64_t requested_frame) const;
/// Generate JSON choice for a property (dropdown properties)
Json::Value add_property_choice_json(std::string name, int value, int selected_value);
Json::Value add_property_choice_json(std::string name, int value, int selected_value) const;
public:
@@ -73,12 +73,12 @@ namespace openshot {
bool operator>= ( ClipBase& a) { return (Position() >= a.Position()); }
/// Get basic properties
std::string Id() { return id; } ///< Get the Id of this clip object
float Position() { return position; } ///< Get position on timeline (in seconds)
int Layer() { return layer; } ///< Get layer of clip on timeline (lower number is covered by higher numbers)
float Start() { return start; } ///< Get start position (in seconds) of clip (trim start of video)
float End() { return end; } ///< Get end position (in seconds) of clip (trim end of video)
float Duration() { return end - start; } ///< Get the length of this clip (in seconds)
std::string Id() const { return id; } ///< Get the Id of this clip object
float Position() const { return position; } ///< Get position on timeline (in seconds)
int Layer() const { return layer; } ///< Get layer of clip on timeline (lower number is covered by higher numbers)
float Start() const { return start; } ///< Get start position (in seconds) of clip (trim start of video)
float End() const { return end; } ///< Get end position (in seconds) of clip (trim end of video)
float Duration() const { return end - start; } ///< Get the length of this clip (in seconds)
/// Set basic properties
void Id(std::string value) { id = value; } ///> Set the Id of this clip object
@@ -88,14 +88,14 @@ namespace openshot {
void End(float value) { end = value; } ///< Set end position (in seconds) of clip (trim end of video)
/// Get and Set JSON methods
virtual std::string Json() = 0; ///< Generate JSON string of this object
virtual void SetJson(std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object
virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object
virtual std::string Json() const = 0; ///< Generate JSON string of this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() const = 0; ///< Generate Json::Value for this object
virtual void SetJsonValue(const Json::Value root) = 0; ///< Load Json::Value into this object
/// Get all properties for a specific frame (perfect for a UI to display the current state
/// of all properties at any time)
virtual std::string PropertiesJSON(int64_t requested_frame) = 0;
virtual std::string PropertiesJSON(int64_t requested_frame) const = 0;
virtual ~ClipBase() = default;
};

View File

@@ -69,10 +69,10 @@ namespace openshot {
static long GetDistance(long R1, long G1, long B1, long R2, long G2, long B2);
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJson(std::string value); ///< Load JSON string into this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
};

View File

@@ -66,10 +66,10 @@ namespace openshot {
Coordinate(double x, double y);
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJson(std::string value); ///< Load JSON string into this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
std::string Json() const; ///< Generate JSON string of this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJson(const std::string value); ///< Load JSON string into this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
};
}

View File

@@ -118,10 +118,10 @@ namespace openshot
std::string Name() { return "DecklinkReader"; };
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue() const; ///< Generate Json::Value for this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
/// Open device and video stream - which is called by the constructor automatically
void Open();

View File

@@ -87,10 +87,10 @@ namespace openshot
std::string Name() { return "DummyReader"; };
/// Get and Set JSON methods
std::string Json(); ///< Generate JSON string of this object
void SetJson(std::string value); ///< Load JSON string into this object
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
std::string Json() const override; ///< Generate JSON string of this object
void SetJson(const std::string value); ///< Load JSON string into this object
Json::Value JsonValue() const override; ///< Generate Json::Value for this object
void SetJsonValue(const Json::Value root); ///< Load Json::Value into this object
/// Open File - which is called by the constructor automatically
void Open();

View File

@@ -94,14 +94,14 @@ namespace openshot
void InitEffectInfo();
/// Get and Set JSON methods
virtual std::string Json() = 0; ///< Generate JSON string of this object
virtual void SetJson(std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() = 0; ///< Generate Json::JsonValue for this object
virtual void SetJsonValue(Json::Value root) = 0; ///< Load Json::JsonValue into this object
Json::Value JsonInfo(); ///< Generate JSON object of meta data / info
virtual std::string Json() const = 0; ///< Generate JSON string of this object
virtual void SetJson(const std::string value) = 0; ///< Load JSON string into this object
virtual Json::Value JsonValue() const = 0; ///< Generate Json::Value for this object
virtual void SetJsonValue(const Json::Value root) = 0; ///< Load Json::Value into this object
Json::Value JsonInfo() const; ///< Generate JSON object of meta data / info
/// Get the order that this effect should be executed.
int Order() { return order; }
int Order() const { return order; }
/// Set the order that this effect should be executed.
void Order(int new_order) { order = new_order; }

View File

@@ -51,7 +51,7 @@ namespace openshot
/// JSON methods
static std::string Json(); ///< Generate JSON string of this object
static Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
static Json::Value JsonValue(); ///< Generate Json::Value for this object
};

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