17#ifndef MOVIEEXPORTER_H
18#define MOVIEEXPORTER_H
21#include <QCoreApplication>
24#include <QTemporaryDir>
25#include "pencilerror.h"
37 QSize exportSize{ 0, 0 };
52 std::function<
void(
float,
float)> majorProgress,
53 std::function<
void(
float)> minorProgress,
54 std::function<
void(
QString)> progressMessage);
57 void cancel() { mCanceled =
true; }
60 static const int MAX_SOUND_FRAMES = 63;
75 bool mCanceled =
false;
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.
Status assembleAudio(const Object *obj, QString ffmpegPath, std::function< void(float)> progress)
Combines all audio tracks in obj into a single file.
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 generateGif(const Object *obj, QString ffmpeg, QString strOut, std::function< void(float)> progress)
Exports obj to a gif 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...
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.