Commit 9e8d8b75 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Workflow: Renaming unused getClip method to getClipHelper.

It now returns a ClipHelper (which also contains the clip)
parent 6f8b3ee9
......@@ -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;
}
......
......@@ -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 );
}
/**
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
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