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 StabilizeTask : public AbstractTask
0017 {
0018 public:
0019     StabilizeTask(const ObjectId &owner, const QString &binId, const QString &destination, int in, int out,
0020                   const std::unordered_map<QString, QVariant> &filterParams, QObject *object);
0021     static void start(QObject* object, bool force = false);
0022 
0023 private Q_SLOTS:
0024     void processLogInfo();
0025 
0026 protected:
0027     void run() override;
0028 
0029 private:
0030     QString m_binId;
0031     int m_inPoint;
0032     int m_outPoint;
0033     std::unordered_map<QString, QVariant> m_filterParams;
0034     const QString m_destination;
0035     QStringList m_consumerArgs;
0036     QString m_errorMessage;
0037     QString m_logDetails;
0038     std::unique_ptr<QProcess> m_jobProcess;
0039 };