Skip to content
Snippets Groups Projects
Commit 9c1d82d4 authored by luyikei's avatar luyikei Committed by Hugo Beauzée-Luyssen
Browse files

MainWorkflow::ClipInfo : Search SequenceWorkfloer first


Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent f34b0739
No related branches found
No related tags found
No related merge requests found
......@@ -214,6 +214,19 @@ MainWorkflow::addClip( const QString& uuid, quint32 trackId, qint32 pos, bool is
QJsonObject
MainWorkflow::clipInfo( const QString& uuid )
{
auto clip = m_sequenceWorkflow->clip( uuid );
if ( clip != nullptr )
{
auto h = clip->toVariant().toHash();
h["length"] = (qint64)( clip->input()->length() );
h["name"] = clip->media()->title();
h["audio"] = clip->formats().testFlag( Clip::Audio );
h["video"] = clip->formats().testFlag( Clip::Video );
h["position"] = m_sequenceWorkflow->position( uuid );
h["trackId"] = m_sequenceWorkflow->trackId( uuid );
return QJsonObject::fromVariantHash( h );
}
auto lClip = Core::instance()->library()->clip( uuid );
if ( lClip != nullptr )
{
......@@ -227,18 +240,7 @@ MainWorkflow::clipInfo( const QString& uuid )
return QJsonObject::fromVariantHash( h );
}
auto clip = m_sequenceWorkflow->clip( uuid );
if ( !clip )
return QJsonObject();
auto h = clip->toVariant().toHash();
h["length"] = (qint64)( clip->input()->length() );
h["name"] = clip->media()->title();
h["audio"] = clip->formats().testFlag( Clip::Audio );
h["video"] = clip->formats().testFlag( Clip::Video );
h["position"] = m_sequenceWorkflow->position( uuid );
h["trackId"] = m_sequenceWorkflow->trackId( uuid );
return QJsonObject::fromVariantHash( h );
return QJsonObject();
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment