Building from Source

Clone the Repository

git clone https://github.com/Astute-Systems/MediaX.git
cd MediaX

Configure Build

Create a build directory and configure with CMake:

mkdir build && cd build
cmake ..

Build Options

Option Default Description
BUILD_TESTING OFF Build unit tests
EXAMPLES OFF Build example applications
BUILD_QT6 OFF Build Qt6 bindings
BUILD_CUDA OFF Enable CUDA acceleration
BUILD_GIGE OFF Enable GigE Vision support (GVCP/GVSP/GenICam)
VAAPI_SUPPORTED OFF Enable Intel/AMD VAAPI hardware acceleration (H.264, H.265, AV1)
NVENC_SUPPORTED OFF Enable NVIDIA NVENC hardware acceleration
BUILD_OPENH264 OFF Enable OpenH264 software codec (H.264)

Example Configurations

Full build with all features:

cmake -DBUILD_TESTING=ON \
      -DEXAMPLES=ON \
      -DVAAPI_SUPPORTED=ON \
      -DBUILD_QT6=ON \
      -DBUILD_GIGE=ON \
      ..

GigE Vision support only:

cmake -DBUILD_GIGE=ON -DEXAMPLES=ON ..

With Intel/AMD hardware acceleration:

cmake -DVAAPI_SUPPORTED=ON ..

Build

make -j$(nproc)

Run Tests

# Run all tests
./build/bin/tests

# Run a specific test suite
./build/bin/tests --gtest_filter="*SAP*"

# GigE Vision tests
./build/bin/tests --gtest_filter="GvcpTypes.*:GvcpServer.*:GvspTypes.*"

Install

sudo make install

Uninstall

sudo make uninstall

Create Packages

Generate Debian packages for distribution:

cpack

This creates:

  • mediax_<version>_<arch>.deb - Runtime library
  • mediax-dev_<version>_<arch>.deb - Development headers
  • mediax-python_<version>_<arch>.deb - Python bindings

Cross-Compilation

ARM64 (Jetson/Raspberry Pi)

cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchain-aarch64.cmake ..

Troubleshooting

Qt6 not found

sudo apt-get install qt6-base-dev

CUDA not found

Set the CUDA toolkit path:

cmake -DCUDAToolkit_ROOT=/usr/local/cuda ..

Support

Build issues?