Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into opencv
Browse files Browse the repository at this point in the history
  • Loading branch information
BrennoCaldato committed Dec 18, 2020
2 parents 6342d43 + d27cf22 commit 5b5763e
Show file tree
Hide file tree
Showing 22 changed files with 362 additions and 232 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,60 @@
name: CI Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04]
compiler: [gcc, clang]
env:
CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2

- uses: haya14busa/action-cond@v1
id: coverage
with:
cond: ${{ matrix.compiler == 'clang' }}
if_true: "-DENABLE_COVERAGE:BOOL=1"
if_false: "-DENABLE_COVERAGE:BOOL=0"

- name: Install dependencies
shell: bash
run: |
sudo add-apt-repository ppa:openshot.developers/libopenshot-daily
sudo apt update
sudo apt install cmake swig doxygen graphviz curl lcov
sudo apt install libopenshot-audio-dev
sudo apt install qtbase5-dev qtbase5-dev-tools
sudo apt install libfdk-aac-dev libavcodec-dev libavformat-dev libavdevice-dev libavutil-dev libavfilter-dev libswscale-dev libpostproc-dev libswresample-dev
sudo apt install libzmq3-dev libmagick++-dev libunittest++-dev
- name: Build libopenshot
shell: bash
run: |
mkdir build
pushd build
cmake -B . -S .. -DCMAKE_INSTALL_PREFIX:PATH="dist" -DCMAKE_BUILD_TYPE="Debug" "${{ steps.coverage.outputs.value }}"
cmake --build . -- VERBOSE=1
popd
- name: Test libopenshot
shell: bash
run: |
pushd build
cmake --build . --target os_test -- VERBOSE=1
popd
- name: Install libopenshot
shell: bash
run: |
pushd build
cmake --build . --target install -- VERBOSE=1
popd
- uses: codecov/codecov-action@v1
if: ${{ matrix.compiler == 'clang' }}
with:
file: build/coverage.info

26 changes: 26 additions & 0 deletions .github/workflows/label-merge-conflicts.yml
@@ -0,0 +1,26 @@

name: Label merge conflicts

# Controls when the action will run. Triggers the workflow on push to repo branches
# (It shouldn't run on pull requests, as it won't have the right credentials to
# edit labels on other PRs.)
on: push

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: eps1lon/actions-label-merge-conflict@v2.0.1
with:
# Token for the repository. Can be passed in using {{ secrets.GITHUB_TOKEN }}
repoToken: ${{ secrets.GITHUB_TOKEN }}
# Name of the label which indicates that the branch is dirty
dirtyLabel: 'conflicts'
# Number of seconds after which the action runs again if the mergable state is unknown.
retryAfter: 60
# Number of times the action retries calculating the mergable state
retryMax: 5
# String. Comment to add when the pull request is conflicting. Supports markdown.
commentOnDirty: 'Merge conflicts have been detected on this PR, please resolve.'

2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Expand Up @@ -46,7 +46,7 @@ mac-builder:
- unzip artifacts.zip
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
- mkdir -p build; cd build;
- cmake -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_PREFIX_PATH=/usr/local/qt5.15.X/qt5.15/5.15.0/clang_64/ -D"CMAKE_BUILD_TYPE:STRING=Release" -D"PYTHON_MODULE_PATH=python" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
- cmake -DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -DCMAKE_PREFIX_PATH=/usr/local/qt5.15.X/qt5.15/5.15.0/clang_64/ -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
- 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"
Expand Down
122 changes: 0 additions & 122 deletions .travis.yml

This file was deleted.

38 changes: 32 additions & 6 deletions CMakeLists.txt
Expand Up @@ -180,14 +180,40 @@ if (ENABLE_COVERAGE)
NAME coverage
LCOV_ARGS "--no-external"
EXECUTABLE openshot-test
DEPENDENCIES openshot-test
EXCLUDE "bindings" "examples" "${CMAKE_CURRENT_BINARY_DIR}/bindings"
DEPENDENCIES openshot openshot-test
EXCLUDE
"bindings/*"
"examples/*"
"${CMAKE_CURRENT_BINARY_DIR}/bindings/*"
"${CMAKE_CURRENT_BINARY_DIR}/src/*_autogen/*"
)
message("Generate coverage report with 'make coverage'")
if(NOT TARGET os_test)
add_custom_target(os_test)
add_dependencies(os_test coverage)
endif()
endif()

# Also hook up 'test' as an alias for the 'os_test' target, if possible
# This requires CMake 3.11+, where the CMP0037 policy
# configured to 'NEW' mode will not reserve target names
# unless the corresponding feature is actually used
if (POLICY CMP0037)
cmake_policy(SET CMP0037 NEW)
endif()
if(TARGET os_test)
if (CMAKE_VERSION VERSION_GREATER 3.11)
message(STATUS "Cmake 3.11+ detected, enabling 'test' target")
add_custom_target(test)
add_dependencies(test os_test)
set(TEST_TARGET_NAME "test")
else()
set(TEST_TARGET_NAME "os_test")
endif()
add_feature_info("Testrunner" ENABLE_TESTS "Run unit tests with 'make ${TEST_TARGET_NAME}'")
endif()

