various: encapsulate all code in the olive namespace to avoid name collisions

Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
This commit is contained in:
itsmattkc
2020-04-06 15:29:53 +10:00
parent 82b6ddccc8
commit 1aa87cbda6
519 changed files with 7939 additions and 158 deletions
+4
View File
@@ -24,6 +24,8 @@
#include "config/config.h" #include "config/config.h"
OLIVE_NAMESPACE_ENTER
AudioManager* AudioManager::instance_ = nullptr; AudioManager* AudioManager::instance_ = nullptr;
void AudioManager::CreateInstance() void AudioManager::CreateInstance()
@@ -282,3 +284,5 @@ void AudioRefreshDevicesObject::Refresh()
emit ListsReady(); emit ListsReady();
} }
OLIVE_NAMESPACE_EXIT
+5
View File
@@ -26,9 +26,12 @@
#include <QAudioOutput> #include <QAudioOutput>
#include <QThread> #include <QThread>
#include "common/define.h"
#include "outputmanager.h" #include "outputmanager.h"
#include "render/audioparams.h" #include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
/** /**
* @brief A thread for refreshing the total list of devices on the system * @brief A thread for refreshing the total list of devices on the system
* *
@@ -133,4 +136,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // AUDIOMANAGER_H #endif // AUDIOMANAGER_H
+24
View File
@@ -1,5 +1,27 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "bufferaverage.h" #include "bufferaverage.h"
OLIVE_NAMESPACE_ENTER
QVector<double> AudioBufferAverage::ProcessAverages(const char *data, int length) QVector<double> AudioBufferAverage::ProcessAverages(const char *data, int length)
{ {
// FIXME: Assumes float and stereo // FIXME: Assumes float and stereo
@@ -18,3 +40,5 @@ QVector<double> AudioBufferAverage::ProcessAverages(const char *data, int length
return averages; return averages;
} }
OLIVE_NAMESPACE_EXIT
+26
View File
@@ -1,8 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef AUDIOBUFFERAVERAGE_H #ifndef AUDIOBUFFERAVERAGE_H
#define AUDIOBUFFERAVERAGE_H #define AUDIOBUFFERAVERAGE_H
#include <QVector> #include <QVector>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class AudioBufferAverage class AudioBufferAverage
{ {
public: public:
@@ -11,4 +35,6 @@ public:
static QVector<double> ProcessAverages(const char* data, int length); static QVector<double> ProcessAverages(const char* data, int length);
}; };
OLIVE_NAMESPACE_EXIT
#endif // AUDIOBUFFERAVERAGE_H #endif // AUDIOBUFFERAVERAGE_H
+24
View File
@@ -1,8 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "outputdeviceproxy.h" #include "outputdeviceproxy.h"
#include "audiomanager.h" #include "audiomanager.h"
#include "bufferaverage.h" #include "bufferaverage.h"
OLIVE_NAMESPACE_ENTER
AudioOutputDeviceProxy::AudioOutputDeviceProxy() : AudioOutputDeviceProxy::AudioOutputDeviceProxy() :
device_(nullptr), device_(nullptr),
send_averages_(false) send_averages_(false)
@@ -117,3 +139,5 @@ qint64 AudioOutputDeviceProxy::ReverseAwareRead(char *data, qint64 maxlen)
return read_count; return read_count;
} }
OLIVE_NAMESPACE_EXIT
+25
View File
@@ -1,10 +1,33 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef AUDIOOUTPUTDEVICEPROXY_H #ifndef AUDIOOUTPUTDEVICEPROXY_H
#define AUDIOOUTPUTDEVICEPROXY_H #define AUDIOOUTPUTDEVICEPROXY_H
#include <QIODevice> #include <QIODevice>
#include "common/define.h"
#include "tempoprocessor.h" #include "tempoprocessor.h"
OLIVE_NAMESPACE_ENTER
class AudioOutputDeviceProxy : public QIODevice class AudioOutputDeviceProxy : public QIODevice
{ {
Q_OBJECT Q_OBJECT
@@ -42,4 +65,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // AUDIOOUTPUTDEVICEPROXY_H #endif // AUDIOOUTPUTDEVICEPROXY_H
+4
View File
@@ -25,6 +25,8 @@
#include "bufferaverage.h" #include "bufferaverage.h"
OLIVE_NAMESPACE_ENTER
AudioOutputManager::AudioOutputManager(QObject *parent) : AudioOutputManager::AudioOutputManager(QObject *parent) :
QObject(parent), QObject(parent),
output_(nullptr), output_(nullptr),
@@ -151,3 +153,5 @@ void AudioOutputManager::ProcessAverages(const char *data, int length)
emit SentSamples(AudioBufferAverage::ProcessAverages(data, length)); emit SentSamples(AudioBufferAverage::ProcessAverages(data, length));
} }
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -29,6 +29,8 @@
#include "outputdeviceproxy.h" #include "outputdeviceproxy.h"
OLIVE_NAMESPACE_ENTER
class AudioOutputManager : public QObject class AudioOutputManager : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -88,4 +90,6 @@ private slots:
void PushMoreSamples(); void PushMoreSamples();
}; };
OLIVE_NAMESPACE_EXIT
#endif // AUDIOHYBRIDDEVICE_H #endif // AUDIOHYBRIDDEVICE_H
+24
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "sampleformat.h" #include "sampleformat.h"
#include "core.h" #include "core.h"
OLIVE_NAMESPACE_ENTER
QString SampleFormat::GetSampleFormatName(const SampleFormat::Format &f) QString SampleFormat::GetSampleFormatName(const SampleFormat::Format &f)
{ {
switch (f) { switch (f) {
@@ -35,3 +57,5 @@ void SampleFormat::SetConfiguredFormatForMode(RenderMode::Mode mode, SampleForma
{ {
Core::SetPreferenceForRenderMode(mode, QStringLiteral("SampleFormat"), format); Core::SetPreferenceForRenderMode(mode, QStringLiteral("SampleFormat"), format);
} }
OLIVE_NAMESPACE_EXIT
+5
View File
@@ -23,8 +23,11 @@
#include <QObject> #include <QObject>
#include "common/define.h"
#include "render/rendermodes.h" #include "render/rendermodes.h"
OLIVE_NAMESPACE_ENTER
class SampleFormat : public QObject class SampleFormat : public QObject
{ {
Q_OBJECT Q_OBJECT
@@ -51,4 +54,6 @@ public:
}; };
OLIVE_NAMESPACE_EXIT
#endif // SAMPLEFORMAT_H #endif // SAMPLEFORMAT_H
+24
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "sumsamples.h" #include "sumsamples.h"
#include <QDebug> #include <QDebug>
OLIVE_NAMESPACE_ENTER
const int SampleSummer::kSumSampleRate = 200; const int SampleSummer::kSumSampleRate = 200;
QVector<SampleSummer::Sum> SampleSummer::SumSamples(const float *samples, int nb_samples, int nb_channels) QVector<SampleSummer::Sum> SampleSummer::SumSamples(const float *samples, int nb_samples, int nb_channels)
@@ -84,3 +106,5 @@ SampleSummer::Info::Info()
{ {
channels = 0; channels = 0;
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef SUMSAMPLES_H #ifndef SUMSAMPLES_H
#define SUMSAMPLES_H #define SUMSAMPLES_H
@@ -6,6 +26,8 @@
#include "codec/samplebuffer.h" #include "codec/samplebuffer.h"
OLIVE_NAMESPACE_ENTER
class SampleSummer { class SampleSummer {
public: public:
struct Sum { struct Sum {
@@ -39,4 +61,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // SUMSAMPLES_H #endif // SUMSAMPLES_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "tempoprocessor.h" #include "tempoprocessor.h"
extern "C" { extern "C" {
@@ -10,6 +30,8 @@ extern "C" {
#include "codec/ffmpeg/ffmpegcommon.h" #include "codec/ffmpeg/ffmpegcommon.h"
OLIVE_NAMESPACE_ENTER
TempoProcessor::TempoProcessor() : TempoProcessor::TempoProcessor() :
filter_graph_(nullptr), filter_graph_(nullptr),
buffersrc_ctx_(nullptr), buffersrc_ctx_(nullptr),
@@ -251,3 +273,5 @@ AVFilterContext *TempoProcessor::CreateTempoFilter(AVFilterGraph* graph, AVFilte
return nullptr; return nullptr;
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef TEMPOPROCESSOR_H #ifndef TEMPOPROCESSOR_H
#define TEMPOPROCESSOR_H #define TEMPOPROCESSOR_H
@@ -15,6 +35,8 @@ extern "C" {
#include "render/audioparams.h" #include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class TempoProcessor class TempoProcessor
{ {
public: public:
@@ -56,4 +78,6 @@ private:
bool flushed_; bool flushed_;
}; };
OLIVE_NAMESPACE_EXIT
#endif // TEMPOPROCESSOR_H #endif // TEMPOPROCESSOR_H
+5 -1
View File
@@ -33,6 +33,8 @@
#include "task/index/index.h" #include "task/index/index.h"
#include "task/taskmanager.h" #include "task/taskmanager.h"
OLIVE_NAMESPACE_ENTER
Decoder::Decoder() : Decoder::Decoder() :
open_(false), open_(false),
stream_(nullptr) stream_(nullptr)
@@ -142,7 +144,7 @@ bool Decoder::ProbeMedia(Footage *f, const QAtomicInt* cancelled)
QMetaObject::invokeMethod(IndexManager::instance(), QMetaObject::invokeMethod(IndexManager::instance(),
"StartIndexingStream", "StartIndexingStream",
Qt::QueuedConnection, Qt::QueuedConnection,
Q_ARG(StreamPtr, stream)); OLIVE_NS_ARG(StreamPtr, stream));
} }
} }
@@ -357,3 +359,5 @@ void Decoder::SignalIndexProgress(const int64_t &ts)
emit IndexProgress(qRound(100.0 * static_cast<double>(ts) / static_cast<double>(stream()->duration()))); emit IndexProgress(qRound(100.0 * static_cast<double>(ts) / static_cast<double>(stream()->duration())));
} }
} }
OLIVE_NAMESPACE_EXIT
+9 -3
View File
@@ -21,6 +21,10 @@
#ifndef DECODER_H #ifndef DECODER_H
#define DECODER_H #define DECODER_H
extern "C" {
#include <libswresample/swresample.h>
}
#include <QMutex> #include <QMutex>
#include <QObject> #include <QObject>
#include <stdint.h> #include <stdint.h>
@@ -32,11 +36,11 @@
#include "common/rational.h" #include "common/rational.h"
#include "project/item/footage/footage.h" #include "project/item/footage/footage.h"
OLIVE_NAMESPACE_ENTER
class Decoder; class Decoder;
using DecoderPtr = std::shared_ptr<Decoder>; using DecoderPtr = std::shared_ptr<Decoder>;
struct SwrContext;
/** /**
* @brief A decoder's is the main class for bringing external media into Olive * @brief A decoder's is the main class for bringing external media into Olive
* *
@@ -276,6 +280,8 @@ private:
}; };
Q_DECLARE_METATYPE(Decoder::RetrieveState) OLIVE_NAMESPACE_EXIT
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::Decoder::RetrieveState)
#endif // DECODER_H #endif // DECODER_H
+24
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "encoder.h" #include "encoder.h"
#include "ffmpeg/ffmpegencoder.h" #include "ffmpeg/ffmpegencoder.h"
OLIVE_NAMESPACE_ENTER
Encoder::Encoder(const EncodingParams &params) : Encoder::Encoder(const EncodingParams &params) :
params_(params), params_(params),
open_(false) open_(false)
@@ -168,3 +190,5 @@ void Encoder::Close()
emit Closed(); emit Closed();
} }
OLIVE_NAMESPACE_EXIT
+26 -2
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef ENCODER_H #ifndef ENCODER_H
#define ENCODER_H #define ENCODER_H
@@ -10,6 +30,8 @@
#include "render/audioparams.h" #include "render/audioparams.h"
#include "render/videoparams.h" #include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
class Encoder; class Encoder;
using EncoderPtr = std::shared_ptr<Encoder>; using EncoderPtr = std::shared_ptr<Encoder>;
@@ -82,8 +104,8 @@ public:
public slots: public slots:
void Open(); void Open();
void WriteFrame(FramePtr frame); void WriteFrame(OLIVE_NAMESPACE::FramePtr frame);
virtual void WriteAudio(const AudioRenderingParams& pcm_info, const QString& pcm_filename, const TimeRange &range) = 0; virtual void WriteAudio(OLIVE_NAMESPACE::AudioRenderingParams pcm_info, const QString& pcm_filename, OLIVE_NAMESPACE::TimeRange range) = 0;
void Close(); void Close();
signals: signals:
@@ -107,4 +129,6 @@ private:
bool open_; bool open_;
}; };
OLIVE_NAMESPACE_EXIT
#endif // ENCODER_H #endif // ENCODER_H
+24
View File
@@ -1,5 +1,27 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "ffmpegcommon.h" #include "ffmpegcommon.h"
OLIVE_NAMESPACE_ENTER
AVPixelFormat FFmpegCommon::GetCompatiblePixelFormat(const AVPixelFormat &pix_fmt) AVPixelFormat FFmpegCommon::GetCompatiblePixelFormat(const AVPixelFormat &pix_fmt)
{ {
AVPixelFormat possible_pix_fmts[] = { AVPixelFormat possible_pix_fmts[] = {
@@ -113,3 +135,5 @@ PixelFormat::Format FFmpegCommon::GetCompatiblePixelFormat(const PixelFormat::Fo
return PixelFormat::PIX_FMT_INVALID; return PixelFormat::PIX_FMT_INVALID;
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FFMPEGABSTRACTION_H #ifndef FFMPEGABSTRACTION_H
#define FFMPEGABSTRACTION_H #define FFMPEGABSTRACTION_H
@@ -8,6 +28,8 @@ extern "C" {
#include "audio/sampleformat.h" #include "audio/sampleformat.h"
#include "render/pixelformat.h" #include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
class FFmpegCommon { class FFmpegCommon {
public: public:
/** /**
@@ -36,4 +58,6 @@ public:
static AVSampleFormat GetFFmpegSampleFormat(const SampleFormat::Format &smp_fmt); static AVSampleFormat GetFFmpegSampleFormat(const SampleFormat::Format &smp_fmt);
}; };
OLIVE_NAMESPACE_EXIT
#endif // FFMPEGABSTRACTION_H #endif // FFMPEGABSTRACTION_H
+4
View File
@@ -42,6 +42,8 @@ extern "C" {
#include "render/diskmanager.h" #include "render/diskmanager.h"
#include "render/pixelformat.h" #include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
FFmpegDecoder::FFmpegDecoder() : FFmpegDecoder::FFmpegDecoder() :
fmt_ctx_(nullptr), fmt_ctx_(nullptr),
codec_ctx_(nullptr), codec_ctx_(nullptr),
@@ -992,3 +994,5 @@ void FFmpegDecoder::ClearTimerEvent()
cache_at_zero_ = false; cache_at_zero_ = false;
cached_frames_.remove_old_frames(QDateTime::currentMSecsSinceEpoch() - clear_timer_.interval()); cached_frames_.remove_old_frames(QDateTime::currentMSecsSinceEpoch() - clear_timer_.interval());
} }
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -37,6 +37,8 @@ extern "C" {
#include "ffmpegframecache.h" #include "ffmpegframecache.h"
#include "project/item/footage/videostream.h" #include "project/item/footage/videostream.h"
OLIVE_NAMESPACE_ENTER
/** /**
* @brief A Decoder derivative that wraps FFmpeg functions as on Olive decoder * @brief A Decoder derivative that wraps FFmpeg functions as on Olive decoder
*/ */
@@ -134,4 +136,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // FFMPEGDECODER_H #endif // FFMPEGDECODER_H
+25 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "ffmpegencoder.h" #include "ffmpegencoder.h"
#include <QFile> #include <QFile>
@@ -5,6 +25,8 @@
#include "ffmpegcommon.h" #include "ffmpegcommon.h"
#include "render/pixelformat.h" #include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
FFmpegEncoder::FFmpegEncoder(const EncodingParams &params) : FFmpegEncoder::FFmpegEncoder(const EncodingParams &params) :
Encoder(params), Encoder(params),
fmt_ctx_(nullptr), fmt_ctx_(nullptr),
@@ -17,7 +39,7 @@ FFmpegEncoder::FFmpegEncoder(const EncodingParams &params) :
{ {
} }
void FFmpegEncoder::WriteAudio(const AudioRenderingParams &pcm_info, const QString &pcm_filename, const TimeRange& range) void FFmpegEncoder::WriteAudio(AudioRenderingParams pcm_info, const QString &pcm_filename, TimeRange range)
{ {
QFile pcm(pcm_filename); QFile pcm(pcm_filename);
if (pcm.open(QFile::ReadOnly)) { if (pcm.open(QFile::ReadOnly)) {
@@ -504,3 +526,5 @@ void FFmpegEncoder::Error(const QString &s)
Close(); Close();
} }
OLIVE_NAMESPACE_EXIT
+25 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FFMPEGENCODER_H #ifndef FFMPEGENCODER_H
#define FFMPEGENCODER_H #define FFMPEGENCODER_H
@@ -10,6 +30,8 @@ extern "C" {
#include "codec/encoder.h" #include "codec/encoder.h"
OLIVE_NAMESPACE_ENTER
class FFmpegEncoder : public Encoder class FFmpegEncoder : public Encoder
{ {
Q_OBJECT Q_OBJECT
@@ -17,7 +39,7 @@ public:
FFmpegEncoder(const EncodingParams &params); FFmpegEncoder(const EncodingParams &params);
public slots: public slots:
virtual void WriteAudio(const AudioRenderingParams& pcm_info, const QString& pcm_filename, const TimeRange &range) override; virtual void WriteAudio(OLIVE_NAMESPACE::AudioRenderingParams pcm_info, const QString& pcm_filename, OLIVE_NAMESPACE::TimeRange range) override;
protected: protected:
virtual bool OpenInternal() override; virtual bool OpenInternal() override;
@@ -66,4 +88,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // FFMPEGENCODER_H #endif // FFMPEGENCODER_H
+24
View File
@@ -1,8 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "ffmpegframecache.h" #include "ffmpegframecache.h"
#include <QDateTime> #include <QDateTime>
#include <QDebug> #include <QDebug>
OLIVE_NAMESPACE_ENTER
QMutex FFmpegFrameCache::pool_lock_; QMutex FFmpegFrameCache::pool_lock_;
QList<Frame*> FFmpegFrameCache::frame_pool_; QList<Frame*> FFmpegFrameCache::frame_pool_;
@@ -97,3 +119,5 @@ void FFmpegFrameCache::Release(Frame *f)
frame_pool_.append(f); frame_pool_.append(f);
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FFMPEGFRAMECACHE_H #ifndef FFMPEGFRAMECACHE_H
#define FFMPEGFRAMECACHE_H #define FFMPEGFRAMECACHE_H
@@ -7,6 +27,8 @@
#include "codec/frame.h" #include "codec/frame.h"
#include "render/videoparams.h" #include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
class FFmpegFrameCache class FFmpegFrameCache
{ {
public: public:
@@ -53,4 +75,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // FFMPEGFRAMECACHE_H #endif // FFMPEGFRAMECACHE_H
+4
View File
@@ -23,6 +23,8 @@
#include <QDebug> #include <QDebug>
#include <QtGlobal> #include <QtGlobal>
OLIVE_NAMESPACE_ENTER
Frame::Frame() : Frame::Frame() :
timestamp_(0), timestamp_(0),
sample_aspect_ratio_(1) sample_aspect_ratio_(1)
@@ -147,3 +149,5 @@ int Frame::allocated_size() const
{ {
return data_.size(); return data_.size();
} }
OLIVE_NAMESPACE_EXIT
+5 -1
View File
@@ -29,6 +29,8 @@
#include "render/pixelformat.h" #include "render/pixelformat.h"
#include "render/videoparams.h" #include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
class Frame; class Frame;
using FramePtr = std::shared_ptr<Frame>; using FramePtr = std::shared_ptr<Frame>;
@@ -122,6 +124,8 @@ private:
}; };
Q_DECLARE_METATYPE(FramePtr) OLIVE_NAMESPACE_EXIT
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::FramePtr)
#endif // FRAME_H #endif // FRAME_H
+4
View File
@@ -30,6 +30,8 @@
#include "config/config.h" #include "config/config.h"
#include "core.h" #include "core.h"
OLIVE_NAMESPACE_ENTER
QStringList OIIODecoder::supported_formats_; QStringList OIIODecoder::supported_formats_;
OIIODecoder::OIIODecoder() : OIIODecoder::OIIODecoder() :
@@ -347,3 +349,5 @@ void OIIODecoder::CloseImageHandle()
buffer_ = nullptr; buffer_ = nullptr;
} }
} }
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -27,6 +27,8 @@
#include "codec/decoder.h" #include "codec/decoder.h"
#include "render/pixelformat.h" #include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
class OIIODecoder : public Decoder class OIIODecoder : public Decoder
{ {
Q_OBJECT Q_OBJECT
@@ -78,4 +80,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // OIIODECODER_H #endif // OIIODECODER_H
+24
View File
@@ -1,5 +1,27 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "samplebuffer.h" #include "samplebuffer.h"
OLIVE_NAMESPACE_ENTER
SampleBuffer::SampleBuffer() : SampleBuffer::SampleBuffer() :
sample_count_per_channel_(0), sample_count_per_channel_(0),
data_(nullptr) data_(nullptr)
@@ -252,3 +274,5 @@ void SampleBuffer::destroy_sample_buffer(float ***data, int nb_channels)
*data = nullptr; *data = nullptr;
} }
} }
OLIVE_NAMESPACE_EXIT
+25 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef SAMPLEBUFFER_H #ifndef SAMPLEBUFFER_H
#define SAMPLEBUFFER_H #define SAMPLEBUFFER_H
@@ -6,6 +26,8 @@
#include "common/constructors.h" #include "common/constructors.h"
#include "render/audioparams.h" #include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class SampleBuffer; class SampleBuffer;
using SampleBufferPtr = std::shared_ptr<SampleBuffer>; using SampleBufferPtr = std::shared_ptr<SampleBuffer>;
@@ -69,6 +91,8 @@ private:
}; };
Q_DECLARE_METATYPE(SampleBufferPtr) OLIVE_NAMESPACE_EXIT
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::SampleBufferPtr)
#endif // SAMPLEBUFFER_H #endif // SAMPLEBUFFER_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "waveinput.h" #include "waveinput.h"
extern "C" { extern "C" {
@@ -7,6 +27,8 @@ extern "C" {
#include <QDataStream> #include <QDataStream>
#include <QtMath> #include <QtMath>
OLIVE_NAMESPACE_ENTER
WaveInput::WaveInput(const QString &f) : WaveInput::WaveInput(const QString &f) :
file_(f) file_(f)
{ {
@@ -216,3 +238,5 @@ qint64 WaveInput::calculate_max_read() const
{ {
return data_size_ - (file_.pos() - data_position_ ); return data_size_ - (file_.pos() - data_position_ );
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef WAVEINPUT_H #ifndef WAVEINPUT_H
#define WAVEINPUT_H #define WAVEINPUT_H
@@ -6,6 +26,8 @@
#include "common/constructors.h" #include "common/constructors.h"
#include "render/audioparams.h" #include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class WaveInput class WaveInput
{ {
public: public:
@@ -49,4 +71,6 @@ private:
quint32 data_size_; quint32 data_size_;
}; };
OLIVE_NAMESPACE_EXIT
#endif // WAVEINPUT_H #endif // WAVEINPUT_H
+24
View File
@@ -1,5 +1,27 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "waveoutput.h" #include "waveoutput.h"
OLIVE_NAMESPACE_ENTER
const int16_t kWAVIntegerFormat = 1; const int16_t kWAVIntegerFormat = 1;
const int16_t kWAVFloatFormat = 3; const int16_t kWAVFloatFormat = 3;
@@ -152,3 +174,5 @@ void WaveOutput::write_int(QFile *file, T integer)
file->write(bytes); file->write(bytes);
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef WAVEAUDIO_H #ifndef WAVEAUDIO_H
#define WAVEAUDIO_H #define WAVEAUDIO_H
@@ -8,6 +28,8 @@
#include "common/constructors.h" #include "common/constructors.h"
#include "render/audioparams.h" #include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class WaveOutput class WaveOutput
{ {
public: public:
@@ -43,4 +65,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // WAVEAUDIO_H #endif // WAVEAUDIO_H
+26
View File
@@ -1,6 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef AUTOSCROLL_H #ifndef AUTOSCROLL_H
#define AUTOSCROLL_H #define AUTOSCROLL_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class AutoScroll { class AutoScroll {
public: public:
enum Method { enum Method {
@@ -10,4 +34,6 @@ public:
}; };
}; };
OLIVE_NAMESPACE_EXIT
#endif // AUTOSCROLL_H #endif // AUTOSCROLL_H
+24
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "bezier.h" #include "bezier.h"
#include <QtMath> #include <QtMath>
OLIVE_NAMESPACE_ENTER
double Bezier::QuadraticXtoT(double x, double a, double b, double c) double Bezier::QuadraticXtoT(double x, double a, double b, double c)
{ {
return (a - b + qSqrt(a*x + c*x - 2*b*x + qPow(b, 2) - a*c))/(a - 2*b + c); return (a - b + qSqrt(a*x + c*x - 2*b*x + qPow(b, 2) - a*c))/(a - 2*b + c);
@@ -40,3 +62,5 @@ double Bezier::CubicTtoY(double a, double b, double c, double d, double t)
{ {
return qPow(1.0 - t, 3)*a + 3*qPow(1.0 - t, 2)*t*b + 3*(1.0 - t)*qPow(t, 2)*c + qPow(t, 3)*d; return qPow(1.0 - t, 3)*a + 3*qPow(1.0 - t, 2)*t*b + 3*(1.0 - t)*qPow(t, 2)*c + qPow(t, 3)*d;
} }
OLIVE_NAMESPACE_EXIT
+25
View File
@@ -1,6 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef BEZIER_H #ifndef BEZIER_H
#define BEZIER_H #define BEZIER_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class Bezier class Bezier
{ {
@@ -14,4 +37,6 @@ public:
static double CubicTtoY(double a, double b, double c, double d, double t); static double CubicTtoY(double a, double b, double c, double d, double t);
}; };
OLIVE_NAMESPACE_EXIT
#endif // BEZIER_H #endif // BEZIER_H
+26
View File
@@ -1,8 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CANCELABLEOBJECT_H #ifndef CANCELABLEOBJECT_H
#define CANCELABLEOBJECT_H #define CANCELABLEOBJECT_H
#include <QAtomicInt> #include <QAtomicInt>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class CancelableObject { class CancelableObject {
public: public:
CancelableObject() : CancelableObject() :
@@ -23,4 +47,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // CANCELABLEOBJECT_H #endif // CANCELABLEOBJECT_H
+26
View File
@@ -1,6 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CONSTRUCTORS_H #ifndef CONSTRUCTORS_H
#define CONSTRUCTORS_H #define CONSTRUCTORS_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
/** /**
* Copy/move deleters. Similar to Q_DISABLE_COPY_MOVE, et al. but those functions are not present in Qt < 5.13 so we * Copy/move deleters. Similar to Q_DISABLE_COPY_MOVE, et al. but those functions are not present in Qt < 5.13 so we
* use our own functions for portability. * use our own functions for portability.
@@ -18,4 +42,6 @@
DISABLE_COPY(Class) \ DISABLE_COPY(Class) \
DISABLE_MOVE(Class) DISABLE_MOVE(Class)
OLIVE_NAMESPACE_EXIT
#endif // CONSTRUCTORS_H #endif // CONSTRUCTORS_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "crashhandler.h" #include "crashhandler.h"
#include <QApplication> #include <QApplication>
@@ -17,6 +37,8 @@
#include <execinfo.h> #include <execinfo.h>
#endif #endif
OLIVE_NAMESPACE_ENTER
void crash_handler(int sig) { void crash_handler(int sig) {
QString log_path = QDir(QStandardPaths::writableLocation(QStandardPaths::TempLocation)).filePath(QStringLiteral("olive_crash")); QString log_path = QDir(QStandardPaths::writableLocation(QStandardPaths::TempLocation)).filePath(QStringLiteral("olive_crash"));
QFile output(log_path); QFile output(log_path);
@@ -118,3 +140,5 @@ void crash_handler(int sig) {
exit(1); exit(1);
} }
OLIVE_NAMESPACE_EXIT
+26
View File
@@ -1,6 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CRASHHANDLER_H #ifndef CRASHHANDLER_H
#define CRASHHANDLER_H #define CRASHHANDLER_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
void crash_handler(int sig); void crash_handler(int sig);
OLIVE_NAMESPACE_EXIT
#endif // CRASHHANDLER_H #endif // CRASHHANDLER_H
+23
View File
@@ -1,5 +1,26 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "debug.h" #include "debug.h"
OLIVE_NAMESPACE_ENTER
void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{ {
@@ -32,3 +53,5 @@ void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QStri
fflush(stderr); fflush(stderr);
#endif #endif
} }
OLIVE_NAMESPACE_EXIT
+26
View File
@@ -1,8 +1,34 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef DEBUG_H #ifndef DEBUG_H
#define DEBUG_H #define DEBUG_H
#include <QDebug> #include <QDebug>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg); void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
OLIVE_NAMESPACE_EXIT
#endif // DEBUG_H #endif // DEBUG_H
+13 -2
View File
@@ -21,6 +21,14 @@
#ifndef OLIVECOMMONDEFINE_H #ifndef OLIVECOMMONDEFINE_H
#define OLIVECOMMONDEFINE_H #define OLIVECOMMONDEFINE_H
#define OLIVE_NAMESPACE olive
#define OLIVE_NAMESPACE_ENTER namespace OLIVE_NAMESPACE {
#define OLIVE_NAMESPACE_EXIT }
OLIVE_NAMESPACE_ENTER
const int kHSVChannels = 3; const int kHSVChannels = 3;
const int kRGBChannels = 3; const int kRGBChannels = 3;
const int kRGBAChannels = 4; const int kRGBAChannels = 4;
@@ -34,8 +42,11 @@ const int kProjectIconSizeMaximum = 256;
/// The default size an icon in ProjectExplorer can be /// The default size an icon in ProjectExplorer can be
const int kProjectIconSizeDefault = 64; const int kProjectIconSizeDefault = 64;
#define OLIVE_NAMESPACE_ENTER namespace olive { OLIVE_NAMESPACE_EXIT
#define OLIVE_NAMESPACE_EXIT } #define MACRO_NAME_AS_STR(s) #s
#define MACRO_VAL_AS_STR(s) MACRO_NAME_AS_STR(s)
#define OLIVE_NS_ARG(x, y) QArgument<OLIVE_NAMESPACE::x>(MACRO_VAL_AS_STR(OLIVE_NAMESPACE) "::" #x, y)
#endif // OLIVECOMMONDEFINE_H #endif // OLIVECOMMONDEFINE_H
+4
View File
@@ -29,6 +29,8 @@
#include "config/config.h" #include "config/config.h"
OLIVE_NAMESPACE_ENTER
QString GetUniqueFileIdentifier(const QString &filename) QString GetUniqueFileIdentifier(const QString &filename)
{ {
QFileInfo info(filename); QFileInfo info(filename);
@@ -95,3 +97,5 @@ QString GetApplicationPath()
{ {
return QCoreApplication::applicationDirPath(); return QCoreApplication::applicationDirPath();
} }
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,10 @@
#include <QString> #include <QString>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
bool IsPortable(); bool IsPortable();
QString GetUniqueFileIdentifier(const QString& filename); QString GetUniqueFileIdentifier(const QString& filename);
@@ -37,4 +41,6 @@ QString GetConfigurationLocation();
QString GetApplicationPath(); QString GetApplicationPath();
OLIVE_NAMESPACE_EXIT
#endif // FILEFUNCTIONS_H #endif // FILEFUNCTIONS_H
+4
View File
@@ -20,6 +20,8 @@
#include "flipmodifiers.h" #include "flipmodifiers.h"
OLIVE_NAMESPACE_ENTER
Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e) { Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e) {
if (e & Qt::ControlModifier & Qt::ShiftModifier) { if (e & Qt::ControlModifier & Qt::ShiftModifier) {
return e; return e;
@@ -35,3 +37,5 @@ Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e) {
return e; return e;
} }
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,12 @@
#include <QtCore> #include <QtCore>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e); Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e);
OLIVE_NAMESPACE_EXIT
#endif // FLIPMODIFIERS_H #endif // FLIPMODIFIERS_H
+20
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef FUNCTIONTIMER_H #ifndef FUNCTIONTIMER_H
#define FUNCTIONTIMER_H #define FUNCTIONTIMER_H
+4
View File
@@ -20,6 +20,8 @@
#include "qtutils.h" #include "qtutils.h"
OLIVE_NAMESPACE_ENTER
int QFontMetricsWidth(QFontMetrics fm, const QString& s) { int QFontMetricsWidth(QFontMetrics fm, const QString& s) {
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0) #if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
return fm.width(s); return fm.width(s);
@@ -27,3 +29,5 @@ int QFontMetricsWidth(QFontMetrics fm, const QString& s) {
return fm.horizontalAdvance(s); return fm.horizontalAdvance(s);
#endif #endif
} }
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -29,6 +29,10 @@
#include <QFontMetrics> #include <QFontMetrics>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
/** /**
* @brief Retrieves the width of a string according to certain QFontMetrics * @brief Retrieves the width of a string according to certain QFontMetrics
* *
@@ -37,4 +41,6 @@
*/ */
int QFontMetricsWidth(QFontMetrics fm, const QString& s); int QFontMetricsWidth(QFontMetrics fm, const QString& s);
OLIVE_NAMESPACE_EXIT
#endif // QTVERSIONABSTRACTION_H #endif // QTVERSIONABSTRACTION_H
+13 -8
View File
@@ -3,6 +3,8 @@
#include "rational.h" #include "rational.h"
OLIVE_NAMESPACE_ENTER
rational::rational(const AVRational &r) : rational::rational(const AVRational &r) :
numer(r.num), numer(r.num),
denom(r.den) denom(r.den)
@@ -32,7 +34,7 @@ rational rational::fromString(const QString &str)
//Function: print number to cout //Function: print number to cout
void rational::print(ostream &out) const void rational::print(std::ostream &out) const
{ {
out << this->numer << "/" << this->denom; out << this->numer << "/" << this->denom;
} }
@@ -425,7 +427,7 @@ bool rational::operator!() const
//IO //IO
ostream& operator<<(ostream &out, const rational &value) std::ostream& operator<<(std::ostream &out, const rational &value)
{ {
out << value.numer; out << value.numer;
if(value.denom != 1) if(value.denom != 1)
@@ -436,7 +438,7 @@ ostream& operator<<(ostream &out, const rational &value)
return out; return out;
} }
istream& operator>>(istream &in, rational &value) std::istream& operator>>(std::istream &in, rational &value)
{ {
in >> value.numer; in >> value.numer;
value.denom = 1; value.denom = 1;
@@ -458,13 +460,16 @@ istream& operator>>(istream &in, rational &value)
return in; return in;
} }
QDebug operator<<(QDebug debug, const rational &r) uint qHash(const rational &r, uint seed)
{
return ::qHash(r.toDouble(), seed);
}
OLIVE_NAMESPACE_EXIT
QDebug operator<<(QDebug debug, const OLIVE_NAMESPACE::rational &r)
{ {
debug.nospace() << r.numerator() << "/" << r.denominator(); debug.nospace() << r.numerator() << "/" << r.denominator();
return debug.space(); return debug.space();
} }
uint qHash(const rational &r, uint seed)
{
return qHash(r.toDouble(), seed);
}
+12 -8
View File
@@ -14,7 +14,9 @@ extern "C" {
#include <libavformat/avformat.h> #include <libavformat/avformat.h>
} }
using namespace std; #include "common/define.h"
OLIVE_NAMESPACE_ENTER
typedef int64_t intType; typedef int64_t intType;
/* /*
@@ -90,11 +92,11 @@ public:
bool isNull() const; bool isNull() const;
//Function: print number to cout //Function: print number to cout
void print(ostream &out = cout) const; void print(std::ostream &out = std::cout) const;
//IO //IO
friend ostream& operator<<(ostream &out, const rational &value); friend std::ostream& operator<<(std::ostream &out, const rational &value);
friend istream& operator>>(istream &in, rational &value); friend std::istream& operator>>(std::istream &in, rational &value);
const intType& numerator() const; const intType& numerator() const;
const intType& denominator() const; const intType& denominator() const;
@@ -116,14 +118,16 @@ private:
intType gcd(intType &x, intType &y); intType gcd(intType &x, intType &y);
}; };
QDebug operator<<(QDebug debug, const rational& r);
// We define these limits at 32-bit to try avoiding integer overflow // We define these limits at 32-bit to try avoiding integer overflow
#define RATIONAL_MIN rational(INT32_MIN, 1) #define RATIONAL_MIN rational(INT32_MIN, 1)
#define RATIONAL_MAX rational(INT32_MAX, 1) #define RATIONAL_MAX rational(INT32_MAX, 1)
Q_DECLARE_METATYPE(rational)
uint qHash(const rational& r, uint seed); uint qHash(const rational& r, uint seed);
OLIVE_NAMESPACE_EXIT
QDebug operator<<(QDebug debug, const OLIVE_NAMESPACE::rational& r);
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::rational)
#endif // RATIONAL_H #endif // RATIONAL_H
+24
View File
@@ -1,5 +1,27 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "threadedobject.h" #include "threadedobject.h"
OLIVE_NAMESPACE_ENTER
void ThreadedObject::LockDeletes() void ThreadedObject::LockDeletes()
{ {
threadobj_delete_lock_++; threadobj_delete_lock_++;
@@ -31,3 +53,5 @@ bool ThreadedObject::TryLockMutex(int timeout)
{ {
return threadobj_main_lock_.tryLock(timeout); return threadobj_main_lock_.tryLock(timeout);
} }
OLIVE_NAMESPACE_EXIT
+26
View File
@@ -1,8 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef THREADEDOBJECT_H #ifndef THREADEDOBJECT_H
#define THREADEDOBJECT_H #define THREADEDOBJECT_H
#include <QMutex> #include <QMutex>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ThreadedObject class ThreadedObject
{ {
public: public:
@@ -21,4 +45,6 @@ private:
QAtomicInt threadobj_delete_lock_; QAtomicInt threadobj_delete_lock_;
}; };
OLIVE_NAMESPACE_EXIT
#endif // THREADEDOBJECT_H #endif // THREADEDOBJECT_H
+4
View File
@@ -24,6 +24,8 @@
#include "config/config.h" #include "config/config.h"
OLIVE_NAMESPACE_ENTER
QString padded(int64_t arg, int padding) { QString padded(int64_t arg, int padding) {
return QStringLiteral("%1").arg(arg, padding, 10, QChar('0')); return QStringLiteral("%1").arg(arg, padding, 10, QChar('0'));
} }
@@ -273,3 +275,5 @@ int64_t Timecode::rescale_timestamp_ceil(const int64_t &ts, const rational &sour
{ {
return qCeil(static_cast<double>(ts) * source.toDouble() / dest.toDouble()); return qCeil(static_cast<double>(ts) * source.toDouble() / dest.toDouble());
} }
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -25,6 +25,8 @@
#include "common/rational.h" #include "common/rational.h"
OLIVE_NAMESPACE_ENTER
/** /**
* @brief Functions for converting times/timecodes/timestamps * @brief Functions for converting times/timecodes/timestamps
* *
@@ -68,4 +70,6 @@ public:
}; };
OLIVE_NAMESPACE_EXIT
#endif // TIMECODEFUNCTIONS_H #endif // TIMECODEFUNCTIONS_H
+26
View File
@@ -1,6 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef TIMELINECOMMON_H #ifndef TIMELINECOMMON_H
#define TIMELINECOMMON_H #define TIMELINECOMMON_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class Timeline { class Timeline {
public: public:
enum MovementMode { enum MovementMode {
@@ -21,4 +45,6 @@ public:
static bool IsATrimMode(MovementMode mode) {return mode == kTrimIn || mode == kTrimOut;} static bool IsATrimMode(MovementMode mode) {return mode == kTrimIn || mode == kTrimOut;}
}; };
OLIVE_NAMESPACE_EXIT
#endif // TIMELINECOMMON_H #endif // TIMELINECOMMON_H
+29 -5
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "timerange.h" #include "timerange.h"
#include <utility> #include <utility>
OLIVE_NAMESPACE_ENTER
TimeRange::TimeRange(const rational &in, const rational &out) : TimeRange::TimeRange(const rational &in, const rational &out) :
in_(in), in_(in),
out_(out) out_(out)
@@ -94,11 +116,6 @@ void TimeRange::normalize()
length_ = out_ - in_; length_ = out_ - in_;
} }
uint qHash(const TimeRange &r, uint seed)
{
return qHash(r.in(), seed) ^ qHash(r.out(), seed);
}
void TimeRangeList::InsertTimeRange(const TimeRange &range) void TimeRangeList::InsertTimeRange(const TimeRange &range)
{ {
for (int i=0;i<size();i++) { for (int i=0;i<size();i++) {
@@ -177,3 +194,10 @@ TimeRangeList TimeRangeList::Intersects(const TimeRange &range)
return intersect_list; return intersect_list;
} }
uint qHash(const TimeRange &r, uint seed)
{
return qHash(r.in(), seed) ^ qHash(r.out(), seed);
}
OLIVE_NAMESPACE_EXIT
+28 -4
View File
@@ -1,8 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef TIMERANGE_H #ifndef TIMERANGE_H
#define TIMERANGE_H #define TIMERANGE_H
#include "rational.h" #include "rational.h"
OLIVE_NAMESPACE_ENTER
class TimeRange { class TimeRange {
public: public:
TimeRange() = default; TimeRange() = default;
@@ -34,10 +56,6 @@ private:
}; };
Q_DECLARE_METATYPE(TimeRange)
uint qHash(const TimeRange& r, uint seed);
class TimeRangeList : public QList<TimeRange> { class TimeRangeList : public QList<TimeRange> {
public: public:
TimeRangeList() = default; TimeRangeList() = default;
@@ -52,4 +70,10 @@ public:
}; };
uint qHash(const TimeRange& r, uint seed);
OLIVE_NAMESPACE_EXIT
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::TimeRange)
#endif // TIMERANGE_H #endif // TIMERANGE_H
+24
View File
@@ -1,9 +1,31 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "xmlutils.h" #include "xmlutils.h"
#include "node/block/block.h" #include "node/block/block.h"
#include "node/factory.h" #include "node/factory.h"
#include "widget/nodeview/nodeviewundo.h" #include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
Node* XMLLoadNode(QXmlStreamReader* reader) { Node* XMLLoadNode(QXmlStreamReader* reader) {
QString node_id; QString node_id;
quintptr node_ptr = 0; quintptr node_ptr = 0;
@@ -74,3 +96,5 @@ void XMLLinkBlocks(const XMLNodeData &xml_node_data)
} }
} }
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef XMLREADLOOP_H #ifndef XMLREADLOOP_H
#define XMLREADLOOP_H #define XMLREADLOOP_H
@@ -6,6 +26,8 @@
#include "project/item/footage/stream.h" #include "project/item/footage/stream.h"
OLIVE_NAMESPACE_ENTER
class Block; class Block;
class Node; class Node;
class NodeParam; class NodeParam;
@@ -48,4 +70,6 @@ bool XMLReadNextStartElement(QXmlStreamReader* reader);
void XMLLinkBlocks(const XMLNodeData& xml_node_data); void XMLLinkBlocks(const XMLNodeData& xml_node_data);
OLIVE_NAMESPACE_EXIT
#endif // XMLREADLOOP_H #endif // XMLREADLOOP_H
+4
View File
@@ -33,6 +33,8 @@
#include "core.h" #include "core.h"
#include "window/mainwindow/mainwindow.h" #include "window/mainwindow/mainwindow.h"
OLIVE_NAMESPACE_ENTER
Config Config::current_config_; Config Config::current_config_;
Config::Config() Config::Config()
@@ -225,3 +227,5 @@ QVariant &Config::operator[](const QString &key)
{ {
return config_map_[key]; return config_map_[key];
} }
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -27,6 +27,8 @@
#include "common/timecodefunctions.h" #include "common/timecodefunctions.h"
OLIVE_NAMESPACE_ENTER
class Config { class Config {
public: public:
static Config& Current(); static Config& Current();
@@ -51,4 +53,6 @@ private:
static QString GetConfigFilePath(); static QString GetConfigFilePath();
}; };
OLIVE_NAMESPACE_EXIT
#endif // CONFIG_H #endif // CONFIG_H
+4
View File
@@ -58,6 +58,8 @@
#include "widget/taskview/taskviewitem.h" #include "widget/taskview/taskviewitem.h"
#include "window/mainwindow/mainwindow.h" #include "window/mainwindow/mainwindow.h"
OLIVE_NAMESPACE_ENTER
Core Core::instance_; Core Core::instance_;
Core::Core() : Core::Core() :
@@ -736,3 +738,5 @@ void Core::OpenProject()
OpenProjectInternal(file); OpenProjectInternal(file);
} }
} }
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -35,6 +35,8 @@
#include "tool/tool.h" #include "tool/tool.h"
#include "undo/undostack.h" #include "undo/undostack.h"
OLIVE_NAMESPACE_ENTER
class MainWindow; class MainWindow;
/** /**
@@ -403,4 +405,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // CORE_H #endif // CORE_H
+4
View File
@@ -25,6 +25,8 @@
#include <QLabel> #include <QLabel>
#include <QVBoxLayout> #include <QVBoxLayout>
OLIVE_NAMESPACE_ENTER
AboutDialog::AboutDialog(QWidget *parent) : AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent) QDialog(parent)
{ {
@@ -64,3 +66,5 @@ AboutDialog::AboutDialog(QWidget *parent) :
connect(buttons, SIGNAL(accepted()), this, SLOT(accept())); connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
} }
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,10 @@
#include <QDialog> #include <QDialog>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
/** /**
* @brief The AboutDialog class * @brief The AboutDialog class
* *
@@ -45,4 +49,6 @@ public:
explicit AboutDialog(QWidget *parent = nullptr); explicit AboutDialog(QWidget *parent = nullptr);
}; };
OLIVE_NAMESPACE_EXIT
#endif // ABOUTDIALOG_H #endif // ABOUTDIALOG_H
+4
View File
@@ -25,6 +25,8 @@
#include <QMenuBar> #include <QMenuBar>
#include <QLabel> #include <QLabel>
OLIVE_NAMESPACE_ENTER
ActionSearch::ActionSearch(QWidget *parent) : ActionSearch::ActionSearch(QWidget *parent) :
QDialog(parent), QDialog(parent),
menu_bar_(nullptr) menu_bar_(nullptr)
@@ -251,3 +253,5 @@ void ActionSearchList::mouseDoubleClickEvent(QMouseEvent *) {
emit dbl_click(); emit dbl_click();
} }
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -27,6 +27,10 @@
#include <QMenu> #include <QMenu>
#include <QMenuBar> #include <QMenuBar>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ActionSearchList; class ActionSearchList;
/** /**
@@ -178,4 +182,6 @@ signals:
void moveSelectionDown(); void moveSelectionDown();
}; };
OLIVE_NAMESPACE_EXIT
#endif // ACTIONSEARCH_H #endif // ACTIONSEARCH_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "colordialog.h" #include "colordialog.h"
#include <QDialogButtonBox> #include <QDialogButtonBox>
@@ -6,6 +26,8 @@
#include "common/qtutils.h" #include "common/qtutils.h"
OLIVE_NAMESPACE_ENTER
ColorDialog::ColorDialog(ColorManager* color_manager, Color start, QString input_cs, QWidget *parent) : ColorDialog::ColorDialog(ColorManager* color_manager, Color start, QString input_cs, QWidget *parent) :
QDialog(parent), QDialog(parent),
color_manager_(color_manager) color_manager_(color_manager)
@@ -127,3 +149,5 @@ void ColorDialog::ColorSpaceChanged(const QString &input, const QString &display
hsv_value_gradient_->SetColorProcessor(to_linear_processor_, to_display); hsv_value_gradient_->SetColorProcessor(to_linear_processor_, to_display);
color_values_widget_->preview_box()->SetColorProcessor(to_linear_processor_, to_display); color_values_widget_->preview_box()->SetColorProcessor(to_linear_processor_, to_display);
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef COLORDIALOG_H #ifndef COLORDIALOG_H
#define COLORDIALOG_H #define COLORDIALOG_H
@@ -10,6 +30,8 @@
#include "widget/colorwheel/colorwheelwidget.h" #include "widget/colorwheel/colorwheelwidget.h"
#include "widget/colorwheel/colorgradientwidget.h" #include "widget/colorwheel/colorgradientwidget.h"
OLIVE_NAMESPACE_ENTER
class ColorDialog : public QDialog class ColorDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
@@ -68,4 +90,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // COLORDIALOG_H #endif // COLORDIALOG_H
+24
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "colorpreviewbox.h" #include "colorpreviewbox.h"
#include <QPainter> #include <QPainter>
OLIVE_NAMESPACE_ENTER
ColorPreviewBox::ColorPreviewBox(QWidget *parent) : ColorPreviewBox::ColorPreviewBox(QWidget *parent) :
QWidget(parent) QWidget(parent)
{ {
@@ -41,3 +63,5 @@ void ColorPreviewBox::paintEvent(QPaintEvent *e)
p.drawRect(rect()); p.drawRect(rect());
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef COLORPREVIEWBOX_H #ifndef COLORPREVIEWBOX_H
#define COLORPREVIEWBOX_H #define COLORPREVIEWBOX_H
@@ -6,6 +26,8 @@
#include "render/color.h" #include "render/color.h"
#include "render/colorprocessor.h" #include "render/colorprocessor.h"
OLIVE_NAMESPACE_ENTER
class ColorPreviewBox : public QWidget class ColorPreviewBox : public QWidget
{ {
Q_OBJECT Q_OBJECT
@@ -29,4 +51,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // COLORPREVIEWBOX_H #endif // COLORPREVIEWBOX_H
+24
View File
@@ -1,8 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "colorspacechooser.h" #include "colorspacechooser.h"
#include <QGridLayout> #include <QGridLayout>
#include <QLabel> #include <QLabel>
OLIVE_NAMESPACE_ENTER
ColorSpaceChooser::ColorSpaceChooser(ColorManager* color_manager, bool enable_input_field, QWidget *parent): ColorSpaceChooser::ColorSpaceChooser(ColorManager* color_manager, bool enable_input_field, QWidget *parent):
QGroupBox(parent), QGroupBox(parent),
color_manager_(color_manager) color_manager_(color_manager)
@@ -145,3 +167,5 @@ void ColorSpaceChooser::ComboBoxChanged()
emit DisplayColorSpaceChanged(display(), view(), look()); emit DisplayColorSpaceChanged(display(), view(), look());
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef COLORSPACECHOOSER_H #ifndef COLORSPACECHOOSER_H
#define COLORSPACECHOOSER_H #define COLORSPACECHOOSER_H
@@ -6,6 +26,8 @@
#include "render/colormanager.h" #include "render/colormanager.h"
OLIVE_NAMESPACE_ENTER
class ColorSpaceChooser : public QGroupBox class ColorSpaceChooser : public QGroupBox
{ {
Q_OBJECT Q_OBJECT
@@ -43,4 +65,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // COLORSPACECHOOSER_H #endif // COLORSPACECHOOSER_H
+24
View File
@@ -1,7 +1,29 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "colorvalueswidget.h" #include "colorvalueswidget.h"
#include <QGridLayout> #include <QGridLayout>
OLIVE_NAMESPACE_ENTER
ColorValuesWidget::ColorValuesWidget(QWidget *parent) : ColorValuesWidget::ColorValuesWidget(QWidget *parent) :
QWidget(parent) QWidget(parent)
{ {
@@ -76,3 +98,5 @@ void ColorValuesWidget::SliderChanged()
emit ColorChanged(c); emit ColorChanged(c);
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef COLORVALUESWIDGET_H #ifndef COLORVALUESWIDGET_H
#define COLORVALUESWIDGET_H #define COLORVALUESWIDGET_H
@@ -7,6 +27,8 @@
#include "render/color.h" #include "render/color.h"
#include "widget/slider/floatslider.h" #include "widget/slider/floatslider.h"
OLIVE_NAMESPACE_ENTER
class ColorValuesWidget : public QWidget class ColorValuesWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT
@@ -37,4 +59,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // COLORVALUESWIDGET_H #endif // COLORVALUESWIDGET_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "crashhandler.h" #include "crashhandler.h"
#include <QFile> #include <QFile>
@@ -7,6 +27,8 @@
#include <QTextEdit> #include <QTextEdit>
#include <QVBoxLayout> #include <QVBoxLayout>
OLIVE_NAMESPACE_ENTER
CrashHandlerDialog::CrashHandlerDialog(const char *log_file) CrashHandlerDialog::CrashHandlerDialog(const char *log_file)
{ {
setWindowTitle(tr("Olive")); setWindowTitle(tr("Olive"));
@@ -59,3 +81,5 @@ void CrashHandlerDialog::reject()
{ {
QDialog::reject(); QDialog::reject();
} }
OLIVE_NAMESPACE_EXIT
+26
View File
@@ -1,8 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CRASHHANDLERDIALOG_H #ifndef CRASHHANDLERDIALOG_H
#define CRASHHANDLERDIALOG_H #define CRASHHANDLERDIALOG_H
#include <QDialog> #include <QDialog>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class CrashHandlerDialog : public QDialog class CrashHandlerDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
@@ -16,4 +40,6 @@ public slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // CRASHHANDLERDIALOG_H #endif // CRASHHANDLERDIALOG_H
+21 -1
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "crashhandler.h" #include "crashhandler.h"
#include <QApplication> #include <QApplication>
@@ -10,7 +30,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv); QApplication a(argc, argv);
CrashHandlerDialog chd(argv[1]); OLIVE_NAMESPACE::CrashHandlerDialog chd(argv[1]);
chd.open(); chd.open();
return a.exec(); return a.exec();
+24
View File
@@ -1,6 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "codecsection.h" #include "codecsection.h"
OLIVE_NAMESPACE_ENTER
CodecSection::CodecSection(QWidget *parent) : CodecSection::CodecSection(QWidget *parent) :
QWidget(parent) QWidget(parent)
{ {
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef CODECSECTION_H #ifndef CODECSECTION_H
#define CODECSECTION_H #define CODECSECTION_H
@@ -5,6 +25,8 @@
#include "codec/encoder.h" #include "codec/encoder.h"
OLIVE_NAMESPACE_ENTER
class CodecSection : public QWidget class CodecSection : public QWidget
{ {
public: public:
@@ -14,4 +36,6 @@ public:
}; };
OLIVE_NAMESPACE_EXIT
#endif // CODECSECTION_H #endif // CODECSECTION_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "h264section.h" #include "h264section.h"
#include <QCheckBox> #include <QCheckBox>
@@ -8,6 +28,8 @@
#include "common/qtutils.h" #include "common/qtutils.h"
#include "widget/slider/integerslider.h" #include "widget/slider/integerslider.h"
OLIVE_NAMESPACE_ENTER
H264Section::H264Section(QWidget *parent) : H264Section::H264Section(QWidget *parent) :
CodecSection(parent) CodecSection(parent)
{ {
@@ -184,3 +206,5 @@ int64_t H264FileSizeSection::GetFileSize() const
// Convert megabytes to BITS // Convert megabytes to BITS
return qRound64(file_size_->GetValue() * 1024.0 * 1024.0 * 8.0); return qRound64(file_size_->GetValue() * 1024.0 * 1024.0 * 8.0);
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef H264SECTION_H #ifndef H264SECTION_H
#define H264SECTION_H #define H264SECTION_H
@@ -7,6 +27,8 @@
#include "codecsection.h" #include "codecsection.h"
#include "widget/slider/floatslider.h" #include "widget/slider/floatslider.h"
OLIVE_NAMESPACE_ENTER
class H264CRFSection : public QWidget class H264CRFSection : public QWidget
{ {
public: public:
@@ -86,4 +108,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // H264SECTION_H #endif // H264SECTION_H
+24
View File
@@ -1,8 +1,30 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "imagesection.h" #include "imagesection.h"
#include <QGridLayout> #include <QGridLayout>
#include <QLabel> #include <QLabel>
OLIVE_NAMESPACE_ENTER
ImageSection::ImageSection(QWidget* parent) : ImageSection::ImageSection(QWidget* parent) :
CodecSection(parent) CodecSection(parent)
{ {
@@ -21,3 +43,5 @@ QCheckBox *ImageSection::image_sequence_checkbox() const
{ {
return image_sequence_checkbox_; return image_sequence_checkbox_;
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef IMAGESECTION_H #ifndef IMAGESECTION_H
#define IMAGESECTION_H #define IMAGESECTION_H
@@ -5,6 +25,8 @@
#include "codecsection.h" #include "codecsection.h"
OLIVE_NAMESPACE_ENTER
class ImageSection : public CodecSection class ImageSection : public CodecSection
{ {
public: public:
@@ -17,4 +39,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // IMAGESECTION_H #endif // IMAGESECTION_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "export.h" #include "export.h"
#include <QCloseEvent> #include <QCloseEvent>
@@ -15,6 +35,8 @@
#include "render/pixelformat.h" #include "render/pixelformat.h"
#include "ui/icons/icons.h" #include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
ExportDialog::ExportDialog(ViewerOutput *viewer_node, QWidget *parent) : ExportDialog::ExportDialog(ViewerOutput *viewer_node, QWidget *parent) :
QDialog(parent), QDialog(parent),
viewer_node_(viewer_node), viewer_node_(viewer_node),
@@ -613,3 +635,5 @@ void ExportDialog::UpdateTaskbarProgress(int progress)
} }
} }
#endif #endif
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef EXPORTDIALOG_H #ifndef EXPORTDIALOG_H
#define EXPORTDIALOG_H #define EXPORTDIALOG_H
@@ -18,6 +38,8 @@
#include "render/backend/exporter.h" #include "render/backend/exporter.h"
#include "widget/viewer/viewer.h" #include "widget/viewer/viewer.h"
OLIVE_NAMESPACE_ENTER
class ExportDialog : public QDialog class ExportDialog : public QDialog
{ {
Q_OBJECT Q_OBJECT
@@ -124,4 +146,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // EXPORTDIALOG_H #endif // EXPORTDIALOG_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "exportaudiotab.h" #include "exportaudiotab.h"
#include <QGridLayout> #include <QGridLayout>
@@ -5,6 +25,8 @@
#include "core.h" #include "core.h"
OLIVE_NAMESPACE_ENTER
ExportAudioTab::ExportAudioTab(QWidget* parent) : ExportAudioTab::ExportAudioTab(QWidget* parent) :
QWidget(parent) QWidget(parent)
{ {
@@ -74,3 +96,5 @@ void ExportAudioTab::set_channel_layout(uint64_t layout)
{ {
channel_layout_combobox_->setCurrentIndex(channel_layouts_.indexOf(layout)); channel_layout_combobox_->setCurrentIndex(channel_layouts_.indexOf(layout));
} }
OLIVE_NAMESPACE_EXIT
+26
View File
@@ -1,9 +1,33 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef EXPORTAUDIOTAB_H #ifndef EXPORTAUDIOTAB_H
#define EXPORTAUDIOTAB_H #define EXPORTAUDIOTAB_H
#include <QComboBox> #include <QComboBox>
#include <QWidget> #include <QWidget>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ExportAudioTab : public QWidget class ExportAudioTab : public QWidget
{ {
public: public:
@@ -25,4 +49,6 @@ private:
QList<uint64_t> channel_layouts_; QList<uint64_t> channel_layouts_;
}; };
OLIVE_NAMESPACE_EXIT
#endif // EXPORTAUDIOTAB_H #endif // EXPORTAUDIOTAB_H
+26
View File
@@ -1,8 +1,32 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef EXPORTCODEC_H #ifndef EXPORTCODEC_H
#define EXPORTCODEC_H #define EXPORTCODEC_H
#include <QString> #include <QString>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ExportCodec { class ExportCodec {
public: public:
enum Flag { enum Flag {
@@ -28,4 +52,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // EXPORTCODEC_H #endif // EXPORTCODEC_H
+26
View File
@@ -1,9 +1,33 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef EXPORTFORMAT_H #ifndef EXPORTFORMAT_H
#define EXPORTFORMAT_H #define EXPORTFORMAT_H
#include <QList> #include <QList>
#include <QString> #include <QString>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ExportFormat { class ExportFormat {
public: public:
ExportFormat(const QString& name, const QString& extension, const QString& encoder, const QList<int>& vcodecs, const QList<int>& acodecs) : ExportFormat(const QString& name, const QString& extension, const QString& encoder, const QList<int>& vcodecs, const QList<int>& acodecs) :
@@ -30,4 +54,6 @@ private:
}; };
OLIVE_NAMESPACE_EXIT
#endif // EXPORTFORMAT_H #endif // EXPORTFORMAT_H
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#include "exportvideotab.h" #include "exportvideotab.h"
#include <QCheckBox> #include <QCheckBox>
@@ -8,6 +28,8 @@
#include "core.h" #include "core.h"
#include "render/colormanager.h" #include "render/colormanager.h"
OLIVE_NAMESPACE_ENTER
ExportVideoTab::ExportVideoTab(ColorManager* color_manager, QWidget *parent) : ExportVideoTab::ExportVideoTab(ColorManager* color_manager, QWidget *parent) :
QWidget(parent), QWidget(parent),
color_manager_(color_manager) color_manager_(color_manager)
@@ -190,3 +212,5 @@ void ExportVideoTab::MaintainAspectRatioChanged(bool val)
{ {
scaling_method_combobox_->setEnabled(!val); scaling_method_combobox_->setEnabled(!val);
} }
OLIVE_NAMESPACE_EXIT
+24
View File
@@ -1,3 +1,23 @@
/***
Olive - Non-Linear Video Editor
Copyright (C) 2019 Olive Team
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
***/
#ifndef EXPORTVIDEOTAB_H #ifndef EXPORTVIDEOTAB_H
#define EXPORTVIDEOTAB_H #define EXPORTVIDEOTAB_H
@@ -12,6 +32,8 @@
#include "render/colormanager.h" #include "render/colormanager.h"
#include "widget/slider/integerslider.h" #include "widget/slider/integerslider.h"
OLIVE_NAMESPACE_ENTER
class ExportVideoTab : public QWidget class ExportVideoTab : public QWidget
{ {
Q_OBJECT Q_OBJECT
@@ -74,4 +96,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // EXPORTVIDEOTAB_H #endif // EXPORTVIDEOTAB_H
@@ -36,6 +36,8 @@
#include "streamproperties/audiostreamproperties.h" #include "streamproperties/audiostreamproperties.h"
#include "streamproperties/videostreamproperties.h" #include "streamproperties/videostreamproperties.h"
OLIVE_NAMESPACE_ENTER
FootagePropertiesDialog::FootagePropertiesDialog(QWidget *parent, Footage *footage) : FootagePropertiesDialog::FootagePropertiesDialog(QWidget *parent, Footage *footage) :
QDialog(parent), QDialog(parent),
footage_(footage) footage_(footage)
@@ -170,3 +172,5 @@ void FootagePropertiesDialog::StreamEnableChangeCommand::undo_internal()
{ {
stream_->set_enabled(old_enabled_); stream_->set_enabled(old_enabled_);
} }
OLIVE_NAMESPACE_EXIT
@@ -32,6 +32,8 @@
#include "project/item/footage/footage.h" #include "project/item/footage/footage.h"
#include "undo/undocommand.h" #include "undo/undocommand.h"
OLIVE_NAMESPACE_ENTER
/** /**
* @brief The MediaPropertiesDialog class * @brief The MediaPropertiesDialog class
* *
@@ -126,4 +128,6 @@ private slots:
}; };
OLIVE_NAMESPACE_EXIT
#endif // MEDIAPROPERTIESDIALOG_H #endif // MEDIAPROPERTIESDIALOG_H
@@ -20,6 +20,8 @@
#include "audiostreamproperties.h" #include "audiostreamproperties.h"
OLIVE_NAMESPACE_ENTER
AudioStreamProperties::AudioStreamProperties(AudioStreamPtr stream) : AudioStreamProperties::AudioStreamProperties(AudioStreamPtr stream) :
stream_(stream) stream_(stream)
{ {
@@ -28,3 +30,5 @@ AudioStreamProperties::AudioStreamProperties(AudioStreamPtr stream) :
void AudioStreamProperties::Accept(QUndoCommand*) void AudioStreamProperties::Accept(QUndoCommand*)
{ {
} }
OLIVE_NAMESPACE_EXIT

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