You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Merge branch 'clip-refactor-keyframes' into opencv
This commit is contained in:
14
.github/stale.yml
vendored
14
.github/stale.yml
vendored
@@ -11,9 +11,17 @@ exemptLabels:
|
||||
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.
|
||||
Thank you so much for submitting an issue to help improve OpenShot Video Editor. We are sorry about this, but this particular issue has gone unnoticed for quite some time. To help keep the OpenShot GitHub Issue Tracker organized and focused, we must ensure that every issue is correctly labelled and triaged, to get the proper attention.
|
||||
|
||||
This issue will be closed, as it meets the following criteria:
|
||||
- No activity in the past 90 days
|
||||
- No one is assigned to this issue
|
||||
|
||||
We'd like to ask you to help us out and determine whether this issue should be reopened.
|
||||
- If this issue is reporting a bug, please can you attempt to reproduce on the [latest daily build](https://www.openshot.org/download/#daily) to help us to understand whether the bug still needs our attention.
|
||||
- If this issue is proposing a new feature, please can you verify whether the feature proposal is still relevant.
|
||||
|
||||
Thanks again for your help!
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
# Only close issues
|
||||
|
||||
@@ -2,6 +2,9 @@ stages:
|
||||
- build-libopenshot
|
||||
- trigger-openshot-qt
|
||||
|
||||
variables:
|
||||
GIT_LOG_FORMAT: "- %h %ad %s [%aN]"
|
||||
|
||||
linux-builder:
|
||||
stage: build-libopenshot
|
||||
artifacts:
|
||||
@@ -22,7 +25,7 @@ linux-builder:
|
||||
- make doc
|
||||
- ~/auto-update-docs "$CI_PROJECT_DIR/build" "$CI_COMMIT_REF_NAME"
|
||||
- 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 @^)..@ --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 --no-abbrev --date=short --no-merges --pretty="tformat:$GIT_LOG_FORMAT" > "install-x64/share/$CI_PROJECT_NAME.log"
|
||||
when: always
|
||||
except:
|
||||
- tags
|
||||
@@ -47,7 +50,7 @@ mac-builder:
|
||||
- make
|
||||
- make install
|
||||
- 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 @^)..@ --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 --no-abbrev --date=short --no-merges --pretty="tformat:$GIT_LOG_FORMAT" > "install-x64/share/$CI_PROJECT_NAME.log"
|
||||
when: always
|
||||
except:
|
||||
- tags
|
||||
@@ -74,7 +77,7 @@ windows-builder-x64:
|
||||
- mingw32-make install
|
||||
- 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..@" --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 "$PREV_GIT_LABEL..@" --oneline --no-abbrev --date=short --no-merges --pretty="tformat:$GIT_LOG_FORMAT" > "install-x64/share/$CI_PROJECT_NAME.log"
|
||||
when: always
|
||||
except:
|
||||
- tags
|
||||
@@ -101,7 +104,7 @@ windows-builder-x86:
|
||||
- mingw32-make install
|
||||
- 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..@" --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"
|
||||
- git log "$PREV_GIT_LABEL..@" --oneline --no-abbrev --date=short --no-merges --pretty="tformat:$GIT_LOG_FORMAT" > "install-x86/share/$CI_PROJECT_NAME.log"
|
||||
when: always
|
||||
except:
|
||||
- tags
|
||||
|
||||
@@ -75,17 +75,14 @@ option(USE_SYSTEM_JSONCPP "Use system installed JsonCpp, if found" ON)
|
||||
option(DISABLE_BUNDLED_JSONCPP "Don't fall back to bundled JsonCpp" OFF)
|
||||
option(ENABLE_IWYU "Enable 'Include What You Use' scanner (CMake 3.3+)" OFF)
|
||||
option(ENABLE_TESTS "Build unit tests (requires UnitTest++)" ON)
|
||||
option(ENABLE_COVERAGE "Scan test coverage using gcov and report" OFF)
|
||||
option(ENABLE_DOCS "Build API documentation (requires Doxygen)" ON)
|
||||
option(APPIMAGE_BUILD "Build to install in an AppImage (Linux only)" OFF)
|
||||
option(ENABLE_MAGICK "Use ImageMagick, if available" 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()
|
||||
set(ENABLE_TESTS OFF)
|
||||
endif()
|
||||
|
||||
if(DEFINED ENABLE_TESTS)
|
||||
@@ -109,9 +106,9 @@ IF (WIN32)
|
||||
ENDIF(WIN32)
|
||||
|
||||
############## Code Coverage #########################
|
||||
if (DISABLE_TESTS AND ENABLE_COVERAGE)
|
||||
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
|
||||
set(DISABLE_TESTS OFF CACHE BOOL "Don't build unit tests" FORCE)
|
||||
if (ENABLE_COVERAGE AND NOT ENABLE_TESTS)
|
||||
message(WARNING "ENABLE_COVERAGE requires unit tests, forcing ENABLE_TESTS")
|
||||
set(ENABLE_TESTS ON CACHE BOOL "Don't build unit tests" FORCE)
|
||||
endif()
|
||||
|
||||
if (ENABLE_COVERAGE)
|
||||
@@ -124,25 +121,29 @@ if (ENABLE_COVERAGE)
|
||||
endif()
|
||||
add_feature_info("Coverage" ENABLE_COVERAGE "analyze test coverage and generate report")
|
||||
|
||||
# Juce requires either DEBUG or NDEBUG to be defined on MacOS.
|
||||
# -DNDEBUG is set by cmake for all release configs, so add
|
||||
# -DDEBUG for debug builds. We'll do this for all OSes, even
|
||||
# though only MacOS requires it.
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
|
||||
# Make sure we've picked some build type, default to debug
|
||||
# Make sure we've picked some build type, default to release
|
||||
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
|
||||
set(CMAKE_BUILD_TYPE "Debug")
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
############## PROCESS src/ DIRECTORIES ##############
|
||||
###
|
||||
### Process subdirectories
|
||||
###
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(examples)
|
||||
add_subdirectory(bindings)
|
||||
|
||||
########## Configure Version.h header ##############
|
||||
configure_file(include/OpenShotVersion.h.in include/OpenShotVersion.h @ONLY)
|
||||
###
|
||||
### Configure Version.h header
|
||||
###
|
||||
# (Note: This comes after the subdirectories, because it needs variables
|
||||
# set during the dependency discovery in src/CMakeLists.txt)
|
||||
configure_file(src/OpenShotVersion.h.in src/OpenShotVersion.h @ONLY)
|
||||
# We'll want that installed later
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/OpenShotVersion.h
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/src/OpenShotVersion.h
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libopenshot)
|
||||
|
||||
|
||||
################### DOCUMENTATION ###################
|
||||
# Find Doxygen (used for documentation)
|
||||
set(DOCS_ENABLED FALSE) # Only set true if Doxygen is found and configured
|
||||
@@ -179,8 +180,10 @@ if (ENABLE_COVERAGE)
|
||||
NAME coverage
|
||||
LCOV_ARGS "--no-external"
|
||||
EXECUTABLE openshot-test
|
||||
DEPENDENCIES openshot-test)
|
||||
message("Generate coverage report with 'make coverage'")
|
||||
DEPENDENCIES openshot-test
|
||||
EXCLUDE "bindings" "examples" "${CMAKE_CURRENT_BINARY_DIR}/bindings"
|
||||
)
|
||||
message("Generate coverage report with 'make coverage'")
|
||||
endif()
|
||||
|
||||
########### PRINT FEATURE SUMMARY ##############
|
||||
|
||||
28
Doxyfile.in
28
Doxyfile.in
@@ -148,7 +148,7 @@ INLINE_INHERITED_MEMB = NO
|
||||
# shortest path that makes the file name unique will be used
|
||||
# The default value is: YES.
|
||||
|
||||
FULL_PATH_NAMES = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
|
||||
# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
|
||||
# Stripping is only done if one of the specified strings matches the left-hand
|
||||
@@ -160,7 +160,7 @@ FULL_PATH_NAMES = NO
|
||||
# will be relative from the directory where doxygen is started.
|
||||
# This tag requires that the tag FULL_PATH_NAMES is set to YES.
|
||||
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_PATH = "@PROJECT_SOURCE_DIR@/src"
|
||||
|
||||
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
|
||||
# path mentioned in the documentation of a class, which tells the reader which
|
||||
@@ -169,7 +169,7 @@ STRIP_FROM_PATH =
|
||||
# specify the list of include paths that are normally passed to the compiler
|
||||
# using the -I flag.
|
||||
|
||||
STRIP_FROM_INC_PATH =
|
||||
STRIP_FROM_INC_PATH = "@PROJECT_SOURCE_DIR@/src"
|
||||
|
||||
# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
|
||||
# less readable) file names. This can be useful is your file systems doesn't
|
||||
@@ -803,9 +803,9 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = "@CMAKE_CURRENT_SOURCE_DIR@/include" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/src" \
|
||||
"@CMAKE_CURRENT_SOURCE_DIR@/doc"
|
||||
INPUT = "@PROJECT_SOURCE_DIR@/src" \
|
||||
"@PROJECT_SOURCE_DIR@/doc" \
|
||||
"@PROJECT_BINARY_DIR@/src/OpenShotVersion.h"
|
||||
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
@@ -862,11 +862,7 @@ EXCLUDE_SYMLINKS = NO
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS = "*/.*" \
|
||||
"*/.*/*" \
|
||||
"*/src/examples/*" \
|
||||
"*/src/bindings/*" \
|
||||
"*.py"
|
||||
EXCLUDE_PATTERNS =
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
@@ -883,27 +879,27 @@ EXCLUDE_SYMBOLS =
|
||||
# that contain example code fragments that are included (see the \include
|
||||
# command).
|
||||
|
||||
EXAMPLE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@/tests"
|
||||
EXAMPLE_PATH = "@PROJECT_SOURCE_DIR@/examples"
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank all
|
||||
# files are included.
|
||||
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_PATTERNS = "*.cpp"
|
||||
|
||||
# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
|
||||
# searched for input files to be used with the \include or \dontinclude commands
|
||||
# irrespective of the value of the RECURSIVE tag.
|
||||
# The default value is: NO.
|
||||
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
EXAMPLE_RECURSIVE = YES
|
||||
|
||||
# The IMAGE_PATH tag can be used to specify one or more files or directories
|
||||
# that contain images that are to be included in the documentation (see the
|
||||
# \image command).
|
||||
|
||||
IMAGE_PATH = "@CMAKE_CURRENT_SOURCE_DIR@"
|
||||
IMAGE_PATH = "@PROJECT_SOURCE_DIR@"
|
||||
|
||||
# The INPUT_FILTER tag can be used to specify a program that doxygen should
|
||||
# invoke to filter for each input file. Doxygen will invoke the filter program
|
||||
@@ -2086,7 +2082,7 @@ INCLUDE_PATH =
|
||||
# used.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
INCLUDE_FILE_PATTERNS = "*.h"
|
||||
|
||||
# The PREDEFINED tag can be used to specify one or more macro names that are
|
||||
# defined before the preprocessor is started (similar to the -D option of e.g.
|
||||
|
||||
217
INSTALL.md
217
INSTALL.md
@@ -2,74 +2,100 @@
|
||||
|
||||
Operating system specific install instructions are located in:
|
||||
|
||||
* [doc/INSTALL-LINUX.md][INSTALL-LINUX]
|
||||
* [doc/INSTALL-MAC.md][INSTALL-MAC]
|
||||
* [doc/INSTALL-WINDOWS.md][INSTALL-WINDOWS]
|
||||
* [doc/INSTALL-LINUX.md][INSTALL-LINUX]
|
||||
* [doc/INSTALL-MAC.md][INSTALL-MAC]
|
||||
* [doc/INSTALL-WINDOWS.md][INSTALL-WINDOWS]
|
||||
|
||||
## Getting Started
|
||||
|
||||
The best way to get started with libopenshot, is to learn about our build system, obtain all the source code,
|
||||
install a development IDE and tools, and better understand our dependencies. So, please read through the
|
||||
following sections, and follow the instructions. And keep in mind, that your computer is likely different
|
||||
than the one used when writing these instructions. Your file paths and versions of applications might be
|
||||
slightly different, so keep an eye out for subtle file path differences in the commands you type.
|
||||
The best way to get started with libopenshot is to learn about our build system,
|
||||
obtain all the source code, install a development IDE and tools,
|
||||
and better understand our dependencies.
|
||||
So, please read through the following sections, and follow the instructions.
|
||||
And keep in mind, your computer is likely different than the one used when writing these instructions.
|
||||
Your file paths and versions of applications will be different,
|
||||
so you should treat the specifics used here as examples and adjust as necessary.
|
||||
Keep an eye out for subtle file path differences in the commands you type.
|
||||
|
||||
## Dependencies
|
||||
|
||||
The following libraries are required to build libopenshot.
|
||||
Instructions on how to install these dependencies vary for each operating system.
|
||||
Libraries and Executables have been labeled in the list below to help distinguish between them.
|
||||
Libraries and executables have been labeled in the list below to help distinguish between them.
|
||||
|
||||
#### FFmpeg (libavformat, libavcodec, libavutil, libavdevice, libavresample, libswscale)
|
||||
* <http://www.ffmpeg.org/> **(Library)**
|
||||
|
||||
* http://www.ffmpeg.org/ **(Library)**
|
||||
* This library is used to decode and encode video, audio, and image files. It is also used to obtain information about media files, such as frame rate, sample rate, aspect ratio, and other common attributes.
|
||||
* This library is used to decode and encode video, audio, and image files.
|
||||
It is also used to obtain information about media files,
|
||||
such as frame rate, sample rate, aspect ratio, and other common attributes.
|
||||
|
||||
#### ImageMagick++ (libMagick++, libMagickWand, libMagickCore)
|
||||
* http://www.imagemagick.org/script/magick++.php **(Library)**
|
||||
* This library is **optional**, and used to decode and encode images.
|
||||
* <http://www.imagemagick.org/script/magick++.php> **(Library)**
|
||||
* This library is **optional**, and used to decode and encode images.
|
||||
|
||||
#### OpenShot Audio Library (libopenshot-audio)
|
||||
* https://github.com/OpenShot/libopenshot-audio/ **(Library)**
|
||||
* This library is used to mix, resample, host plug-ins, and play audio. It is based on the JUCE project, which is an outstanding audio library used by many different applications
|
||||
* <https://github.com/OpenShot/libopenshot-audio/> **(Library)**
|
||||
|
||||
* This library is used to mix, resample, host plug-ins, and play audio.
|
||||
It is based on the JUCE project,
|
||||
an outstanding audio library used by many different applications.
|
||||
|
||||
#### Qt 5 (libqt5)
|
||||
* http://www.qt.io/qt5/ **(Library)**
|
||||
* Qt5 is used to display video, store image data, composite images, apply image effects, and many other utility functions, such as file system manipulation, high resolution timers, etc...
|
||||
* <http://www.qt.io/qt5/> **(Library)**
|
||||
|
||||
* Qt5 is used to display video, store image data, composite images,
|
||||
apply image effects, and many other utility functions,
|
||||
such as file system manipulation, high resolution timers, etc.
|
||||
|
||||
#### ZeroMQ (libzmq)
|
||||
* http://zeromq.org/ **(Library)**
|
||||
* This library is used to communicate between libopenshot and other applications (publisher / subscriber). Primarily used to send debug data from libopenshot.
|
||||
* <http://zeromq.org/> **(Library)**
|
||||
|
||||
* This library is used to communicate between libopenshot and other applications (publisher / subscriber).
|
||||
Primarily used to send debug data from libopenshot.
|
||||
|
||||
#### OpenMP (`-fopenmp`)
|
||||
* http://openmp.org/wp/ **(Compiler Flag)**
|
||||
* If your compiler supports this flag (GCC, Clang, and most other compilers), it provides libopenshot with easy methods of using parallel programming techniques to improve performance and take advantage of multi-core processors.
|
||||
* <http://openmp.org/wp/> **(Compiler Flag)**
|
||||
|
||||
* If your compiler supports this flag (GCC, Clang, and most other compilers),
|
||||
it provides libopenshot with implementations of common parallel programming techniques
|
||||
used to improve performance and take advantage of multi-core processors.
|
||||
|
||||
#### CMake (`cmake`)
|
||||
* http://www.cmake.org/ **(Executable)**
|
||||
* This executable is used to automate the generation of Makefiles, check for dependencies, and is the backbone of libopenshot’s cross-platform build process.
|
||||
* <http://www.cmake.org/> **(Executable)**
|
||||
|
||||
* This executable is used to automate the generation of Makefiles,
|
||||
check for dependencies, and is the backbone of libopenshot’s cross-platform build process.
|
||||
|
||||
#### SWIG (`swig`)
|
||||
* http://www.swig.org/ **(Executable)**
|
||||
* This executable is used to generate the Python and Ruby bindings for libopenshot. It is a simple and powerful wrapper for C++ libraries, and supports many languages.
|
||||
* <http://www.swig.org/> **(Executable)**
|
||||
|
||||
* This executable is used to generate the Python and Ruby bindings for libopenshot.
|
||||
It is a powerful wrapper for C++ libraries, and supports many languages.
|
||||
|
||||
#### Python 3 (libpython)
|
||||
* http://www.python.org/ **(Executable and Library)**
|
||||
* This library is used by swig to create the Python (version 3+) bindings for libopenshot. This is also the official language used by OpenShot Video Editor (a graphical interface to libopenshot).
|
||||
* <http://www.python.org/> **(Executable and Library)**
|
||||
|
||||
* This library is used by swig to create the Python (version 3+) bindings for libopenshot.
|
||||
This is also the official language used by OpenShot Video Editor (a graphical interface to libopenshot).
|
||||
|
||||
#### Doxygen (doxygen)
|
||||
* http://www.stack.nl/~dimitri/doxygen/ **(Executable)**
|
||||
* This executable is used to auto-generate the documentation used by libopenshot.
|
||||
* <http://www.stack.nl/~dimitri/doxygen/> **(Executable)**
|
||||
* This executable is used to auto-generate the documentation used by libopenshot.
|
||||
|
||||
#### UnitTest++ (libunittest++)
|
||||
* https://github.com/unittest-cpp/ **(Library)**
|
||||
* This library is used to execute unit tests for libopenshot. It contains many macros used to keep our unit testing code very clean and simple.
|
||||
* <https://github.com/unittest-cpp/> **(Library)**
|
||||
|
||||
* This library is used to execute unit tests for libopenshot.
|
||||
It contains many macros used to keep our unit testing code clean and easy-to-follow.
|
||||
|
||||
## Obtaining Source Code
|
||||
|
||||
The first step in installing libopenshot is to obtain the most recent source code. The source code is available on [GitHub](https://github.com/OpenShot/libopenshot). Use the following command to obtain the latest libopenshot source code.
|
||||
The first step in installing libopenshot is to obtain the most recent source code.
|
||||
The source code is available on [GitHub](https://github.com/OpenShot/libopenshot).
|
||||
Use the following command to obtain the latest libopenshot source code.
|
||||
|
||||
```
|
||||
```sh
|
||||
git clone https://github.com/OpenShot/libopenshot.git
|
||||
git clone https://github.com/OpenShot/libopenshot-audio.git
|
||||
```
|
||||
@@ -79,27 +105,36 @@ git clone https://github.com/OpenShot/libopenshot-audio.git
|
||||
The source code is divided up into the following folders.
|
||||
|
||||
#### `build/`
|
||||
This folder needs to be manually created, and is used by cmake to store the temporary build files, such as makefiles, as well as the final binaries (library and test executables).
|
||||
This folder needs to be manually created,
|
||||
and is used by cmake to store the build system control files and generated output
|
||||
(such as compiled object files and the result of template-file processing)
|
||||
as well as the final results of the build (library, tool, and test program binaries).
|
||||
|
||||
#### `cmake/`
|
||||
This folder contains custom modules not included by default in cmake.
|
||||
CMake find modules are used to discover dependency libraries on the system, and to incorporate their headers and object files.
|
||||
CMake find modules are used to discover dependency libraries on the system,
|
||||
and to incorporate their headers and object files.
|
||||
CMake code modules are used to implement build features such as test coverage scanning.
|
||||
|
||||
#### `doc/`
|
||||
This folder contains documentation and related files.
|
||||
This includes logos and images required by the doxygen-generated API documentation.
|
||||
|
||||
#### `include/`
|
||||
This folder contains all headers (*.h) used by libopenshot.
|
||||
|
||||
#### `src/`
|
||||
This folder contains all source code (*.cpp) used by libopenshot.
|
||||
This folder contains all source code (`*.cpp`) and headers (`*.h`) for libopenshot.
|
||||
|
||||
#### `bindings/`
|
||||
This folder contains language bindings for the libopenshot API.
|
||||
Current supported languages are Python and Ruby.
|
||||
|
||||
#### `examples/`
|
||||
This folder contains various pieces of example code written in C++, Ruby, or Python.
|
||||
It also holds the media files (data files) used in examples and unit tests.
|
||||
|
||||
#### `tests/`
|
||||
This folder contains all unit test code.
|
||||
Each test file (`<class>_Tests.cpp`) contains the tests for the named class.
|
||||
We use UnitTest++ macros to keep the test code simple and manageable.
|
||||
We use UnitTest++ macros to keep the test code uncomplicated and manageable.
|
||||
|
||||
#### `thirdparty/`
|
||||
This folder contains code not written by the OpenShot team.
|
||||
@@ -113,79 +148,91 @@ locates header files and libraries, and generates a build system in various form
|
||||
We use CMake's Makefile generators to compile libopenshot and libopenshot-audio.
|
||||
|
||||
CMake uses an out-of-source build concept.
|
||||
This means that the build system, all temporary files, and all generated products are kept separate from the source code.
|
||||
This means that the build system,
|
||||
along with all temporary/intermediate files and generated products output during the build,
|
||||
is kept strictly separate from the source code.
|
||||
This includes Makefiles, object files, and even the final binaries.
|
||||
While it is possible to build in-tree, we highly recommend you use a `/build/` sub-folder to compile each library.
|
||||
This prevents the build process from cluttering up the source
|
||||
code.
|
||||
These instructions have only been tested with the GNU compiler suite (including MSYS2/MinGW for Windows), and the Clang compiler (including AppleClang on MacOS).
|
||||
The source code files and directories are never modified by the build system,
|
||||
which makes it convenient and safe to re-run, reconfigure, or discard builds as needed.
|
||||
While it is possible to build in-tree,
|
||||
we highly recommend you use a `/build/` sub-folder to compile each library.
|
||||
|
||||
## CMake Flags (Optional)
|
||||
There are many different build flags that can be passed to cmake to adjust how libopenshot is compiled. Some of these flags might be required when compiling on certain OSes, just depending on how your build environment is setup.
|
||||
These instructions have only been tested with the following compiler stacks:
|
||||
* The GNU compiler suite (including MSYS2/MinGW for Windows)
|
||||
* The Clang compiler (including AppleClang on MacOS)
|
||||
|
||||
Other compilers, including MSVC, are entirely unsupported.
|
||||
It may be possible to build libopenshot using other compiler stacks,
|
||||
but most likely not without modifications to the build system which you would have to make yourself.
|
||||
|
||||
### CMake Flags (Optional)
|
||||
There are many different build flags that can be passed to cmake to adjust how libopenshot is compiled.
|
||||
Some of these flags might be required when compiling on certain OSes,
|
||||
depending on how your build environment is setup.
|
||||
|
||||
To add a build flag, follow this general syntax:
|
||||
|
||||
```sh
|
||||
$ cmake -DMAGICKCORE_HDRI_ENABLE=1 -DENABLE_TESTS=1 ..
|
||||
cmake -B build -S . -DMAGICKCORE_HDRI_ENABLE=1 -DENABLE_TESTS=1 ...
|
||||
```
|
||||
|
||||
Following are some of the flags you might need to set when generating your build system.
|
||||
|
||||
##### Optional behavior:
|
||||
* `-DENABLE_TESTS=0` (default: `ON`)
|
||||
* `-DENABLE_COVERAGE=1` (default: `OFF`)
|
||||
* `-DENABLE_DOCS=0` (default: `ON` if doxygen found)
|
||||
#### Optional behaviors of the build system
|
||||
* `-DENABLE_TESTS=0` (default: `ON`)
|
||||
* `-DENABLE_COVERAGE=1` (default: `OFF`)
|
||||
* `-DENABLE_DOCS=0` (default: `ON` if doxygen found)
|
||||
* `-DENABLE_RUBY=0` (default: `ON` if SWIG and Ruby detected)
|
||||
* `-DENABLE_PYTHON=0` (default: `ON` if SWIG and Python detected)
|
||||
|
||||
##### Compiler configuration:
|
||||
* `-DCMAKE_BUILD_TYPE=Release`, `-DCMAKE_BUILD_TYPE=Debug` (default: `Debug` if unset)
|
||||
* `-DCMAKE_CXX_FLAGS="-Wall -Wextra"` (default: CMake builtin defaults for build type)
|
||||
* `-DCMAKE_CXX_COMPILER=/path/to/g++`, `-DCMAKE_CXX_COMPILER=/path/to/clang++`
|
||||
* `-DCMAKE_C_COMPILER=/path/to/gcc`, `-DCMAKE_CXX_COMPILER=/path/to/clang` (used by CMake for OS probes)
|
||||
#### Options to configure the compiler
|
||||
* `-DCMAKE_BUILD_TYPE=Release`, `-DCMAKE_BUILD_TYPE=Debug` (default: `Release` if unset)
|
||||
* `-DCMAKE_CXX_FLAGS="-Wall -Wextra"` (default: CMake builtin defaults for build type)
|
||||
* `-DCMAKE_CXX_COMPILER=/path/to/g++`, `-DCMAKE_CXX_COMPILER=/path/to/clang++`
|
||||
* `-DCMAKE_C_COMPILER=/path/to/gcc`, `-DCMAKE_CXX_COMPILER=/path/to/clang` (used by CMake for OS probes)
|
||||
|
||||
##### Dependency configuration:
|
||||
* `-DCMAKE_PREFIX_PATH=/extra/path/to/search/for/libraries/`
|
||||
* `-DUSE_SYSTEM_JSONCPP=0` (default: auto if discovered)
|
||||
* `-DImageMagick_FOUND=0` (default: auto if discovered)
|
||||
#### Options to configure dependencies
|
||||
* `-DCMAKE_PREFIX_PATH=/extra/path/to/search/for/libraries/`
|
||||
* `-DUSE_SYSTEM_JSONCPP=0` (default: auto if discovered)
|
||||
* `-DENABLE_MAGICK=0` (default: auto if discovered)
|
||||
|
||||
##### To compile bindings for a specific Python installation:
|
||||
* `-DPYTHON_INCLUDE_DIR=/location/of/python/includes/`
|
||||
* `-DPYTHON_LIBRARY=/location/of/libpython*.so`
|
||||
* `-DPYTHON_FRAMEWORKS=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/` (MacOS only)
|
||||
#### Options to compile bindings for a specific Python installation
|
||||
* `-DPYTHON_INCLUDE_DIR=/location/of/python/includes/`
|
||||
* `-DPYTHON_LIBRARY=/location/of/libpython*.so`
|
||||
* `-DPYTHON_FRAMEWORKS=/usr/local/Cellar/python3/3.3.2/Frameworks/Python.framework/` (MacOS only)
|
||||
|
||||
##### Only used when building with ImageMagick enabled:
|
||||
* `-DMAGICKCORE_HDRI_ENABLE=1` (default `0`)
|
||||
* `-DMAGICKCORE_QUANTUM_DEPTH=8` (default `16`)
|
||||
#### Options only relevant when building with ImageMagick
|
||||
* `-DMAGICKCORE_HDRI_ENABLE=1` (default `0`)
|
||||
* `-DMAGICKCORE_QUANTUM_DEPTH=8` (default `16`)
|
||||
|
||||
## Linux Build Instructions (libopenshot-audio)
|
||||
To compile libopenshot-audio, we need to go through a few additional steps to manually build and install it. Launch a terminal and enter:
|
||||
To compile libopenshot-audio, we need to build it from source code and install the results.
|
||||
Launch a terminal and enter:
|
||||
|
||||
```
|
||||
```sh
|
||||
cd [libopenshot-audio repo folder]
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
make install
|
||||
./src/openshot-audio-test-sound (This should play a test sound)
|
||||
cmake -B build -S .
|
||||
cmake --build build
|
||||
./build/src/openshot-audio-test-sound (This should play a test sound)
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
## Linux Build Instructions (libopenshot)
|
||||
Run the following commands to compile libopenshot:
|
||||
|
||||
```
|
||||
```sh
|
||||
cd [libopenshot repo directory]
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake ../
|
||||
make
|
||||
make install
|
||||
cmake -B build -S .
|
||||
cmake --build build
|
||||
cmake --build build --target test
|
||||
cmake --install build
|
||||
```
|
||||
|
||||
For more detailed instructions, please see:
|
||||
|
||||
* [doc/INSTALL-LINUX.md][INSTALL-LINUX]
|
||||
* [doc/INSTALL-MAC.md][INSTALL-MAC]
|
||||
* [doc/INSTALL-WINDOWS.md][INSTALL-WINDOWS]
|
||||
* [doc/INSTALL-LINUX.md][INSTALL-LINUX]
|
||||
* [doc/INSTALL-MAC.md][INSTALL-MAC]
|
||||
* [doc/INSTALL-WINDOWS.md][INSTALL-WINDOWS]
|
||||
|
||||
[INSTALL-LINUX]: https://github.com/OpenShot/libopenshot/blob/develop/doc/INSTALL-LINUX.md
|
||||
[INSTALL-MAC]: https://github.com/OpenShot/libopenshot/blob/develop/doc/INSTALL-MAC.md
|
||||
|
||||
@@ -50,11 +50,11 @@ include_directories(${PYTHON_INCLUDE_PATH})
|
||||
if (CMAKE_VERSION VERSION_LESS 3.12)
|
||||
### Include project headers
|
||||
include_directories(
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${PROJECT_BINARY_DIR}/include")
|
||||
"${PROJECT_SOURCE_DIR}/src"
|
||||
"${PROJECT_BINARY_DIR}/src")
|
||||
endif()
|
||||
|
||||
### Enable C++ support in SWIG
|
||||
### Enable C++ in SWIG
|
||||
set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON)
|
||||
set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot)
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
#include "KeyFrame.h"
|
||||
#include "RendererBase.h"
|
||||
#include "Settings.h"
|
||||
#include "TimelineBase.h"
|
||||
#include "Timeline.h"
|
||||
#include "ZmqLogger.h"
|
||||
#include "AudioDeviceInfo.h"
|
||||
@@ -212,6 +213,7 @@
|
||||
%include "KeyFrame.h"
|
||||
%include "RendererBase.h"
|
||||
%include "Settings.h"
|
||||
%include "TimelineBase.h"
|
||||
%include "Timeline.h"
|
||||
%include "ZmqLogger.h"
|
||||
%include "AudioDeviceInfo.h"
|
||||
@@ -255,5 +257,5 @@
|
||||
%template(PointsVector) std::vector<openshot::Point>;
|
||||
%template(FieldVector) std::vector<openshot::Field>;
|
||||
%template(MappedFrameVector) std::vector<openshot::MappedFrame>;
|
||||
%template(MappedMetadata) std::map<std::string, std::string>;
|
||||
%template(MetadataMap) std::map<std::string, std::string>;
|
||||
%template(AudioDeviceInfoVector) std::vector<openshot::AudioDeviceInfo>;
|
||||
@@ -46,11 +46,11 @@ endif()
|
||||
option(SILENCE_RUBY_VERSION_WARNING
|
||||
"Don't warn about possible SWIG incompatibilities with Ruby 2.7.0+" OFF)
|
||||
|
||||
if (${RUBY_VERSION} VERSION_GREATER 2.6.9 AND ${SWIG_VERSION} VERSION_LESS 4.0.3)
|
||||
if (${RUBY_VERSION} VERSION_GREATER 2.6.9 AND ${SWIG_VERSION} VERSION_LESS 4.0.2)
|
||||
if (NOT ${SILENCE_RUBY_VERSION_WARNING})
|
||||
message(WARNING "\
|
||||
Ruby 2.7.0+ detected, building the libopenshot Ruby API bindings \
|
||||
requires either SWIG 4.0.3 or an older version patched with this commit: \
|
||||
requires either SWIG 4.0.2+ or an older version patched with this commit: \
|
||||
https://github.com/swig/swig/commit/5542cc228ad10bdc5c91107afb77c808c43bf2a4 \
|
||||
(Recent Fedora and Ubuntu distro packages of SWIG 4.0.1 have already been \
|
||||
patched.)")
|
||||
@@ -64,19 +64,16 @@ endif()
|
||||
include_directories(${RUBY_INCLUDE_DIRS})
|
||||
|
||||
if (CMAKE_VERSION VERSION_LESS 3.12)
|
||||
### Include Ruby header files and project headers
|
||||
### Include project headers
|
||||
include_directories(
|
||||
"${PROJECT_SOURCE_DIR}/include"
|
||||
"${PROJECT_BINARY_DIR}/include")
|
||||
"${PROJECT_SOURCE_DIR}/src"
|
||||
"${PROJECT_BINARY_DIR}/src")
|
||||
endif()
|
||||
|
||||
### Enable C++ in SWIG
|
||||
set_property(SOURCE openshot.i PROPERTY CPLUSPLUS ON)
|
||||
set_property(SOURCE openshot.i PROPERTY SWIG_MODULE_NAME openshot)
|
||||
|
||||
### Unbreak std::isfinite()
|
||||
add_definitions(-DHAVE_ISFINITE=1)
|
||||
|
||||
### Suppress a ton of warnings in the generated SWIG C++ code
|
||||
set(SWIG_CXX_FLAGS "-Wno-unused-variable -Wno-unused-function \
|
||||
-Wno-deprecated-copy -Wno-class-memaccess -Wno-cast-function-type \
|
||||
@@ -99,6 +96,14 @@ else()
|
||||
swig_add_library(rbopenshot LANGUAGE ruby SOURCES openshot.i)
|
||||
endif()
|
||||
|
||||
### Set name of target (with no prefix, since Ruby does not like that)
|
||||
# XXX: If this is not done exactly this way, the module builds as
|
||||
# e.g. rbopenshot.so, but its initializer method will be named
|
||||
# 'Init_openshot()' (via the module name set in the SWIG .i file).
|
||||
# Which leads to Ruby barfing when it attempts to load the module.
|
||||
set_target_properties(${SWIG_MODULE_rbopenshot_REAL_NAME} PROPERTIES
|
||||
PREFIX "" OUTPUT_NAME "openshot")
|
||||
|
||||
### Link the new Ruby wrapper library with libopenshot
|
||||
target_link_libraries(${SWIG_MODULE_rbopenshot_REAL_NAME} PUBLIC
|
||||
${RUBY_LIBRARY} openshot)
|
||||
@@ -42,23 +42,20 @@
|
||||
%include "std_list.i"
|
||||
%include "std_vector.i"
|
||||
%include "std_map.i"
|
||||
%include <stdint.i>
|
||||
|
||||
/* Unhandled STL Exception Handling */
|
||||
%include <std_except.i>
|
||||
|
||||
namespace std {
|
||||
template<class T> class shared_ptr {
|
||||
public:
|
||||
T *operator->();
|
||||
};
|
||||
}
|
||||
/* Include shared pointer code */
|
||||
%include <std_shared_ptr.i>
|
||||
|
||||
/* Mark these classes as shared_ptr classes */
|
||||
#ifdef USE_IMAGEMAGICK
|
||||
%template(SPtrImage) std::shared_ptr<Magick::Image>;
|
||||
%shared_ptr(Magick::Image)
|
||||
#endif
|
||||
%template(SPtrAudioBuffer) std::shared_ptr<juce::AudioSampleBuffer>;
|
||||
%template(SPtrOpenFrame) std::shared_ptr<openshot::Frame>;
|
||||
%shared_ptr(juce::AudioSampleBuffer)
|
||||
%shared_ptr(openshot::Frame)
|
||||
|
||||
%{
|
||||
/* Ruby and FFmpeg define competing RSHIFT macros,
|
||||
@@ -103,6 +100,7 @@ namespace std {
|
||||
#include "KeyFrame.h"
|
||||
#include "RendererBase.h"
|
||||
#include "Settings.h"
|
||||
#include "TimelineBase.h"
|
||||
#include "Timeline.h"
|
||||
#include "ZmqLogger.h"
|
||||
#include "AudioDeviceInfo.h"
|
||||
@@ -192,6 +190,7 @@ namespace std {
|
||||
%include "KeyFrame.h"
|
||||
%include "RendererBase.h"
|
||||
%include "Settings.h"
|
||||
%include "TimelineBase.h"
|
||||
%include "Timeline.h"
|
||||
%include "ZmqLogger.h"
|
||||
%include "AudioDeviceInfo.h"
|
||||
@@ -227,5 +226,5 @@ namespace std {
|
||||
%template(PointsVector) std::vector<openshot::Point>;
|
||||
%template(FieldVector) std::vector<openshot::Field>;
|
||||
%template(MappedFrameVector) std::vector<openshot::MappedFrame>;
|
||||
%template(MappedMetadata) std::map<std::string, std::string>;
|
||||
%template(MetadataMap) std::map<std::string, std::string>;
|
||||
%template(AudioDeviceInfoVector) std::vector<openshot::AudioDeviceInfo>;
|
||||
@@ -11,12 +11,14 @@ endif()
|
||||
|
||||
# Find the libopenshot-audio header files (check env/cache vars first)
|
||||
find_path(
|
||||
LIBOPENSHOT_AUDIO_INCLUDE_DIR
|
||||
OpenShotAudio_INCLUDE_DIR
|
||||
JuceHeader.h
|
||||
HINTS
|
||||
ENV LIBOPENSHOT_AUDIO_DIR
|
||||
PATHS
|
||||
${LIBOPENSHOT_AUDIO_DIR}
|
||||
${OpenShotAudio_ROOT}
|
||||
${OpenShotAudio_INCLUDE_DIR}
|
||||
PATH_SUFFIXES
|
||||
include/libopenshot-audio
|
||||
libopenshot-audio
|
||||
@@ -26,12 +28,14 @@ find_path(
|
||||
|
||||
# Find the libopenshot-audio header files (fallback to std. paths)
|
||||
find_path(
|
||||
LIBOPENSHOT_AUDIO_INCLUDE_DIR
|
||||
OpenShotAudio_INCLUDE_DIR
|
||||
JuceHeader.h
|
||||
HINTS
|
||||
ENV LIBOPENSHOT_AUDIO_DIR
|
||||
PATHS
|
||||
${LIBOPENSHOT_AUDIO_DIR}
|
||||
${OpenShotAudio_ROOT}
|
||||
${OpenShotAudio_INCLUDE_DIR}
|
||||
PATH_SUFFIXES
|
||||
include/libopenshot-audio
|
||||
libopenshot-audio
|
||||
@@ -40,7 +44,7 @@ find_path(
|
||||
|
||||
# Find libopenshot-audio.so / libopenshot-audio.dll (check env/cache vars first)
|
||||
find_library(
|
||||
LIBOPENSHOT_AUDIO_LIBRARY
|
||||
OpenShotAudio_LIBRARY
|
||||
NAMES
|
||||
libopenshot-audio
|
||||
openshot-audio
|
||||
@@ -48,6 +52,8 @@ find_library(
|
||||
ENV LIBOPENSHOT_AUDIO_DIR
|
||||
PATHS
|
||||
${LIBOPENSHOT_AUDIO_DIR}
|
||||
${OpenShotAudio_ROOT}
|
||||
${OpenShotAudio_LIBRARY}
|
||||
PATH_SUFFIXES
|
||||
lib/libopenshot-audio
|
||||
libopenshot-audio
|
||||
@@ -57,7 +63,7 @@ find_library(
|
||||
|
||||
# Find libopenshot-audio.so / libopenshot-audio.dll (fallback)
|
||||
find_library(
|
||||
LIBOPENSHOT_AUDIO_LIBRARY
|
||||
OpenShotAudio_LIBRARY
|
||||
NAMES
|
||||
libopenshot-audio
|
||||
openshot-audio
|
||||
@@ -65,39 +71,41 @@ find_library(
|
||||
ENV LIBOPENSHOT_AUDIO_DIR
|
||||
PATHS
|
||||
${LIBOPENSHOT_AUDIO_DIR}
|
||||
${OpenShotAudio_ROOT}
|
||||
${OpenShotAudio_LIBRARY}
|
||||
PATH_SUFFIXES
|
||||
lib/libopenshot-audio
|
||||
libopenshot-audio
|
||||
lib
|
||||
)
|
||||
|
||||
set(LIBOPENSHOT_AUDIO_LIBRARIES "${LIBOPENSHOT_AUDIO_LIBRARY}")
|
||||
set(LIBOPENSHOT_AUDIO_LIBRARY "${LIBOPENSHOT_AUDIO_LIBRARIES}")
|
||||
set(LIBOPENSHOT_AUDIO_INCLUDE_DIRS "${LIBOPENSHOT_AUDIO_INCLUDE_DIR}")
|
||||
set(OpenShotAudio_LIBRARIES "${OpenShotAudio_LIBRARY}")
|
||||
set(OpenShotAudio_LIBRARY "${OpenShotAudio_LIBRARIES}")
|
||||
set(OpenShotAudio_INCLUDE_DIRS "${OpenShotAudio_INCLUDE_DIR}")
|
||||
|
||||
if(LIBOPENSHOT_AUDIO_INCLUDE_DIR AND EXISTS "${LIBOPENSHOT_AUDIO_INCLUDE_DIR}/JuceHeader.h")
|
||||
file(STRINGS "${LIBOPENSHOT_AUDIO_INCLUDE_DIR}/JuceHeader.h" libosa_version_str
|
||||
if(OpenShotAudio_INCLUDE_DIR AND EXISTS "${OpenShotAudio_INCLUDE_DIR}/JuceHeader.h")
|
||||
file(STRINGS "${OpenShotAudio_INCLUDE_DIR}/JuceHeader.h" libosa_version_str
|
||||
REGEX "versionString.*=.*\"[^\"]+\"")
|
||||
if(libosa_version_str MATCHES "versionString.*=.*\"([^\"]+)\"")
|
||||
set(LIBOPENSHOT_AUDIO_VERSION_STRING ${CMAKE_MATCH_1})
|
||||
set(OpenShotAudio_VERSION_STRING ${CMAKE_MATCH_1})
|
||||
endif()
|
||||
unset(libosa_version_str)
|
||||
string(REGEX REPLACE "^([0-9]+\.[0-9]+\.[0-9]+).*$" "\\1"
|
||||
LIBOPENSHOT_AUDIO_VERSION "${LIBOPENSHOT_AUDIO_VERSION_STRING}")
|
||||
OpenShotAudio_VERSION "${OpenShotAudio_VERSION_STRING}")
|
||||
endif()
|
||||
|
||||
# If we couldn't parse M.N.B version, don't keep any of it
|
||||
if(NOT LIBOPENSHOT_AUDIO_VERSION)
|
||||
unset(LIBOPENSHOT_AUDIO_VERSION)
|
||||
unset(LIBOPENSHOT_AUDIO_VERSION_STRING)
|
||||
if(NOT OpenShotAudio_VERSION)
|
||||
unset(OpenShotAudio_VERSION)
|
||||
unset(OpenShotAudio_VERSION_STRING)
|
||||
endif()
|
||||
|
||||
# Determine compatibility with requested version in find_package()
|
||||
if(OpenShotAudio_FIND_VERSION AND LIBOPENSHOT_AUDIO_VERSION)
|
||||
if("${OpenShotAudio_FIND_VERSION}" STREQUAL "${LIBOPENSHOT_AUDIO_VERSION}")
|
||||
if(OpenShotAudio_FIND_VERSION AND OpenShotAudio_VERSION)
|
||||
if("${OpenShotAudio_FIND_VERSION}" STREQUAL "${OpenShotAudio_VERSION}")
|
||||
set(OpenShotAudio_VERSION_EXACT TRUE)
|
||||
endif()
|
||||
if("${OpenShotAudio_FIND_VERSION}" VERSION_GREATER "${LIBOPENSHOT_AUDIO_VERSION}")
|
||||
if("${OpenShotAudio_FIND_VERSION}" VERSION_GREATER "${OpenShotAudio_VERSION}")
|
||||
set(OpenShotAudio_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
set(OpenShotAudio_VERSION_COMPATIBLE TRUE)
|
||||
@@ -105,12 +113,76 @@ if(OpenShotAudio_FIND_VERSION AND LIBOPENSHOT_AUDIO_VERSION)
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
# handle the QUIETLY and REQUIRED arguments and set LIBOPENSHOT_AUDIO_FOUND to TRUE
|
||||
# handle the QUIETLY and REQUIRED arguments and set OpenShotAudio_FOUND to TRUE
|
||||
# if all listed variables are TRUE
|
||||
find_package_handle_standard_args(OpenShotAudio
|
||||
REQUIRED_VARS
|
||||
LIBOPENSHOT_AUDIO_LIBRARY
|
||||
LIBOPENSHOT_AUDIO_INCLUDE_DIRS
|
||||
OpenShotAudio_LIBRARIES
|
||||
OpenShotAudio_INCLUDE_DIRS
|
||||
VERSION_VAR
|
||||
LIBOPENSHOT_AUDIO_VERSION_STRING
|
||||
OpenShotAudio_VERSION_STRING
|
||||
)
|
||||
|
||||
if(OpenShotAudio_FOUND)
|
||||
set(OpenShotAudio_INCLUDE_DIRS "${OpenShotAudio_INCLUDE_DIRS}"
|
||||
CACHE PATH "The paths to libopenshot-audio's header files" FORCE)
|
||||
set(OpenShotAudio_LIBRARIES "${OpenShotAudio_LIBRARIES}"
|
||||
CACHE STRING "The libopenshot-audio library to link with" FORCE)
|
||||
if(DEFINED OpenShotAudio_VERSION)
|
||||
set(OpenShotAudio_VERSION ${OpenShotAudio_VERSION}
|
||||
CACHE STRING "The version of libopenshot-audio detected" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(OpenShotAudio_FOUND AND NOT TARGET OpenShot::Audio)
|
||||
message(STATUS "Creating IMPORTED target OpenShot::Audio")
|
||||
if(WIN32)
|
||||
add_library(OpenShot::Audio UNKNOWN IMPORTED)
|
||||
else()
|
||||
add_library(OpenShot::Audio SHARED IMPORTED)
|
||||
endif()
|
||||
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OpenShotAudio_INCLUDE_DIRS}")
|
||||
|
||||
# Juce requires either DEBUG or NDEBUG to be defined on MacOS.
|
||||
# -DNDEBUG is set by cmake for all release configs, so add
|
||||
# -DDEBUG for debug builds. We'll do this for all OSes, even
|
||||
# though only MacOS requires it.
|
||||
# The generator expression translates to:
|
||||
# CONFIG == "DEBUG" ? "DEBUG" : ""
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:DEBUG>)
|
||||
|
||||
# For the Ruby bindings
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS HAVE_ISFINITE=1)
|
||||
|
||||
if(WIN32)
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS IGNORE_JUCE_HYPOT=1)
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
INTERFACE_COMPILE_OPTIONS -include cmath)
|
||||
elseif(APPLE)
|
||||
# Prevent compiling with __cxx11
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS _GLIBCXX_USE_CXX11_ABI=0)
|
||||
list(APPEND framework_deps
|
||||
"-framework Carbon"
|
||||
"-framework Cocoa"
|
||||
"-framework CoreFoundation"
|
||||
"-framework CoreAudio"
|
||||
"-framework CoreMidi"
|
||||
"-framework IOKit"
|
||||
"-framework AGL"
|
||||
"-framework AudioToolbox"
|
||||
"-framework QuartzCore"
|
||||
"-lobjc"
|
||||
"-framework Accelerate"
|
||||
)
|
||||
target_link_libraries(OpenShot::Audio INTERFACE ${framework_deps})
|
||||
endif()
|
||||
|
||||
set_property(TARGET OpenShot::Audio APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${OpenShotAudio_LIBRARIES}")
|
||||
endif()
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# vim: ts=2 sw=2
|
||||
#[=======================================================================[.rst:
|
||||
FindRESVG
|
||||
FindResvg
|
||||
---------
|
||||
Try to find the shared-library build of resvg, the Rust SVG library
|
||||
|
||||
IMPORTED targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module defines :prop_tgt:`IMPORTED` target ``RESVG::resvg`` when
|
||||
This module defines :prop_tgt:`IMPORTED` target ``Resvg::Resvg`` when
|
||||
the library and headers are found.
|
||||
|
||||
Result Variables
|
||||
@@ -17,10 +17,10 @@ This module defines the following variables:
|
||||
|
||||
::
|
||||
|
||||
RESVG_FOUND - Library and header files found
|
||||
RESVG_INCLUDE_DIRS - Include directory path
|
||||
RESVG_LIBRARIES - Link path to the library
|
||||
RESVG_DEFINITIONS - Compiler switches (currently unused)
|
||||
Resvg_FOUND - Library and header files found
|
||||
Resvg_INCLUDE_DIRS - Include directory path
|
||||
Resvg_LIBRARIES - Link path to the library
|
||||
Resvg_DEFINITIONS - Compiler switches (currently unused)
|
||||
|
||||
Backwards compatibility
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
@@ -47,7 +47,7 @@ if(DEFINED RESVGDIR AND CMAKE_VERSION VERSION_GREATER 3.4)
|
||||
BASE_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||
endif()
|
||||
|
||||
find_path(RESVG_INCLUDE_DIRS
|
||||
find_path(Resvg_INCLUDE_DIRS
|
||||
ResvgQt.h
|
||||
PATHS
|
||||
${RESVGDIR}
|
||||
@@ -62,7 +62,7 @@ find_path(RESVG_INCLUDE_DIRS
|
||||
resvg/capi/include
|
||||
)
|
||||
|
||||
find_library(RESVG_LIBRARIES
|
||||
find_library(Resvg_LIBRARIES
|
||||
NAMES resvg
|
||||
PATHS
|
||||
${RESVGDIR}
|
||||
@@ -77,39 +77,39 @@ find_library(RESVG_LIBRARIES
|
||||
resvg/target/release
|
||||
)
|
||||
|
||||
if (RESVG_INCLUDE_DIRS AND RESVG_LIBRARIES)
|
||||
set(RESVG_FOUND TRUE)
|
||||
if (Resvg_INCLUDE_DIRS AND Resvg_LIBRARIES)
|
||||
set(Resvg_FOUND TRUE)
|
||||
endif()
|
||||
set(RESVG_LIBRARIES ${RESVG_LIBRARIES} CACHE STRING "The Resvg library link path")
|
||||
set(RESVG_INCLUDE_DIRS ${RESVG_INCLUDE_DIRS} CACHE STRING "The Resvg include directories")
|
||||
set(RESVG_DEFINITIONS "" CACHE STRING "The Resvg CFLAGS")
|
||||
set(Resvg_LIBRARIES ${Resvg_LIBRARIES} CACHE STRING "The Resvg library link path")
|
||||
set(Resvg_INCLUDE_DIRS ${Resvg_INCLUDE_DIRS} CACHE STRING "The Resvg include directories")
|
||||
set(Resvg_DEFINITIONS "" CACHE STRING "The Resvg CFLAGS")
|
||||
|
||||
mark_as_advanced(RESVG_LIBRARIES RESVG_INCLUDE_DIRS RESVG_DEFINITIONS)
|
||||
mark_as_advanced(Resvg_LIBRARIES Resvg_INCLUDE_DIRS Resvg_DEFINITIONS)
|
||||
|
||||
# Give a nice error message if some of the required vars are missing.
|
||||
find_package_handle_standard_args(RESVG
|
||||
"Could NOT find RESVG, using Qt SVG parsing instead"
|
||||
RESVG_LIBRARIES RESVG_INCLUDE_DIRS )
|
||||
find_package_handle_standard_args(Resvg
|
||||
"Could NOT find Resvg, using Qt SVG parsing instead"
|
||||
Resvg_LIBRARIES Resvg_INCLUDE_DIRS )
|
||||
|
||||
# Export target
|
||||
if(RESVG_FOUND AND NOT TARGET RESVG::resvg)
|
||||
message(STATUS "Creating IMPORTED target RESVG::resvg")
|
||||
if(Resvg_FOUND AND NOT TARGET Resvg::Resvg)
|
||||
message(STATUS "Creating IMPORTED target Resvg::Resvg")
|
||||
if (WIN32)
|
||||
# Windows mis-links SHARED library targets
|
||||
add_library(RESVG::resvg UNKNOWN IMPORTED)
|
||||
add_library(Resvg::Resvg UNKNOWN IMPORTED)
|
||||
else()
|
||||
# Linux needs SHARED to link because libresvg has no SONAME
|
||||
add_library(RESVG::resvg SHARED IMPORTED)
|
||||
set_property(TARGET RESVG::resvg APPEND PROPERTY
|
||||
add_library(Resvg::Resvg SHARED IMPORTED)
|
||||
set_property(TARGET Resvg::Resvg APPEND PROPERTY
|
||||
IMPORTED_NO_SONAME TRUE)
|
||||
endif()
|
||||
|
||||
set_property(TARGET RESVG::resvg APPEND PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${RESVG_INCLUDE_DIRS}")
|
||||
set_property(TARGET Resvg::Resvg APPEND PROPERTY
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Resvg_INCLUDE_DIRS}")
|
||||
|
||||
set_property(TARGET RESVG::resvg APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS "${RESVG_DEFINITIONS}")
|
||||
set_property(TARGET Resvg::Resvg APPEND PROPERTY
|
||||
INTERFACE_COMPILE_DEFINITIONS "${Resvg_DEFINITIONS}")
|
||||
|
||||
set_property(TARGET RESVG::resvg APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${RESVG_LIBRARIES}")
|
||||
set_property(TARGET Resvg::Resvg APPEND PROPERTY
|
||||
IMPORTED_LOCATION "${Resvg_LIBRARIES}")
|
||||
endif()
|
||||
@@ -7,10 +7,11 @@ coverage:
|
||||
base: pr # Only post a status to pull requests
|
||||
informational: true # Don't block PRs based on coverage stats (yet?)
|
||||
ignore:
|
||||
- "/src/examples"
|
||||
- "/src/Qt/demo"
|
||||
- "/thirdparty/jsoncpp/*.cpp"
|
||||
- "/thirdparty/jsoncpp/json/*.h"
|
||||
- "/examples"
|
||||
- "/bindings"
|
||||
- "/thirdparty/jsoncpp"
|
||||
- "/doc"
|
||||
- "/cmake"
|
||||
- "/*.md"
|
||||
- "bindings"
|
||||
- "src/openshot_autogen"
|
||||
|
||||
65
examples/CMakeLists.txt
Normal file
65
examples/CMakeLists.txt
Normal file
@@ -0,0 +1,65 @@
|
||||
####################### CMakeLists.txt (libopenshot) #########################
|
||||
# @brief CMake build file for libopenshot (used to generate makefiles)
|
||||
# @author Jonathan Thomas <jonathan@openshot.org>
|
||||
# @author FeRD (Frank Dana) <ferdnyc@gmail.com>
|
||||
#
|
||||
# @section LICENSE
|
||||
#
|
||||
# Copyright (c) 2008-2020 OpenShot Studios, LLC
|
||||
# <http://www.openshotstudios.com/>. This file is part of
|
||||
# OpenShot Library (libopenshot), an open-source project dedicated to
|
||||
# delivering high quality video editing and animation solutions to the
|
||||
# world. For more information visit <http://www.openshot.org/>.
|
||||
#
|
||||
# OpenShot Library (libopenshot) is free software: you can redistribute it
|
||||
# and/or modify it under the terms of the GNU Lesser General Public License
|
||||
# as published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# OpenShot Library (libopenshot) is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License
|
||||
# along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
|
||||
################################################################################
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# Dependencies
|
||||
find_package(Qt5 COMPONENTS Gui REQUIRED)
|
||||
|
||||
############### CLI EXECUTABLES ################
|
||||
# Create test executable
|
||||
add_executable(openshot-example Example.cpp)
|
||||
|
||||
# Define path to test input files
|
||||
file(TO_NATIVE_PATH "${PROJECT_SOURCE_DIR}/examples/" TEST_MEDIA_PATH)
|
||||
target_compile_definitions(openshot-example PRIVATE
|
||||
-DTEST_MEDIA_PATH="${TEST_MEDIA_PATH}" )
|
||||
|
||||
# Link test executable to the new library
|
||||
target_link_libraries(openshot-example openshot)
|
||||
|
||||
add_executable(openshot-html-test ExampleHtml.cpp)
|
||||
target_link_libraries(openshot-html-test openshot Qt5::Gui)
|
||||
|
||||
############### PLAYER EXECUTABLE ################
|
||||
# Create test executable
|
||||
add_executable(openshot-player qt-demo/main.cpp)
|
||||
|
||||
set_target_properties(openshot-player PROPERTIES AUTOMOC ON)
|
||||
|
||||
# Link test executable to the new library
|
||||
target_link_libraries(openshot-player openshot)
|
||||
|
||||
############### TEST BLACKMAGIC CAPTURE APP ################
|
||||
if (BLACKMAGIC_FOUND)
|
||||
# Create test executable
|
||||
add_executable(openshot-blackmagic
|
||||
examples/ExampleBlackmagic.cpp)
|
||||
|
||||
# Link test executable to the new library
|
||||
target_link_libraries(openshot-blackmagic openshot)
|
||||
endif()
|
||||
@@ -31,8 +31,8 @@
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include "../../include/OpenShot.h"
|
||||
#include "../../include/CrashHandler.h"
|
||||
#include "OpenShot.h"
|
||||
#include "CrashHandler.h"
|
||||
|
||||
using namespace openshot;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Find and load the ruby libopenshot wrapper library
|
||||
require "./openshot"
|
||||
require "openshot"
|
||||
|
||||
# Create a new FFmpegReader and Open it
|
||||
r = OpenShot::FFmpegReader.new("myfile.mp4")
|
||||
r = Openshot::FFmpegReader.new("test.mp4")
|
||||
r.Open()
|
||||
|
||||
# Get frame 1
|
||||
f = r.GetFrame(1)
|
||||
|
||||
# Display the frame
|
||||
r.Display()
|
||||
f.Display()
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QTimer>
|
||||
|
||||
#include "../../include/OpenShot.h"
|
||||
#include "../../include/CrashHandler.h"
|
||||
#include "OpenShot.h"
|
||||
#include "CrashHandler.h"
|
||||
|
||||
using namespace openshot;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user