gst-bad qmlglsink and Windows

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

gst-bad qmlglsink and Windows

Weber, Holger

Hi,

I try to get the qmlglsink running under windows. I’m not sure if windows is even supported.

 

I checked out the current master stream of 1.13.x and tried to compile it.

 

The configure script says, that QPA is not installed… How can I fix this?

 

 

configure: *** checking feature: Qt elements ***

configure: *** for plug-ins: qt ***

checking for QT... yes

checking for moc-qt5... no

checking for moc... C:/msys64/mingw32/bin/moc

checking for rcc-qt5... no

checking for rcc... C:/msys64/mingw32/bin/rcc

checking for uic-qt5... no

checking for uic... C:/msys64/mingw32/bin/uic

configure: Cannot find QPA

configure: WARNING: Could not find any Qt Windowing integration

configure: *** These plugins will not be built: qt

 

I try to compile the package under msys2 with QT 5.9.

 

Regards,

Holger

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst-bad qmlglsink and Windows

Jan Schmidt-6

Hi,

On 07/09/17 00:03, Weber, Holger wrote:

Hi,

I try to get the qmlglsink running under windows. I’m not sure if windows is even supported.

 

I checked out the current master stream of 1.13.x and tried to compile it.

 

The configure script says, that QPA is not installed… How can I fix this?

 

 

configure: *** checking feature: Qt elements ***

configure: *** for plug-ins: qt ***

checking for QT... yes

checking for moc-qt5... no

checking for moc... C:/msys64/mingw32/bin/moc

checking for rcc-qt5... no

checking for rcc... C:/msys64/mingw32/bin/rcc

checking for uic-qt5... no

checking for uic... C:/msys64/mingw32/bin/uic

configure: Cannot find QPA

configure: WARNING: Could not find any Qt Windowing integration

configure: *** These plugins will not be built: qt

 

I try to compile the package under msys2 with QT 5.9.


In general we don't build the Qt plugin under msys, because it needs to be built to match the Qt platform and compiler that it's running against.

