This document is used to introduce how to install nnstreamer and NCC elements.

# Step 1: Prerequisites

$ sudo apt-get install ninja-build gcc g++ libglib2.0-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-bad gstreamer1.0-tools flex bison  
$ pip3 install --user meson==0.50

# Step 2: Installing NNStreamer (opens new window)

# Clone
$ cd ~
$ git clone https://github.com/nnstreamer/nnstreamer.git

# Patch
$ cd nnstreamer
$ git checkout 47bcd119c3ac5b925831b52da662cdf1a227d0d3
$ cp ~/opennccframe/nnstreamer/0001-Filter-Decoder-Add-option-for-ncc-and-fix-bug-of-box.patch ./
$ git apply 0001-Filter-Decoder-Add-option-for-ncc-and-fix-bug-of-box.patch

# Build and install
$ export PATH=~/.local/bin:$PATH  
$ export DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
$ meson build --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/$DEB_HOST_MULTIARCH --bindir=/usr/bin --includedir=/usr/include
$ sudo ninja -C build install

# Step 3: Installing NCC elements into NNStreamer

WARNING

NCC elements are based on native vpu library. If you have not install it, please press here to install.

# Build and install
$ cd ~/opennccframe/nnstreamer
$ export PATH=~/.local/bin:$PATH  
$ export DEB_HOST_MULTIARCH=$(dpkg-architecture -qDEB_HOST_MULTIARCH)
$ meson build --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/$DEB_HOST_MULTIARCH --bindir=/usr/bin --includedir=/usr/include
$ sudo ninja -C build install

# Step 4: Running example

You can press here to run your first example with NNStreamer.