[vlmc-devel] commit: EffectsEngine: Adding types for Mixers, renaming filter methods. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Fri Aug 20 00:55:04 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Aug 19 10:32:53 2010 +0200| [dff58cd471278080bb6c74938fac682952876d77] | committer: Hugo Beauzée-Luyssen
EffectsEngine: Adding types for Mixers, renaming filter methods.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=dff58cd471278080bb6c74938fac682952876d77
---
src/EffectsEngine/EffectsEngine.cpp | 6 +++---
src/EffectsEngine/EffectsEngine.h | 11 +++++++----
src/Renderer/WorkflowRenderer.cpp | 6 +++---
src/Workflow/VideoClipWorkflow.cpp | 6 +++---
4 files changed, 16 insertions(+), 13 deletions(-)
diff --git a/src/EffectsEngine/EffectsEngine.cpp b/src/EffectsEngine/EffectsEngine.cpp
index 534dccb..b5cb999 100644
--- a/src/EffectsEngine/EffectsEngine.cpp
+++ b/src/EffectsEngine/EffectsEngine.cpp
@@ -100,7 +100,7 @@ EffectsEngine::browseDirectory( const QString &path )
}
void
-EffectsEngine::applyEffects( const FilterList &effects, Workflow::Frame* frame,
+EffectsEngine::applyFilters( const FilterList &effects, Workflow::Frame* frame,
qint64 currentFrame, double time )
{
if ( effects.size() == 0 )
@@ -149,7 +149,7 @@ EffectsEngine::applyEffects( const FilterList &effects, Workflow::Frame* frame,
}
void
-EffectsEngine::saveEffects( const FilterList &effects, QXmlStreamWriter &project )
+EffectsEngine::saveFilters( const FilterList &effects, QXmlStreamWriter &project )
{
if ( effects.size() <= 0 )
return ;
@@ -169,7 +169,7 @@ EffectsEngine::saveEffects( const FilterList &effects, QXmlStreamWriter &project
}
void
-EffectsEngine::initEffects( const FilterList &effects, quint32 width, quint32 height )
+EffectsEngine::initFilters( const FilterList &effects, quint32 width, quint32 height )
{
EffectsEngine::FilterList::const_iterator it = effects.begin();
EffectsEngine::FilterList::const_iterator ite = effects.end();
diff --git a/src/EffectsEngine/EffectsEngine.h b/src/EffectsEngine/EffectsEngine.h
index cb673c3..8d90b82 100644
--- a/src/EffectsEngine/EffectsEngine.h
+++ b/src/EffectsEngine/EffectsEngine.h
@@ -31,6 +31,7 @@ class QTime;
#include "MainWorkflow.h"
class FilterInstance;
+class MixerInstance;
#include <QObject>
#include <QHash>
@@ -63,16 +64,18 @@ class EffectsEngine : public QObject, public Singleton<EffectsEngine>
QUuid uuid;
};
typedef EffectHelper<FilterInstance> FilterHelper;
- typedef QList<FilterHelper*> FilterList;
+ typedef QList<FilterHelper*> FilterList;
+ typedef EffectHelper<MixerInstance> MixerHelper;
+ typedef QList<MixerHelper*> MixerList;
Effect* effect( const QString& name );
bool loadEffect( const QString& fileName );
void browseDirectory( const QString& path );
- static void applyEffects( const FilterList &effects,
+ static void applyFilters( const FilterList &effects,
Workflow::Frame *frame, qint64 currentFrame, double time );
- static void saveEffects( const FilterList &effects, QXmlStreamWriter &project );
- static void initEffects( const FilterList &effects, quint32 width, quint32 height );
+ static void saveFilters( const FilterList &effects, QXmlStreamWriter &project );
+ static void initFilters( const FilterList &effects, quint32 width, quint32 height );
private:
EffectsEngine();
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 36d984c..9cf959b 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -175,7 +175,7 @@ WorkflowRenderer::lockVideo( EsHandler *handler, qint64 *pts, size_t *bufferSize
}
{
QReadLocker lock( m_effectsLock );
- EffectsEngine::applyEffects( m_filters, ret->video,
+ EffectsEngine::applyFilters( m_filters, ret->video,
m_mainWorkflow->getCurrentFrame(),
m_mainWorkflow->getCurrentFrame() * 1000.0 / handler->fps );
}
@@ -239,7 +239,7 @@ void WorkflowRenderer::startPreview()
setupRenderer( m_width, m_height, m_outputFps );
}
QReadLocker lock( m_effectsLock );
- EffectsEngine::initEffects( m_filters, m_width, m_height );
+ EffectsEngine::initFilters( m_filters, m_width, m_height );
//Deactivating vlc's keyboard inputs.
m_mediaPlayer->setKeyInput( false );
@@ -414,7 +414,7 @@ WorkflowRenderer::saveProject( QXmlStreamWriter &project ) const
project.writeStartElement( "renderer" );
{
QReadLocker lock( m_effectsLock );
- EffectsEngine::saveEffects( m_filters, project );
+ EffectsEngine::saveFilters( m_filters, project );
}
project.writeEndElement();
}
diff --git a/src/Workflow/VideoClipWorkflow.cpp b/src/Workflow/VideoClipWorkflow.cpp
index 3e27f15..e268185 100644
--- a/src/Workflow/VideoClipWorkflow.cpp
+++ b/src/Workflow/VideoClipWorkflow.cpp
@@ -102,7 +102,7 @@ VideoClipWorkflow::initVlcOutput()
m_vlcMedia->addOption( buffer );
QReadLocker lock( m_effectsLock );
- EffectsEngine::initEffects( m_filters, m_width, m_height );
+ EffectsEngine::initFilters( m_filters, m_width, m_height );
}
void*
@@ -169,7 +169,7 @@ VideoClipWorkflow::unlock( VideoClipWorkflow *cw, void *buffer, int width,
Workflow::Frame *frame = cw->m_computedBuffers.last();
{
QWriteLocker lock( cw->m_effectsLock );
- EffectsEngine::applyEffects( cw->m_filters, frame, cw->m_renderedFrame,
+ EffectsEngine::applyFilters( cw->m_filters, frame, cw->m_renderedFrame,
cw->m_renderedFrame * 1000.0 / cw->clip()->getMedia()->fps() );
}
{
@@ -229,7 +229,7 @@ void
VideoClipWorkflow::saveEffects( QXmlStreamWriter &project ) const
{
QReadLocker lock( m_effectsLock );
- EffectsEngine::saveEffects( m_filters, project );
+ EffectsEngine::saveFilters( m_filters, project );
}
void
More information about the Vlmc-devel
mailing list