merged video and audio nodes into a single media node
They performed exactly the same function so I don't think we need the clutter. Also bumped the project version, but old projects are automatically converted.
This commit is contained in:
@@ -14,9 +14,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
add_subdirectory(audio)
|
||||
add_subdirectory(video)
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/input/media/media.h
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2020 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/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/input/media/audio/audio.h
|
||||
node/input/media/audio/audio.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -1,55 +0,0 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2020 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 "audio.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
Node *AudioInput::copy() const
|
||||
{
|
||||
return new AudioInput();
|
||||
}
|
||||
|
||||
Stream::Type AudioInput::type() const
|
||||
{
|
||||
return Stream::kAudio;
|
||||
}
|
||||
|
||||
QString AudioInput::Name() const
|
||||
{
|
||||
return tr("Audio Input");
|
||||
}
|
||||
|
||||
QString AudioInput::ShortName() const
|
||||
{
|
||||
return tr("Audio");
|
||||
}
|
||||
|
||||
QString AudioInput::id() const
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.audioinput");
|
||||
}
|
||||
|
||||
QString AudioInput::Description() const
|
||||
{
|
||||
return tr("Import an audio footage stream.");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2020 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 AUDIOINPUT_H
|
||||
#define AUDIOINPUT_H
|
||||
|
||||
#include "../media.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class AudioInput : public MediaInput
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AudioInput() = default;
|
||||
|
||||
virtual Node* copy() const override;
|
||||
|
||||
virtual Stream::Type type() const override;
|
||||
|
||||
virtual QString Name() const override;
|
||||
virtual QString ShortName() const override;
|
||||
virtual QString id() const override;
|
||||
virtual QString Description() const override;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // AUDIOINPUT_H
|
||||
@@ -57,7 +57,7 @@ bool MediaInput::IsMedia() const
|
||||
|
||||
void MediaInput::Retranslate()
|
||||
{
|
||||
footage_input_->set_name(tr("Footage"));
|
||||
footage_input_->set_name(tr("Media"));
|
||||
}
|
||||
|
||||
NodeValueTable MediaInput::Value(NodeValueDatabase &value) const
|
||||
|
||||
@@ -36,7 +36,25 @@ class MediaInput : public Node
|
||||
public:
|
||||
MediaInput();
|
||||
|
||||
virtual Stream::Type type() const = 0;
|
||||
virtual QString Name() const override
|
||||
{
|
||||
return tr("Media");
|
||||
}
|
||||
|
||||
virtual QString id() const override
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.mediainput");
|
||||
}
|
||||
|
||||
virtual QString Description() const override
|
||||
{
|
||||
return tr("Import footage into the node graph.");
|
||||
}
|
||||
|
||||
virtual Node* copy() const override
|
||||
{
|
||||
return new MediaInput();
|
||||
}
|
||||
|
||||
virtual QVector<CategoryID> Category() const override;
|
||||
|
||||
@@ -45,7 +63,6 @@ public:
|
||||
|
||||
virtual bool IsMedia() const override;
|
||||
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
virtual NodeValueTable Value(NodeValueDatabase& value) const override;
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Olive - Non-Linear Video Editor
|
||||
# Copyright (C) 2020 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/>.
|
||||
|
||||
set(OLIVE_SOURCES
|
||||
${OLIVE_SOURCES}
|
||||
node/input/media/video/video.h
|
||||
node/input/media/video/video.cpp
|
||||
PARENT_SCOPE
|
||||
)
|
||||
@@ -1,63 +0,0 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2020 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 "video.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QMatrix4x4>
|
||||
#include <QOpenGLPixelTransferOptions>
|
||||
|
||||
#include "codec/ffmpeg/ffmpegdecoder.h"
|
||||
#include "core.h"
|
||||
#include "project/item/footage/footage.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
Node *VideoInput::copy() const
|
||||
{
|
||||
return new VideoInput();
|
||||
}
|
||||
|
||||
Stream::Type VideoInput::type() const
|
||||
{
|
||||
return Stream::kVideo;
|
||||
}
|
||||
|
||||
QString VideoInput::Name() const
|
||||
{
|
||||
return tr("Video Input");
|
||||
}
|
||||
|
||||
QString VideoInput::ShortName() const
|
||||
{
|
||||
return tr("Video");
|
||||
}
|
||||
|
||||
QString VideoInput::id() const
|
||||
{
|
||||
return QStringLiteral("org.olivevideoeditor.Olive.videoinput");
|
||||
}
|
||||
|
||||
QString VideoInput::Description() const
|
||||
{
|
||||
return tr("Import a video footage stream.");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/***
|
||||
|
||||
Olive - Non-Linear Video Editor
|
||||
Copyright (C) 2020 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 VIDEOINPUT_H
|
||||
#define VIDEOINPUT_H
|
||||
|
||||
#include <QOpenGLTexture>
|
||||
|
||||
#include "../media.h"
|
||||
#include "render/colormanager.h"
|
||||
|
||||
namespace olive {
|
||||
|
||||
class VideoInput : public MediaInput
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
VideoInput() = default;
|
||||
|
||||
virtual Node* copy() const override;
|
||||
|
||||
virtual Stream::Type type() const override;
|
||||
|
||||
virtual QString Name() const override;
|
||||
virtual QString ShortName() const override;
|
||||
virtual QString id() const override;
|
||||
virtual QString Description() const override;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // VIDEOINPUT_H
|
||||
Reference in New Issue
Block a user