L4T Multimedia API Reference

27.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nvee_v4l2_cam_cuda.md
Go to the documentation of this file.
1 Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
2 
3 @page ee_v4l2_cam_cuda_group V4L2 Camera with CUDA
4 @{
5 
6  - [Overview](#overview)
7  - [Key Structure and Functions](#key)
8  - [Command Line Options](#commands_line_options)
9 
10 #### Special Requirements ####
11 - V4L2 Camera (USB or YUV Camera with the format YUYV/YVYU/UYVY/VYUY)
12 - Display
13 
14 - - - - - - - - - - - - - - -
15 <a name="overview">
16 ## Overview ##
17 
18 This sample demonstrates how to capture images from a V4L2 YUV type of camera
19 and share the image stream with NVIDIA<sup>&reg;</sup> CUDA<sup>&reg;</sup>
20 engines to draw a black box on the upper left corner.
21 
22 #### Block Diagram ####
23 ![Block Diagram](nvee_v4l2_camera.png)
24 
25 - - - - - - - - - - - - - - -
26 <a name="key">
27 ## Key Structure and Functions ##
28 
29 
30 |Structure|Description|
31 |-------|-----------|
32 |context_t|Global structure to save the context for V4L2 camera, VIC, CUDA and EglRenderer.|
33 
34 
35 |Function|Description|
36 |-------|-----------|
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.|
43 
44 
45 
46 - - - - - - - - - - - - - - -
47 <a name="commands_line_options">
48 ## Command Line Options ##
49 
50  ./camera_v4l2_cuda [OPTIONS]
51 
52 For example:
53 
54  ./camera_v4l2_cuda -d /dev/video0 -s 640x480 -f YUYV -n 30 -c
55 
56 
57 Use the `-h` option to view the currently supported options.
58 
59 
60 
61 
62