########### PRINT FEATURE SUMMARY ##############
feature_summary(WHAT ALL
INCLUDE_QUIET_PACKAGES
FATAL_ON_MISSING_REQUIRED_PACKAGES
DESCRIPTION "Displaying feature summary\n\nBuild configuration:")
INCLUDE_QUIET_PACKAGES
FATAL_ON_MISSING_REQUIRED_PACKAGES
DESCRIPTION "Displaying feature summary\n\nBuild configuration:")
1 change: 1 addition & 0 deletions bindings/python/openshot.i
Expand Up @@ -232,6 +232,7 @@
%include "effects/Bars.h"
%include "effects/Blur.h"
%include "effects/Brightness.h"
%include "effects/Caption.h"
%include "effects/ChromaKey.h"
%include "effects/ColorShift.h"
%include "effects/Crop.h"
Expand Down
1 change: 1 addition & 0 deletions bindings/ruby/openshot.i
Expand Up @@ -206,6 +206,7 @@
%include "effects/Bars.h"
%include "effects/Blur.h"
%include "effects/Brightness.h"
%include "effects/Caption.h"
%include "effects/ChromaKey.h"
%include "effects/ColorShift.h"
%include "effects/Crop.h"
Expand Down
11 changes: 5 additions & 6 deletions codecov.yml
Expand Up @@ -7,11 +7,10 @@ coverage:
base: pr # Only post a status to pull requests
informational: true # Don't block PRs based on coverage stats (yet?)
ignore:
- "/examples"
- "/bindings"
- "/thirdparty/jsoncpp"
- "/doc"
- "/cmake"
- "/*.md"
- "examples"
- "bindings"
- "thirdparty/jsoncpp"
- "doc"
- "cmake"
- "*.md"
- "src/openshot_autogen"
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -173,7 +173,10 @@ target_include_directories(openshot

################# LIBOPENSHOT-AUDIO ###################
# Find JUCE-based openshot Audio libraries
find_package(OpenShotAudio 0.2.0 REQUIRED)
if(NOT TARGET OpenShot::Audio)
# Only load if necessary (not for integrated builds)
find_package(OpenShotAudio 0.2.0 REQUIRED)
endif()
target_link_libraries(openshot PUBLIC OpenShot::Audio)

###
Expand Down
4 changes: 2 additions & 2 deletions src/Clip.h
Expand Up @@ -204,7 +204,7 @@ namespace openshot {
void AddEffect(openshot::EffectBase* effect);

/// Close the internal reader
void Close();
void Close() override;

/// Return the list of effects on the timeline
std::list<openshot::EffectBase*> Effects() { return effects; };
Expand All @@ -217,7 +217,7 @@ namespace openshot {
///
/// @returns A new openshot::Frame object
/// @param frame_number The frame number (starting at 1) of the clip or effect on the timeline.
std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number);
std::shared_ptr<openshot::Frame> GetFrame(int64_t frame_number) override;

/// @brief Get an openshot::Frame object for a specific frame number of this timeline. The image size and number
/// of samples can be customized to match the Timeline, or any custom output. Extra samples will be moved to the
Expand Down
4 changes: 3 additions & 1 deletion src/ImageReader.h
Expand Up @@ -48,6 +48,8 @@

namespace openshot
{
// Forward decls
class CacheBase;

/**
* @brief This class uses the ImageMagick++ libraries, to open image files, and return
Expand Down Expand Up @@ -90,7 +92,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
CacheMemory* GetCache() override { return NULL; };
CacheBase* GetCache() override { return NULL; };

/// Get an openshot::Frame object for a specific frame number of this reader. All numbers
/// return the same Frame, since they all share the same image data.
Expand Down
4 changes: 3 additions & 1 deletion src/QtHtmlReader.h
Expand Up @@ -49,6 +49,8 @@ class QImage;

namespace openshot
{
// Forward decls
class CacheBase;

/**
* @brief This class uses Qt libraries, to create frames with rendered HTML, and return
Expand Down Expand Up @@ -115,7 +117,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
openshot::CacheMemory* GetCache() override { return NULL; };
CacheBase* GetCache() override { return NULL; };

/// Get an openshot::Frame object for a specific frame number of this reader. All numbers
/// return the same Frame, since they all share the same image data.
Expand Down
4 changes: 3 additions & 1 deletion src/QtImageReader.h
Expand Up @@ -42,6 +42,8 @@

namespace openshot
{
// Forward decl
class CacheBase;

/**
* @brief This class uses the Qt library, to open image files, and return
Expand Down Expand Up @@ -88,7 +90,7 @@ namespace openshot
void Close() override;

/// Get the cache object used by this reader (always returns NULL for this object)
CacheMemory* GetCache() override { return NULL; };
CacheBase* GetCache() override { return NULL; };

/// Get an openshot::Frame object for a specific frame number of this reader. All numbers
/// return the same Frame, since they all share the same image data.
Expand Down

0 comments on commit 5b5763e

Please sign in to comment.