CuteLogger
Fast and simple logging solution for Qt based applications
meltjob.h
1/*
2 * Copyright (c) 2012-2022 Meltytech, LLC
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef MELTJOB_H
19#define MELTJOB_H
20
21#include "abstractjob.h"
22#include <QTemporaryFile>
23#include <MltProfile.h>
24
25class MeltJob : public AbstractJob
26{
27 Q_OBJECT
28public:
29 MeltJob(const QString &name, const QString &xml, int frameRateNum, int frameRateDen,
30 QThread::Priority priority = Settings.jobPriority());
31 MeltJob(const QString &name, const QStringList &args, int frameRateNum, int frameRateDen);
32 virtual ~MeltJob();
33 QString xml();
34 QString xmlPath() const
35 {
36 return m_xml->fileName();
37 }
38 void setIsStreaming(bool streaming);
39 void setUseMultiConsumer(bool multi = true);
40 void setInAndOut(int in, int out);
41
42public slots:
43 void start();
44 void onViewXmlTriggered();
45
46protected slots:
47 virtual void onOpenTiggered();
48 virtual void onFinished(int exitCode, QProcess::ExitStatus exitStatus);
49 void onShowFolderTriggered();
50 void onReadyRead();
51
52protected:
53 QScopedPointer<QTemporaryFile> m_xml;
54
55private:
56
57 bool m_isStreaming;
58 int m_previousPercent;
59 QStringList m_args;
60 int m_currentFrame;
61 Mlt::Profile m_profile;
62 bool m_useMultiConsumer;
63 int m_in {-1};
64 int m_out {-1};
65};
66
67#endif // MELTJOB_H