For Windows, you should try using the qtplugin.pro file in the gst-plugins-bad/ext/qt directory to compile the plugin from with qtcreator. That said - I'm not sure I've tried building it since the dependency on QPA parts was added. It might not work on Windows right now (which is something we'd like to know of course)

The autoconf build is used on other platforms, where Qt can be found and used more easily.

Regards,
Jan.

 

Regards,

Holger

 



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: gst-bad qmlglsink and Windows

Weber, Holger

Building doesn’t work I get a compiler error which has something to doe with GST_PLUGIN_DEFINE. I used qtcreator which is included in msys.

 

C:/msys64/mingw32/bin/mingw32-make -f Makefile.Debug

mingw32-make[1]: Entering directory 'C:/msys64/home/nice.guy/gst-plugins-bad/ext/build-qtplugin-telerob-Debug'

g++ -c -fno-keep-inline-dllexport -march=i686 -mtune=core2 -Wa,-mbig-obj -pipe -g -pthread -mms-bitfields -pthread -mms-bitfields -pthread -mms-bitfields -Wextra -Wall -W -fexceptions -mthreads -DUNICODE -DGST_USE_UNSTABLE_API -DHAVE_QT_WIN32 -DGST_PACKAGE_NAME="GStreamer Bad Plug-ins (qmake)" -DGST_PACKAGE_ORIGIN="Unknown package origin" -DGST_LICENSE="LGPL" -DPACKAGE="gst-plugins-bad (qmake)" -DPACKAGE_VERSION="1.9.0.1" -DQT_QML_DEBUG -DQT_PLUGIN -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../qt -I. -I/include -isystem C:/msys64/mingw32/include/QtGui/5.9.1/QtGui -isystem C:/msys64/mingw32/include/gstreamer-1.0 -isystem C:/msys64/mingw32/include/glib-2.0 -IC:/msys64/mingw32/lib/glib-2.0/include -isystem C:/msys64/mingw32/include -IC:/msys64/mingw32/lib/gstreamer-1.0/include -isystem C:/msys64/mingw32/include/QtQuick -isystem C:/msys64/mingw32/include/QtWidgets -isystem C:/msys64/mingw32/include/QtGui -isystem C:/msys64/mingw32/include/QtQml -isystem C:/msys64/mingw32/include/QtNetwork -isystem C:/msys64/mingw32/include/QtCore -Idebug -IC:/msys64/mingw32/share/qt5/mkspecs/win32-g++  -o debug/gstplugin.o ../qt/gstplugin.cc

In file included from C:/msys64/mingw32/include/gstreamer-1.0/gst/gstelementfactory.h:38:0,

                from C:/msys64/mingw32/include/gstreamer-1.0/gst/gstelement.h:90,

                 from C:/msys64/mingw32/include/gstreamer-1.0/gst/gstbin.h:27,

                 from C:/msys64/mingw32/include/gstreamer-1.0/gst/gst.h:35,

                 from ../qt/gstqtsink.h:24,

                 from ../qt/gstplugin.cc:25:

<command-line>:0:17: error: too many decimal points in number

../qt/gstplugin.cc:51:18: note: in expansion of macro 'PACKAGE_VERSION'

     plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,

                  ^

<command-line>:0:13: error: 'LGPL' was not declared in this scope

../qt/gstplugin.cc:51:35: note: in expansion of macro 'GST_LICENSE'

     plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,

                                   ^

<command-line>:0:13: note: suggested alternative: 'LP'

../qt/gstplugin.cc:51:35: note: in expansion of macro 'GST_LICENSE'

     plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,

           

[....]

 

Regards,

Holger

 

 

Von: Jan Schmidt [mailto:[hidden email]]
Gesendet: Mittwoch, 6. September 2017 16:38
An: Discussion of the development of and with GStreamer; Weber, Holger
Betreff: Re: gst-bad qmlglsink and Windows

 

Hi,

On 07/09/17 00:03, Weber, Holger wrote:

Hi,

I try to get the qmlglsink running under windows. I’m not sure if windows is even supported.

 

I checked out the current master stream of 1.13.x and tried to compile it.

 

The configure script says, that QPA is not installed… How can I fix this?

 

 

configure: *** checking feature: Qt elements ***

configure: *** for plug-ins: qt ***

checking for QT... yes

checking for moc-qt5... no

checking for moc... C:/msys64/mingw32/bin/moc

checking for rcc-qt5... no

checking for rcc... C:/msys64/mingw32/bin/rcc

checking for uic-qt5... no

checking for uic... C:/msys64/mingw32/bin/uic

configure: Cannot find QPA

configure: WARNING: Could not find any Qt Windowing integration

configure: *** These plugins will not be built: qt

 

I try to compile the package under msys2 with QT 5.9.


In general we don't build the Qt plugin under msys, because it needs to be built to match the Qt platform and compiler that it's running against.

For Windows, you should try using the qtplugin.pro file in the gst-plugins-bad/ext/qt directory to compile the plugin from with qtcreator. That said - I'm not sure I've tried building it since the dependency on QPA parts was added. It might not work on Windows right now (which is something we'd like to know of course)

The autoconf build is used on other platforms, where Qt can be found and used more easily.

Regards,
Jan.


 

Regards,

Holger

 




_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

 


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: AW: gst-bad qmlglsink and Windows

Tim Müller
On Thu, 2017-09-07 at 07:00 +0000, Weber, Holger wrote:

Hi Holger,

> Building doesn’t work I get a compiler error which has something to
> doe with GST_PLUGIN_DEFINE. I used qtcreator which is included in
> msys.
>  
> C:/msys64/mingw32/bin/mingw32-make -f Makefile.Debug
> mingw32-make[1]: Entering directory 'C:/msys64/home/nice.guy/gst-
> plugins-bad/ext/build-qtplugin-telerob-Debug'
> g++ -c -fno-keep-inline-dllexport -march=i686 -mtune=core2 -Wa,-mbig-
> obj -pipe -g -pthread -mms-bitfields -pthread -mms-bitfields -pthread
> -mms-bitfields -Wextra -Wall -W -fexceptions -mthreads -DUNICODE
> -DGST_USE_UNSTABLE_API -DHAVE_QT_WIN32 -DGST_PACKAGE_NAME="GStreamer
> Bad Plug-ins (qmake)" -DGST_PACKAGE_ORIGIN="Unknown package origin"
> -DGST_LICENSE="LGPL" -DPACKAGE="gst-plugins-bad (qmake)"
> -DPACKAGE_VERSION="1.9.0.1" -DQT_QML_DEBUG ...
>                  from ../qt/gstplugin.cc:25:
> <command-line>:0:17: error: too many decimal points in number
> ../qt/gstplugin.cc:51:18: note: in expansion of macro
> 'PACKAGE_VERSION'
>      plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,
                  ^
I can reproduce that on Linux. It looks like a quoting issue.

I've pushed a quick fix here:

https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=fcf8b
6bb908ea32073fce3b355f6cc89a67bc52c

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic
http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

AW: AW: gst-bad qmlglsink and Windows

Weber, Holger
There were some other issues I tried to fix. The most time I spend on figuring out why the qml element wasn't loaded. The problem was, that it was linked against the debug dlls of qt and my app was running in release mode.

Also changing to release in QtCreator didn't help because there was a "debug" keyword in the .pro file.
Maybe someone finds this helpful...

This patch works for 1.12...
---
 ext/qt/gstplugin.cc      | 11 ++++++++++-
 ext/qt/gstqtglutility.cc |  6 +++---
 ext/qt/qtplugin.pro      | 13 +++++--------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/ext/qt/gstplugin.cc b/ext/qt/gstplugin.cc
index 01ca2752c..05d7d255b 100644
--- a/ext/qt/gstplugin.cc
+++ b/ext/qt/gstplugin.cc
@@ -22,6 +22,14 @@
 #include "config.h"
 #endif
 
+#ifndef GST_PACKAGE_NAME
+#define GST_PACKAGE_NAME   "GStreamer Bad Plug-ins (qmake)"
+#define GST_PACKAGE_ORIGIN "Unknown package origin"
+#define GST_LICENSE        "LGPL"
+#define PACKAGE            "gst-plugins-bad (qmake)"
+#define PACKAGE_VERSION    "1.12.0.1"
+#endif
+
 #include "gstqtsink.h"
 #include "gstqtsrc.h"
 #include <QtQml/QQmlApplicationEngine>
@@ -34,13 +42,14 @@ plugin_init (GstPlugin * plugin)
     return FALSE;
   }
   
+#ifndef HAVE_QT_WIN32
   if (!gst_element_register (plugin, "qmlglsrc",
           GST_RANK_NONE, GST_TYPE_QT_SRC)) {
     return FALSE;
   }
+#endif
   /* this means the plugin must be loaded before the qml engine is loaded */
   qmlRegisterType<QtGLVideoItem> ("org.freedesktop.gstreamer.GLVideoItem", 1, 0, "GstGLVideoItem");
-
   return TRUE;
 }
 
diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
index a4b22aa95..067876bcd 100644
--- a/ext/qt/gstqtglutility.cc
+++ b/ext/qt/gstqtglutility.cc
@@ -230,7 +230,7 @@ gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
       wglMakeCurrent (device, 0);
       gst_object_unref (window);
       if (!gst_gl_context_create (*context, *wrap_glcontext, &error)) {
-        GST_ERROR ("%p failed to create shared GL context: %s", this, error->message);
+        // GST_ERROR ("%p failed to create shared GL context: %s", this, error->message);
         g_object_unref (*context);
         *context = NULL;
         g_object_unref (*wrap_glcontext);
@@ -239,10 +239,10 @@ gst_qt_get_gl_wrapcontext (GstGLDisplay * display,
         return FALSE;
       }
       wglMakeCurrent (device, (HGLRC) gl_handle);
-    }
+    } G_STMT_END;
 #endif
     gst_gl_context_activate (*wrap_glcontext, FALSE);
-  } G_STMT_END;
+  }
 
   return TRUE;
 }
diff --git a/ext/qt/qtplugin.pro b/ext/qt/qtplugin.pro
index af1d8ddc1..ed9464b6a 100644
--- a/ext/qt/qtplugin.pro
+++ b/ext/qt/qtplugin.pro
@@ -5,7 +5,7 @@ TARGET = libgstqtsink
 QT += qml quick widgets
 
 QT_CONFIG -= no-pkg-config
