![]() |
NVIDIA DRIVE 5.0 Linux SDK API Reference5.0.10.3 Release |
Captures uncompressed video data, writing the results to a NvMediaVideoSurface.
A specific NvMedia implementation may support capturing multiple types of uncompressed video data. However, NvMediaVideoCapture objects are able to capture a specific type of uncompressed video data. This type must be specified during creation.
Data Structures | |
struct | NvMediaVideoCaptureSettings |
Video capture settings for CSI format. More... | |
struct | NvMediaVideoCapture |
Video capture object created by NvMediaVideoCaptureCreate. More... | |
Macros | |
#define | NVMEDIA_VCP_VERSION_MAJOR 1 |
Major Version number. More... | |
#define | NVMEDIA_VCP_VERSION_MINOR 3 |
Minor Version number. More... | |
#define | NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE |
Infinite time-out for NvMediaVideoCaptureGetFrameEx. More... | |
Functions | |
NvMediaStatus | NvMediaVideoCaptureGetVersion (NvMediaVersion *version) |
Get the version information for the NvMedia VCP library. More... | |
NvMediaVideoCapture * | NvMediaVideoCaptureCreate (NvMediaVideoCaptureSettings *settings) |
Creates a capture object used to capture various formats of analog or digital video input. More... | |
void | NvMediaVideoCaptureDestroy (NvMediaVideoCapture *capture) |
Destroyx a video capture created by NvMediaVideoCaptureCreate. More... | |
void | NvMediaVideoCaptureStop (NvMediaVideoCapture *capture) |
Stops a video capture. More... | |
NvMediaStatus | NvMediaVideoCaptureGetFrameEx (NvMediaVideoCapture *capture, uint32_t millisecondTimeout, NvMediaVideoSurface **surface) |
Gets a captured frame with frame status. More... | |
NvMediaStatus | NvMediaVideoCaptureFeedFrame (NvMediaVideoCapture *capture, NvMediaVideoSurface *surface, uint32_t millisecondTimeout) |
Adds a video frame to the video capture pool. More... | |
NvMediaStatus | NvMediaVideoCaptureReleaseFrame (NvMediaVideoCapture *capture, NvMediaVideoSurface **surface) |
Gets a frame from the internal pool that user fed with NvMediaVideoCaptureFeedFrame after HW gives up to capture. More... | |
NvMediaStatus | NvMediaVideoCaptureGetExtraLines (NvMediaVideoCapture *capture, NvMediaVideoSurface *surface, void *extraBuf, NvMediaRect *srcRect) |
Return extra lines data stored in a captured surface. More... | |
#define NVMEDIA_VCP_VERSION_MAJOR 1 |
Major Version number.
Definition at line 40 of file nvmedia_vcp.h.
#define NVMEDIA_VCP_VERSION_MINOR 3 |
Minor Version number.
Definition at line 42 of file nvmedia_vcp.h.
#define NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE |
Infinite time-out for NvMediaVideoCaptureGetFrameEx.
Definition at line 48 of file nvmedia_vcp.h.
Determines the video capture input format type.
Definition at line 83 of file nvmedia_vcp.h.
Determines the video capture interface type for CSI interface.
Definition at line 53 of file nvmedia_vcp.h.
NvMediaVideoCapture* NvMediaVideoCaptureCreate | ( | NvMediaVideoCaptureSettings * | settings | ) |
Creates a capture object used to capture various formats of analog or digital video input.
into a NvMediaVideoSurface. The supported surfaces must be obtained by /ref NvMediaSurfaceFormatGetType with:
[in] | settings | Determines the settings for the capture. Used only for the CSI interface. For VIP set it to NULL. |
void NvMediaVideoCaptureDestroy | ( | NvMediaVideoCapture * | capture | ) |
Destroyx a video capture created by NvMediaVideoCaptureCreate.
[in] | capture | A pointer to the video capture to be destroyed. |
NvMediaStatus NvMediaVideoCaptureFeedFrame | ( | NvMediaVideoCapture * | capture, |
NvMediaVideoSurface * | surface, | ||
uint32_t | millisecondTimeout | ||
) |
Adds a video frame to the video capture pool.
The pool size is determined by the maxBuffers parameter. See NvMediaVideoCaptureCreate.
[in] | capture | The video capture object to be used. |
[in] | surface | The surface to be added to the pool. |
[in] | millisecondTimeout | Time-out in milliseconds. |
NvMediaStatus NvMediaVideoCaptureGetExtraLines | ( | NvMediaVideoCapture * | capture, |
NvMediaVideoSurface * | surface, | ||
void * | extraBuf, | ||
NvMediaRect * | srcRect | ||
) |
Return extra lines data stored in a captured surface.
Currently only NvMediaSurfaceType_R8G8B8A8 surface type is supported.
[in] | capture | The video capture to be used. |
[in] | surface | Surface to get the extra lines from. |
[in] | extraBuf | The buffer where the extra line data is stored. |
[in] | srcRect | The source rectangle extracted out as extra lines. If NULL, the extra lines (defined at the time of capture creation) from the source surface are extracted. |
NvMediaStatus NvMediaVideoCaptureGetFrameEx | ( | NvMediaVideoCapture * | capture, |
uint32_t | millisecondTimeout, | ||
NvMediaVideoSurface ** | surface | ||
) |
Gets a captured frame with frame status.
This function blocks until a frame is available or until the timeout (in milliseconds) has been reached. To block without a timeout, specify NVMEDIA_VIDEO_CAPTURE_TIMEOUT_INFINITE for millisecondTimeout. The returned NvMediaVideoSurface must be passed back to the NvMediaVideoCapture object using NvMediaVideoCaptureReleaseFrame() after it has been processed. NvMediaVideoSurface gets NULL if surface capture object does not have sufficient buffers in the internal pool, meaning that too few NvMediaVideoSurface objects have been added to the capture object pool. When NvMediaVideoCaptureGetFrameEx() returns an NVMEDIA_STATUS_OK, that surface is idle and ready for immediate use.
[in] | capture | A pointer to the video capture to be used. |
[in] | millisecondTimeout | Time-out, in milliseconds |
[in,out] | surface | Indirect pointer to a surface that is ready for use. |
NvMediaStatus NvMediaVideoCaptureGetVersion | ( | NvMediaVersion * | version | ) |
Get the version information for the NvMedia VCP library.
[in] | version | A pointer to a NvMediaVersion structure to be filled by the function. |
NvMediaStatus NvMediaVideoCaptureReleaseFrame | ( | NvMediaVideoCapture * | capture, |
NvMediaVideoSurface ** | surface | ||
) |
Gets a frame from the internal pool that user fed with NvMediaVideoCaptureFeedFrame after HW gives up to capture.
This function should be called until getting NVMEDIA_STATUS_ERROR.
[in] | capture | The video capture object to be used. |
[in] | surface | The frame was fed from user but HW gives up to capture. |
void NvMediaVideoCaptureStop | ( | NvMediaVideoCapture * | capture | ) |
Stops a video capture.
[in] | capture | The video capture to be stopped. |