-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (24 loc) · 1019 Bytes
/
main.cpp
File metadata and controls
28 lines (24 loc) · 1019 Bytes
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
#include "QtGStreamerHUD.h"
#include "gstqtvideosinkplugin.h"
#include <QLoggingCategory>
#include <QGst/Init>
#include <QGst/Quick/VideoSurface>
#include <QGst/Quick/VideoItem>
#include <gst/gst.h>
#include <QThread>
#include <gstqtquick2videosink.h>
#include <objbase.h>
// Since Qt QML scene rendering is on a rendering thread and not the UI thread, use a 'direct' call instead of the glib 'signal/slot'
// The UI thread blocks during the 'update-node' call, so it's safe to make this direct call on the rendering thread
gpointer gst_qt_quick2_video_sink_update_node(GstQtQuick2VideoSink *self, gpointer node, qreal x, qreal y, qreal w, qreal h);
void* update_node(void* surface, void* node, qreal x, qreal y, qreal w, qreal h)
{
return gst_qt_quick2_video_sink_update_node((GstQtQuick2VideoSink*)surface, (gpointer)node, x, y, w, h);
}
int main(int argc, char *argv[])
{
CoInitializeEx(NULL,COINIT_MULTITHREADED);
int retCode = InitHUDApp(argc,argv, false);
ExitHUDApp();
return retCode;
}