#ifndef QHANDBRAKE_H
#define QHANDBRAKE_H

#include <QObject>
#include <QProcess>

class QHandbrake : public QObject
{
    Q_OBJECT

public:
    explicit QHandbrake(QObject *parent = nullptr);
    uint8_t setPath(QString pathIn);
    Q_INVOKABLE uint8_t startEncode(const QString path,const QString title);
    Q_INVOKABLE uint8_t stopEncode();
    Q_INVOKABLE uint8_t setCoreUsage(uint8_t cores);

private:
    QString exePath = "";
    QProcess *HBProcess, *tasksetProcess;
    void printStandardStatus();
    void printOutput();

signals:
    void statusChanged(QString status);
};

#endif // QHANDBRAKE_H
