Skip to content

Commit

Permalink
Merge branch 'develop' into interlace
Browse files Browse the repository at this point in the history
  • Loading branch information
eisneinechse committed Sep 13, 2020
2 parents 8577848 + 9c35e55 commit 36c32f3
Show file tree
Hide file tree
Showing 40 changed files with 734 additions and 374 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Expand Up @@ -27,7 +27,7 @@ linux-builder:
except:
- tags
tags:
- linux
- linux-bionic

mac-builder:
stage: build-libopenshot
Expand All @@ -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_CXX_FLAGS=-I\ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc@8/bin/g++-8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc@8/bin/gcc-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" ../
- 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
30 changes: 0 additions & 30 deletions .travis.yml
Expand Up @@ -32,11 +32,6 @@ addons:
- curl

jobs:

# The FFmpeg 3.2 backport PPA has gone missing
allow_failures:
- name: "FFmpeg 3.2 GCC (Ubuntu 16.04 Xenial)"

include:
- name: "Coverage + FFmpeg 3.4 GCC (Ubuntu 18.04 Bionic)"
env:
Expand Down Expand Up @@ -99,31 +94,6 @@ jobs:
- libavresample-dev
- 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:jon-hedgerows/ffmpeg-backports'
packages:
- *p_common
- libavresample-dev
- libavcodec57
- libavdevice57
- libavfilter6
- libavformat57
- libavresample3
- libavutil55
- libpostproc54
- libswresample2
- libswscale4

- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
env:
- BUILD_VERSION=ffmpeg2
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
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
4 changes: 2 additions & 2 deletions include/ChunkReader.h
Expand Up @@ -37,10 +37,10 @@
#include <iostream>
#include <fstream>
#include <omp.h>
#include <QtCore/qdir.h>
#include <stdio.h>
#include <cstdio>
#include <cstdlib>
#include <memory>
#include <QtCore/QDir>
#include "Json.h"
#include "CacheMemory.h"
#include "Exceptions.h"
Expand Down
12 changes: 6 additions & 6 deletions include/ChunkWriter.h
Expand Up @@ -34,19 +34,19 @@
#include "ReaderBase.h"
#include "WriterBase.h"
#include "FFmpegWriter.h"
#include "CacheMemory.h"
#include "Exceptions.h"
#include "Json.h"

#include <cmath>
#include <ctime>
#include <iostream>
#include <fstream>
#include <omp.h>
#include <QtCore/qdir.h>
#include <stdio.h>
#include <cstdio>
#include <sstream>
#include <unistd.h>
#include "CacheMemory.h"
#include "Exceptions.h"
#include "Json.h"
#include <omp.h>
#include <QtCore/QDir>


namespace openshot
Expand Down
9 changes: 5 additions & 4 deletions include/Clip.h
Expand Up @@ -169,6 +169,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 Get an openshot::Frame object for a specific frame number of this timeline.
///
/// @returns The requested frame (containing the image)
Expand Down Expand Up @@ -253,8 +256,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
11 changes: 7 additions & 4 deletions include/FFmpegUtilities.h
Expand Up @@ -40,7 +40,7 @@
#ifndef IS_FFMPEG_3_2
#define IS_FFMPEG_3_2 (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 64, 101))
#endif

