17 #ifndef MOVIEEXPORTER_H
18 #define MOVIEEXPORTER_H
23 #include <QTemporaryDir>
24 #include "pencilerror.h"
36 QSize exportSize{ 0, 0 };
50 std::function<
void(
float,
float)> majorProgress,
51 std::function<
void(
float)> minorProgress,
52 std::function<
void(
QString)> progressMessage);
55 void cancel() { mCanceled =
true; }
70 bool mCanceled =
false;
73 #endif // MOVIEEXPORTER_H
Status assembleAudio(const Object *obj, QString ffmpegPath, std::function< void(float)> progress)
Combines all audio tracks in obj into a single file.
Status run(const Object *obj, const ExportMovieDesc &desc, std::function< void(float, float)> majorProgress, std::function< void(float)> minorProgress, std::function< void(QString)> progressMessage)
Begin exporting the movie described by exportDesc.
static Status executeFFmpeg(const QString &cmd, const QStringList &args, std::function< bool(int)> progress)
Runs the specified command (should be ffmpeg) and allows for progress feedback.
Status generateGif(const Object *obj, QString ffmpeg, QString strOut, std::function< void(float)> progress)
Exports obj to a gif image at strOut using FFmpeg.
Status generateMovie(const Object *obj, QString ffmpegPath, QString strOutputFile, std::function< void(float)> progress)
Exports obj to a movie image at strOut using FFmpeg.
Status executeFFMpegPipe(const QString &cmd, const QStringList &args, std::function< void(float)> progress, std::function< bool(QProcess &, int)> writeFrame)
Runs the specified command (should be ffmpeg), and lets writeFrame pipe data into it 1 frame at a tim...