1 Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 @page ee_v4l2_cam_cuda_group V4L2 Camera with CUDA
6 - [Overview](#overview)
7 - [Key Structure and Functions](#key)
8 - [Command Line Options](#commands_line_options)
10 #### Special Requirements ####
11 - V4L2 Camera (USB or YUV Camera with the format YUYV/YVYU/UYVY/VYUY)
14 - - - - - - - - - - - - - - -
18 This sample demonstrates how to capture images from a V4L2 YUV type of camera
19 and share the image stream with NVIDIA<sup>®</sup> CUDA<sup>®</sup>
20 engines to draw a black box on the upper left corner.
22 #### Block Diagram ####
23 
25 - - - - - - - - - - - - - - -
27 ## Key Structure and Functions ##
30 |Structure|Description|
32 |context_t|Global structure to save the context
for V4L2 camera, VIC, CUDA and EglRenderer.|
35 |Function|Description|
37 |init_components|Initializes V4L2 camera, VIC, and EglRenderer.|
38 |prepare_buffers|Allocates buffers
for VIC output_plane and capture_plane. Then, it shares the buffers with V4L2 Camera, CUDA, and EglRenderer.|
39 |start_stream|Starts V4L2 camera streaming and VIC.|
40 |conv_capture_dqbuf_thread_callback|Processes the de-queued buffer with CUDA and renders it to the display.|
41 |start_capture|Main thread to enqueue and dequeue buffers.|
42 |stop_stream|Stops V4L2 camera streaming.|
46 - - - - - - - - - - - - - - -
47 <a name=
"commands_line_options">
48 ## Command Line Options ##
50 ./camera_v4l2_cuda [OPTIONS]
54 ./camera_v4l2_cuda -d /dev/video0 -s 640x480 -f YUYV -n 30 -c
57 Use the `-h` option to view the currently supported options.