Commit 3c8bc9cb authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Merging EffectsEngine with Workflow.

It doesn't work, but from a theoretical POV, it's not too bad :)
parent 04519e16
......@@ -43,7 +43,7 @@ void EffectsEngine::render( void )
// return ;
// }
void EffectsEngine::setInputFrame( VideoFrame frame, quint32 tracknumber )
void EffectsEngine::setInputFrame( VideoFrame& frame, quint32 tracknumber )
{
m_videoInputs[tracknumber] = frame;
return ;
......
......@@ -30,7 +30,7 @@ class EffectsEngine
// INPUTS & OUTPUTS METHODS
/* void setClock( Parameter currentframenumber ); */
void setInputFrame( VideoFrame frame, quint32 tracknumber );
void setInputFrame( VideoFrame& frame, quint32 tracknumber );
VideoFrame const & getOutputFrame( quint32 tracknumber ) const;
private:
......
#include "MixerEffect.h"
#include <iostream>
#include <QtDebug>
char const * MixerEffect::m_videoInputsNames[] =
{
"track0",
......@@ -83,9 +84,20 @@ MixerEffect::~MixerEffect()
void MixerEffect::render( void )
{
LightVideoFrame tmp;
QHash< QString, InSlot<LightVideoFrame> >::iterator it = m_videoInputs.begin();
QHash< QString, InSlot<LightVideoFrame> >::iterator end = m_videoInputs.end();
qDebug() << "MixerEffect";
std::cout << "MixerEffect" << std::endl;
(m_videoInputs["track0"]) >> tmp;
(m_videoOutputs["out"]) << tmp;
while ( it != end )
{
const VideoFrame& lvf = static_cast<VideoFrame>( static_cast<LightVideoFrame>( ( it.value() ) ) );
if ( lvf.rvf.raw != NULL )
{
m_videoOutputs["out"] << it.value();
}
++it;
}
qDebug() << "Endof MixerEffect";
return ;
}
......@@ -23,14 +23,16 @@ void PouetEffect::render( void )
VideoFrame tmp;
quint32 size;
( m_videoInputs["in"] ) >> lol;
tmp = lol;
for ( i = 0; i < tmp.nbpixels; ++i )
tmp.rvf.pixel[i].Red = 'W';
lol2 = tmp;
(m_videoOutputs["out"]) << lol2;
m_videoOutputs["out"] << m_videoInputs["in"];
// ( m_videoInputs["in"] ) >> lol;
// tmp = lol;
//
// for ( i = 0; i < tmp.nbpixels; ++i )
// tmp.rvf.pixel[i].Red = 'W';
//
//
// lol2 = tmp;
// (m_videoOutputs["out"]) << lol2;
return ;
}
......@@ -73,7 +73,11 @@ class WorkflowRenderer : public GenericRenderer
bool m_stopping;
private:
<<<<<<< HEAD:src/Renderer/WorkflowRenderer.h
MainWorkflow::OutputBuffers* m_lastFrame;
=======
const VideoFrame* m_lastFrame;
>>>>>>> Merging EffectsEngine with Workflow.:src/Renderer/WorkflowRenderer.h
QStack<Actions> m_actions;
QReadWriteLock* m_actionsLock;
bool m_pauseAsked;
......
......@@ -53,6 +53,7 @@ MainWorkflow::MainWorkflow( int trackCount ) :
connect( m_tracks[i], SIGNAL( allTracksRenderCompleted() ), this, SLOT( tracksRenderCompleted() ) );
}
m_outputBuffers = new OutputBuffers;
m_effectEngine = new EffectsEngine;
}
MainWorkflow::~MainWorkflow()
......@@ -60,6 +61,7 @@ MainWorkflow::~MainWorkflow()
//FIXME: this is probably useless, since already done by the renderer
stop();
delete m_effectEngine;
delete m_synchroneRenderWaitConditionMutex;
delete m_synchroneRenderWaitCondition;
delete m_renderMutex;
......
......@@ -34,6 +34,8 @@
#include "TrackWorkflow.h"
#include "TrackHandler.h"
#include "Clip.h"
#include "VideoFrame.h"
#include "EffectsEngine.h"
class MainWorkflow : public QObject, public Singleton<MainWorkflow>
{
......@@ -139,6 +141,8 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
friend class Singleton<MainWorkflow>;
EffectsEngine* m_effectEngine;
private slots:
void tracksPaused();
void tracksRenderCompleted();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment