Commit c3438245 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Using kind of ugly hack to have black screen when there's nothing to render

Fixes #131
parent 9e2c6b39
......@@ -143,10 +143,7 @@ MainWorkflow::getOutput( TrackType trackType )
{
m_effectEngine->render();
const LightVideoFrame &tmp = m_effectEngine->getVideoOutput( 1 );
if (tmp->nboctets == 0 )
m_outputBuffers->video = MainWorkflow::blackOutput;
else
m_outputBuffers->video = &tmp;
m_outputBuffers->video = &tmp;
}
else
{
......
......@@ -333,6 +333,9 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
*/
void renderOneFrame();
/// Pre-filled buffer used when there's nothing to render
static LightVideoFrame* blackOutput;
private:
MainWorkflow( int trackCount = 64 );
~MainWorkflow();
......@@ -379,9 +382,6 @@ class MainWorkflow : public QObject, public Singleton<MainWorkflow>
/// Height used the render
quint32 m_height;
/// Pre-filled buffer used when there's nothing to render
static LightVideoFrame* blackOutput;
friend class Singleton<MainWorkflow>;
private slots:
......
......@@ -123,7 +123,7 @@ TrackHandler::getOutput( qint64 currentFrame, qint64 subFrame )
{
void* ret = m_tracks[i]->getOutput( currentFrame, subFrame );
if ( ret == NULL )
m_effectEngine->setVideoInput( i + 1, *TrackHandler::nullOutput );
m_effectEngine->setVideoInput( i + 1, *MainWorkflow::blackOutput );
else
{
StackedBuffer<LightVideoFrame*>* stackedBuffer =
......
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