forked from Upipe/upipe
-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL
92 lines (71 loc) · 2.8 KB
/
INSTALL
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
@section TPH {Installation}
@section T {Requirements}
Upipe has the following dependencies:
@list
@item a C99 compiler (Upipe won't probably compile with any other compiler
than gcc >= 4.1)
@item 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)
@item a recent version of
autoconf (@url http://www.gnu.org/software/autoconf/),
automake (@url http://www.gnu.org/software/automake/)
and libtool (@url http://www.gnu.org/software/libtool/)
@end list
Upipe has the following optional dependencies:
@list
@item @url http://www.freedesktop.org/wiki/Software/pkg-config/
pkg-config to detect installed dependencies
@item @url http://dist.schmorp.de/libev/ libev library and headers
(only required for the optional libupump-ev library), tested with 4.11.
@item @url http://www.nongnu.org/mkdoc/ mkdoc to compile the documentation
@item @url http://ffmpeg.org/ or @url http://libav.org/ libraries and headers
for upipe-av, upipe-swscale and upipe-swresample.
Tested with libav v9.10, and ffmpeg 2.0 up to 4.0.2.
FFmpeg/libav needs to be configured with --enable-pic --enable-shared.
@item perl is needed in the build process of upipe-av
@item @url 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.
@item @url http://www.videolan.org/developers/x264.html for upipe-x264
@item @url http://x265.org/ for upipe-x265
@item a GL/GLU/GLX and X11 implementation for upipe-gl
@end list
@end section
@section T {Build}
Upipe comes with a pretty standard autotools build system, so
@code R
./bootstrap && ./configure && make
@end code
should be enough to build it. Unit tests can be built and run with:
@code R
make check
@end code
@end section
@section T {Execution}
Upipe is a set of development headers for pipes and libraries for
applications, and thus runs inside an application. Simple examples
are however provided in the tests/ and examples/ directories.
@end section
@section T {Debugging}
Upipe's code makes intensive use of the @ref #container_of macro.
Debugging with gdb can be made easier by adding the following lines to your
.gdbinit file:
@code R
set print pretty on
define container_of
p ((struct $arg1*)((void*)$arg0 - (void*)&((struct $arg1*)0)->$arg2))
end
@end code
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:
@code R
(gdb) container_of upipe upipe_foo upipe
$5 = (struct upipe_foo *) 0x7f9db9873000
(gdb) print *$5
$6 = {
[...]
@end code
@end section
@end section