[vlmc-devel] commit: TrackHandler: Save tracks effects ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Fri Sep 17 00:38:53 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Sep 16 23:55:41 2010 +0200| [f61455494a702c01780bb7914a3a6171ceadafec] | committer: Hugo Beauzée-Luyssen 

TrackHandler: Save tracks effects

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=f61455494a702c01780bb7914a3a6171ceadafec
---

 src/EffectsEngine/EffectUser.h |    3 +--
 src/Workflow/TrackHandler.cpp  |    3 ++-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/EffectsEngine/EffectUser.h b/src/EffectsEngine/EffectUser.h
index 4b078ea..50eeec3 100644
--- a/src/EffectsEngine/EffectUser.h
+++ b/src/EffectsEngine/EffectUser.h
@@ -60,6 +60,7 @@ class EffectUser : public QObject
         virtual qint64                  length() const = 0;
         virtual Type                    effectType() const = 0;
         void                            loadEffects( const QDomElement &project );
+        void                            saveFilters( QXmlStreamWriter &project ) const;
 
     protected:
         EffectUser();
@@ -70,8 +71,6 @@ class EffectUser : public QObject
         //Filters:
         quint32                         *applyFilters( const Workflow::Frame *frame,
                                                        qint64 currentFrame, double time );
-        void                            saveFilters( QXmlStreamWriter &project ) const;
-
         //Mixers methods:
         EffectHelper                    *getMixer( qint64 currentFrame );
 
diff --git a/src/Workflow/TrackHandler.cpp b/src/Workflow/TrackHandler.cpp
index 92e9dd7..2d588e7 100644
--- a/src/Workflow/TrackHandler.cpp
+++ b/src/Workflow/TrackHandler.cpp
@@ -159,12 +159,13 @@ TrackHandler::save( QXmlStreamWriter& project ) const
 {
     for ( unsigned int i = 0; i < m_trackCount; ++i)
     {
-        if ( m_tracks[i]->getLength() > 0 )
+        if ( m_tracks[i]->getLength() > 0 || m_tracks[i]->count( Effect::Filter ) > 0 )
         {
             project.writeStartElement( "track" );
             project.writeAttribute( "type", QString::number( (int)m_trackType ) );
             project.writeAttribute( "id", QString::number( i ) );
             m_tracks[i]->save( project );
+            m_tracks[i]->saveFilters( project );
             project.writeEndElement();
         }
     }



More information about the Vlmc-devel mailing list