QtGStreamer 1.2.0
Loading...
Searching...
No Matches
Build system integration

CMake

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

which will find QtGStreamer and define the following variables:

  • QTGSTREAMER_FOUND - system has QtGStreamer
  • QTGSTREAMER_INCLUDE_DIR - the QtGStreamer include directory
  • QTGSTREAMER_INCLUDES - the include directories needed to use QtGStreamer
  • QTGLIB_LIBRARY - the QtGLib library
  • QTGLIB_LIBRARIES - the libraries needed to use QtGLib
  • QTGSTREAMER_LIBRARY - the QtGStreamer library
  • QTGSTREAMER_LIBRARIES - the libraries needed to use QtGStreamer
  • QTGSTREAMER_QUICK_LIBRARY - the QtGStreamerQuick library
  • QTGSTREAMER_QUICK_LIBRARIES - the libraries needed to use QtGStreamerQuick
  • QTGSTREAMER_UI_LIBRARY - the QtGStreamerUi library
  • QTGSTREAMER_UI_LIBRARIES - the libraries needed to use QtGStreamerUi
  • QTGSTREAMER_UTILS_LIBRARY - the QtGStreamerUtils library
  • QTGSTREAMER_UTILS_LIBRARIES - the libraries needed to use QtGStreamerUtils
  • QTGSTREAMER_DEFINITIONS - definitions recommended for using QtGStreamer
  • QTGSTREAMER_FLAGS - extra compiler switches recommended for using QtGStreamer

Take a look at the CMakeLists.txt of the QtGStreamer examples to see how to use them.

qmake

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

In the PKGCONFIG variable you can set one or more of:

  • QtGLib-2.0 - the libraries needed to use QtGLib
  • QtGStreamer-1.0 - the libraries needed to use QtGStreamer
  • QtGStreamerUi-1.0 - the libraries needed to use QtGStreamerUi
  • QtGStreamerUtils-1.0 - the libraries needed to use QtGStreamerUtils

When QtGStreamer is built using Qt5, those packages are called differently:

  • Qt5GLib-2.0
  • Qt5GStreamer-1.0
  • Qt5GStreamerUi-1.0
  • Qt5GStreamerUtils-1.0

And additionally in Qt5 there is:

  • Qt5GStreamerQuick-1.0 - the libraries needed to use Qt5GStreamerQuick

Other build systems

If you are not using one of the above build systems, you could also use QtGStreamer via pkg-config, if your build system integrates with it.