2 Installation
2.1 Requirements
Upipe has the following dependencies:
a C99 compiler (Upipe won't probably compile with any other compiler than gcc >= 4.1)
support for Intel atomic built-ins (there is a fallback with semaphores for architectures/compilers that don't support them, but it is really not recommended)
a recent version of autoconf (http://www.gnu.org/software/autoconf/), automake (http://www.gnu.org/software/automake/) and libtool (http://www.gnu.org/software/libtool/)
Upipe has the following optional dependencies:
http://www.freedesktop.org/wiki/Software/pkg-config/ pkg-config to detect installed dependencies
http://dist.schmorp.de/libev/ libev library and headers (only required for the optional libupump-ev library), tested with 4.11.
http://www.nongnu.org/mkdoc/ mkdoc to compile the documentation
http://ffmpeg.org/ or http://libav.org/ libraries and headers for upipe-av, upipe-swscale and upipe-swresample. Tested with libav v9.10, and ffmpeg 1.1 up to 2.1.1 . FFmpeg/libav needs to be configured with --enable-pic --enable-shared.
perl is needed in the build process of upipe-av
http://www.videolan.org/developers/bitstream.html headers to build upipe-ts, upipe-framers, and a few upipe-modules components. bitstream should always be fetched from the latest git.
http://www.videolan.org/developers/x264.html for upipe-x264
http://x265.org/ for upipe-x265
a GL/GLU/GLX and X11 implementation for upipe-gl
2.2 Build
Upipe comes with a pretty standard autotools build system, so
./bootstrap && ./configure && make
should be enough to build it. Unit tests can be built and run with:
make check
2.3 Execution
Upipe is a set of developement headers for pipes and librares for applications, and thus runs inside an application. Simple examples are however provided in the tests/ and examples/ directories.
2.4 Debugging
Upipe's code makes intensive use of the container_of macro. Debugging with gdb can be made easier by adding the following lines to your .gdbinit file:
set print pretty on
define container_of
p ((struct $arg1*)((void*)$arg0 - (void*)&((struct $arg1*)0)->$arg2))
end
Then, supposing you big structure is upipe_foo, and you have a member called upipe to which you have a pointer (also called upipe), you can call it from gdb's shell to get a pointer to upipe_foo:
(gdb) container_of upipe upipe_foo upipe
$5 = (struct upipe_foo *) 0x7f9db9873000
(gdb) print *$5
$6 = {
[...]