justburner 64e039
#pragma once
justburner 64e039
justburner 64e039
#ifndef THIRDPARTY_INCLUDED
justburner 64e039
#define THIRDPARTY_INCLUDED
justburner 64e039
justburner 64e039
#include "tcommon.h"
justburner 64e039
justburner 64e039
#include <qprocess></qprocess>
justburner 64e039
#include <qstring></qstring>
justburner 64e039
#include <qstringlist></qstringlist>
justburner 64e039
justburner 64e039
#undef DVAPI
justburner 64e039
#ifdef TOONZLIB_EXPORTS
justburner 64e039
#define DVAPI DV_EXPORT_API
justburner 64e039
#else
justburner 64e039
#define DVAPI DV_IMPORT_API
justburner 64e039
#endif
justburner 64e039
justburner 64e039
namespace ThirdParty {
justburner 64e039
justburner 64e039
//-----------------------------------------------------------------------------
justburner 64e039
justburner 64e039
DVAPI void initialize();
justburner 64e039
justburner 64e039
//-----------------------------------------------------------------------------
justburner 64e039
justburner 64e039
DVAPI void getFFmpegVideoSupported(QStringList &exts);
justburner 64e039
DVAPI void getFFmpegAudioSupported(QStringList &exts);
justburner 64e039
justburner 64e039
DVAPI bool findFFmpeg(QString dir);
justburner 64e039
DVAPI bool checkFFmpeg();
justburner 64e039
DVAPI QString autodetectFFmpeg();
justburner 64e039
justburner 64e039
DVAPI QString getFFmpegDir();
justburner 64e039
DVAPI void setFFmpegDir(const QString &dir);
justburner 64e039
DVAPI int getFFmpegTimeout();
justburner 64e039
DVAPI void setFFmpegTimeout(int secs);
justburner 64e039
justburner 64e039
DVAPI void runFFmpeg(QProcess &process, const QStringList &arguments);
justburner 64e039
DVAPI void runFFprobe(QProcess &process, const QStringList &arguments);
justburner 64e039
justburner 64e039
DVAPI void runFFmpegAudio(QProcess &process, QString srcPath, QString dstPath,
justburner 64e039
                          int samplerate = 44100, int bpp = 16,
justburner 64e039
                          int channels = 2);
justburner 64e039
DVAPI bool readFFmpegAudio(QProcess &process, QByteArray &rawData);
justburner 64e039
justburner 64e039
//-----------------------------------------------------------------------------
justburner 64e039
justburner 64e039
DVAPI bool findRhubarb(QString dir);
justburner 64e039
DVAPI bool checkRhubarb();
justburner 64e039
DVAPI QString autodetectRhubarb();
justburner 64e039
justburner 64e039
DVAPI QString getRhubarbDir();
justburner 64e039
DVAPI void setRhubarbDir(const QString &dir);
justburner 64e039
DVAPI int getRhubarbTimeout();
justburner 64e039
DVAPI void setRhubarbTimeout(int secs);
justburner 64e039
justburner 64e039
DVAPI void runRhubarb(QProcess &process, const QStringList &arguments);
justburner 64e039
justburner 64e039
//-----------------------------------------------------------------------------
justburner 64e039
justburner 64e039
// return  0 = No error
justburner 64e039
// return -1 = error code
justburner 64e039
// return -2 = timed out
justburner 64e039
DVAPI int waitAsyncProcess(const QProcess &process, int timeout);
justburner 64e039
justburner 64e039
//-----------------------------------------------------------------------------
justburner 64e039
justburner 64e039
}  // namespace ThirdParty
justburner 64e039
justburner 64e039
#endif