2017-06-04 22:58:29 +02:00
|
|
|
#ifndef RECORDINGFORMATS_HPP
|
|
|
|
#define RECORDINGFORMATS_HPP
|
|
|
|
|
2017-06-06 01:26:26 +02:00
|
|
|
#include <QDir>
|
2017-06-04 22:58:29 +02:00
|
|
|
#include <QFile>
|
|
|
|
#include <QImage>
|
|
|
|
#include <QString>
|
2017-06-06 17:05:34 +02:00
|
|
|
#include <formats.hpp>
|
2017-06-04 22:58:29 +02:00
|
|
|
#include <functional>
|
|
|
|
|
2017-06-13 00:38:32 +02:00
|
|
|
#include <recording/encoders/encoder.hpp>
|
|
|
|
|
2017-06-04 22:58:29 +02:00
|
|
|
class RecordingFormats {
|
|
|
|
public:
|
2017-06-06 17:05:34 +02:00
|
|
|
RecordingFormats(formats::Recording f);
|
2017-06-04 22:58:29 +02:00
|
|
|
std::function<void(QImage)> getConsumer();
|
2017-06-13 00:38:32 +02:00
|
|
|
std::function<bool(QSize)> getValidator();
|
2017-06-04 22:58:29 +02:00
|
|
|
std::function<QByteArray()> getFinalizer();
|
2017-06-13 18:23:33 +02:00
|
|
|
std::function<void()> getPostUploadTask();
|
2017-06-06 01:26:26 +02:00
|
|
|
QImage::Format getFormat();
|
2017-06-06 17:05:34 +02:00
|
|
|
QString getAnotherFormat();
|
2017-06-04 22:58:29 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::function<void(QImage)> consumer;
|
2017-06-13 00:38:32 +02:00
|
|
|
std::function<bool(QSize)> validator;
|
2017-06-04 22:58:29 +02:00
|
|
|
std::function<QByteArray()> finalizer;
|
2017-06-13 18:23:33 +02:00
|
|
|
std::function<void()> postUploadTask;
|
2017-06-06 01:28:19 +02:00
|
|
|
std::vector<QImage> frames;
|
2017-06-06 01:26:26 +02:00
|
|
|
QImage::Format iFormat;
|
|
|
|
QDir tmpDir;
|
2017-06-13 01:15:57 +02:00
|
|
|
QString path;
|
2017-06-13 00:38:32 +02:00
|
|
|
Encoder *enc = NULL;
|
2017-06-13 14:15:37 +02:00
|
|
|
bool interrupt = false;
|
2017-06-28 11:12:34 +02:00
|
|
|
bool frameAdded = false;
|
2017-06-06 17:05:34 +02:00
|
|
|
QString anotherFormat;
|
2017-06-04 22:58:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RECORDINGFORMATS_HPP
|