NVIDIA DRIVE OS Linux API Reference

5.1.6.1 Release
For Test and Development only

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_vcp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
15 #ifndef _NVMEDIA_VCP_H
16 #define _NVMEDIA_VCP_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include "nvmedia_core.h"
23 #include "nvmedia_surface.h"
24 #include "nvmedia_video.h"
25 
42 #define NVMEDIA_VCP_VERSION_MAJOR 1
43 
44 #define NVMEDIA_VCP_VERSION_MINOR 5
45 
50 #define NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE 0xFFFFFFFF
51 
56 #define NVMEDIA_MAX_VCP_FRAME_BUFFERS 32u
57 
61 typedef enum {
87 
91 typedef enum {
99 
103 typedef struct {
111  uint16_t width;
113  uint16_t height;
115  uint16_t startX;
117  uint16_t startY;
119  uint16_t extraLines;
125  uint32_t interfaceLanes;
127  uint8_t tpgEnable;
133  uint32_t pixelFrequency;
135  uint16_t thsSettle;
137 
141 typedef struct {
146  uint16_t width;
148  uint16_t height;
150  unsigned char numBuffers;
152 
164  NvMediaVersion *version
165 );
166 
182 );
183 
188 void
190  NvMediaVideoCapture *capture
191 );
192 
197 void
199  NvMediaVideoCapture *capture
200 );
201 
227  NvMediaVideoCapture *capture,
228  uint32_t millisecondTimeout,
229  NvMediaVideoSurface **surface
230 );
231 
246  NvMediaVideoCapture *capture,
247  NvMediaVideoSurface *surface,
248  uint32_t millisecondTimeout
249 );
250 
263  NvMediaVideoCapture *capture,
264  NvMediaVideoSurface **surface
265 );
266 
285  NvMediaVideoCapture *capture,
286  NvMediaVideoSurface *surface,
287  void *extraBuf,
288  NvMediaRect *srcRect
289 );
290 
291 /*
292  * \defgroup history_nvmedia_vcp History
293  * Provides change history for the NvMedia Video Capture API.
294  *
295  * \section history_nvmedia_vcp Version History
296  *
297  * <b> Version 1.0 </b> March 21, 2017
298  * - Initial release
299  *
300  * <b> Version 1.1 </b> April 25, 2017
301  * The following APIs are deprecated -
302  NvMediaVideoCaptureListVideoSurfaces()
303  NvMediaVideoCaptureGetFrame(). Use NvMediaVideoCaptureGetFrameEx() instead.
304  NvMediaVideoCaptureStart()
305  NvMediaVideoCaptureDebugGetStatus()
306  NvMediaVideoCaptureReturnFrame()
307  NvMediaVideoCaptureCheckAvailableFrame(). Use NvMediaVideoCaptureReleaseFrame() instead.
308  * NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C, NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_D,
309  NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_F are newly added to NvMediaVideoCaptureInterfaceType
310  * NvMediaVideoCaptureGetVersion() is added to get the version of NvMedia VCP library
311  * NvMediaVideoCaptureInterfaceFormat is now deprecated. Only CSI format is supported.
312  * interfaceFormat member is removed from \ref NvMediaVideoCapture
313  * interfaceFormat & numBuffers inputs are removed from NvMediaVideoCaptureCreate() API.
314  * Internal ring buffer based capture is no more supported.
315  * externalBuffer member is removed from \ref NvMediaVideoCaptureSettings.
316  *
317  * <b> Version 1.2 </b> May 19, 2017
318  * Removed NvMediaVideoCaptureSurfaceFormatType
319  * NvMediaVideoCaptureSettings now takes NvMediaSurfaceType to indicate capture surface format
320  * Removed NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV420
321  * from \ref NvMediaVideoCaptureInputFormatType
322  * Removed NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_TPG_EF
323  *
324  * <b> Version 1.3 </b> November 18, 2017
325  * Added CSI interfaces G & H
326  *
327  * <b> Version 1.4 </b> October 04, 2018
328  * Updated the comments in the header to use new NvMediaSurfaceType values
329  *
330  * <b> Version 1.5 </b> February 06, 2019
331  * Added required header includes nvmedia_core.h and nvmedia_surface.h
332  *
333  */
334 
336 #ifdef __cplusplus
337 }; /* extern "C" */
338 #endif
339 
340 #endif /* _NVMEDIA_VCP_H */
uint16_t height
Height of the captured surface.
Definition: nvmedia_vcp.h:148
NvMediaStatus NvMediaVideoCaptureFeedFrame(NvMediaVideoCapture *capture, NvMediaVideoSurface *surface, uint32_t millisecondTimeout)
Adds a video frame to the video capture pool.
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Video capture object created by NvMediaVideoCaptureCreate.
Definition: nvmedia_vcp.h:141
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:80
NvMediaStatus NvMediaVideoCaptureGetFrameEx(NvMediaVideoCapture *capture, uint32_t millisecondTimeout, NvMediaVideoSurface **surface)
Gets a captured frame with frame status.
NvMediaBool interlace
Interlaced format.
Definition: nvmedia_vcp.h:121
NVIDIA Media Interface: Surface Handling
NvMediaStatus NvMediaVideoCaptureReleaseFrame(NvMediaVideoCapture *capture, NvMediaVideoSurface **surface)
Gets a frame from the internal pool that user fed with NvMediaVideoCaptureFeedFrame after HW gives up...
unsigned char numBuffers
Number of frame buffers used to create the video capture object.
Definition: nvmedia_vcp.h:150
void NvMediaVideoCaptureDestroy(NvMediaVideoCapture *capture)
Destroyx a video capture created by NvMediaVideoCaptureCreate.
NvMediaSurfaceType surfaceType
The surface type that will be returned upon capturing an image.
Definition: nvmedia_vcp.h:144
Holds NvMedia version information.
Definition: nvmedia_core.h:226
Video capture settings for CSI format.
Definition: nvmedia_vcp.h:103
NvMediaVideoCapture * NvMediaVideoCaptureCreate(NvMediaVideoCaptureSettings *settings)
Creates a capture object used to capture various formats of analog or digital video input...
uint16_t thsSettle
MIPI THS-SETTLE time.
Definition: nvmedia_vcp.h:135
NVIDIA Media Interface: Core
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
uint16_t width
Capture width.
Definition: nvmedia_vcp.h:111
NvMediaVideoCaptureInterfaceType interfaceType
Interface type.
Definition: nvmedia_vcp.h:105
uint16_t startY
Vertical start position.
Definition: nvmedia_vcp.h:117
uint16_t height
Capture height.
Definition: nvmedia_vcp.h:113
NvMediaStatus NvMediaVideoCaptureGetVersion(NvMediaVersion *version)
Get the version information for the NvMedia VCP library.
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
NVIDIA Media Interface: Video Surface Processing
void NvMediaVideoCaptureStop(NvMediaVideoCapture *capture)
Stops a video capture.
uint32_t pixelFrequency
Pixel clock frequency.
Definition: nvmedia_vcp.h:133
uint32_t interfaceLanes
Number of CSI interface lanes active.
Definition: nvmedia_vcp.h:125
NvMediaVideoCaptureInterfaceType
Determines the video capture interface type for CSI interface.
Definition: nvmedia_vcp.h:61
uint16_t extraLines
Extra lines (in the larger field for interlaced capture)
Definition: nvmedia_vcp.h:119
uint8_t tpgEnable
TPG enabled.
Definition: nvmedia_vcp.h:127
NvMediaStatus NvMediaVideoCaptureGetExtraLines(NvMediaVideoCapture *capture, NvMediaVideoSurface *surface, void *extraBuf, NvMediaRect *srcRect)
Return extra lines data stored in a captured surface.
NvMediaVideoCaptureInputFormatType inputFormatType
Input format.
Definition: nvmedia_vcp.h:107
NvMediaVideoCaptureInputFormatType
Determines the video capture input format type.
Definition: nvmedia_vcp.h:91
NvMediaSurfaceType surfaceType
Capture surface type.
Definition: nvmedia_vcp.h:109
uint16_t width
Width of the captured surface.
Definition: nvmedia_vcp.h:146
uint16_t interlacedExtraLinesDelta
Extra lines delta between the two fields.
Definition: nvmedia_vcp.h:123
uint16_t startX
Horizontal start position.
Definition: nvmedia_vcp.h:115
A handle representing a video surface object.
Definition: nvmedia_video.h:58