[vlmc-devel] commit: Workflow: Renaming unused getClip method to getClipHelper. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Wed Aug 25 00:40:13 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Wed Aug 25 00:01:39 2010 +0200| [9e8d8b7520eb06de5daf13952b8322e37d4e28ee] | committer: Hugo Beauzée-Luyssen 

Workflow: Renaming unused getClip method to getClipHelper.

It now returns a ClipHelper (which also contains the clip)

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

 src/Workflow/ClipHelper.h      |    2 +-
 src/Workflow/MainWorkflow.cpp  |    8 ++++----
 src/Workflow/MainWorkflow.h    |   14 ++++++--------
 src/Workflow/TrackHandler.cpp  |    6 +++---
 src/Workflow/TrackHandler.h    |    2 +-
 src/Workflow/TrackWorkflow.cpp |    8 ++++----
 src/Workflow/TrackWorkflow.h   |    2 +-
 7 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/src/Workflow/ClipHelper.h b/src/Workflow/ClipHelper.h
index 5fe3842..e7b4203 100644
--- a/src/Workflow/ClipHelper.h
+++ b/src/Workflow/ClipHelper.h
@@ -56,7 +56,7 @@ class   ClipHelper : public QObject
          *  \return The length in frames
          */
         qint64      length() const;
-        const QUuid&    uuid() const
+        const QUuid &uuid() const
         {
             return m_uuid;
         }
diff --git a/src/Workflow/MainWorkflow.cpp b/src/Workflow/MainWorkflow.cpp
index 4afc6c5..3eea18e 100644
--- a/src/Workflow/MainWorkflow.cpp
+++ b/src/Workflow/MainWorkflow.cpp
@@ -264,11 +264,11 @@ MainWorkflow::setCurrentFrame( qint64 currentFrame, Vlmc::FrameChangedReason rea
     emit frameChanged( currentFrame, reason );
 }
 
-Clip*
-MainWorkflow::getClip( const QUuid &uuid, unsigned int trackId,
-                       Workflow::TrackType trackType )
+ClipHelper*
+MainWorkflow::getClipHelper( const QUuid &uuid, unsigned int trackId,
+                                Workflow::TrackType trackType )
 {
-    return m_tracks[trackType]->getClip( uuid, trackId );
+    return m_tracks[trackType]->getClipHelper( uuid, trackId );
 }
 
 /**
diff --git a/src/Workflow/MainWorkflow.h b/src/Workflow/MainWorkflow.h
index 6c4de47..de599e4 100644
--- a/src/Workflow/MainWorkflow.h
+++ b/src/Workflow/MainWorkflow.h
@@ -333,15 +333,13 @@ class   MainWorkflow : public QObject, public Singleton<MainWorkflow>
         void                    computeLength();
 
         /**
-         * \param   uuid : The clip's uuid.
-         *              Please note that the UUID must be the real clip's uuid,
-         *              and not the timeline (ClipHelper) uuid, or else nothing would match.
-         *  \param  trackId : the track id
-         *  \param  trackType : the track type (audio or video)
-         *  \returns    The clip that matches the given UUID, or NULL.
-         */
-        Clip*                   getClip( const QUuid& uuid, unsigned int trackId,
-                                         Workflow::TrackType trackType );
+         *  \param      uuid : The clip helper's uuid.
+         *  \param      trackId : the track id
+         *  \param      trackType : the track type (audio or video)
+         *  \returns    The clip helper that matches the given UUID, or NULL.
+         */
+        ClipHelper*             getClipHelper( const QUuid& uuid, unsigned int trackId,
+                                               Workflow::TrackType trackType );
 
     private:
         /// Pre-filled buffer used when there's nothing to render
diff --git a/src/Workflow/TrackHandler.cpp b/src/Workflow/TrackHandler.cpp
index 16daa66..6a8f2f9 100644
--- a/src/Workflow/TrackHandler.cpp
+++ b/src/Workflow/TrackHandler.cpp
@@ -177,12 +177,12 @@ TrackHandler::unmuteTrack( unsigned int trackId )
     m_tracks[trackId].activate();
 }
 
-Clip*
-TrackHandler::getClip( const QUuid& uuid, unsigned int trackId )
+ClipHelper*
+TrackHandler::getClipHelper( const QUuid& uuid, unsigned int trackId )
 {
     Q_ASSERT( trackId < m_trackCount );
 
-    return m_tracks[trackId]->getClip( uuid );
+    return m_tracks[trackId]->getClipHelper( uuid );
 }
 
 void
diff --git a/src/Workflow/TrackHandler.h b/src/Workflow/TrackHandler.h
index f50f8bb..34671df 100644
--- a/src/Workflow/TrackHandler.h
+++ b/src/Workflow/TrackHandler.h
@@ -71,7 +71,7 @@ class   TrackHandler : public QObject
         Clip*                   removeClip( const QUuid& uuid, unsigned int trackId );
         void                    muteTrack( unsigned int trackId );
         void                    unmuteTrack( unsigned int trackId );
-        Clip*                   getClip( const QUuid& uuid, unsigned int trackId );
+        ClipHelper              *getClipHelper( const QUuid& uuid, unsigned int trackId );
         void                    clear();
 
         bool                    endIsReached() const;
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index fce4c01..de8a899 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -138,16 +138,16 @@ TrackWorkflow::getClipPosition( const QUuid& uuid ) const
     return -1;
 }
 
-Clip*
-TrackWorkflow::getClip( const QUuid& uuid )
+ClipHelper*
+TrackWorkflow::getClipHelper( const QUuid& uuid )
 {
     QMap<qint64, ClipWorkflow*>::const_iterator     it = m_clips.begin();
     QMap<qint64, ClipWorkflow*>::const_iterator     end = m_clips.end();
 
     while ( it != end )
     {
-        if ( it.value()->getClipHelper()->clip()->uuid() == uuid )
-            return it.value()->clip();
+        if ( it.value()->getClipHelper()->uuid() == uuid )
+            return it.value()->getClipHelper();
         ++it;
     }
     return NULL;
diff --git a/src/Workflow/TrackWorkflow.h b/src/Workflow/TrackWorkflow.h
index 7e42d2b..b7a431b 100644
--- a/src/Workflow/TrackWorkflow.h
+++ b/src/Workflow/TrackWorkflow.h
@@ -61,7 +61,7 @@ class   TrackWorkflow : public QObject
         void                                    addClip( ClipWorkflow*, qint64 start );
         void                                    addEffect( Effect *effect, const QUuid &uuid );
         qint64                                  getClipPosition( const QUuid& uuid ) const;
-        Clip*                                   getClip( const QUuid& uuid );
+        ClipHelper                              *getClipHelper( const QUuid& uuid );
 
         //FIXME: this won't be reliable as soon as we change the fps from the configuration
         static const unsigned int               nbFrameBeforePreload = 60;



More information about the Vlmc-devel mailing list