2017-06-04 22:58:29 +02:00
|
|
|
#ifndef RECORDINGFORMATS_HPP
|
|
|
|
#define RECORDINGFORMATS_HPP
|
|
|
|
|
2017-07-29 17:22:17 +02:00
|
|
|
#include <QApplication>
|
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-07-09 21:04:21 +02:00
|
|
|
#include <QTemporaryDir>
|
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 {
|
2017-07-29 17:22:17 +02:00
|
|
|
Q_DECLARE_TR_FUNCTIONS(RecordingFormats)
|
2017-06-04 22:58:29 +02:00
|
|
|
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-07-01 22:34:11 +02:00
|
|
|
std::function<QString()> 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-07-01 22:34:11 +02:00
|
|
|
std::function<QString()> 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;
|
2017-07-09 21:04:21 +02:00
|
|
|
QTemporaryDir 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
|