L4T Multimedia API Reference27.1 Release |
This sample demonstrates how to capture images from a V4L2 YUV type of camera and share the image stream with NVIDIA® CUDA® engines to draw a black box on the upper left corner.
Structure | Description |
---|---|
context_t | Global structure to save the context for V4L2 camera, VIC, CUDA and EglRenderer. |
Function | Description |
---|---|
init_components | Initializes V4L2 camera, VIC, and EglRenderer. |
prepare_buffers | Allocates buffers for VIC output_plane and capture_plane. Then, it shares the buffers with V4L2 Camera, CUDA, and EglRenderer. |
start_stream | Starts V4L2 camera streaming and VIC. |
conv_capture_dqbuf_thread_callback | Processes the de-queued buffer with CUDA and renders it to the display. |
start_capture | Main thread to enqueue and dequeue buffers. |
stop_stream | Stops V4L2 camera streaming. |
./camera_v4l2_cuda [OPTIONS]
For example:
./camera_v4l2_cuda -d /dev/video0 -s 640x480 -f YUYV -n 30 -c
Use the -h
option to view the currently supported options.