1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
|
1. About
--------
QtGStreamer is a set of libraries and plugins providing C++ bindings for
GStreamer [1] with a Qt-style API plus some helper classes for integrating
GStreamer better in Qt [2] applications.
Currently, it consists of the following parts:
* QtGLib - Library providing C++/Qt bindings for parts of the GLib
and GObject APIs, a base on which QtGStreamer is built.
* QtGStreamer - Library providing C++/Qt bindings for GStreamer
* QtGStreamerUi - Library providing integration with QtGui. Currently,
it only provides a video widget that embeds GStreamer's
video sinks.
* QtGStreamerUtils - Library providing some high level utility classes.
In addition, it provides a "qwidgetvideosink" GStreamer element, an video
sink element that can draw directly on QWidgets using QPainter.
[1]. http://gstreamer.freedesktop.org/
[2]. http://qt.nokia.com/
2. Building
-----------
2.1 Dependencies
----------------
QtGStreamer requires the following software to be installed in order to build:
* CMake 2.8 or later <http://www.cmake.org/>
* GStreamer 0.10.33 or later <http://gstreamer.freedesktop.org/>
With its dependencies:
- Glib / GObject <http://www.gtk.org/>
and including gstreamer-plugins-base (0.10.33 or later)
* Qt 4.7 or later <http://qt.nokia.com/>
* Boost 1.39 or later <http://www.boost.org/>
* Automoc (only with cmake < 2.8.6) <https://projects.kde.org/projects/kdesupport/automoc/>
- NOTE: Automoc is not needed with cmake >= 2.8.6
as it has been integrated into cmake itself
* Flex (only if QTGSTREAMER_CODEGEN=ON, see below) <http://flex.sourceforge.net/>
* Bison (only if QTGSTREAMER_CODEGEN=ON, see below) <http://www.gnu.org/software/bison/>
In addition, if gcc is used as the compiler, libstdc++ version 4.5 or later is
required at runtime. This is due to a bug in earlier versions of libstdc++ that
sometimes makes dynamic_cast fail under conditions where it should not.
2.2 Compiler
------------
A decent compiler with proper support for advanced templates, including features
such as partial template specialization, is required. QtGStreamer can also make
use of C++0x features (see below for details). A compiler supporting at least
some of them is recommended. Currently, only the GNU C++ compiler (g++) version
4.5 or later is known to support all the features that QtGStreamer uses. However,
other compilers can be used too, but with some limitations.
C++0x features in use:
* static_assert(). Used to show nice error messages when the programmer is trying
to use some template in the wrong way. If not present, the templates will still
fail to compile if used in the wrong way, but the error messages may be quite
weird to understand...
* Variadic templates together with rvalue references. Used to support connecting
and emitting GObject signals with any number of arguments. If not available, a
hack-ish implementation using boost's preprocessor library, boost::function and
boost::bind is used to provide support for up to 9 arguments.
2.3 Procedure
-------------
The build procedure is simple:
$ mkdir build && cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/installation/prefix
$ make
$ make install
Other options that can be passed to cmake include:
* -DCMAKE_BUILD_TYPE=[Debug|Release|RelWithDebInfo|MinSizeRel]
Allows you to specify the type of the build. This is a standard
cmake option, see the cmake man page for details.
* -DQTGSTREAMER_STATIC=[ON|OFF]
Allows you to choose whether to build static or dynamic libraries.
ON means static, OFF means dynamic.
* -DQTGSTREAMER_EXAMPLES=[ON|OFF]
Allows you to choose whether to build the examples shipped with QtGStreamer or not.
Note that the examples can also be built independently outside the source tree.
* -DQTGSTREAMER_TESTS=[ON|OFF]
Allows you to choose whether to build tests or not.
* -DQTGSTREAMER_CODEGEN=[ON|OFF]
Allows you to choose whether to build and use the QtGStreamer code generator or not.
This code generator generates some extra code based on the QtGlib/QtGStreamer
headers. This extra code is required, but it is also shipped in the source tree,
so it is not necessary to regenerate it, unless you are developing QtGStreamer and
you are making changes to the headers. If you are crosscompiling, you should make
sure to turn this feature off, since this will compile codegen for the target
architecture and then try to run it, which will fail.
* -DUSE_GST_PLUGIN_DIR=[ON|OFF]
Allows you to choose whether to install plugin together with the rest of the
gstreamer plugins or whether to install them in the same prefix as QtGStreamer.
You will probably want to set this to OFF if you are installing in a prefix
different than GStreamer (say somewhere in $HOME) while GStreamer is installed
in a system location and you don't want to gain root privileges to do "make install".
* -DUSE_QT_PLUGIN_DIR=[ON|OFF]
Same as USE_GST_PLUGIN_DIR, but for Qt (QML) plugins.
* -DGST_PACKAGE_NAME="some string"
Allows you to specify the name that gst-inspect will show as the "Binary package"
name for all the element plugins that are build from this source package.
* -DGST_PACKAGE_ORIGIN="http://some.url"
Allows you to specify the url that gst-inspect will show as the "Origin URL"
for all the element plugins that are build from this source package.
* -DLIB_SUFFIX=64
Set this to install in $prefix/lib64 instead of $prefix/lib.
2.4 Generating documentation
----------------------------
QtGStreamer uses doxygen for documentation. To generate the documentation you need
to install doxygen and run "make doc" after you have run cmake. This will generate
the documentation in <builddir>/doc/html/.
2.5 Running tests
-----------------
QtGStreamer comes with a suite of automatic unit tests that ensure QtGStreamer
is working properly. To run them you will need ctest, a tool that comes with cmake,
plus some gstreamer plugins from the base and good sets.
To run them, simply invoke "make test" or "ctest" in the build directory.
For advanced usage, refer to the ctest manual page.
3. Links & Contact information
------------------------------
Web:
http://gstreamer.freedesktop.net
http://gstreamer.freedesktop.org/wiki/QtGStreamer
Mailing list:
mailto:gstreamer-devel@lists.sourceforge.net
Irc channels:
irc://irc.freenode.net/gstreamer
irc://irc.freenode.net/qtgstreamer
Git repository:
http://cgit.freedesktop.org/gstreamer/qt-gstreamer/
Bugs, feature requests & patches should be sent at:
https://bugzilla.gnome.org/enter_bug.cgi?product=GStreamer&component=qt-gstreamer
--
George Kiagiadakis <george.kiagiadakis@collabora.co.uk>
Last updated: Feb 7, 2012
|