Commit f7f4a977 authored by dogmaphobic's avatar dogmaphobic

Attempt at making Windows build happy.

While at it, fixed an issue with builds that have video streaming disabled.
parent f5ab8d3b
......@@ -41,7 +41,7 @@ This file is part of the QGROUNDCONTROL project
#if defined(QGC_GST_STREAMING)
G_BEGIN_DECLS
// Our own plugin
GST_PLUGIN_STATIC_DECLARE(QTVIDEOSINK_NAME);
GST_PLUGIN_STATIC_DECLARE(QGC_VIDEOSINK_PLUGIN);
// The static plugins we use
#if defined(__mobile__)
GST_PLUGIN_STATIC_DECLARE(coreelements);
......@@ -64,7 +64,7 @@ void initializeVideoStreaming(int &argc, char* argv[])
g_error_free(error);
}
// Our own plugin
GST_PLUGIN_STATIC_REGISTER(QTVIDEOSINK_NAME);
GST_PLUGIN_STATIC_REGISTER(QGC_VIDEOSINK_PLUGIN);
// The static plugins we use
#if defined(__mobile__)
GST_PLUGIN_STATIC_REGISTER(coreelements);
......@@ -94,10 +94,12 @@ void initializeVideoStreaming(int &argc, char* argv[])
#endif
#endif
#else
Q_UNUSED(argc);
Q_UNUSED(argv);
#endif
qmlRegisterType<VideoItem> ("QGroundControl.QgcQtGStreamer", 1, 0, "VideoItem");
qmlRegisterUncreatableType<VideoSurface>("QGroundControl.QgcQtGStreamer", 1, 0, "VideoSurface", QLatin1String("VideoSurface from QML is not supported"));
#endif
}
void shutdownVideoStreaming()
......
......@@ -102,7 +102,7 @@ VideoEnabled {
QGC_GST_STREAMING \
GST_PLUGIN_BUILD_STATIC \
QTGLVIDEOSINK_NAME=qt5glvideosink \
QTVIDEOSINK_NAME=qt5videosink
QGC_VIDEOSINK_PLUGIN=qt5videosink
INCLUDEPATH += \
$$PWD/gstqtvideosink \
......
......@@ -41,12 +41,12 @@ GST_DEBUG_CATEGORY(gst_qt5gstvideosink_debug);
static gboolean plugin_init(GstPlugin *plugin)
{
GST_DEBUG_CATEGORY_INIT(gst_qt5gstvideosink_debug,
G_STRINGIFY(QTVIDEOSINK_NAME), 0,
G_STRINGIFY(QGC_VIDEOSINK_PLUGIN), 0,
"Debug category for GstQtVideoSink");
if(!gst_element_register(plugin, G_STRINGIFY(QTVIDEOSINK_NAME),
if(!gst_element_register(plugin, G_STRINGIFY(QGC_VIDEOSINK_PLUGIN),
GST_RANK_NONE, GST_TYPE_QT_VIDEO_SINK)) {
GST_ERROR("Failed to register " G_STRINGIFY(QTVIDEOSINK_NAME));
GST_ERROR("Failed to register " G_STRINGIFY(QGC_VIDEOSINK_PLUGIN));
return FALSE;
}
#ifndef GST_QT_VIDEO_SINK_NO_OPENGL
......@@ -76,7 +76,7 @@ static gboolean plugin_init(GstPlugin *plugin)
GST_PLUGIN_DEFINE (
GST_VERSION_MAJOR,
GST_VERSION_MINOR,
QTVIDEOSINK_NAME,
QGC_VIDEOSINK_PLUGIN,
"A video sink that can draw on any Qt surface",
plugin_init,
PACKAGE_VERSION,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment