Skip to content

Commit

Permalink
Merge branch 'develop' into clip-refactor-keyframes
Browse files Browse the repository at this point in the history
# Conflicts:
#	include/Clip.h
#	include/ReaderBase.h
#	include/Timeline.h
#	src/Clip.cpp
#	src/FFmpegReader.cpp
#	src/QtImageReader.cpp
#	src/ReaderBase.cpp
  • Loading branch information
jonoomph committed Oct 6, 2020
2 parents 206578d + 414a2cd commit fb879a4
Show file tree
Hide file tree
Showing 27 changed files with 646 additions and 265 deletions.
4 changes: 4 additions & 0 deletions .github/labeler.yml
@@ -0,0 +1,4 @@
# Add 'build' label to CMake changes
build:
- /**/CMakeList.txt
- /cmake/**/*.cmake
19 changes: 19 additions & 0 deletions .github/workflows/label.yml
@@ -0,0 +1,19 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md

name: Labeler
on: [pull_request]

jobs:
label:

runs-on: ubuntu-latest

steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Expand Up @@ -43,7 +43,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/ -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" ../
- 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/ -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.11.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -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
5 changes: 3 additions & 2 deletions CMakeLists.txt
Expand Up @@ -77,6 +77,7 @@ option(ENABLE_IWYU "Enable 'Include What You Use' scanner (CMake 3.3+)" OFF)
option(ENABLE_TESTS "Build unit tests (requires UnitTest++)" ON)
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)
Expand Down Expand Up @@ -129,9 +130,9 @@ add_feature_info("Coverage" ENABLE_COVERAGE "analyze test coverage and generate
# -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 ##############
Expand Down
34 changes: 19 additions & 15 deletions README.md
@@ -1,6 +1,6 @@
OpenShot Video Library (libopenshot) is a free, open-source C++ library dedicated to
delivering high quality video editing, animation, and playback solutions to the
world.
OpenShot Video Library (libopenshot) is a free, open-source C++ library
dedicated to delivering high quality video editing, animation, and playback
solutions to the world.

## Build Status

Expand All @@ -15,7 +15,8 @@ world.
* Time Mapping (Curve-based Slow Down, Speed Up, Reverse)
* Audio Mixing & Resampling (Curve-based)
* Audio Plug-ins (VST & AU)
* Audio Drivers (ASIO, WASAPI, DirectSound, CoreAudio, iPhone Audio, ALSA, JACK, and Android)
* Audio Drivers (ASIO, WASAPI, DirectSound, CoreAudio, iPhone Audio,
ALSA, JACK, and Android)
* Telecine and Inverse Telecine (Film to TV, TV to Film)
* Frame Rate Conversions
* Multi-Processor Support (Performance)
Expand All @@ -27,19 +28,21 @@ world.

## Install

Detailed instructions for building libopenshot and libopenshot-audio for each OS. These instructions
are also available in the /docs/ source folder.
Detailed instructions for building libopenshot and libopenshot-audio for
each OS. These instructions are also available in the `/docs/` source folder.

* [Linux](https://github.com/OpenShot/libopenshot/wiki/Linux-Build-Instructions)
* [Mac](https://github.com/OpenShot/libopenshot/wiki/Mac-Build-Instructions)
* [Windows](https://github.com/OpenShot/libopenshot/wiki/Windows-Build-Instructions)

## Hardware Acceleration

OpenShot now supports experimental hardware acceleration, both for encoding and
decoding videos. When enabled, this can either speed up those operations or slow
them down, depending on the power and features supported by your graphics card.
Please see [doc/HW-ACCELL.md](doc/HW-ACCEL.md) for more information.
OpenShot now supports experimental hardware acceleration, both for encoding
and decoding videos. When enabled, this can either speed up those operations
or slow them down, depending on the power and features supported by your
graphics card.

Please see [`doc/HW-ACCEL.md`](doc/HW-ACCEL.md) for more information.

## Documentation

Expand All @@ -51,10 +54,11 @@ make doc

## Developers

Are you interested in becoming more involved in the development of
OpenShot? Build exciting new features, fix bugs, make friends, and become a hero!
Please read the [step-by-step](https://github.com/OpenShot/openshot-qt/wiki/Become-a-Developer)
instructions for getting source code, configuring dependencies, and building OpenShot.
Are you interested in becoming more involved in the development of OpenShot?
Build exciting new features, fix bugs, make friends, and become a hero!
Please read the [step-by-step](https://github.com/OpenShot/openshot-qt/wiki/Become-a-Developer)
instructions for getting source code, configuring dependencies, and building
OpenShot.

## Report a bug

Expand All @@ -72,7 +76,7 @@ https://github.com/OpenShot/libopenshot/issues

### License

Copyright (c) 2008-2019 OpenShot Studios, LLC.
Copyright (c) 2008-2020 OpenShot Studios, LLC.

OpenShot Library (libopenshot) is free software: you can redistribute it
and/or modify it under the terms of the GNU Lesser General Public License
Expand Down
24 changes: 0 additions & 24 deletions cmake/Modules/FindZMQ.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions include/CacheDisk.h
Expand Up @@ -38,8 +38,6 @@
#include "Frame.h"
#include "Exceptions.h"
#include <QDir>
#include <QString>
#include <QTextStream>

namespace openshot {

Expand Down
9 changes: 5 additions & 4 deletions include/Clip.h
Expand Up @@ -188,6 +188,9 @@ namespace openshot {
/// Return the list of effects on the timeline
std::list<openshot::EffectBase*> Effects() { return effects; };

/// Look up an effect by ID
openshot::EffectBase* GetEffect(const std::string& id);

/// @brief This method is required for all derived classes of ClipBase, and returns a
/// new openshot::Frame object. All Clip keyframes and effects are resolved into
/// pixels.
Expand Down Expand Up @@ -278,8 +281,6 @@ namespace openshot {
openshot::Keyframe has_audio; ///< An optional override to determine if this clip has audio (-1=undefined, 0=no, 1=yes)
openshot::Keyframe has_video; ///< An optional override to determine if this clip has video (-1=undefined, 0=no, 1=yes)
};
} // namespace


}

#endif
#endif // OPENSHOT_CLIP_H
3 changes: 3 additions & 0 deletions include/FFmpegUtilities.h
Expand Up @@ -122,6 +122,9 @@
#ifndef PIX_FMT_YUV420P
#define PIX_FMT_YUV420P AV_PIX_FMT_YUV420P
#endif
#ifndef PIX_FMT_YUV444P
#define PIX_FMT_YUV444P AV_PIX_FMT_YUV444P
#endif

// FFmpeg's libavutil/common.h defines an RSHIFT incompatible with Ruby's
// definition in ruby/config.h, so we move it to FF_RSHIFT
Expand Down
44 changes: 44 additions & 0 deletions include/QtUtilities.h
@@ -0,0 +1,44 @@
/**
* @file
* @brief Header file for QtUtilities (compatibiity overlay)
* @author FeRD (Frank Dana) <ferdnyc@gmail.com>
*/

/* 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/>.
*/

#ifndef OPENSHOT_QT_UTILITIES_H
#define OPENSHOT_QT_UTILITIES_H

#include <Qt>
#include <QTextStream>

// Fix Qt::endl for older Qt versions
// From: https://bugreports.qt.io/browse/QTBUG-82680
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
namespace Qt {
using TextStreamFunction = QTextStream& (*)(QTextStream&);
constexpr TextStreamFunction endl = ::endl;
}
#endif

#endif // OPENSHOT_QT_UTILITIES_H

0 comments on commit fb879a4

Please sign in to comment.