Using Qt creator and static gstreamer plugin

Peter Staab PixStaMP at gmx.net
Thu Mar 1 03:40:45 PST 2012


Hi,

I am using Meego (Harmattan), ARM, and latest version of Qt Creator for a project which displays video data coming from gstreamer. Integration of gstreamer into my Qt Creator project works fine. Basically only the following lines have to be added:
##
CONFIG += link_pkgconfig
PKGCONFIG += \
    gstreamer-0.10 \
    gstreamer-base-0.10 \
    gstreamer-interfaces-0.10 \
    gstreamer-audio-0.10 \
    gstreamer-video-0.10 \
    gstreamer-plugins-bad-0.10 \
    gstreamer-plugins-base-0.10 \
    gstreamer-plugins-good-0.10 \
    gst-nokia-videosrc \
    gstreamer-app-0.10
LIBS += -lgstinterfaces-0.10 -lglib-2.0
##

Now I want to use qt-gstreamer [1,2] (latest git version) to show the ouput in a Qml widget. Therefore I compile qt-gstreamer in the Harmattan scratchbox (caution: the CMAKE_CXX_FLAGS in CMakeLists.txt have to be extended with "-fPIC"):
##
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=~/scratchbox/qt-gstreamer -DQTGSTREAMER_STATIC=ON -DCMAKE_BUILD_TYPE=Release -DUSE_GST_PLUGIN_DIR=OFF -DUSE_QT_PLUGIN_DIR=OFF
$ make
$ make install
##
This compiles fine and results in 4 static libraries which I add to the Qt Creator project file:
LIBS += -L$$PWD/libs/ -lQtGLib-2.0 -lQtGStreamer-0.10 -lQtGStreamerUi-0.10 -lQtGStreamerUtils-0.10

But now compilation of the project in Qt Creator fails with several undefined references:
##
c:/Workspace_Qt/testapp/libs/\libQtGStreamer-0.10.a(init.cpp.o): In function `QGst::init(int*, char***)':
init.cpp:(.text+0x34): undefined reference to `QGlib::init()'
c:/Workspace_Qt/testapp/libs/\libQtGStreamer-0.10.a(bus.cpp.o): In function `QGst::Private::BusWatch::timerEvent(QTimerEvent*)':
bus.cpp:(.text._ZN4QGst7Private8BusWatch10timerEventEP11QTimerEvent[QGst::Private::BusWatch::timerEvent(QTimerEvent*)]+0x160): undefined reference to `QGlib::Private::emit(void*, char const*, QGlib::Quark, QList<QGlib::Value> const&)'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o): In function `QGst::Ui::AbstractRenderer::create(QGlib::RefPointer<QGst::Element> const&, QWidget*)':
videowidget.cpp:(.text+0x508): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
videowidget.cpp:(.text+0x58c): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o): In function `QGst::Ui::VideoWidget::releaseVideoSink()':
videowidget.cpp:(.text+0x148c): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
videowidget.cpp:(.text+0x1510): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o): In function `QGst::Ui::XOverlayRenderer::setVideoSink(QGlib::RefPointer<QGst::XOverlay> const&)':
videowidget.cpp:(.text._ZN4QGst2Ui16XOverlayRenderer12setVideoSinkERKN5QGlib10RefPointerINS_8XOverlayEEE[QGst::Ui::XOverlayRenderer::setVideoSink(QGlib::RefPointer<QGst::XOverlay> const&)]+0x70): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o):videowidget.cpp:(.text._ZN4QGst2Ui16XOverlayRenderer12setVideoSinkERKN5QGlib10RefPointerINS_8XOverlayEEE[QGst::Ui::XOverlayRenderer::setVideoSink(QGlib::RefPointer<QGst::XOverlay> const&)]+0xf4): more undefined references to `QGst::XOverlay::setWindowHandle(unsigned long)' follow
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o): In function `QGst::Ui::XOverlayRenderer::eventFilter(QObject*, QEvent*)':
videowidget.cpp:(.text._ZN4QGst2Ui16XOverlayRenderer11eventFilterEP7QObjectP6QEvent[QGst::Ui::XOverlayRenderer::eventFilter(QObject*, QEvent*)]+0x22c): undefined reference to `QGst::XOverlay::expose()'
videowidget.cpp:(.text._ZN4QGst2Ui16XOverlayRenderer11eventFilterEP7QObjectP6QEvent[QGst::Ui::XOverlayRenderer::eventFilter(QObject*, QEvent*)]+0x264): undefined reference to `QGst::XOverlay::expose()'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o): In function `QGst::Ui::PipelineWatch::onBusSyncMessage(QGlib::RefPointer<QGst::Message> const&)':
videowidget.cpp:(.text._ZN4QGst2Ui13PipelineWatch16onBusSyncMessageERKN5QGlib10RefPointerINS_7MessageEEE[QGst::Ui::PipelineWatch::onBusSyncMessage(QGlib::RefPointer<QGst::Message> const&)]+0x120): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
videowidget.cpp:(.text._ZN4QGst2Ui13PipelineWatch16onBusSyncMessageERKN5QGlib10RefPointerINS_7MessageEEE[QGst::Ui::PipelineWatch::onBusSyncMessage(QGlib::RefPointer<QGst::Message> const&)]+0x1a4): undefined reference to `QGst::XOverlay::setWindowHandle(unsigned long)'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(videowidget.cpp.o): In function `QGst::Ui::QtVideoSinkRenderer::eventFilter(QObject*, QEvent*)':
videowidget.cpp:(.text._ZN4QGst2Ui19QtVideoSinkRenderer11eventFilterEP7QObjectP6QEvent[QGst::Ui::QtVideoSinkRenderer::eventFilter(QObject*, QEvent*)]+0x2c4): undefined reference to `QGlib::Private::emit(void*, char const*, QGlib::Quark, QList<QGlib::Value> const&)'
c:/Workspace_Qt/testapp/libs/\libQtGStreamerUi-0.10.a(graphicsvideowidget.cpp.o): In function `QGst::Ui::GraphicsVideoWidget::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*)':
graphicsvideowidget.cpp:(.text+0xb48): undefined reference to `QGlib::Private::emit(void*, char const*, QGlib::Quark, QList<QGlib::Value> const&)'
collect2: ld returned 1 exit status
make: *** [testapp] Error 1
12:33:59: The process "C:\nokiaqtsdk\madde\bin\make.exe" exited with code 2.
Error while building project testapp (target: Harmattan)
When executing build step 'Make'
##

How can I properly integrate qt-gstreamer as a static plugin/library into my Qt Creator project?

Regards,


[1] http://gkiagia.wordpress.com/2012/02/09/introducing-qtvideosink-gstreamer-meets-qml/
[2] http://cgit.freedesktop.org/gstreamer/qt-gstreamer




-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                                  
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a


More information about the gstreamer-devel mailing list