Commit 76f98d82 authored by luyikei's avatar luyikei

MainWorkflow: Implement takeThumbnail

parent 13672c73
......@@ -50,6 +50,7 @@
#include "Tools/RendererEventWatcher.h"
#include "Tools/OutputEventWatcher.h"
#include "Workflow/Types.h"
#include "ThumbnailWorker.h"
#include <QMutex>
......@@ -298,6 +299,17 @@ MainWorkflow::addEffect( const QString &clipUuid, const QString &effectId )
return QStringLiteral( "" );
MainWorkflow::takeThumbnail( const QString& uuid, quint32 pos )
ThumbnailWorker worker;
connect( &worker, &ThumbnailWorker::imageReady, this, &MainWorkflow::thumbnailUpdated, Qt::DirectConnection );
auto clip = m_sequenceWorkflow->clip( uuid ); uuid, clip->media()->fileInfo()->absoluteFilePath(),
clip->begin() + pos, clip->input()->width(),
clip->input()->height() );
MainWorkflow::startRenderToFile( const QString &outputFileName, quint32 width, quint32 height,
double fps, const QString &ar, quint32 vbitrate, quint32 abitrate,
......@@ -153,6 +153,9 @@ class MainWorkflow : public QObject
QString addEffect( const QString& clipUuid, const QString& effectId );
void takeThumbnail( const QString& uuid, quint32 pos );
bool startRenderToFile( const QString& outputFileName, quint32 width, quint32 height,
double fps, const QString& ar, quint32 vbitrate, quint32 abitrate,
quint32 nbChannels, quint32 sampleRate );
......@@ -258,6 +261,8 @@ class MainWorkflow : public QObject
void clipUnlinked( const QString& uuidA, const QString& uuidB );
void effectsUpdated( const QString& clipUuid );
void thumbnailUpdated( const QString& uuid, quint32 pos, const QPixmap& pixmap );
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