NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.5.0 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_vcp.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, 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_video.h"
23 
40 #define NVMEDIA_VCP_VERSION_MAJOR 1
41 
42 #define NVMEDIA_VCP_VERSION_MINOR 2
43 
48 #define NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE 0xFFFFFFFF
49 
53 typedef enum {
73 
77 typedef enum {
85 
89 typedef struct {
97  uint16_t width;
99  uint16_t height;
101  uint16_t startX;
103  uint16_t startY;
105  uint16_t extraLines;
111  uint32_t interfaceLanes;
113  uint8_t tpgEnable;
119  uint32_t pixelFrequency;
121  uint16_t thsSettle;
123 
127 typedef struct {
132  uint16_t width;
134  uint16_t height;
136  unsigned char numBuffers;
138 
150  NvMediaVersion *version
151 );
152 
168 );
169 
174 void
176  NvMediaVideoCapture *capture
177 );
178 
183 void
185  NvMediaVideoCapture *capture
186 );
187 
213  NvMediaVideoCapture *capture,
214  uint32_t millisecondTimeout,
215  NvMediaVideoSurface **surface
216 );
217 
232  NvMediaVideoCapture *capture,
233  NvMediaVideoSurface *surface,
234  uint32_t millisecondTimeout
235 );
236 
249  NvMediaVideoCapture *capture,
250  NvMediaVideoSurface **surface
251 );
252 
271  NvMediaVideoCapture *capture,
272  NvMediaVideoSurface *surface,
273  void *extraBuf,
274  NvMediaRect *srcRect
275 );
276 
277 /*
278  * \defgroup history_nvmedia_vcp History
279  * Provides change history for the NvMedia Video Capture API.
280  *
281  * \section history_nvmedia_vcp Version History
282  *
283  * <b> Version 1.0 </b> March 21, 2017
284  * - Initial release
285  *
286  * <b> Version 1.1 </b> April 25, 2017
287  * The following APIs are deprecated -
288  NvMediaVideoCaptureListVideoSurfaces()
289  NvMediaVideoCaptureGetFrame(). Use NvMediaVideoCaptureGetFrameEx() instead.
290  NvMediaVideoCaptureStart()
291  NvMediaVideoCaptureDebugGetStatus()
292  NvMediaVideoCaptureReturnFrame()
293  NvMediaVideoCaptureCheckAvailableFrame(). Use NvMediaVideoCaptureReleaseFrame() instead.
294  * NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C, NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_D,
295  NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_F are newly added to NvMediaVideoCaptureInterfaceType
296  * NvMediaVideoCaptureGetVersion() is added to get the version of NvMedia VCP library
297  * NvMediaVideoCaptureInterfaceFormat is now deprecated. Only CSI format is supported.
298  * interfaceFormat member is removed from \ref NvMediaVideoCapture
299  * interfaceFormat & numBuffers inputs are removed from NvMediaVideoCaptureCreate() API.
300  * Internal ring buffer based capture is no more supported.
301  * externalBuffer member is removed from \ref NvMediaVideoCaptureSettings.
302  *
303  * <b> Version 1.2 </b> May 19, 2017
304  * Removed NvMediaVideoCaptureSurfaceFormatType
305  * NvMediaVideoCaptureSettings now takes NvMediaSurfaceType to indicate capture surface format
306  * Removed NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV420
307  * from \ref NvMediaVideoCaptureInputFormatType
308  * Removed NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_TPG_EF
309  *
310  */
311 
313 #ifdef __cplusplus
314 }; /* extern "C" */
315 #endif
316 
317 #endif /* _NVMEDIA_VCP_H */
uint16_t height
Height of the captured surface.
Definition: nvmedia_vcp.h:134
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:127
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
NvMediaStatus NvMediaVideoCaptureGetFrameEx(NvMediaVideoCapture *capture, uint32_t millisecondTimeout, NvMediaVideoSurface **surface)
Gets a captured frame with frame status.
NvMediaBool interlace
Interlaced format.
Definition: nvmedia_vcp.h:107
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:136
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:130
Holds NvMedia Version information.
Definition: nvmedia_core.h:231
Video capture settings for CSI format.
Definition: nvmedia_vcp.h:89
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:121
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:178
uint16_t width
Capture width.
Definition: nvmedia_vcp.h:97
NvMediaVideoCaptureInterfaceType interfaceType
Interface type.
Definition: nvmedia_vcp.h:91
uint16_t startY
Vertical start position.
Definition: nvmedia_vcp.h:103
uint16_t height
Capture height.
Definition: nvmedia_vcp.h:99
NvMediaStatus NvMediaVideoCaptureGetVersion(NvMediaVersion *version)
Get the version information for the NvMedia VCP library.
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:135
NVIDIA Media Interface: Video Surface Processing
void NvMediaVideoCaptureStop(NvMediaVideoCapture *capture)
Stops a video capture.
uint32_t pixelFrequency
Pixel clock frequency.
Definition: nvmedia_vcp.h:119
uint32_t interfaceLanes
Number of CSI interface lanes active.
Definition: nvmedia_vcp.h:111
NvMediaVideoCaptureInterfaceType
Determines the video capture interface type for CSI interface.
Definition: nvmedia_vcp.h:53
uint16_t extraLines
Extra lines (in the larger field for interlaced capture)
Definition: nvmedia_vcp.h:105
uint8_t tpgEnable
TPG enabled.
Definition: nvmedia_vcp.h:113
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:93
NvMediaVideoCaptureInputFormatType
Determines the video capture input format type.
Definition: nvmedia_vcp.h:77
NvMediaSurfaceType surfaceType
Capture surface type.
Definition: nvmedia_vcp.h:95
uint16_t width
Width of the captured surface.
Definition: nvmedia_vcp.h:132
uint16_t interlacedExtraLinesDelta
Extra lines delta between the two fields.
Definition: nvmedia_vcp.h:109
uint16_t startX
Horizontal start position.
Definition: nvmedia_vcp.h:101
A handle representing a video surface object.
Definition: nvmedia_video.h:58