NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux SDK

Developer Guide
5.1.6.0 Release


 
Building and Running the NvMedia Samples
 
Building the NvMedia Samples
Running the NvMedia Samples
The NvMedia samples installed on the NVIDIA DRIVE™ AGX Platform are already compiled and ready to run. If you modify a sample, though, you must rebuild it on the host Linux system. This section explains how.
Additionally, before you can run a sample, you must define environment variables and optionally customize a configuration file.
Building the NvMedia Samples
Each sample comes with source code and a makefile. Use these procedures to build the desired sample.
To build a sample application
1. If you are running the sample on a non-standard windowing system such as an EGLdevice, Wayland, or X11, enter:
export NV_WINSYS=<egldevice|wayland|x11>
Each DRIVE AGX Platform has a default windowing system. Most samples are set up to compile on multiple different windowing systems, depending on the platform.
2. On the host system, enter the commands:
cd <top>/drive-t186ref-linux/samples/nvmedia/<sample>
make clean
make
Where <sample> is the sample name, for example nvmipp_raw.
3. Rerun the copytarget script, passing in the path to the target file system to ensure that the new executable is copied to the target.
<top>/drive-t186ref-linux/utils/scripts/copytarget-samples <targetfs_dir>
 
Caution:
If you run copytarget without specifying a <targetfs_dir>, the script corrupts the host system files.
 
Running the NvMedia Samples
Prerequisites
The shared libraries, executables, and configuration files or scripts required to configure the cameras. For details, refer to the specific sample application.
The video files in case of decode/encode samples.
For more information, see Supported Video Media Formats in Understanding NvMedia.
4.  
To run a sample application on Ubuntu or Genivi file systems
1. On the target system, navigate to the sample application directory, depending on your file system.
In Ubuntu rootfs:
/home/nvidia/drive-t186ref-linux/samples/nvmedia/<sample>
In Genivi rootfs:
/home/root/samples/nvmedia/<sample>
2. Copy the default configuration file and modify your copy for your needs.
3. Run the sample application.