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

SequenceWorkflow: Rename SW::Clip to ClipInstance

parent a7859e48
......@@ -133,7 +133,7 @@ namespace Commands
private:
std::shared_ptr<SequenceWorkflow> m_workflow;
QSharedPointer<SequenceWorkflow::Clip> m_clip;
QSharedPointer<SequenceWorkflow::ClipInstance> m_clip;
quint32 m_trackId;
qint64 m_pos;
};
......@@ -156,7 +156,7 @@ namespace Commands
private:
std::shared_ptr<SequenceWorkflow> m_workflow;
QSharedPointer<SequenceWorkflow::Clip> m_clip;
QSharedPointer<SequenceWorkflow::ClipInstance> m_clip;
qint64 m_newBegin;
qint64 m_oldBegin;
qint64 m_newEnd;
......@@ -175,7 +175,7 @@ namespace Commands
virtual void retranslate();
private:
std::shared_ptr<SequenceWorkflow> m_workflow;
QSharedPointer<SequenceWorkflow::Clip> m_toSplit;
QSharedPointer<SequenceWorkflow::ClipInstance> m_toSplit;
quint32 m_trackId;
QSharedPointer<::Clip> m_newClip;
QUuid m_newClipUuid;
......
......@@ -71,7 +71,7 @@ SequenceWorkflow::addClip( QSharedPointer<::Clip> clip, quint32 trackId, qint32
auto ret = t->insertAt( *clip->input(), pos );
if ( ret == false )
return {};
auto c = QSharedPointer<Clip>::create( clip,
auto c = QSharedPointer<ClipInstance>::create( clip,
uuid.isNull() == true ? QUuid::createUuid() : uuid,
trackId, pos, isAudioClip );
vlmcDebug() << "adding" << (isAudioClip ? "audio" : "video") << "clip instance:" << c->uuid;
......@@ -141,7 +141,7 @@ SequenceWorkflow::resizeClip( const QUuid& uuid, qint64 newBegin, qint64 newEnd,
return ret;
}
QSharedPointer<SequenceWorkflow::Clip>
QSharedPointer<SequenceWorkflow::ClipInstance>
SequenceWorkflow::removeClip( const QUuid& uuid )
{
vlmcDebug() << "Removing clip instance" << uuid;
......@@ -279,7 +279,7 @@ SequenceWorkflow::clear()
}
}
QSharedPointer<SequenceWorkflow::Clip>
QSharedPointer<SequenceWorkflow::ClipInstance>
SequenceWorkflow::clip( const QUuid& uuid )
{
auto it = m_clips.find( uuid );
......@@ -329,7 +329,7 @@ SequenceWorkflow::track( quint32 trackId, bool isAudio )
return m_tracks[Workflow::VideoTrack][trackId];
}
SequenceWorkflow::Clip::Clip(QSharedPointer<::Clip> c, const QUuid& uuid, quint32 tId, qint64 p, bool isAudio )
SequenceWorkflow::ClipInstance::ClipInstance(QSharedPointer<::Clip> c, const QUuid& uuid, quint32 tId, qint64 p, bool isAudio )
: clip( c )
, uuid( uuid )
, trackId( tId )
......
......@@ -56,10 +56,10 @@ class SequenceWorkflow : public QObject
SequenceWorkflow( size_t trackCount = 64 );
~SequenceWorkflow();
struct Clip
struct ClipInstance
{
Clip() = default;
Clip( QSharedPointer<::Clip> c, const QUuid& uuid, quint32 tId, qint64 p, bool isAudio );
ClipInstance() = default;
ClipInstance( QSharedPointer<::Clip> c, const QUuid& uuid, quint32 tId, qint64 p, bool isAudio );
QSharedPointer<::Clip> clip;
QUuid uuid;
quint32 trackId;
......@@ -85,7 +85,7 @@ class SequenceWorkflow : public QObject
bool moveClip( const QUuid& uuid, quint32 trackId, qint64 pos );
bool resizeClip( const QUuid& uuid, qint64 newBegin,
qint64 newEnd, qint64 newPos );
QSharedPointer<Clip> removeClip( const QUuid& uuid );
QSharedPointer<ClipInstance> removeClip( const QUuid& uuid );
bool linkClips( const QUuid& uuidA, const QUuid& uuidB );
bool unlinkClips( const QUuid& uuidA, const QUuid& uuidB );
......@@ -93,7 +93,7 @@ class SequenceWorkflow : public QObject
void loadFromVariant( const QVariant& variant );
void clear();
QSharedPointer<Clip> clip( const QUuid& uuid );
QSharedPointer<ClipInstance> clip( const QUuid& uuid );
quint32 trackId( const QUuid& uuid );
qint32 position( const QUuid& uuid );
......@@ -104,7 +104,7 @@ class SequenceWorkflow : public QObject
inline std::shared_ptr<Backend::ITrack> track( quint32 trackId, bool audio );
QMap<QUuid, QSharedPointer<Clip>> m_clips;
QMap<QUuid, QSharedPointer<ClipInstance>> m_clips;
Backend::IMultiTrack* m_multitrack;
QList<std::shared_ptr<Backend::ITrack>> m_tracks[Workflow::NbTrackType];
......
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