diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index a5815d36ccdc850d0b999619113a6c745b3ee172..4bd40cfd4b09cbec6c2ac763d53ff505706e3e6b 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -331,13 +331,6 @@ contains (DEFINES, QGC_DISABLE_PAIRING) { DEFINES += QGC_ENABLE_PAIRING } - -# -# Add qmlglsink (libs/gst-plugins-good/ext/qt) -# - -include(qmlglsink.pri) - # # External library configuration # diff --git a/src/VideoStreaming/GLVideoItemStub.cc b/src/VideoStreaming/GLVideoItemStub.cc new file mode 100644 index 0000000000000000000000000000000000000000..ae85382bfdefe6d9798efcc2f8bcb4fe201fd1d0 --- /dev/null +++ b/src/VideoStreaming/GLVideoItemStub.cc @@ -0,0 +1,16 @@ +#include "GLVideoItemStub.h" + +GLVideoItemStub::GLVideoItemStub() +{ +// setFlag(QQuickItem::ItemHasContents, true); +} + +GLVideoItemStub::~GLVideoItemStub() +{ +} + +//QSGNode* +//GLVideoItemStub::updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData* updatePaintNodeData) +//{ +// return oldNode; +//} diff --git a/src/VideoStreaming/GLVideoItemStub.h b/src/VideoStreaming/GLVideoItemStub.h new file mode 100644 index 0000000000000000000000000000000000000000..488cc803840d87d5f371838da2c56eb66c42915e --- /dev/null +++ b/src/VideoStreaming/GLVideoItemStub.h @@ -0,0 +1,18 @@ +#pragma once + +#include + +class GLVideoItemStub : public QQuickItem +{ + Q_OBJECT + +public: + GLVideoItemStub(); + ~GLVideoItemStub(); + +protected: +// QSGNode* updatePaintNode(QSGNode* oldNode, UpdatePaintNodeData* updatePaintNodeData); + +private: + +}; diff --git a/src/VideoStreaming/VideoStreaming.cc b/src/VideoStreaming/VideoStreaming.cc index bf2700f97162c0643790ce3e5566dff6a34e825e..e72ef0acef200da584a62e1f17d550456170a3c4 100644 --- a/src/VideoStreaming/VideoStreaming.cc +++ b/src/VideoStreaming/VideoStreaming.cc @@ -25,6 +25,8 @@ #if defined(__ios__) #include "gst_ios_init.h" #endif +#else +#include "GLVideoItemStub.h" #endif #include "VideoStreaming.h" @@ -183,9 +185,10 @@ void initializeVideoStreaming(int &argc, char* argv[], char* logpath, char* debu qCritical() << "unable to find qmlglsink - you need to build it yourself and add to GST_PLUGIN_PATH"; } #else - Q_UNUSED(argc); - Q_UNUSED(argv); - Q_UNUSED(logpath); - Q_UNUSED(debuglevel); + qmlRegisterType ("org.freedesktop.gstreamer.GLVideoItem", 1, 0, "GstGLVideoItem"); + Q_UNUSED(argc) + Q_UNUSED(argv) + Q_UNUSED(logpath) + Q_UNUSED(debuglevel) #endif } diff --git a/src/VideoStreaming/VideoStreaming.h b/src/VideoStreaming/VideoStreaming.h index 9ac6e1d6296b44dd6388248c2609e6a056dba500..58f27cf2f727da6d4d134716e9a9d6bee678cc54 100644 --- a/src/VideoStreaming/VideoStreaming.h +++ b/src/VideoStreaming/VideoStreaming.h @@ -17,5 +17,3 @@ #pragma once extern void initializeVideoStreaming (int &argc, char *argv[], char* filename, char* debuglevel); - - diff --git a/src/VideoStreaming/VideoStreaming.pri b/src/VideoStreaming/VideoStreaming.pri index 00c82887a5876c76d73ffb81c06d74de88eb2735..17d7d1e35b9c0687753c3f07b996625359946901 100644 --- a/src/VideoStreaming/VideoStreaming.pri +++ b/src/VideoStreaming/VideoStreaming.pri @@ -126,6 +126,7 @@ VideoEnabled { $$PWD/iOS } + include($$PWD/../../qmlglsink.pri) } else { LinuxBuild|MacBuild|iOSBuild|WindowsBuild|AndroidBuild { message("Skipping support for video streaming (GStreamer libraries not installed)") @@ -133,5 +134,10 @@ VideoEnabled { } else { message("Skipping support for video streaming (Unsupported platform)") } -} + SOURCES += \ + $$PWD/GLVideoItemStub.cc + + HEADERS += \ + $$PWD/GLVideoItemStub.h +}