File indexing completed on 2024-12-01 04:28:37

0001 /*
0002     SPDX-FileCopyrightText: 2021 Jean-Baptiste Mardelle <jb@kdenlive.org>
0003 
0004 SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #pragma once
0008 
0009 #include "abstracttask.h"
0010 #include <memory>
0011 #include <unordered_map>
0012 #include <mlt++/MltConsumer.h>
0013 
0014 class QProcess;
0015 
0016 class SpeedTask : public AbstractTask
0017 {
0018 public:
0019     SpeedTask(const ObjectId &owner, const QString &destination, int in, int out, std::unordered_map<QString, QVariant> filterParams, QObject *object);
0020     static void start(QObject* object, bool force = false);
0021 
0022 private Q_SLOTS:
0023     void processLogInfo();
0024 
0025 protected:
0026     void run() override;
0027 
0028 private:
0029     double m_speed;
0030     int m_inPoint;
0031     int m_outPoint;
0032     QString m_assetId;
0033     QString m_filterName;
0034     std::unordered_map<QString, QVariant> m_filterParams;
0035     const QString m_destination;
0036     QStringList m_consumerArgs;
0037     QString m_errorMessage;
0038     QString m_logDetails;
0039     std::unique_ptr<QProcess> m_jobProcess;
0040 };