#ifndef HAVE_HW_ACCEL
#define HAVE_HW_ACCEL (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 107, 100))
#endif
Expand Down 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 Expand Up @@ -177,13 +180,13 @@
#define AV_OUTPUT_CONTEXT(output_context, path) avformat_alloc_output_context2( output_context, NULL, NULL, path)
#define AV_OPTION_FIND(priv_data, name) av_opt_find(priv_data, name, NULL, 0, 0)
#define AV_OPTION_SET( av_stream, priv_data, name, value, avcodec) av_opt_set(priv_data, name, value, 0); avcodec_parameters_from_context(av_stream->codecpar, avcodec);
#define AV_FORMAT_NEW_STREAM(oc, st_codec, av_codec, av_st) av_st = avformat_new_stream(oc, NULL);\
#define AV_FORMAT_NEW_STREAM(oc, st_codec_ctx, av_codec, av_st) av_st = avformat_new_stream(oc, NULL);\
if (!av_st) \
throw OutOfMemory("Could not allocate memory for the video stream.", path); \
c = avcodec_alloc_context3(av_codec); \
st_codec = c; \
st_codec_ctx = c; \
av_st->codecpar->codec_id = av_codec->id;
#define AV_COPY_PARAMS_FROM_CONTEXT(av_stream, av_codec) avcodec_parameters_from_context(av_stream->codecpar, av_codec);
#define AV_COPY_PARAMS_FROM_CONTEXT(av_stream, av_codec_ctx) avcodec_parameters_from_context(av_stream->codecpar, av_codec_ctx);
#elif IS_FFMPEG_3_2
#define AV_REGISTER_ALL av_register_all();
#define AVCODEC_REGISTER_ALL avcodec_register_all();
Expand Down
4 changes: 2 additions & 2 deletions include/FFmpegWriter.h
Expand Up @@ -164,8 +164,8 @@ namespace openshot {
AVOutputFormat *fmt;
AVFormatContext *oc;
AVStream *audio_st, *video_st;
AVCodecContext *video_codec;
AVCodecContext *audio_codec;
AVCodecContext *video_codec_ctx;
AVCodecContext *audio_codec_ctx;
SwsContext *img_convert_ctx;
int16_t *samples;
uint8_t *audio_outbuf;
Expand Down
2 changes: 1 addition & 1 deletion include/Fraction.h
Expand Up @@ -31,7 +31,7 @@
#ifndef OPENSHOT_FRACTION_H
#define OPENSHOT_FRACTION_H

#include <math.h>
#include <cmath>

namespace openshot {

Expand Down
3 changes: 1 addition & 2 deletions include/FrameMapper.h
Expand Up @@ -33,7 +33,7 @@

#include <assert.h>
#include <iostream>
#include <math.h>
#include <cmath>
#include <vector>
#include <memory>
#include "CacheMemory.h"
Expand Down Expand Up @@ -138,7 +138,6 @@ namespace openshot
*/
class FrameMapper : public ReaderBase {
private:
bool is_open;
bool field_toggle; // Internal odd / even toggle (used when building the mapping)
Fraction original; // The original frame rate
Fraction target; // The target frame rate
Expand Down
2 changes: 1 addition & 1 deletion include/KeyFrame.h
Expand Up @@ -33,7 +33,7 @@

#include <iostream>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <assert.h>
#include <vector>
#include "Exceptions.h"
Expand Down
4 changes: 2 additions & 2 deletions include/OpenMPUtilities.h
Expand Up @@ -32,8 +32,8 @@
#define OPENSHOT_OPENMP_UTILITIES_H

#include <omp.h>
#include <stdlib.h>
#include <string.h>
#include <algorithm>
#include <string>

#include "Settings.h"

Expand Down
10 changes: 5 additions & 5 deletions include/Profiles.h
Expand Up @@ -35,12 +35,12 @@
#include <string>
#include <sstream>
#include <fstream>
#include <QtCore/qstring.h>
#include <QtCore/qstringlist.h>
#include <QtCore/qfile.h>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QFile>
#include <QTextStream>
#include <stdio.h>
#include <stdlib.h>
#include <cstdio>
#include <cstdlib>
#include "Exceptions.h"
#include "Fraction.h"
#include "Json.h"
Expand Down
12 changes: 6 additions & 6 deletions include/Qt/PlayerDemo.h
Expand Up @@ -31,12 +31,12 @@
#ifndef OPENSHOT_PLAYER_DEMO_H
#define OPENSHOT_PLAYER_DEMO_H

#include <QtWidgets/QWidget>
#include <QtWidgets/QBoxLayout>
#include <QtWidgets/QMenuBar>
#include <QtWidgets/QMenu>
#include <QtGui/qevent.h>
#include <QApplication>
#include <QObject>
#include <QWidget>
#include <QKeyEvent>
#include <QCloseEvent>
#include <QVBoxLayout>
#include <QMenuBar>

#include "VideoRenderWidget.h"

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 36c32f3

Please sign in to comment.