KShare/src/recording/recordingformats.hpp

42 lines
1.0 KiB
C++
Raw Normal View History

#ifndef RECORDINGFORMATS_HPP
#define RECORDINGFORMATS_HPP
#include <QApplication>
#include <QDir>
#include <QFile>
#include <QImage>
#include <QString>
2017-07-09 21:04:21 +02:00
#include <QTemporaryDir>
#include <formats.hpp>
#include <functional>
#include <recording/encoders/encoder.hpp>
class RecordingFormats {
Q_DECLARE_TR_FUNCTIONS(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;
2017-06-06 01:28:19 +02:00
std::vector<QImage> frames;
QImage::Format iFormat;
2017-07-09 21:04:21 +02:00
QTemporaryDir tmpDir;
QString path;
Encoder *enc = NULL;
2017-06-13 14:15:37 +02:00
bool interrupt = false;
bool frameAdded = false;
QString anotherFormat;
};
#endif // RECORDINGFORMATS_HPP