[vlmc-devel] commit: TrackWorkflow: Fixing remaining mixers problems. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Fri Aug 20 00:55:11 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri Aug 20 00:54:47 2010 +0200| [7eb26b943c7cc189d9c5a8168790196ce4139575] | committer: Hugo Beauzée-Luyssen
TrackWorkflow: Fixing remaining mixers problems.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=7eb26b943c7cc189d9c5a8168790196ce4139575
---
src/Gui/MainWindow.cpp | 2 +-
src/Workflow/TrackWorkflow.cpp | 19 +++++++++++++++----
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp
index 9b02c3b..af23afb 100644
--- a/src/Gui/MainWindow.cpp
+++ b/src/Gui/MainWindow.cpp
@@ -433,7 +433,7 @@ MainWindow::initializeDockWidgets( void )
Qt::AllDockWidgetAreas, QDockWidget::AllDockWidgetFeatures,
Qt::LeftDockWidgetArea );
//FIXME !!!
- EffectsEngine::getInstance()->browseDirectory( "/usr/local/frei0r/lib/" );
+ EffectsEngine::getInstance()->browseDirectory( "/usr/local/lib/frei0r-1" );
m_renderer = new WorkflowRenderer();
m_renderer->initializeRenderer();
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index 06af143..a5b94c6 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -326,8 +326,6 @@ TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
//Is the clip supposed to render now?
if ( start <= currentFrame && currentFrame <= start + cw->getClipHelper()->length() )
{
- if ( ret != NULL )
- qCritical() << "There's more than one clip to render here. Undefined behaviour !";
ret = renderClip( cw, currentFrame, start, needRepositioning,
renderOneFrame, paused );
if ( m_trackType == MainWorkflow::VideoTrack )
@@ -351,14 +349,24 @@ TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
if ( m_trackType == MainWorkflow::VideoTrack )
{
EffectsEngine::MixerHelper* mixer = EffectsEngine::getMixer( m_mixers, currentFrame );
- if ( mixer != NULL )
+ if ( mixer != NULL && frames[0] != NULL ) //There's no point using the mixer if there's no frame rendered.
{
//FIXME: We don't handle mixer3 yet.
mixer->effect->process( currentFrame * 1000.0 / m_fps,
frames[0]->get()->buffer(),
frames[1] != NULL ? frames[1]->get()->buffer() : MainWorkflow::blackOutput->buffer(),
NULL, m_mixerBuffer->buffer() );
- ret = m_mixerBuffer;
+ m_mixerBuffer->ptsDiff = frames[0]->get()->ptsDiff;
+ //The rest of the code uses stackedbuffer, m_mixerBuffer is just a Frame*
+ for ( quint32 i = 0; i < EffectsEngine::MaxFramesForMixer; ++i )
+ {
+ if ( frames[i] != NULL )
+ frames[i]->release();
+ else
+ break;
+ }
+ m_lastFrame = subFrame;
+ return m_mixerBuffer;
}
else //If no mixer, clean the potentially rendered extra frames.
{
@@ -369,6 +377,8 @@ TrackWorkflow::getOutput( qint64 currentFrame, qint64 subFrame, bool paused )
else
break;
}
+ ret = frames[0];
+ m_videoStackedBuffer = reinterpret_cast<StackedBuffer<Workflow::Frame*>*>( ret );
}
}
m_lastFrame = subFrame;
@@ -564,6 +574,7 @@ TrackWorkflow::initRender( quint32 width, quint32 height, double fps )
preloadClip( cw );
++it;
}
+ EffectsEngine::initMixers( m_mixers, width, height );
}
bool
More information about the Vlmc-devel
mailing list