NVIDIA Tegra
DRIVE 5.0 Linux Open Source Software

Development Guide
5.0.10.3 Release


 
Screen Capture Sample Application
 
Building the Sample Application
Running the Sample Application
Use the nvdisp_scrncapt sample application as an example of how to use the wrapper library and screen capture functionality.
Source files are located at:
test_scrncapt.c: Contains the essential API interface code.
scrncapt_util.c
scrncapt_util.h
Building the Sample Application
The following steps describe how to build nvdisp_scrncapt.
To build the sample application
1. On the host system, enter:
$ cd <top>/drive-t186ref-linux/samples/nvdc/screen_capture
$ make clean
$ make
2. Re-run the script to copy the new executable to the target:
<top>/drive-t186ref-linux/utils/scripts/copytarget <targetfs_dir>
Running the Sample Application
Note:
To run under hypervisor, you must set the DISPLAY_IP=<displayserver IP addr> environment variable. For example:
DISPLAY_IP=12.0.0.1 ./nvdisp_scrncapt -v 3
The following steps describe how to run nvdisp_scrncapt.
To run the sample application
1. Go to the target directory that contains the sample application's executable file.
2. To capture the current screen display on all heads, execute from the target console:
$ ./nvdisp_scrncapt -v 3
The sample application displays status messages and saves each active window to a RAW RGB file as a demonstration of how capture frames are processed. The capture files contain pixel data in 24-bit RGB888 RAW format. Use a RAW image file viewer program to examine the saved image.