This directory contains example code to demonstrate reading data blocks continuously using the io_uring kernel interface. The loaded data is then fed to a video display pipeline based on OpenGL / EGL
|
This demo code has been published on Lumiera.org |
Building the code
As convenience, a CMake build system is provided, defining all library prerequisites.
A typical invocation for a complete build might be…
cmake -S examples -B build cmake --build build -- -j4 # clean tree with... cmake --build build --target clean
|
The -j4 option tells make to use 4 cores concurrently to speed up the build.
Furthermore, you might want to configure further options with a graphical GUI,
e.g: cmake-gui build; this way you can configure individual library dependencies
to point to custom locations. |
Use at least GCC-14
TODO: still relevant?
Some older C++ compilers seem to have problems with constexpr functions;
to circumvent such problems, you might want to use at least GCC-14,
which can be configured for CMake with
cmake -S examples -B build -DCMAKE_CXX_COMPILER=g++-14
Dependencies
Although the prime objective of this demo is to show how to read a sequence of data blocks using io_uring, the practical example uses this technology to display video frames with an OpenGL pipeline. The framework is a simple GTK-3 application that integrates OpenGL through EGL (with GLEW). This explains why you need several distinct groups of dependencies to build the code. The build system only mentions the top-level dependencies; so either you have to install further transitive dependencies manually, or (preferrably) you might want to rely on the package manager of a Linux distribution. The following list shows how to install the dependencies on Debian / Ubuntu.
- Basic build environment
-
apt install build-essential cmake - Lib-uring
-
apt install liburing-dev - Build a GTK-3 application with C++
-
apt install libgtkmm-3.0-dev - EGL Video Display
-
apt install libx11-dev libglew-dev libegl-dev libgl-dev