QtGStreamer in Qt5
Marco Trapanese
marcotrapanese at gmail.com
Sun Jul 14 23:04:10 PDT 2013
Il 14/07/2013 08:45, George Kiagiadakis ha scritto:
> Can you give more details of what you are doing? Did you compile
> QtGStreamer with Qt5? What include directory did you change? Regards,
> George
Well, starting with a simple player example found on the web (iirc:
http://cgit.freedesktop.org/gstreamer/qt-gstreamer/tree/examples/player?id=a5ea630e8e8c7b6c16868404b44dfed0f3342714)
which using QGstreamer along with the Ui (for the VideoWidget) I tried
to compile the project under Qt5.
The first problem is, you know, the include path for QWidget is changed.
So I modified the videowidget.h:
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include <QtWidgets/QtWidget>
#else
#include <QtGui/QWidgets>
#endif
Then it complained about the miss of declaration of TRUE and FALSE (I
don't know where they are defined). So I added to maintain the
portability of the code:
enum {
FALSE,
TRUE
}
to my project.
Compiling now leads to a lots of errors like this:
Undefined reference to QWidget::hasHeightFor Width() const
Undefined reference to QWidget::nativeEvent(QByteArray const&, void*, long*)
Undefined reference to QWidget::initPainter(QPainter*) const
Undefined reference to QWidget::redirected(QPoint*) const
Undefined reference to QWidget::sharedPainter() const
and so on...
Perhaps it's my fault and it should be a well-known issue when porting
to Qt5 but I cannot make it works.
Thanks
Marco
More information about the gstreamer-devel
mailing list