NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 Release
For Test and Development only
nvmedia_vcp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2020, 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 
46 #define NVMEDIA_VCP_VERSION_MAJOR 1
47 
48 #define NVMEDIA_VCP_VERSION_MINOR 5
49 
54 #define NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE 0xFFFFFFFF
55 
60 #define NVMEDIA_MAX_VCP_FRAME_BUFFERS 32u
61 
65 typedef enum {
91 
95 typedef enum {
103 
107 typedef struct {
115  uint16_t width;
117  uint16_t height;
119  uint16_t startX;
121  uint16_t startY;
123  uint16_t extraLines;
129  uint32_t interfaceLanes;
131  uint8_t tpgEnable;
137  uint32_t pixelFrequency;
139  uint16_t thsSettle;
141 
145 typedef struct {
150  uint16_t width;
152  uint16_t height;
154  unsigned char numBuffers;
156 
168  NvMediaVersion *version
169 );
170 
186 );
187 
192 void
194  NvMediaVideoCapture *capture
195 );
196 
201 void
203  NvMediaVideoCapture *capture
204 );
205 
231  NvMediaVideoCapture *capture,
232  uint32_t millisecondTimeout,
233  NvMediaVideoSurface **surface
234 );
235 
250  NvMediaVideoCapture *capture,
251  NvMediaVideoSurface *surface,
252  uint32_t millisecondTimeout
253 );
254 
267  NvMediaVideoCapture *capture,
268  NvMediaVideoSurface **surface
269 );
270 
289  NvMediaVideoCapture *capture,
290  NvMediaVideoSurface *surface,
291  void *extraBuf,
292  NvMediaRect *srcRect
293 );
294 
295 /*
296  * \defgroup history_nvmedia_vcp History
297  * Provides change history for the NvMedia Video Capture API.
298  *
299  * \section history_nvmedia_vcp Version History
300  *
301  * <b> Version 1.0 </b> March 21, 2017
302  * - Initial release
303  *
304  * <b> Version 1.1 </b> April 25, 2017
305  * The following APIs are deprecated -
306  NvMediaVideoCaptureListVideoSurfaces()
307  NvMediaVideoCaptureGetFrame(). Use NvMediaVideoCaptureGetFrameEx() instead.
308  NvMediaVideoCaptureStart()
309  NvMediaVideoCaptureDebugGetStatus()
310  NvMediaVideoCaptureReturnFrame()
311  NvMediaVideoCaptureCheckAvailableFrame(). Use NvMediaVideoCaptureReleaseFrame() instead.
312  * NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C, NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_D,
313  NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_F are newly added to NvMediaVideoCaptureInterfaceType
314  * NvMediaVideoCaptureGetVersion() is added to get the version of NvMedia VCP library
315  * NvMediaVideoCaptureInterfaceFormat is now deprecated. Only CSI format is supported.
316  * interfaceFormat member is removed from \ref NvMediaVideoCapture
317  * interfaceFormat & numBuffers inputs are removed from NvMediaVideoCaptureCreate() API.
318  * Internal ring buffer based capture is no more supported.
319  * externalBuffer member is removed from \ref NvMediaVideoCaptureSettings.
320  *
321  * <b> Version 1.2 </b> May 19, 2017
322  * Removed NvMediaVideoCaptureSurfaceFormatType
323  * NvMediaVideoCaptureSettings now takes NvMediaSurfaceType to indicate capture surface format
324  * Removed NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV420
325  * from \ref NvMediaVideoCaptureInputFormatType
326  * Removed NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_TPG_EF
327  *
328  * <b> Version 1.3 </b> November 18, 2017
329  * Added CSI interfaces G & H
330  *
331  * <b> Version 1.4 </b> October 04, 2018
332  * Updated the comments in the header to use new NvMediaSurfaceType values
333  *
334  * <b> Version 1.5 </b> February 06, 2019
335  * Added required header includes nvmedia_core.h and nvmedia_surface.h
336  *
337  */
338 
340 #ifdef __cplusplus
341 }; /* extern "C" */
342 #endif
343 
344 #endif /* _NVMEDIA_VCP_H */
nvmedia_video.h
NVIDIA Media Interface: Video Surface Processing
nvmedia_surface.h
NVIDIA Media Interface: Surface Handling
NvMediaVideoCapture::height
uint16_t height
Height of the captured surface.
Definition: nvmedia_vcp.h:152
NvMediaVideoCaptureSettings::startY
uint16_t startY
Vertical start position.
Definition: nvmedia_vcp.h:121
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_G
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_G
Interface: CSI, port: G.
Definition: nvmedia_vcp.h:85
NvMediaVideoCaptureSettings::width
uint16_t width
Capture width.
Definition: nvmedia_vcp.h:115
NvMediaVideoCaptureReleaseFrame
NvMediaStatus NvMediaVideoCaptureReleaseFrame(NvMediaVideoCapture *capture, NvMediaVideoSurface **surface)
Gets a frame from the internal pool that user fed with NvMediaVideoCaptureFeedFrame after HW gives up...
NvMediaVideoCapture::width
uint16_t width
Width of the captured surface.
Definition: nvmedia_vcp.h:150
NvMediaVideoCaptureSettings
Video capture settings for CSI format.
Definition: nvmedia_vcp.h:107
NvMediaVideoCaptureSettings::interfaceType
NvMediaVideoCaptureInterfaceType interfaceType
Interface type.
Definition: nvmedia_vcp.h:109
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_A
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_A
Interface: CSI, port: A.
Definition: nvmedia_vcp.h:67
NvMediaVideoCaptureInputFormatType
NvMediaVideoCaptureInputFormatType
Determines the video capture input format type.
Definition: nvmedia_vcp.h:95
NvMediaVideoCaptureSettings::pixelFrequency
uint32_t pixelFrequency
Pixel clock frequency.
Definition: nvmedia_vcp.h:137
NvMediaVideoCaptureSettings::interfaceLanes
uint32_t interfaceLanes
Number of CSI interface lanes active.
Definition: nvmedia_vcp.h:129
NvMediaVideoCaptureSettings::tpgEnable
uint8_t tpgEnable
TPG enabled.
Definition: nvmedia_vcp.h:131
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_E
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_E
Interface: CSI, port: E.
Definition: nvmedia_vcp.h:79
NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_RGB888
@ NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_RGB888
Input format: RGBA.
Definition: nvmedia_vcp.h:101
NvMediaVideoCaptureSettings::startX
uint16_t startX
Horizontal start position.
Definition: nvmedia_vcp.h:119
NvMediaVideoCaptureSettings::extraLines
uint16_t extraLines
Extra lines (in the larger field for interlaced capture)
Definition: nvmedia_vcp.h:123
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:237
NvMediaVideoCaptureSettings::interlace
NvMediaBool interlace
Interlaced format.
Definition: nvmedia_vcp.h:125
NvMediaVideoCaptureCreate
NvMediaVideoCapture * NvMediaVideoCaptureCreate(NvMediaVideoCaptureSettings *settings)
Creates a capture object used to capture various formats of analog or digital video input.
NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV444
@ NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV444
Input format: YUV 4:4:4.
Definition: nvmedia_vcp.h:99
NvMediaVideoCapture::surfaceType
NvMediaSurfaceType surfaceType
The surface type that will be returned upon capturing an image.
Definition: nvmedia_vcp.h:148
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_EF
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_EF
Interface: CSI, port: EF.
Definition: nvmedia_vcp.h:83
NvMediaVideoCaptureSettings::surfaceType
NvMediaSurfaceType surfaceType
Capture surface type.
Definition: nvmedia_vcp.h:113
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_GH
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_GH
Interface: CSI, port: GH.
Definition: nvmedia_vcp.h:89
NvMediaVideoSurface
A handle representing a video surface object.
Definition: nvmedia_video.h:58
NvMediaVideoCaptureSettings::inputFormatType
NvMediaVideoCaptureInputFormatType inputFormatType
Input format.
Definition: nvmedia_vcp.h:111
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
nvmedia_core.h
NVIDIA Media Interface: Core
NvMediaSurfaceType
#define NvMediaSurfaceType
Defines the set of NvMedia surface types.
Definition: nvmedia_surface.h:550
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_F
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_F
Interface: CSI, port: F.
Definition: nvmedia_vcp.h:81
NvMediaVideoCaptureGetFrameEx
NvMediaStatus NvMediaVideoCaptureGetFrameEx(NvMediaVideoCapture *capture, uint32_t millisecondTimeout, NvMediaVideoSurface **surface)
Gets a captured frame with frame status.
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
NvMediaVideoCapture::numBuffers
unsigned char numBuffers
Number of frame buffers used to create the video capture object.
Definition: nvmedia_vcp.h:154
NvMediaVideoCaptureStop
void NvMediaVideoCaptureStop(NvMediaVideoCapture *capture)
Stops a video capture.
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_D
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_D
Interface: CSI, port: D.
Definition: nvmedia_vcp.h:75
NvMediaVideoCaptureSettings::interlacedExtraLinesDelta
uint16_t interlacedExtraLinesDelta
Extra lines delta between the two fields.
Definition: nvmedia_vcp.h:127
NvMediaVideoCapture
Video capture object created by NvMediaVideoCaptureCreate.
Definition: nvmedia_vcp.h:145
NvMediaVideoCaptureInterfaceType
NvMediaVideoCaptureInterfaceType
Determines the video capture interface type for CSI interface.
Definition: nvmedia_vcp.h:65
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_CD
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_CD
Interface: CSI, port: CD.
Definition: nvmedia_vcp.h:77
NvMediaVideoCaptureGetExtraLines
NvMediaStatus NvMediaVideoCaptureGetExtraLines(NvMediaVideoCapture *capture, NvMediaVideoSurface *surface, void *extraBuf, NvMediaRect *srcRect)
Return extra lines data stored in a captured surface.
NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV422
@ NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV422
Input format: YUV 4:2:2.
Definition: nvmedia_vcp.h:97
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_H
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_H
Interface: CSI, port: H.
Definition: nvmedia_vcp.h:87
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB
Interface: CSI, port: AB.
Definition: nvmedia_vcp.h:71
NvMediaVideoCaptureSettings::thsSettle
uint16_t thsSettle
MIPI THS-SETTLE time.
Definition: nvmedia_vcp.h:139
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C
Interface: CSI, port: C.
Definition: nvmedia_vcp.h:73
NvMediaVideoCaptureDestroy
void NvMediaVideoCaptureDestroy(NvMediaVideoCapture *capture)
Destroyx a video capture created by NvMediaVideoCaptureCreate.
NvMediaVideoCaptureSettings::height
uint16_t height
Capture height.
Definition: nvmedia_vcp.h:117
NvMediaBool
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:80
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_B
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_B
Interface: CSI, port: B.
Definition: nvmedia_vcp.h:69
NvMediaVideoCaptureGetVersion
NvMediaStatus NvMediaVideoCaptureGetVersion(NvMediaVersion *version)
Get the version information for the NvMedia VCP library.
NvMediaVideoCaptureFeedFrame
NvMediaStatus NvMediaVideoCaptureFeedFrame(NvMediaVideoCapture *capture, NvMediaVideoSurface *surface, uint32_t millisecondTimeout)
Adds a video frame to the video capture pool.