-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
44 lines (35 loc) · 1.4 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include "editor.h"
#include <thread>
#include <libopenshot/OpenShot.h>
#include <QApplication>
using namespace std;
using namespace openshot;
void setHardwareAccel(QSettings *settings) {
Settings::Instance()->HARDWARE_DECODER = settings->value("video/hw_acceleration", 0).toInt();
Settings::Instance()->OMP_THREADS = std::thread::hardware_concurrency();
Settings::Instance()->HIGH_QUALITY_SCALING = true;
Settings::Instance()->FF_THREADS = std::thread::hardware_concurrency();
Settings::Instance()->DE_LIMIT_HEIGHT_MAX = 10000;
Settings::Instance()->DE_LIMIT_WIDTH_MAX = 10000;
Settings::Instance()->WAIT_FOR_VIDEO_PROCESSING_TASK = false;
if (Settings::Instance()->HARDWARE_DECODER != 0) {
cerr << "Hardware decoding enabled... Detected thread count: " << Settings::Instance()->FF_THREADS << endl;
}
}
int main(int argv, char **args) {
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argv, args);
QCoreApplication::setOrganizationName("AK");
QCoreApplication::setApplicationName("SVEditor");
QSettings settings;
settings.setValue("app/name", "SVEditor");
settings.sync();
//QQuickStyle::setStyle("Material");
setHardwareAccel(&settings);
Editor editor;
editor.resize(1280, 720);
editor.setWindowTitle(QObject::tr("SVEditor"));
editor.show();
//editor.playPause();
return QApplication::exec();
}