-CONFIG += link_pkgconfig debug plugin
+CONFIG += link_pkgconfig plugin
 PKGCONFIG = \
     gstreamer-1.0 \
     gstreamer-video-1.0 \
@@ -13,19 +13,16 @@ PKGCONFIG = \
 
 DEFINES += \
     GST_USE_UNSTABLE_API \
-    HAVE_QT_WIN32 \
-    'GST_PACKAGE_NAME=\"GStreamer Bad Plug-ins (qmake)\"' \
-    'GST_PACKAGE_ORIGIN=\"Unknown package origin\"' \
-    'GST_LICENSE=\"LGPL\"' \
-    'PACKAGE=\"gst-plugins-bad (qmake)\"' \
-    'PACKAGE_VERSION=\"1.9.0.1\"'
+    HAVE_QT_WIN32
 
 SOURCES += \
     gstplugin.cc \
     gstqsgtexture.cc \
+    gstqtglutility.cc \
     gstqtsink.cc \
     qtitem.cc
 
+
 HEADERS += \
     gstqsgtexture.h \
     gstqtgl.h \
@@ -36,4 +33,4 @@ INCLUDEPATH += \
     $$(GSTREAMER_ROOT)/include \
     $$[QT_INSTALL_PREFIX]/include/QtGui/$$[QT_VERSION]/QtGui/
 
-    
\ No newline at end of file
+    
--
2.13.2.windows.1



-----Ursprüngliche Nachricht-----
Von: gstreamer-devel [mailto:[hidden email]] Im Auftrag von Tim Müller
Gesendet: Donnerstag, 7. September 2017 11:18
An: [hidden email]
Betreff: Re: AW: gst-bad qmlglsink and Windows

On Thu, 2017-09-07 at 07:00 +0000, Weber, Holger wrote:

Hi Holger,

> Building doesn’t work I get a compiler error which has something to
> doe with GST_PLUGIN_DEFINE. I used qtcreator which is included in
> msys.
>  
> C:/msys64/mingw32/bin/mingw32-make -f Makefile.Debug
> mingw32-make[1]: Entering directory 'C:/msys64/home/nice.guy/gst-
> plugins-bad/ext/build-qtplugin-telerob-Debug'
> g++ -c -fno-keep-inline-dllexport -march=i686 -mtune=core2 -Wa,-mbig-
> obj -pipe -g -pthread -mms-bitfields -pthread -mms-bitfields -pthread
> -mms-bitfields -Wextra -Wall -W -fexceptions -mthreads -DUNICODE
> -DGST_USE_UNSTABLE_API -DHAVE_QT_WIN32 -DGST_PACKAGE_NAME="GStreamer
> Bad Plug-ins (qmake)" -DGST_PACKAGE_ORIGIN="Unknown package origin"
> -DGST_LICENSE="LGPL" -DPACKAGE="gst-plugins-bad (qmake)"
> -DPACKAGE_VERSION="1.9.0.1" -DQT_QML_DEBUG ...
>                  from ../qt/gstplugin.cc:25:
> <command-line>:0:17: error: too many decimal points in number
> ../qt/gstplugin.cc:51:18: note: in expansion of macro
> 'PACKAGE_VERSION'
>      plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME,
                  ^
I can reproduce that on Linux. It looks like a quoting issue.

I've pushed a quick fix here:

https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=fcf8b
6bb908ea32073fce3b355f6cc89a67bc52c

Cheers
 -Tim

--
Tim Müller, Centricular Ltd - http://www.centricular.com

Join us at the GStreamer Conference!
21-22 October 2017 in Prague, Czech Republic http://gstreamer.freedesktop.org/conference/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel