Providing you have all dependencies installed, the project can be built and installed on windows as follow:
git clone https://github.com/5G-MAG/rt-xr-maf-native.git
cd rt-xr-maf-native
meson setup builddir
meson compile -C builddir
meson install -C builddir --tags swig_cs --destdir path\to\rt-xr-unity-player\Packages\rt.xr.maf
meson install -C builddir --tags libmaf_cs,avpipeline --destdir path\to\rt-xr-unity-player\Packages\rt.xr.maf\x86_64-w64
By default, the meson setup configures a debug build:
meson setup builddir
Switch to a release build after setup:
meson configure --buildtype=release builddir
The project uses the meson build system. See this quickstart guide if you are new to it.
This documentation assumes usage of the default ninja backend, regardless of the toolchain used. Meson supports a range of toolchains (GCC, Clang, Visual Studio, MinGW, ICC, ARMCC ...)
meson
will use dependencies available on the system, else will fallback to custom dependency definitions. Make sure to check out meson's documentation if you are new to meson.
If a dependency is not detected, the meson setup
command looks for a fallback subproject, and will download automatically the ressource specfied in dependency's wrap files.
When configuring the project use the --wrap-mode option to control the dependency lookup behavior.
The project has a dependency on FFmpeg 5.1 libraries. See subprojects/packagefiles/FFmpeg-5.1/README.md for guidance on setting it up.
The Catch2 is used for unit tests and is downloaded automatically upon setup, as specified in subprojects/catch2.wrap
.
to disable automatic download
meson setup --wrap-mode=nodownload builddir
All build options with their default values are specified in meson_options.txt
.
libmaf
provides the core MAF API and media pipeline factory.
meson setup -Dlibmaf=true -Dcsharp=false -Davpipeline=false builddir
meson compile -C builddir
csharp
priovides the C# bindings for libmaf
, composed of .cs source files and a lightweight C++ wrapper. These are generated using SWIG. The files in subprojects/maf_csharp
should be re-generated whenever the API changes.
See subprojects/maf_csharp/README.md for details.
meson setup --reconfigure -Dcsharp=true -Davpipeline=false -Dlibmaf=false builddir
meson compile -C builddir
avpipeline
is a media pipeline plugin implemented using libav.
meson setup --reconfigure -Davpipeline=true -Dlibmaf=false -Dcsharp=false builddir
meson compile -C builddir
On windows, in order to build using the visual studio compiler and linker, run commands from a 'Developer Powershell VisualStudio' console. See also: https://mesonbuild.com/Using-with-Visual-Studio.html
Alternatively, the project can be built with gcc
using MSYS2.