NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.2 Release
For Test and Development only
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 */
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:148
NvMediaVideoCaptureSettings::startY
uint16_t startY
Vertical start position.
Definition: nvmedia_vcp.h:117
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_G
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_G
Interface: CSI, port: G.
Definition: nvmedia_vcp.h:81
NvMediaVideoCaptureSettings::width
uint16_t width
Capture width.
Definition: nvmedia_vcp.h:111
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:146
NvMediaVideoCaptureSettings
Video capture settings for CSI format.
Definition: nvmedia_vcp.h:103
NvMediaVideoCaptureSettings::interfaceType
NvMediaVideoCaptureInterfaceType interfaceType
Interface type.
Definition: nvmedia_vcp.h:105
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_A
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_A
Interface: CSI, port: A.
Definition: nvmedia_vcp.h:63
NvMediaVideoCaptureInputFormatType
NvMediaVideoCaptureInputFormatType
Determines the video capture input format type.
Definition: nvmedia_vcp.h:91
NvMediaVideoCaptureSettings::pixelFrequency
uint32_t pixelFrequency
Pixel clock frequency.
Definition: nvmedia_vcp.h:133
NvMediaVideoCaptureSettings::interfaceLanes
uint32_t interfaceLanes
Number of CSI interface lanes active.
Definition: nvmedia_vcp.h:125
NvMediaVideoCaptureSettings::tpgEnable
uint8_t tpgEnable
TPG enabled.
Definition: nvmedia_vcp.h:127
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_E
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_E
Interface: CSI, port: E.
Definition: nvmedia_vcp.h:75
NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_RGB888
@ NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_RGB888
Input format: RGBA.
Definition: nvmedia_vcp.h:97
NvMediaVideoCaptureSettings::startX
uint16_t startX
Horizontal start position.
Definition: nvmedia_vcp.h:115
NvMediaVideoCaptureSettings::extraLines
uint16_t extraLines
Extra lines (in the larger field for interlaced capture)
Definition: nvmedia_vcp.h:119
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:237
NvMediaVideoCaptureSettings::interlace
NvMediaBool interlace
Interlaced format.
Definition: nvmedia_vcp.h:121
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:95
NvMediaVideoCapture::surfaceType
NvMediaSurfaceType surfaceType
The surface type that will be returned upon capturing an image.
Definition: nvmedia_vcp.h:144
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_EF
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_EF
Interface: CSI, port: EF.
Definition: nvmedia_vcp.h:79
NvMediaVideoCaptureSettings::surfaceType
NvMediaSurfaceType surfaceType
Capture surface type.
Definition: nvmedia_vcp.h:109
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_GH
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_GH
Interface: CSI, port: GH.
Definition: nvmedia_vcp.h:85
NvMediaVideoSurface
A handle representing a video surface object.
Definition: nvmedia_video.h:58
NvMediaVideoCaptureSettings::inputFormatType
NvMediaVideoCaptureInputFormatType inputFormatType
Input format.
Definition: nvmedia_vcp.h:107
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:77
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:150
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:71
NvMediaVideoCaptureSettings::interlacedExtraLinesDelta
uint16_t interlacedExtraLinesDelta
Extra lines delta between the two fields.
Definition: nvmedia_vcp.h:123
NvMediaVideoCapture
Video capture object created by NvMediaVideoCaptureCreate.
Definition: nvmedia_vcp.h:141
NvMediaVideoCaptureInterfaceType
NvMediaVideoCaptureInterfaceType
Determines the video capture interface type for CSI interface.
Definition: nvmedia_vcp.h:61
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_CD
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_CD
Interface: CSI, port: CD.
Definition: nvmedia_vcp.h:73
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:93
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_H
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_H
Interface: CSI, port: H.
Definition: nvmedia_vcp.h:83
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB
Interface: CSI, port: AB.
Definition: nvmedia_vcp.h:67
NvMediaVideoCaptureSettings::thsSettle
uint16_t thsSettle
MIPI THS-SETTLE time.
Definition: nvmedia_vcp.h:135
NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C
@ NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C
Interface: CSI, port: C.
Definition: nvmedia_vcp.h:69
NvMediaVideoCaptureDestroy
void NvMediaVideoCaptureDestroy(NvMediaVideoCapture *capture)
Destroyx a video capture created by NvMediaVideoCaptureCreate.
NvMediaVideoCaptureSettings::height
uint16_t height
Capture height.
Definition: nvmedia_vcp.h:113
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:65
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.