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"
OLIVE_NAMESPACE_ENTER
AudioManager* AudioManager::instance_ = nullptr;
void AudioManager::CreateInstance()
@@ -282,3 +284,5 @@ void AudioRefreshDevicesObject::Refresh()
emit ListsReady();
}
OLIVE_NAMESPACE_EXIT
+5
View File
@@ -26,9 +26,12 @@
#include <QAudioOutput>
#include <QThread>
#include "common/define.h"
#include "outputmanager.h"
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
/**
* @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
+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"
OLIVE_NAMESPACE_ENTER
QVector<double> AudioBufferAverage::ProcessAverages(const char *data, int length)
{
// FIXME: Assumes float and stereo
@@ -18,3 +40,5 @@ QVector<double> AudioBufferAverage::ProcessAverages(const char *data, int length
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
#define AUDIOBUFFERAVERAGE_H
#include <QVector>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class AudioBufferAverage
{
public:
@@ -11,4 +35,6 @@ public:
static QVector<double> ProcessAverages(const char* data, int length);
};
OLIVE_NAMESPACE_EXIT
#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 "audiomanager.h"
#include "bufferaverage.h"
OLIVE_NAMESPACE_ENTER
AudioOutputDeviceProxy::AudioOutputDeviceProxy() :
device_(nullptr),
send_averages_(false)
@@ -117,3 +139,5 @@ qint64 AudioOutputDeviceProxy::ReverseAwareRead(char *data, qint64 maxlen)
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
#define AUDIOOUTPUTDEVICEPROXY_H
#include <QIODevice>
#include "common/define.h"
#include "tempoprocessor.h"
OLIVE_NAMESPACE_ENTER
class AudioOutputDeviceProxy : public QIODevice
{
Q_OBJECT
@@ -42,4 +65,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // AUDIOOUTPUTDEVICEPROXY_H
+4
View File
@@ -25,6 +25,8 @@
#include "bufferaverage.h"
OLIVE_NAMESPACE_ENTER
AudioOutputManager::AudioOutputManager(QObject *parent) :
QObject(parent),
output_(nullptr),
@@ -151,3 +153,5 @@ void AudioOutputManager::ProcessAverages(const char *data, int length)
emit SentSamples(AudioBufferAverage::ProcessAverages(data, length));
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -29,6 +29,8 @@
#include "outputdeviceproxy.h"
OLIVE_NAMESPACE_ENTER
class AudioOutputManager : public QObject
{
Q_OBJECT
@@ -88,4 +90,6 @@ private slots:
void PushMoreSamples();
};
OLIVE_NAMESPACE_EXIT
#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 "core.h"
OLIVE_NAMESPACE_ENTER
QString SampleFormat::GetSampleFormatName(const SampleFormat::Format &f)
{
switch (f) {
@@ -35,3 +57,5 @@ void SampleFormat::SetConfiguredFormatForMode(RenderMode::Mode mode, SampleForma
{
Core::SetPreferenceForRenderMode(mode, QStringLiteral("SampleFormat"), format);
}
OLIVE_NAMESPACE_EXIT
+5
View File
@@ -23,8 +23,11 @@
#include <QObject>
#include "common/define.h"
#include "render/rendermodes.h"
OLIVE_NAMESPACE_ENTER
class SampleFormat : public QObject
{
Q_OBJECT
@@ -51,4 +54,6 @@ public:
};
OLIVE_NAMESPACE_EXIT
#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 <QDebug>
OLIVE_NAMESPACE_ENTER
const int SampleSummer::kSumSampleRate = 200;
QVector<SampleSummer::Sum> SampleSummer::SumSamples(const float *samples, int nb_samples, int nb_channels)
@@ -84,3 +106,5 @@ SampleSummer::Info::Info()
{
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
#define SUMSAMPLES_H
@@ -6,6 +26,8 @@
#include "codec/samplebuffer.h"
OLIVE_NAMESPACE_ENTER
class SampleSummer {
public:
struct Sum {
@@ -39,4 +61,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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"
extern "C" {
@@ -10,6 +30,8 @@ extern "C" {
#include "codec/ffmpeg/ffmpegcommon.h"
OLIVE_NAMESPACE_ENTER
TempoProcessor::TempoProcessor() :
filter_graph_(nullptr),
buffersrc_ctx_(nullptr),
@@ -251,3 +273,5 @@ AVFilterContext *TempoProcessor::CreateTempoFilter(AVFilterGraph* graph, AVFilte
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
#define TEMPOPROCESSOR_H
@@ -15,6 +35,8 @@ extern "C" {
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class TempoProcessor
{
public:
@@ -56,4 +78,6 @@ private:
bool flushed_;
};
OLIVE_NAMESPACE_EXIT
#endif // TEMPOPROCESSOR_H
+5 -1
View File
@@ -33,6 +33,8 @@
#include "task/index/index.h"
#include "task/taskmanager.h"
OLIVE_NAMESPACE_ENTER
Decoder::Decoder() :
open_(false),
stream_(nullptr)
@@ -142,7 +144,7 @@ bool Decoder::ProbeMedia(Footage *f, const QAtomicInt* cancelled)
QMetaObject::invokeMethod(IndexManager::instance(),
"StartIndexingStream",
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())));
}
}
OLIVE_NAMESPACE_EXIT
+9 -3
View File
@@ -21,6 +21,10 @@
#ifndef DECODER_H
#define DECODER_H
extern "C" {
#include <libswresample/swresample.h>
}
#include <QMutex>
#include <QObject>
#include <stdint.h>
@@ -32,11 +36,11 @@
#include "common/rational.h"
#include "project/item/footage/footage.h"
OLIVE_NAMESPACE_ENTER
class Decoder;
using DecoderPtr = std::shared_ptr<Decoder>;
struct SwrContext;
/**
* @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
+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 "ffmpeg/ffmpegencoder.h"
OLIVE_NAMESPACE_ENTER
Encoder::Encoder(const EncodingParams &params) :
params_(params),
open_(false)
@@ -168,3 +190,5 @@ void Encoder::Close()
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
#define ENCODER_H
@@ -10,6 +30,8 @@
#include "render/audioparams.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
class Encoder;
using EncoderPtr = std::shared_ptr<Encoder>;
@@ -82,8 +104,8 @@ public:
public slots:
void Open();
void WriteFrame(FramePtr frame);
virtual void WriteAudio(const AudioRenderingParams& pcm_info, const QString& pcm_filename, const TimeRange &range) = 0;
void WriteFrame(OLIVE_NAMESPACE::FramePtr frame);
virtual void WriteAudio(OLIVE_NAMESPACE::AudioRenderingParams pcm_info, const QString& pcm_filename, OLIVE_NAMESPACE::TimeRange range) = 0;
void Close();
signals:
@@ -107,4 +129,6 @@ private:
bool open_;
};
OLIVE_NAMESPACE_EXIT
#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"
OLIVE_NAMESPACE_ENTER
AVPixelFormat FFmpegCommon::GetCompatiblePixelFormat(const AVPixelFormat &pix_fmt)
{
AVPixelFormat possible_pix_fmts[] = {
@@ -113,3 +135,5 @@ PixelFormat::Format FFmpegCommon::GetCompatiblePixelFormat(const PixelFormat::Fo
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
#define FFMPEGABSTRACTION_H
@@ -8,6 +28,8 @@ extern "C" {
#include "audio/sampleformat.h"
#include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
class FFmpegCommon {
public:
/**
@@ -36,4 +58,6 @@ public:
static AVSampleFormat GetFFmpegSampleFormat(const SampleFormat::Format &smp_fmt);
};
OLIVE_NAMESPACE_EXIT
#endif // FFMPEGABSTRACTION_H
+4
View File
@@ -42,6 +42,8 @@ extern "C" {
#include "render/diskmanager.h"
#include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
FFmpegDecoder::FFmpegDecoder() :
fmt_ctx_(nullptr),
codec_ctx_(nullptr),
@@ -992,3 +994,5 @@ void FFmpegDecoder::ClearTimerEvent()
cache_at_zero_ = false;
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 "project/item/footage/videostream.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief A Decoder derivative that wraps FFmpeg functions as on Olive decoder
*/
@@ -134,4 +136,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#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 <QFile>
@@ -5,6 +25,8 @@
#include "ffmpegcommon.h"
#include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
FFmpegEncoder::FFmpegEncoder(const EncodingParams &params) :
Encoder(params),
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);
if (pcm.open(QFile::ReadOnly)) {
@@ -504,3 +526,5 @@ void FFmpegEncoder::Error(const QString &s)
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
#define FFMPEGENCODER_H
@@ -10,6 +30,8 @@ extern "C" {
#include "codec/encoder.h"
OLIVE_NAMESPACE_ENTER
class FFmpegEncoder : public Encoder
{
Q_OBJECT
@@ -17,7 +39,7 @@ public:
FFmpegEncoder(const EncodingParams &params);
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:
virtual bool OpenInternal() override;
@@ -66,4 +88,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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 <QDateTime>
#include <QDebug>
OLIVE_NAMESPACE_ENTER
QMutex FFmpegFrameCache::pool_lock_;
QList<Frame*> FFmpegFrameCache::frame_pool_;
@@ -97,3 +119,5 @@ void FFmpegFrameCache::Release(Frame *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
#define FFMPEGFRAMECACHE_H
@@ -7,6 +27,8 @@
#include "codec/frame.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
class FFmpegFrameCache
{
public:
@@ -53,4 +75,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // FFMPEGFRAMECACHE_H
+4
View File
@@ -23,6 +23,8 @@
#include <QDebug>
#include <QtGlobal>
OLIVE_NAMESPACE_ENTER
Frame::Frame() :
timestamp_(0),
sample_aspect_ratio_(1)
@@ -147,3 +149,5 @@ int Frame::allocated_size() const
{
return data_.size();
}
OLIVE_NAMESPACE_EXIT
+5 -1
View File
@@ -29,6 +29,8 @@
#include "render/pixelformat.h"
#include "render/videoparams.h"
OLIVE_NAMESPACE_ENTER
class 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
+4
View File
@@ -30,6 +30,8 @@
#include "config/config.h"
#include "core.h"
OLIVE_NAMESPACE_ENTER
QStringList OIIODecoder::supported_formats_;
OIIODecoder::OIIODecoder() :
@@ -347,3 +349,5 @@ void OIIODecoder::CloseImageHandle()
buffer_ = nullptr;
}
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -27,6 +27,8 @@
#include "codec/decoder.h"
#include "render/pixelformat.h"
OLIVE_NAMESPACE_ENTER
class OIIODecoder : public Decoder
{
Q_OBJECT
@@ -78,4 +80,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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"
OLIVE_NAMESPACE_ENTER
SampleBuffer::SampleBuffer() :
sample_count_per_channel_(0),
data_(nullptr)
@@ -252,3 +274,5 @@ void SampleBuffer::destroy_sample_buffer(float ***data, int nb_channels)
*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
#define SAMPLEBUFFER_H
@@ -6,6 +26,8 @@
#include "common/constructors.h"
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class 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
+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"
extern "C" {
@@ -7,6 +27,8 @@ extern "C" {
#include <QDataStream>
#include <QtMath>
OLIVE_NAMESPACE_ENTER
WaveInput::WaveInput(const QString &f) :
file_(f)
{
@@ -216,3 +238,5 @@ qint64 WaveInput::calculate_max_read() const
{
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
#define WAVEINPUT_H
@@ -6,6 +26,8 @@
#include "common/constructors.h"
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class WaveInput
{
public:
@@ -49,4 +71,6 @@ private:
quint32 data_size_;
};
OLIVE_NAMESPACE_EXIT
#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"
OLIVE_NAMESPACE_ENTER
const int16_t kWAVIntegerFormat = 1;
const int16_t kWAVFloatFormat = 3;
@@ -152,3 +174,5 @@ void WaveOutput::write_int(QFile *file, T integer)
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
#define WAVEAUDIO_H
@@ -8,6 +28,8 @@
#include "common/constructors.h"
#include "render/audioparams.h"
OLIVE_NAMESPACE_ENTER
class WaveOutput
{
public:
@@ -43,4 +65,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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
#define AUTOSCROLL_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class AutoScroll {
public:
enum Method {
@@ -10,4 +34,6 @@ public:
};
};
OLIVE_NAMESPACE_EXIT
#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 <QtMath>
OLIVE_NAMESPACE_ENTER
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);
@@ -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;
}
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
#define BEZIER_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class Bezier
{
@@ -14,4 +37,6 @@ public:
static double CubicTtoY(double a, double b, double c, double d, double t);
};
OLIVE_NAMESPACE_EXIT
#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
#define CANCELABLEOBJECT_H
#include <QAtomicInt>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class CancelableObject {
public:
CancelableObject() :
@@ -23,4 +47,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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
#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
* use our own functions for portability.
@@ -18,4 +42,6 @@
DISABLE_COPY(Class) \
DISABLE_MOVE(Class)
OLIVE_NAMESPACE_EXIT
#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 <QApplication>
@@ -17,6 +37,8 @@
#include <execinfo.h>
#endif
OLIVE_NAMESPACE_ENTER
void crash_handler(int sig) {
QString log_path = QDir(QStandardPaths::writableLocation(QStandardPaths::TempLocation)).filePath(QStringLiteral("olive_crash"));
QFile output(log_path);
@@ -118,3 +140,5 @@ void crash_handler(int sig) {
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
#define CRASHHANDLER_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
void crash_handler(int sig);
OLIVE_NAMESPACE_EXIT
#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"
OLIVE_NAMESPACE_ENTER
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);
#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
#define DEBUG_H
#include <QDebug>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
void DebugHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
OLIVE_NAMESPACE_EXIT
#endif // DEBUG_H
+13 -2
View File
@@ -21,6 +21,14 @@
#ifndef 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 kRGBChannels = 3;
const int kRGBAChannels = 4;
@@ -34,8 +42,11 @@ const int kProjectIconSizeMaximum = 256;
/// The default size an icon in ProjectExplorer can be
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
+4
View File
@@ -29,6 +29,8 @@
#include "config/config.h"
OLIVE_NAMESPACE_ENTER
QString GetUniqueFileIdentifier(const QString &filename)
{
QFileInfo info(filename);
@@ -95,3 +97,5 @@ QString GetApplicationPath()
{
return QCoreApplication::applicationDirPath();
}
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,10 @@
#include <QString>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
bool IsPortable();
QString GetUniqueFileIdentifier(const QString& filename);
@@ -37,4 +41,6 @@ QString GetConfigurationLocation();
QString GetApplicationPath();
OLIVE_NAMESPACE_EXIT
#endif // FILEFUNCTIONS_H
+4
View File
@@ -20,6 +20,8 @@
#include "flipmodifiers.h"
OLIVE_NAMESPACE_ENTER
Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e) {
if (e & Qt::ControlModifier & Qt::ShiftModifier) {
return e;
@@ -35,3 +37,5 @@ Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e) {
return e;
}
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,12 @@
#include <QtCore>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
Qt::KeyboardModifiers FlipControlAndShiftModifiers(Qt::KeyboardModifiers e);
OLIVE_NAMESPACE_EXIT
#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
#define FUNCTIONTIMER_H
+4
View File
@@ -20,6 +20,8 @@
#include "qtutils.h"
OLIVE_NAMESPACE_ENTER
int QFontMetricsWidth(QFontMetrics fm, const QString& s) {
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
return fm.width(s);
@@ -27,3 +29,5 @@ int QFontMetricsWidth(QFontMetrics fm, const QString& s) {
return fm.horizontalAdvance(s);
#endif
}
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -29,6 +29,10 @@
#include <QFontMetrics>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief Retrieves the width of a string according to certain QFontMetrics
*
@@ -37,4 +41,6 @@
*/
int QFontMetricsWidth(QFontMetrics fm, const QString& s);
OLIVE_NAMESPACE_EXIT
#endif // QTVERSIONABSTRACTION_H
+13 -8
View File
@@ -3,6 +3,8 @@
#include "rational.h"
OLIVE_NAMESPACE_ENTER
rational::rational(const AVRational &r) :
numer(r.num),
denom(r.den)
@@ -32,7 +34,7 @@ rational rational::fromString(const QString &str)
//Function: print number to cout
void rational::print(ostream &out) const
void rational::print(std::ostream &out) const
{
out << this->numer << "/" << this->denom;
}
@@ -425,7 +427,7 @@ bool rational::operator!() const
//IO
ostream& operator<<(ostream &out, const rational &value)
std::ostream& operator<<(std::ostream &out, const rational &value)
{
out << value.numer;
if(value.denom != 1)
@@ -436,7 +438,7 @@ ostream& operator<<(ostream &out, const rational &value)
return out;
}
istream& operator>>(istream &in, rational &value)
std::istream& operator>>(std::istream &in, rational &value)
{
in >> value.numer;
value.denom = 1;
@@ -458,13 +460,16 @@ istream& operator>>(istream &in, rational &value)
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();
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>
}
using namespace std;
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
typedef int64_t intType;
/*
@@ -90,11 +92,11 @@ public:
bool isNull() const;
//Function: print number to cout
void print(ostream &out = cout) const;
void print(std::ostream &out = std::cout) const;
//IO
friend ostream& operator<<(ostream &out, const rational &value);
friend istream& operator>>(istream &in, rational &value);
friend std::ostream& operator<<(std::ostream &out, const rational &value);
friend std::istream& operator>>(std::istream &in, rational &value);
const intType& numerator() const;
const intType& denominator() const;
@@ -116,14 +118,16 @@ private:
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
#define RATIONAL_MIN rational(INT32_MIN, 1)
#define RATIONAL_MAX rational(INT32_MAX, 1)
Q_DECLARE_METATYPE(rational)
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
+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"
OLIVE_NAMESPACE_ENTER
void ThreadedObject::LockDeletes()
{
threadobj_delete_lock_++;
@@ -31,3 +53,5 @@ bool ThreadedObject::TryLockMutex(int 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
#define THREADEDOBJECT_H
#include <QMutex>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ThreadedObject
{
public:
@@ -21,4 +45,6 @@ private:
QAtomicInt threadobj_delete_lock_;
};
OLIVE_NAMESPACE_EXIT
#endif // THREADEDOBJECT_H
+4
View File
@@ -24,6 +24,8 @@
#include "config/config.h"
OLIVE_NAMESPACE_ENTER
QString padded(int64_t arg, int padding) {
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());
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -25,6 +25,8 @@
#include "common/rational.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief Functions for converting times/timecodes/timestamps
*
@@ -68,4 +70,6 @@ public:
};
OLIVE_NAMESPACE_EXIT
#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
#define TIMELINECOMMON_H
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class Timeline {
public:
enum MovementMode {
@@ -21,4 +45,6 @@ public:
static bool IsATrimMode(MovementMode mode) {return mode == kTrimIn || mode == kTrimOut;}
};
OLIVE_NAMESPACE_EXIT
#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 <utility>
OLIVE_NAMESPACE_ENTER
TimeRange::TimeRange(const rational &in, const rational &out) :
in_(in),
out_(out)
@@ -94,11 +116,6 @@ void TimeRange::normalize()
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)
{
for (int i=0;i<size();i++) {
@@ -177,3 +194,10 @@ TimeRangeList TimeRangeList::Intersects(const TimeRange &range)
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
#define TIMERANGE_H
#include "rational.h"
OLIVE_NAMESPACE_ENTER
class TimeRange {
public:
TimeRange() = default;
@@ -34,10 +56,6 @@ private:
};
Q_DECLARE_METATYPE(TimeRange)
uint qHash(const TimeRange& r, uint seed);
class TimeRangeList : public QList<TimeRange> {
public:
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
+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 "node/block/block.h"
#include "node/factory.h"
#include "widget/nodeview/nodeviewundo.h"
OLIVE_NAMESPACE_ENTER
Node* XMLLoadNode(QXmlStreamReader* reader) {
QString node_id;
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
#define XMLREADLOOP_H
@@ -6,6 +26,8 @@
#include "project/item/footage/stream.h"
OLIVE_NAMESPACE_ENTER
class Block;
class Node;
class NodeParam;
@@ -48,4 +70,6 @@ bool XMLReadNextStartElement(QXmlStreamReader* reader);
void XMLLinkBlocks(const XMLNodeData& xml_node_data);
OLIVE_NAMESPACE_EXIT
#endif // XMLREADLOOP_H
+4
View File
@@ -33,6 +33,8 @@
#include "core.h"
#include "window/mainwindow/mainwindow.h"
OLIVE_NAMESPACE_ENTER
Config Config::current_config_;
Config::Config()
@@ -225,3 +227,5 @@ QVariant &Config::operator[](const QString &key)
{
return config_map_[key];
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -27,6 +27,8 @@
#include "common/timecodefunctions.h"
OLIVE_NAMESPACE_ENTER
class Config {
public:
static Config& Current();
@@ -51,4 +53,6 @@ private:
static QString GetConfigFilePath();
};
OLIVE_NAMESPACE_EXIT
#endif // CONFIG_H
+4
View File
@@ -58,6 +58,8 @@
#include "widget/taskview/taskviewitem.h"
#include "window/mainwindow/mainwindow.h"
OLIVE_NAMESPACE_ENTER
Core Core::instance_;
Core::Core() :
@@ -736,3 +738,5 @@ void Core::OpenProject()
OpenProjectInternal(file);
}
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -35,6 +35,8 @@
#include "tool/tool.h"
#include "undo/undostack.h"
OLIVE_NAMESPACE_ENTER
class MainWindow;
/**
@@ -403,4 +405,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // CORE_H
+4
View File
@@ -25,6 +25,8 @@
#include <QLabel>
#include <QVBoxLayout>
OLIVE_NAMESPACE_ENTER
AboutDialog::AboutDialog(QWidget *parent) :
QDialog(parent)
{
@@ -64,3 +66,5 @@ AboutDialog::AboutDialog(QWidget *parent) :
connect(buttons, SIGNAL(accepted()), this, SLOT(accept()));
}
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -23,6 +23,10 @@
#include <QDialog>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief The AboutDialog class
*
@@ -45,4 +49,6 @@ public:
explicit AboutDialog(QWidget *parent = nullptr);
};
OLIVE_NAMESPACE_EXIT
#endif // ABOUTDIALOG_H
+4
View File
@@ -25,6 +25,8 @@
#include <QMenuBar>
#include <QLabel>
OLIVE_NAMESPACE_ENTER
ActionSearch::ActionSearch(QWidget *parent) :
QDialog(parent),
menu_bar_(nullptr)
@@ -251,3 +253,5 @@ void ActionSearchList::mouseDoubleClickEvent(QMouseEvent *) {
emit dbl_click();
}
OLIVE_NAMESPACE_EXIT
+6
View File
@@ -27,6 +27,10 @@
#include <QMenu>
#include <QMenuBar>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ActionSearchList;
/**
@@ -178,4 +182,6 @@ signals:
void moveSelectionDown();
};
OLIVE_NAMESPACE_EXIT
#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 <QDialogButtonBox>
@@ -6,6 +26,8 @@
#include "common/qtutils.h"
OLIVE_NAMESPACE_ENTER
ColorDialog::ColorDialog(ColorManager* color_manager, Color start, QString input_cs, QWidget *parent) :
QDialog(parent),
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);
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
#define COLORDIALOG_H
@@ -10,6 +30,8 @@
#include "widget/colorwheel/colorwheelwidget.h"
#include "widget/colorwheel/colorgradientwidget.h"
OLIVE_NAMESPACE_ENTER
class ColorDialog : public QDialog
{
Q_OBJECT
@@ -68,4 +90,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#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 <QPainter>
OLIVE_NAMESPACE_ENTER
ColorPreviewBox::ColorPreviewBox(QWidget *parent) :
QWidget(parent)
{
@@ -41,3 +63,5 @@ void ColorPreviewBox::paintEvent(QPaintEvent *e)
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
#define COLORPREVIEWBOX_H
@@ -6,6 +26,8 @@
#include "render/color.h"
#include "render/colorprocessor.h"
OLIVE_NAMESPACE_ENTER
class ColorPreviewBox : public QWidget
{
Q_OBJECT
@@ -29,4 +51,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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 <QGridLayout>
#include <QLabel>
OLIVE_NAMESPACE_ENTER
ColorSpaceChooser::ColorSpaceChooser(ColorManager* color_manager, bool enable_input_field, QWidget *parent):
QGroupBox(parent),
color_manager_(color_manager)
@@ -145,3 +167,5 @@ void ColorSpaceChooser::ComboBoxChanged()
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
#define COLORSPACECHOOSER_H
@@ -6,6 +26,8 @@
#include "render/colormanager.h"
OLIVE_NAMESPACE_ENTER
class ColorSpaceChooser : public QGroupBox
{
Q_OBJECT
@@ -43,4 +65,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#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 <QGridLayout>
OLIVE_NAMESPACE_ENTER
ColorValuesWidget::ColorValuesWidget(QWidget *parent) :
QWidget(parent)
{
@@ -76,3 +98,5 @@ void ColorValuesWidget::SliderChanged()
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
#define COLORVALUESWIDGET_H
@@ -7,6 +27,8 @@
#include "render/color.h"
#include "widget/slider/floatslider.h"
OLIVE_NAMESPACE_ENTER
class ColorValuesWidget : public QWidget
{
Q_OBJECT
@@ -37,4 +59,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#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 <QFile>
@@ -7,6 +27,8 @@
#include <QTextEdit>
#include <QVBoxLayout>
OLIVE_NAMESPACE_ENTER
CrashHandlerDialog::CrashHandlerDialog(const char *log_file)
{
setWindowTitle(tr("Olive"));
@@ -59,3 +81,5 @@ void CrashHandlerDialog::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
#define CRASHHANDLERDIALOG_H
#include <QDialog>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class CrashHandlerDialog : public QDialog
{
Q_OBJECT
@@ -16,4 +40,6 @@ public slots:
};
OLIVE_NAMESPACE_EXIT
#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 <QApplication>
@@ -10,7 +30,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
CrashHandlerDialog chd(argv[1]);
OLIVE_NAMESPACE::CrashHandlerDialog chd(argv[1]);
chd.open();
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"
OLIVE_NAMESPACE_ENTER
CodecSection::CodecSection(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
#define CODECSECTION_H
@@ -5,6 +25,8 @@
#include "codec/encoder.h"
OLIVE_NAMESPACE_ENTER
class CodecSection : public QWidget
{
public:
@@ -14,4 +36,6 @@ public:
};
OLIVE_NAMESPACE_EXIT
#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 <QCheckBox>
@@ -8,6 +28,8 @@
#include "common/qtutils.h"
#include "widget/slider/integerslider.h"
OLIVE_NAMESPACE_ENTER
H264Section::H264Section(QWidget *parent) :
CodecSection(parent)
{
@@ -184,3 +206,5 @@ int64_t H264FileSizeSection::GetFileSize() const
// Convert megabytes to BITS
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
#define H264SECTION_H
@@ -7,6 +27,8 @@
#include "codecsection.h"
#include "widget/slider/floatslider.h"
OLIVE_NAMESPACE_ENTER
class H264CRFSection : public QWidget
{
public:
@@ -86,4 +108,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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 <QGridLayout>
#include <QLabel>
OLIVE_NAMESPACE_ENTER
ImageSection::ImageSection(QWidget* parent) :
CodecSection(parent)
{
@@ -21,3 +43,5 @@ QCheckBox *ImageSection::image_sequence_checkbox() const
{
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
#define IMAGESECTION_H
@@ -5,6 +25,8 @@
#include "codecsection.h"
OLIVE_NAMESPACE_ENTER
class ImageSection : public CodecSection
{
public:
@@ -17,4 +39,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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 <QCloseEvent>
@@ -15,6 +35,8 @@
#include "render/pixelformat.h"
#include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
ExportDialog::ExportDialog(ViewerOutput *viewer_node, QWidget *parent) :
QDialog(parent),
viewer_node_(viewer_node),
@@ -613,3 +635,5 @@ void ExportDialog::UpdateTaskbarProgress(int progress)
}
}
#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
#define EXPORTDIALOG_H
@@ -18,6 +38,8 @@
#include "render/backend/exporter.h"
#include "widget/viewer/viewer.h"
OLIVE_NAMESPACE_ENTER
class ExportDialog : public QDialog
{
Q_OBJECT
@@ -124,4 +146,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#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 <QGridLayout>
@@ -5,6 +25,8 @@
#include "core.h"
OLIVE_NAMESPACE_ENTER
ExportAudioTab::ExportAudioTab(QWidget* parent) :
QWidget(parent)
{
@@ -74,3 +96,5 @@ void ExportAudioTab::set_channel_layout(uint64_t 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
#define EXPORTAUDIOTAB_H
#include <QComboBox>
#include <QWidget>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ExportAudioTab : public QWidget
{
public:
@@ -25,4 +49,6 @@ private:
QList<uint64_t> channel_layouts_;
};
OLIVE_NAMESPACE_EXIT
#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
#define EXPORTCODEC_H
#include <QString>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ExportCodec {
public:
enum Flag {
@@ -28,4 +52,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#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
#define EXPORTFORMAT_H
#include <QList>
#include <QString>
#include "common/define.h"
OLIVE_NAMESPACE_ENTER
class ExportFormat {
public:
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
+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 <QCheckBox>
@@ -8,6 +28,8 @@
#include "core.h"
#include "render/colormanager.h"
OLIVE_NAMESPACE_ENTER
ExportVideoTab::ExportVideoTab(ColorManager* color_manager, QWidget *parent) :
QWidget(parent),
color_manager_(color_manager)
@@ -190,3 +212,5 @@ void ExportVideoTab::MaintainAspectRatioChanged(bool 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
#define EXPORTVIDEOTAB_H
@@ -12,6 +32,8 @@
#include "render/colormanager.h"
#include "widget/slider/integerslider.h"
OLIVE_NAMESPACE_ENTER
class ExportVideoTab : public QWidget
{
Q_OBJECT
@@ -74,4 +96,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // EXPORTVIDEOTAB_H
@@ -36,6 +36,8 @@
#include "streamproperties/audiostreamproperties.h"
#include "streamproperties/videostreamproperties.h"
OLIVE_NAMESPACE_ENTER
FootagePropertiesDialog::FootagePropertiesDialog(QWidget *parent, Footage *footage) :
QDialog(parent),
footage_(footage)
@@ -170,3 +172,5 @@ void FootagePropertiesDialog::StreamEnableChangeCommand::undo_internal()
{
stream_->set_enabled(old_enabled_);
}
OLIVE_NAMESPACE_EXIT
@@ -32,6 +32,8 @@
#include "project/item/footage/footage.h"
#include "undo/undocommand.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief The MediaPropertiesDialog class
*
@@ -126,4 +128,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // MEDIAPROPERTIESDIALOG_H
@@ -20,6 +20,8 @@
#include "audiostreamproperties.h"
OLIVE_NAMESPACE_ENTER
AudioStreamProperties::AudioStreamProperties(AudioStreamPtr stream) :
stream_(stream)
{
@@ -28,3 +30,5 @@ AudioStreamProperties::AudioStreamProperties(AudioStreamPtr stream) :
void AudioStreamProperties::Accept(QUndoCommand*)
{
}
OLIVE_NAMESPACE_EXIT

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