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
+3 -3
View File
@@ -25,9 +25,7 @@
#include "project/item/sequence/sequence.h"
#include "ui/icons/icons.h"
Folder::Folder()
{
}
OLIVE_NAMESPACE_ENTER
Item::Type Folder::type() const
{
@@ -91,3 +89,5 @@ void Folder::Save(QXmlStreamWriter *writer) const
writer->writeEndElement(); // folder
}
OLIVE_NAMESPACE_EXIT
+5 -1
View File
@@ -25,6 +25,8 @@
#include "project/item/footage/footage.h"
#include "project/item/item.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief The Folder class representing a directory in a project structure
*
@@ -34,7 +36,7 @@
class Folder : public Item
{
public:
Folder();
Folder() = default;
virtual Type type() const override;
@@ -50,4 +52,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // FOLDER_H
+4
View File
@@ -20,6 +20,8 @@
#include "audiostream.h"
OLIVE_NAMESPACE_ENTER
AudioStream::AudioStream() :
index_done_(false)
{
@@ -130,3 +132,5 @@ void AudioStream::append_conformed_version(const AudioRenderingParams &params)
emit ConformAppended(params);
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -27,6 +27,8 @@
#include "render/audioparams.h"
#include "stream.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief A Stream derivative containing audio-specific information
*/
@@ -76,4 +78,6 @@ private:
using AudioStreamPtr = std::shared_ptr<AudioStream>;
OLIVE_NAMESPACE_EXIT
#endif // AUDIOSTREAM_H
+4
View File
@@ -28,6 +28,8 @@
#include "core.h"
#include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
Footage::Footage()
{
Clear();
@@ -374,3 +376,5 @@ void Footage::UpdateTooltip()
break;
}
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -32,6 +32,8 @@
#include "project/item/footage/videostream.h"
#include "timeline/timelinepoints.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief A reference to an external media file with metadata in a project structure
*
@@ -265,4 +267,6 @@ private:
using FootagePtr = std::shared_ptr<Footage>;
OLIVE_NAMESPACE_EXIT
#endif // FOOTAGE_H
+4
View File
@@ -25,6 +25,8 @@
#include "project/project.h"
#include "render/colormanager.h"
OLIVE_NAMESPACE_ENTER
ImageStream::ImageStream() :
premultiplied_alpha_(false)
{
@@ -136,3 +138,5 @@ void ImageStream::DefaultColorSpaceChanged()
emit ParametersChanged();
}
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -23,6 +23,8 @@
#include "stream.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief A Stream derivative containing video-specific information
*/
@@ -67,4 +69,6 @@ private slots:
using ImageStreamPtr = std::shared_ptr<ImageStream>;
OLIVE_NAMESPACE_EXIT
#endif // IMAGESTREAM_H
+4
View File
@@ -23,6 +23,8 @@
#include "footage.h"
#include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
Stream::Stream() :
footage_(nullptr),
type_(kUnknown),
@@ -165,3 +167,5 @@ void Stream::SaveCustomParameters(QXmlStreamWriter*) const
stream_index_(stream_index)
{
}*/
OLIVE_NAMESPACE_EXIT
+5 -1
View File
@@ -29,6 +29,8 @@
#include "common/rational.h"
OLIVE_NAMESPACE_ENTER
class Footage;
/*class StreamID {
@@ -136,7 +138,9 @@ private:
using StreamPtr = std::shared_ptr<Stream>;
OLIVE_NAMESPACE_EXIT
#include <QMetaType>
Q_DECLARE_METATYPE(StreamPtr)
Q_DECLARE_METATYPE(OLIVE_NAMESPACE::StreamPtr)
#endif // STREAM_H
+4
View File
@@ -24,6 +24,8 @@
#include "common/timecodefunctions.h"
OLIVE_NAMESPACE_ENTER
const int64_t VideoStream::kEndTimestamp = AV_NOPTS_VALUE;
VideoStream::VideoStream() :
@@ -202,3 +204,5 @@ bool VideoStream::save_frame_index(const QString &s)
return false;
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -23,6 +23,8 @@
#include "imagestream.h"
OLIVE_NAMESPACE_ENTER
class VideoStream : public ImageStream
{
Q_OBJECT
@@ -72,4 +74,6 @@ private:
using VideoStreamPtr = std::shared_ptr<VideoStream>;
OLIVE_NAMESPACE_EXIT
#endif // VIDEOSTREAM_H
+4
View File
@@ -20,6 +20,8 @@
#include "item.h"
OLIVE_NAMESPACE_ENTER
Item::Item() :
parent_(nullptr),
project_(nullptr)
@@ -200,3 +202,5 @@ bool Item::ChildExistsWithNameInternal(const QString &name, Item *folder)
return false;
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -34,6 +34,8 @@
#include "node/param.h"
#include "project/item/footage/stream.h"
OLIVE_NAMESPACE_ENTER
class Project;
class Item;
@@ -122,4 +124,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // ITEM_H
+4
View File
@@ -35,6 +35,8 @@
#include "panel/sequenceviewer/sequenceviewer.h"
#include "ui/icons/icons.h"
OLIVE_NAMESPACE_ENTER
Sequence::Sequence()
{
viewer_output_ = new ViewerOutput();
@@ -283,3 +285,5 @@ void Sequence::NameChangedEvent(const QString &name)
{
viewer_output_->set_media_name(name);
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -29,6 +29,8 @@
#include "project/item/item.h"
#include "timeline/timelinepoints.h"
OLIVE_NAMESPACE_ENTER
class Sequence;
using SequencePtr = std::shared_ptr<Sequence>;
@@ -82,4 +84,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // SEQUENCE_H
@@ -1,6 +0,0 @@
#include "sequenceparams.h"
SequenceParams::SequenceParams()
{
}
@@ -1,11 +0,0 @@
#ifndef SEQUENCEPARAMS_H
#define SEQUENCEPARAMS_H
class SequenceParams
{
public:
SequenceParams();
};
#endif // SEQUENCEPARAMS_H