Getting Started - Building the project

From RidgeRun Developer Wiki


Previous: Getting Started/Getting the Code Index Next: Documentation






Dependencies

The GStreamer Buffer Synchronization has the following dependencies for building from source:

Compulsory

A C++ compiler compatible with C++-14.

Moreover, we use the Meson building system. You can install it using:

# Install PIP
sudo apt install python3 python3-pip
# Install ninja
sudo apt install ninja-build pkg-config
# Install meson
sudo pip3 install meson

It is also required to have the packages related to building the GStreamer plug-in extension:

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base

Other packages may be needed to integrate other plug-ins for a full pipeline.

Optional

For documentation, development, and plotting, you can install the following dependencies:

# For documentation
sudo apt install doxygen graphviz
# For development
pip3 install pre-commit
sudo apt install clang-format cpp-check
# For unit tests
sudo apt install cpputest

In the following sections, you can see how to install the dependencies mentioned before.

Building the project

Build GStreamer Buffer Synchronization Project

Once the dependencies have been met, you can clone the repository. You can run a default compilation with the following:

# When using docs
git submodule update --init

meson build --optimization 3 --prefix /usr -Denable-docs=disabled -Ddeveloper-mode=false -Denable-examples=disabled -Denable-tests=disabled

ninja -C build

sudo ninja -C build install

For additional customization, you may refer to the following table of options:

`
Configure Option Description Values Default
-Ddeveloper-mode Enable developer mode true, false true
-Denable-docs Enable the documentation generation disabled, enabled enabled
-Denable-eval Enable the evaluation system. disabled, enabled disabled
-Denable-tests Enable the compilation of the tests. disabled, enabled enabled
-Denable-gstreamer Enable the GStreamer plug-in disabled, enabled enabled
--prefix /usr Set the installation path of the library PATH /usr/local
--optimization 3 Set the optimization level to the maximum 0, 1, 2, 3 0
Table 1. RidgeRun Video Stabilization Library configuration options (Meson)

Testing the project

You can test the final construction results of the library using the test suite:

meson --reconfigure build -Denable-tests=enabled -Denable-examples=enabled
ninja -C build test

Moreover, if the examples were enabled, you can run them as well: Examples

Using the library for your app

A simple C++ application without options can be compiled using:

g++ -o app app.cpp $(pkg-config librrsyncer --cflags --libs)

where app.cpp is the app to compile and uses the C++ Buffer Synchronization.

You can use pkg-config with the package name of librrsyncer. The library has to be installed previously.



Previous: Getting Started/Getting the Code Index Next: Documentation