3 GStreamer [meson](http://mesonbuild.com/) based repositories aggregrator
5 You can build GStreamer and all its modules at once using
6 meson and its [subproject](https://github.com/mesonbuild/meson/wiki/Subprojects) feature.
10 ### Install meson and ninja
12 You should get meson through your package manager or using:
14 $ pip3 install --user meson
16 If you are building on Windows, do not use the Meson MSI installer since it is
17 experimental and will likely not work.
19 You should get `ninja` using your package manager or download the [official
20 release](https://github.com/ninja-build/ninja/releases) and put it in your PATH.
22 ### Build GStreamer and its modules
24 You can get all GStreamer built running:
27 mkdir build/ && meson build && ninja -C build/
30 NOTE: on fedora (and maybe other distributions) replace `ninja` with `ninja-build`
32 # Development environment
34 ## Uninstalled environment
36 gst-build also contains a special `uninstalled` target that lets you enter an
37 uninstalled development environment where you will be able to work on GStreamer
38 easily. You can get into that environment running:
41 ninja -C build/ uninstalled
44 If your operating system handles symlinks, built modules source code will be
45 available at the root of `gst-build/` for example GStreamer core will be in
46 `gstreamer/`. Otherwise they will be present in `subprojects/`. You can simply
47 hack in there and to rebuild you just need to rerun `ninja -C build/`.
49 NOTE: In the uninstalled environment, a fully usable prefix is also configured
50 in `gst-build/prefix` where you can install any extra dependency/project.
52 ## Update git subprojects
54 We added a special `update` target to update subprojects (it uses `git pull
55 --rebase` meaning you should always make sure the branches you work on are
56 following the right upstream branch, you can set it with `git branch
57 --set-upstream-to origin/master` if you are working on `gst-build` master
60 Update all GStreamer modules and rebuild:
63 ninja -C build/ update
66 Update all GStreamer modules without rebuilding:
69 ninja -C build/ git-update
74 We also added a meson option, 'custom_subprojects', that allows the user
75 to provide a comma-separated list of subprojects that should be built
76 alongside the default ones.
82 git clone my_subproject
84 rm -rf * && meson .. -Dcustom_subprojects=my_subproject
91 You can easily run the test of all the components:
97 To list all available tests:
100 meson test -C build --list
103 To run all the tests of a specific component:
106 meson test -C build --suite gst-plugins-base
109 Or to run a specific test file:
112 meson test -C build/ --suite gstreamer gst_gstbuffer
115 Run a specific test from a specific test file:
118 GST_CHECKS=test_subbuffer meson test -C build/ --suite gstreamer gst_gstbuffer
121 ## Checkout another branch using worktrees
123 If you need to have several versions of GStreamer coexisting (eg. `master` and `1.14`),
124 you can use the `checkout-branch-worktree` script provided by `gst-build`. It allows you
125 to create a new `gst-build` environment with new checkout of all the GStreamer modules as
126 [git worktrees](https://git-scm.com/docs/git-worktree).
128 For example to get a fresh checkout of `gst-1.14` from a `gst-build` in master already
129 built in a `build` directory you can simply run:
132 ./checkout-branch-worktree ../gst-1.14 1.14 -C build/
135 ## Add information about GStreamer development environment in your prompt line
139 We automatically handle `bash` and set `$PS1` accordingly
143 In your `.zshrc`, you should add something like:
146 export PROMPT="$GST_ENV-$PROMPT"
151 In your `~/.config/fish/functions/fish_prompt.fish`, you should add something like this at the end of the fish_prompt function body:
155 echo -n -s (set_color -b blue white) "(" (basename "$GST_ENV") ")" (set_color normal) " "
161 In your powerline theme configuration file (by default in
162 `{POWERLINE INSTALLATION DIR}/config_files/themes/shell/default.json`)
163 you should add a new environment segment as follow:
167 "function": "powerline.segments.common.env.environment",
168 "args": { "variable": "GST_ENV" },