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
+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 "conform.h"
#include "codec/decoder.h"
OLIVE_NAMESPACE_ENTER
ConformTask::ConformTask(AudioStreamPtr stream, const AudioRenderingParams& params) :
stream_(stream),
params_(params)
@@ -27,3 +49,5 @@ void ConformTask::Action()
emit Succeeded();
}
}
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 CONFORMTASK_H
#define CONFORMTASK_H
@@ -5,6 +25,8 @@
#include "render/audioparams.h"
#include "task/task.h"
OLIVE_NAMESPACE_ENTER
class ConformTask : public Task
{
public:
@@ -20,4 +42,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // CONFORMTASK_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 "index.h"
#include "codec/decoder.h"
#include "codec/ffmpeg/ffmpegdecoder.h"
OLIVE_NAMESPACE_ENTER
IndexTask::IndexTask(StreamPtr stream) :
stream_(stream)
{
@@ -27,3 +49,5 @@ void IndexTask::Action()
emit Succeeded();
}
}
OLIVE_NAMESPACE_EXIT
+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/>.
***/
#ifndef INDEXTASK_H
#define INDEXTASK_H
#include "project/item/footage/footage.h"
#include "task/task.h"
OLIVE_NAMESPACE_ENTER
class IndexTask : public Task
{
public:
@@ -17,4 +39,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // INDEXTASK_H
+4
View File
@@ -20,6 +20,8 @@
#include "task.h"
OLIVE_NAMESPACE_ENTER
Task::Task() :
title_(tr("Task"))
{
@@ -51,3 +53,5 @@ void Task::SetTitle(const QString &s)
{
title_ = s;
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -26,6 +26,8 @@
#include "common/cancelableobject.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief A base class for background tasks running in Olive.
*
@@ -143,4 +145,6 @@ private:
};
OLIVE_NAMESPACE_EXIT
#endif // TASK_H
+4
View File
@@ -23,6 +23,8 @@
#include <QDebug>
#include <QThread>
OLIVE_NAMESPACE_ENTER
TaskManager* TaskManager::instance_ = nullptr;
TaskManager::TaskManager() :
@@ -256,3 +258,5 @@ void TaskManager::TaskFailed()
{
SetTaskStatus(static_cast<Task*>(sender()), kError);
}
OLIVE_NAMESPACE_EXIT
+4
View File
@@ -27,6 +27,8 @@
#include "common/constructors.h"
#include "task/task.h"
OLIVE_NAMESPACE_ENTER
/**
* @brief An object that manages background Task objects, handling their start and end
*
@@ -182,4 +184,6 @@ private slots:
};
OLIVE_NAMESPACE_EXIT
#endif // TASKMANAGER_H