NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 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, 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 3
43 
48 #define NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE 0xFFFFFFFF
49 
53 typedef enum {
79 
83 typedef enum {
91 
95 typedef struct {
103  uint16_t width;
105  uint16_t height;
107  uint16_t startX;
109  uint16_t startY;
111  uint16_t extraLines;
117  uint32_t interfaceLanes;
119  uint8_t tpgEnable;
125  uint32_t pixelFrequency;
127  uint16_t thsSettle;
129 
133 typedef struct {
138  uint16_t width;
140  uint16_t height;
142  unsigned char numBuffers;
144 
156  NvMediaVersion *version
157 );
158 
174 );
175 
180 void
182  NvMediaVideoCapture *capture
183 );
184 
189 void
191  NvMediaVideoCapture *capture
192 );
193 
219  NvMediaVideoCapture *capture,
220  uint32_t millisecondTimeout,
221  NvMediaVideoSurface **surface
222 );
223 
238  NvMediaVideoCapture *capture,
239  NvMediaVideoSurface *surface,
240  uint32_t millisecondTimeout
241 );
242 
255  NvMediaVideoCapture *capture,
256  NvMediaVideoSurface **surface
257 );
258 
277  NvMediaVideoCapture *capture,
278  NvMediaVideoSurface *surface,
279  void *extraBuf,
280  NvMediaRect *srcRect
281 );
282 
283 /*
284  * \defgroup history_nvmedia_vcp History
285  * Provides change history for the NvMedia Video Capture API.
286  *
287  * \section history_nvmedia_vcp Version History
288  *
289  * <b> Version 1.0 </b> March 21, 2017
290  * - Initial release
291  *
292  * <b> Version 1.1 </b> April 25, 2017
293  * The following APIs are deprecated -
294  NvMediaVideoCaptureListVideoSurfaces()
295  NvMediaVideoCaptureGetFrame(). Use NvMediaVideoCaptureGetFrameEx() instead.
296  NvMediaVideoCaptureStart()
297  NvMediaVideoCaptureDebugGetStatus()
298  NvMediaVideoCaptureReturnFrame()
299  NvMediaVideoCaptureCheckAvailableFrame(). Use NvMediaVideoCaptureReleaseFrame() instead.
300  * NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_C, NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_D,
301  NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_CSI_F are newly added to NvMediaVideoCaptureInterfaceType
302  * NvMediaVideoCaptureGetVersion() is added to get the version of NvMedia VCP library
303  * NvMediaVideoCaptureInterfaceFormat is now deprecated. Only CSI format is supported.
304  * interfaceFormat member is removed from \ref NvMediaVideoCapture
305  * interfaceFormat & numBuffers inputs are removed from NvMediaVideoCaptureCreate() API.
306  * Internal ring buffer based capture is no more supported.
307  * externalBuffer member is removed from \ref NvMediaVideoCaptureSettings.
308  *
309  * <b> Version 1.2 </b> May 19, 2017
310  * Removed NvMediaVideoCaptureSurfaceFormatType
311  * NvMediaVideoCaptureSettings now takes NvMediaSurfaceType to indicate capture surface format
312  * Removed NVMEDIA_VIDEO_CAPTURE_INPUT_FORMAT_TYPE_YUV420
313  * from \ref NvMediaVideoCaptureInputFormatType
314  * Removed NVMEDIA_VIDEO_CAPTURE_CSI_INTERFACE_TYPE_TPG_EF
315  *
316  * <b> Version 1.3 </b> November 18, 2017
317  * Added CSI interfaces G & H
318  *
319  */
320 
322 #ifdef __cplusplus
323 }; /* extern "C" */
324 #endif
325 
326 #endif /* _NVMEDIA_VCP_H */
uint16_t height
Height of the captured surface.
Definition: nvmedia_vcp.h:140
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:133
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:113
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:142
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:136
Holds NvMedia Version information.
Definition: nvmedia_core.h:252
Video capture settings for CSI format.
Definition: nvmedia_vcp.h:95
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:127
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
uint16_t width
Capture width.
Definition: nvmedia_vcp.h:103
NvMediaVideoCaptureInterfaceType interfaceType
Interface type.
Definition: nvmedia_vcp.h:97
uint16_t startY
Vertical start position.
Definition: nvmedia_vcp.h:109
uint16_t height
Capture height.
Definition: nvmedia_vcp.h:105
NvMediaStatus NvMediaVideoCaptureGetVersion(NvMediaVersion *version)
Get the version information for the NvMedia VCP library.
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
NVIDIA Media Interface: Video Surface Processing
void NvMediaVideoCaptureStop(NvMediaVideoCapture *capture)
Stops a video capture.
uint32_t pixelFrequency
Pixel clock frequency.
Definition: nvmedia_vcp.h:125
uint32_t interfaceLanes
Number of CSI interface lanes active.
Definition: nvmedia_vcp.h:117
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:111
uint8_t tpgEnable
TPG enabled.
Definition: nvmedia_vcp.h:119
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:99
NvMediaVideoCaptureInputFormatType
Determines the video capture input format type.
Definition: nvmedia_vcp.h:83
NvMediaSurfaceType surfaceType
Capture surface type.
Definition: nvmedia_vcp.h:101
uint16_t width
Width of the captured surface.
Definition: nvmedia_vcp.h:138
uint16_t interlacedExtraLinesDelta
Extra lines delta between the two fields.
Definition: nvmedia_vcp.h:115
uint16_t startX
Horizontal start position.
Definition: nvmedia_vcp.h:107
A handle representing a video surface object.
Definition: nvmedia_video.h:58