KShare/recording/recordingformats.hpp
2017-07-09 21:04:21 +02:00

40 lines
994 B
C++

#ifndef RECORDINGFORMATS_HPP
#define RECORDINGFORMATS_HPP
#include <QDir>
#include <QFile>
#include <QImage>
#include <QString>
#include <QTemporaryDir>
#include <formats.hpp>
#include <functional>
#include <recording/encoders/encoder.hpp>
class RecordingFormats {
public:
RecordingFormats(formats::Recording f);
std::function<void(QImage)> getConsumer();
std::function<bool(QSize)> getValidator();
std::function<QString()> getFinalizer();
std::function<void()> getPostUploadTask();
QImage::Format getFormat();
QString getAnotherFormat();
private:
std::function<void(QImage)> consumer;
std::function<bool(QSize)> validator;
std::function<QString()> finalizer;
std::function<void()> postUploadTask;
std::vector<QImage> frames;
QImage::Format iFormat;
QTemporaryDir tmpDir;
QString path;
Encoder *enc = NULL;
bool interrupt = false;
bool frameAdded = false;
QString anotherFormat;
};
#endif // RECORDINGFORMATS_HPP