wegen/FrOSCon26/examples
Ichthyostega 03a2adcd45 publication: finalise README
and add the location for the final publication
2026-08-15 01:30:16 +02:00
..
__CONTENT__
CMakeLists.txt Prototype: add dependency to liburing 2026-07-12 03:35:25 +02:00
commons.hpp Prototype/Demo: add IO timing measurement 2026-07-18 01:25:17 +02:00
demo-uring.cpp Prototype/Demo: minor bugfix 2026-08-10 04:40:37 +02:00
egl-display.hpp Prototype/Demo: minor bugfix 2026-08-10 04:40:37 +02:00
gtk-uring-app.hpp Prototype: Playback parameters for a 1200px-50fps video 2026-07-17 19:00:14 +02:00
LICENSE Prototype: setup for example code ++ GPL v2+ 2026-07-11 20:43:45 +02:00
README publication: finalise README 2026-08-15 01:30:16 +02:00

IO_URING and Video Output Example Code
======================================
:revision: 1.0
:author: Hermann Voßeler
:date: 8/2026


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

TIP: This demo code has been published on
     link:https://www.lumiera.org/research/ioUring/index.html[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...

[source,sh]
--------------
cmake -S examples -B build
cmake --build build -- -j4

# clean tree with...
cmake --build build --target clean
--------------

TIP: 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
~~~~~~~~~~~~~~~~~~~
[red yellow-background]#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
-----------