QtGStreamer build system integration
-
Hi,
I am trying to build "QtGstreamer":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/ in my Qt 4 application on windows . I am following the guide "here ":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/build_system_integration.html .It says:
@
If you are using cmake as your build system, using QtGStreamer is quite easy. You can just do:
find_package(QtGStreamer) # for Qt4 QtGStreamer..... OR .....
find_package(Qt5GStreamer) # for Qt5 QtGStreamer
@
and
@
If you are using qmake as your build system, you can use QtGStreamer via pkg-config. For example:
CONFIG += link_pkgconfig
PKGCONFIG += QtGStreamer-1.0@
Since I already use qmake to build my project ,I think cmake does not concern me and I am wondering how adding
@
CONFIG += link_pkgconfig
PKGCONFIG += QtGStreamer-1.0@
to my pro file will help build QtGstreamer .I have downloaded QGstreamer and my folder structure is as follows:
@- qt-gstreamer-1.2.0
|------cmake[Folder]
|------codegen[Folder]
|------docs[Folder]
|------elements[Folder]
|------examples[Folder]
|------src[Folder]
|------tests[Folder]
|------CMakelists[File]
|------COPYING[File]
|------Doxyfile.in[File]
|------HACKING[File]
|------NEWS[File]
|------README[File]
@
Lets suppose it is stored on my C:\ drive .What steps do I need to carry out so I can build an instance of QtGstreamer I can link against in my application?I saw pkgconfing mentioned ;How is PKGCONFIG used exactly ?Any pointers or hints will be greatly appreciated.
Thank you for your time.
- qt-gstreamer-1.2.0
-
I can't help you with building QtGStreamer but these instructions are not for building it. They are for linking an app to a QtGStreamer library via package manager on Linux.
-
Hi,
To add to Chris, IIRC, you can find a pkgconfig.exe for windows. But if you want to avoid spending time on this, just use the old method:
@QTGSTREAMERPATH = C:/where_QtGStreamer_hides
INCLUDEPATH += $$QTSTREAMERPATH/include
LIBS +=
-L$$QTSTREAMERPATH/bin(or lib etc…)
-lQtGStreamer-1.0
@Hope it helps
-
Thank you Chris and SGaist for the replies ,
SGaist:@
QTGSTREAMERPATH = C:/where_QtGStreamer_hides
INCLUDEPATH += $$QTSTREAMERPATH/include
LIBS +=
-L$$QTSTREAMERPATH/bin(or lib etc…)
-lQtGStreamer-1.0@
These statements are for linking against already built binaries right?I only have the source code and could not find prebuilt binaries for windows(THE FOLDER STRUCTURE I SHOWED WAS FOR MY SOURCE CODE .I guess I have to go through the process of building myself .
This is a section on building from the README file:
@
2.3 ProcedureThe build procedure is simple:
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/prefix
$ make
$ make install@
I am going to download and install cmake and try to build with msvs2010 .Any advice on this would be helpful as this is my first time to use cmake.
Thank you for your time .
-
I have managed to install cmake and run
@
cmake ..
@In a build directory I created under qt-gstreamer-1.2.0 but I am getting the following errors:
@-- Building for: Visual Studio 10 2010
-- Using Qt4 (min: 4.7)
-- Could NOT find Boost
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Could NOT find GSTREAMER_BASE_LIBRARY
.........
@It seems cmake in not picking up the location of boost ,I got it under
@
C:\local\boost_1_53_0\boost
@I saw in my CMakelists.txt file the following statement:
@
find_package(Boost 1.39)
macro_log_feature(Boost_FOUND "Boost" "Required for building QtGLib" "http://www.boost.org/" TRUE "1.39")
@I think that it is the failure of this statement that is causing the errors.
To sum it up: How do I make cmake aware of the location of the boost libraries and other unrecognized components .For example I got gstreamer installed but it is also missing it .Is it through edits to the CMakelists.txt file?I realize this is not really a Qt question but QtGstreamer is Qt right ? :-)
Thank you for your time.
-
Use
-D "CMAKE_PREFIX_PATH":http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_PREFIX_PATH.html ="path to boost cmake files"when calling cmake
-
Hello.
I've ended up on the same problem. Did you manage to find a solution for this?
Thanks in advance.
-
Hello.
I've ended up on the same problem. Did you manage to find a solution for this?
Thanks in advance.
-
Hi,
I could not build it and I used ffmpeg for my needs .But is seems some people have been able to build it here : http://gstreamer-devel.966125.n4.nabble.com/Problems-building-QtGStreamer-release-build-on-Windows-td4657300.html#a4669019 .I haven't tried this yet as I am tight on time but I am interested in knowing if you get it to build :-) . -
Hi,
I could not build it and I used ffmpeg for my needs .But is seems some people have been able to build it here : http://gstreamer-devel.966125.n4.nabble.com/Problems-building-QtGStreamer-release-build-on-Windows-td4657300.html#a4669019 .I haven't tried this yet as I am tight on time but I am interested in knowing if you get it to build :-) . -
Hi,
I know it has been some time, but have you managed to solve this? I have to build some apps with GStreamer, but don't know how to include it and access it from Qt.
TIA
-
Sorry I haven't had the time to look into this lately.I have used ffmpeg to solve my problems.If this helps ,I used it as an external process and this saves the hassle to go and build it yourself :-) .
-
Thanks for your reply @musimbate , I managed to link the gstreamer library header files, so I didn't build it, but just include its path and access the header files and libs. Anyway, now I have an error of The program has unexpectedly finished. When I try to debug it, I get the following error in a pop-up:
During startup program excited with code 0xc0000135.On General Messages:
<dump of C:\Qt\Qt5.5.0_Android\5.5\mingw492_32\qml>:1:24: Reading only version 1.1 parts.
<dump of C:\Qt\Qt5.5.0_Android\5.5\mingw492_32\qml>:10:5: Expected only Component and ModuleApi object definitions.I read many questions realated to this error, but none helped, I think is an error with the gstream library, but may be a compiler/debugger error also. I am just asking, in case you have encountered any error using ffmpeg.
I am relatively new to Qt, and never encountered this error before. If you need any code:
.pro:
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = GStreamer-test5
TEMPLATE = appSOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui
INCLUDEPATH += C:/gstreamer/1.0/x86/include/gstreamer-1.0
C:/gstreamer/1.0/x86/lib/gstreamer-1.0/include
C:/gstreamer/1.0/x86/include/glib-2.0
C:/gstreamer/1.0/x86/lib/glib-2.0/includeLIBS += -L C:/gstreamer/1.0/x86/lib/ -lgstreamer-1.0
and .main:
#include "mainwindow.h"
#include <QApplication>#include <QDebug>
#include <stdio.h>
#include "gst/gst.h"void *__gxx_personality_v0;
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();const gchar *nano_str; guint major, minor, micro, nano; gst_init (&argc, &argv); gst_version (&major, &minor, µ, &nano); if (nano == 1) nano_str = "(CVS)"; else if (nano == 2) nano_str = "(Prerelease)"; else nano_str = ""; // printf ("This program is linked against GStreamer %d.%d.%d %s\n", major, minor, micro, nano_str); qDebug() << "This program is linked against GStreamer %d.%d.%d %s\n", major, minor, micro, nano_str ; return a.exec();
Firstly, I had the error :
undefined reference to `__gxx_personality_v0' , but fixed it by adding void *__gxx_personality_v0;, although I don't know what excatly it is.Its been three days I struggle with this problem. Any help appreciated, or maybe if you can help me by some code on how to access the header files and libs.
Thank you! -
I wish I could be of more help but I could not build it myself.