Skip to content

Latest commit

 

History

History
115 lines (72 loc) · 4.61 KB

README.md

File metadata and controls

115 lines (72 loc) · 4.61 KB

XR Player - Media pipelines plugins

Under Development Version License

Introduction

This repository provides media pipelines implementations supporting the 5G-MAG Reference Tools XR player Unity 3D project.

Media pipelines are plugins for the XR Player's media player implementation of the Media Access Functions API (MAF) defined in ISO/IEC 23090-14.

The MAF API abstracts timed media fetching, exposing decoded timestamped media buffers to the 3D presentation engine.

The media buffers may provide video, audio, but also 3D geometry arrays or arbitrary data referenced described by accessor headers.

The project is composed of the following libraries:

  • subprojects/maf: the MAF API implemented by media pipeline plugins - documentation
  • subprojects/maf_csharp: C# bindings for the MAF API - documentation

Media pipeline plugins:

Build and install using docker

# Get the source
git clone https://github.com/5G-MAG/rt-xr-maf-native.git 

# Build everything into a docker container
cd rt-xr-maf-native
docker build -t maf:builder .

# Copy build artifacts into a local directory
docker run --mount=type=bind,source=$(pwd)/Packages/rt.xr.maf,target=/install -it maf:builder

1. Cloning

git clone https://github.com/5G-MAG/rt-xr-maf-native.git

2. Setup dependencies

Compiling for Android

Android API, NDK and SDK version should match the environment setup of the Unity 3D editor's Android build support module.

The Android build support module installed by Unity 2022 - using NDK version 23.2.8568313 - is known to work as configured in the crossfile/android-aarch64 file.

meson build system

The project uses the meson build system. It can be conveniently installed in a python virtual environment using : ./scripts/install_meson.sh

Plugin specific dependencies

FFmpeg 7.1

The subproject/avpipeline plugin has a dependency on libav. When compiling the plugin meson first attempts to look for system dependency, then looks for FFmpeg as a subproject providing the dependencies.

For Android, the precompiled FFmpeg libraries and headers should be copied to the dedicated subproject:

subprojects/
  avpipeline/
  FFmpeg/
    meson.build
    arm64/
      include/
      lib/
  maf/
  maf_csharp/

The meson.build file should be copied from the script directory: cp ./scripts/build_ffmpeg_android.meson ./subprojects/FFmpeg/meson.build

The ./scripts/build_ffmpeg_android.sh uses a third party project ffmpeg-android-maker to compile ffmpeg for android and setup the dependency subproject. Please check the script in order to download the dependency in the right path.

3. Compile all libraries and plugins

Before compiling, edit the crossfile configuration to point to your Android NDK toolchain installation's.

./scripts/build_android.sh

the script generates a debug build.

4. Copy libraries, plugins, and dependencies to the Unity project

Run the installation script for android, passing installation directory as an argument:

./scripts/install_android.sh ../rt-xr-unity-player/Packages/rt.xr.maf

Gitflow

This project follows the Gitflow workflow.

The development branch of this project serves as an integration branch for new features.

Consequently, please make sure to switch to the development branch before starting the implementation of a new feature.

Licenses

This project is provided under 5G-MAG's Public License. For the full license terms, please see the LICENSE file distributed along with the repository or retrieve it from here.