developed beginnings of media node

This commit is contained in:
itsmattkc
2019-07-20 12:34:57 -07:00
parent 6c52c45aea
commit 3605a2f988
21 changed files with 298 additions and 24 deletions
+1
View File
@@ -14,6 +14,7 @@
# 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(block)
add_subdirectory(generator)
add_subdirectory(input)
add_subdirectory(output)
+24
View File
@@ -0,0 +1,24 @@
# 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/>.
#add_subdirectory(image)
set(OLIVE_SOURCES
${OLIVE_SOURCES}
node/block/block.h
node/block/block.cpp
PARENT_SCOPE
)
+11
View File
@@ -0,0 +1,11 @@
#include "block.h"
Block::Block()
{
}
QString Block::Category()
{
return tr("Block");
}
+20
View File
@@ -0,0 +1,20 @@
#ifndef BLOCK_H
#define BLOCK_H
#include "node/node.h"
class Block : public Node
{
Q_OBJECT
public:
Block();
virtual QString Category() override;
public slots:
// virtual void Process(const rational &time) override;
};
#endif // BLOCK_H
+1 -1
View File
@@ -14,7 +14,7 @@
# 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(image)
add_subdirectory(media)
set(OLIVE_SOURCES
${OLIVE_SOURCES}
@@ -16,7 +16,7 @@
set(OLIVE_SOURCES
${OLIVE_SOURCES}
node/input/image/image.h
node/input/image/image.cpp
node/input/media/media.h
node/input/media/media.cpp
PARENT_SCOPE
)
@@ -1,39 +1,43 @@
#include "image.h"
#include "media.h"
ImageInput::ImageInput() :
MediaInput::MediaInput() :
texture_(nullptr)
{
footage_input_ = new NodeInput();
footage_input_->add_data_input(NodeInput::kFootage);
AddParameter(footage_input_);
texture_output_ = new NodeOutput();
texture_output_->set_data_type(NodeOutput::kTexture);
AddParameter(texture_output_);
}
QString ImageInput::Name()
QString MediaInput::Name()
{
return tr("Image");
return tr("Media");
}
QString ImageInput::id()
QString MediaInput::id()
{
return "org.olivevideoeditor.Olive.imageinput";
return "org.olivevideoeditor.Olive.mediainput";
}
QString ImageInput::Category()
QString MediaInput::Category()
{
return tr("Input");
}
QString ImageInput::Description()
QString MediaInput::Description()
{
return tr("Import an image file.");
return tr("Import a footage stream.");
}
NodeOutput *ImageInput::texture_output()
NodeOutput *MediaInput::texture_output()
{
return texture_output_;
}
void ImageInput::Process(const rational &time)
void MediaInput::Process(const rational &time)
{
// FIXME: Use OIIO and OCIO here
@@ -11,11 +11,11 @@
* FIXME: This will likely be replaced by the Media node as the Media node will be set up to pull from various decoders
* from the beginning.
*/
class ImageInput : public Node
class MediaInput : public Node
{
Q_OBJECT
public:
ImageInput();
MediaInput();
virtual QString Name() override;
virtual QString id() override;
@@ -28,6 +28,8 @@ public slots:
virtual void Process(const rational &time) override;
private:
NodeInput* footage_input_;
NodeOutput* texture_output_;
QOpenGLTexture* texture_;
+1
View File
@@ -183,6 +183,7 @@ QString NodeParam::GetDefaultDataTypeName(const DataType& type)
case kTexture: return tr("Texture");
case kMatrix: return tr("Matrix");
case kBlock: return tr("Block");
case kFootage: return tr("Footage");
case kAny: return tr("Any");
}
+1
View File
@@ -65,6 +65,7 @@ public:
kTexture,
kMatrix,
kBlock,
kFootage,
kAny
};