-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
35 lines (30 loc) · 1.05 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
#include <QApplication>
#include <QQmlApplicationEngine>
#include<QAbstractVideoFilter>
#include <QCamera>
#include <QQuickItem>
#include <QQuickView>
#include <QQmlContext>
#include <QObject>
#include "framefilter.h"
#include "framefilterrunnable.h"
#include "analyzeresult.h"
#include "bcvencoder.h"
#include "bcvdecoder.h"
#include "imageprovider.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
// QQmlApplicationEngine engine;
qmlRegisterType<FrameFilter>("qmlvideofilter", 1, 0, "FrameFilter" );
qmlRegisterType<AnalyzeResult>("qmlvideofilter", 1, 0, "AnalyzeResult");
qmlRegisterType<BCVEncoder>("qmlbcvencoder", 1, 0, "BCVEncoder");
qmlRegisterType<BCVDecoder>("qmlbcvdecoder", 1, 0, "BCVDecoder");
ImageProvider* ImgProvider = new ImageProvider();
QQuickView view;
view.setSource(QUrl("qrc:/main.qml"));
view.engine()->addImageProvider( QLatin1String("provider"), ImgProvider );
view.engine()->rootContext()->setContextProperty("ProviderImg", ImgProvider );
view.show();
return app.exec();
}