![]() |
NVIDIA DRIVE 5.0 Linux SDK API Reference5.0.10.3 Release |
Captures uncompressed image data, writing the results to an NvMediaImage.
A specific NvMedia implementation may support capturing multiple types of uncompressed image data. However, NvMediaICP objects are able to capture a specific type of uncompressed image data. This type must be specified during creation.
Data Structures | |
struct | NvMediaICPInputFormat |
Capture input format. More... | |
struct | NvMediaICPSettings |
Holds image capture settings for the CSI format. More... | |
struct | NvMediaICPSettingsEx |
Holds the image capture settings for the CSI format. More... | |
struct | NvMediaICPEx |
Holds the image capture object created by NvMediaICPCreateEx. More... | |
struct | NvMediaICPErrorInfo |
Holds the capture error information populated by NvMediaICPGetErrorInfo. More... | |
Macros | |
#define | NVMEDIA_ICP_VERSION_MAJOR 4 |
Major Version number. More... | |
#define | NVMEDIA_ICP_VERSION_MINOR 7 |
Minor Version number. More... | |
#define | NVMEDIA_IMAGE_CAPTURE_TIMEOUT_INFINITE |
Defines an infinite time-out for NvMediaICPGetFrameEx. More... | |
#define | NVMEDIA_ICP_MAX_VIRTUAL_GROUPS 4 |
Defines the maximum number of virtual groups. More... | |
#define | NVMEDIA_ICP_MAX_VIRTUAL_CHANNELS 3 |
Defines the maximum number of virtual channels per virtual group. More... | |
#define | NVMEDIA_ICP_HANDLER(icpEx, groupIdx) (icpEx->icp[groupIdx].hIcp) |
Defines a macro that gets NvMediaICP handler from NvMediaICPEx handler. More... | |
#define | NVMEDIA_ICP_SETTINGS_HANDLER(icpSettingsEx, groupIdx, vcIdx) (&icpSettingsEx.virtualGroups[groupIdx].virtualChannels[vcIdx].icpSettings) |
Defines a macro that gets the NvMediaICPSettings handler from the NvMediaICPSettingsEx object. More... | |
#define | NVMEDIA_ICP_ERROR(_type_, _error_, _value_, _desc_) NVMEDIA_ICP_##_type_##_ERROR_##_error_ = _value_, |
Typedefs | |
typedef void | NvMediaICP |
Image capture object per virtual group. More... | |
Functions | |
NvMediaStatus | NvMediaICPGetVersion (NvMediaVersion *version) |
Checks the version compatibility for the NvMedia ICP library. More... | |
NvMediaICPEx * | NvMediaICPCreateEx (NvMediaICPSettingsEx *settings) |
Creates an image capture object used to capture various formats of input into an NvMediaImage. More... | |
void | NvMediaICPDestroyEx (NvMediaICPEx *icpEx) |
Destroys the image capture object created by NvMediaICPCreateEx. More... | |
NvMediaStatus | NvMediaICPFeedFrame (NvMediaICP *icp, NvMediaImage *image, uint32_t millisecondTimeout) |
Adds an image to the image capture pool. More... | |
NvMediaStatus | NvMediaICPFeedImageGroup (NvMediaICP *icp, NvMediaImageGroup *imageGrp, unsigned int millisecondTimeout) |
Adds an image group to the image capture pool. More... | |
NvMediaStatus | NvMediaICPStop (NvMediaICP *icp) |
Stops the image capture. More... | |
NvMediaStatus | NvMediaICPResume (NvMediaICP *icp) |
Resumes the image capture. More... | |
NvMediaStatus | NvMediaICPGetFrameEx (NvMediaICP *icp, uint32_t millisecondTimeout, NvMediaImage **image) |
Gets a captured frame with frame status. More... | |
NvMediaStatus | NvMediaICPGetImageGroup (NvMediaICP *icp, uint32_t millisecondTimeout, NvMediaImageGroup **imageGrp) |
Gets a captured image group with frame status. More... | |
NvMediaStatus | NvMediaICPReleaseFrame (NvMediaICP *icp, NvMediaImage **image) |
Gets a frame from the internal pool that the client previously supplied with NvMediaICPFeedFrame(). More... | |
NvMediaStatus | NvMediaICPReleaseImageGroup (NvMediaICP *icp, NvMediaImageGroup **imageGrp) |
Gets an image group from the internal pool that the client previously supplied with NvMediaICPFeedImageGroup(). More... | |
NvMediaStatus | NvMediaICPGetErrorInfo (NvMediaICP *icp, NvMediaICPErrorInfo *icpErrorInfo) |
Gets the capture error information. More... | |
#define NVMEDIA_ICP_ERROR | ( | _type_, | |
_error_, | |||
_value_, | |||
_desc_ | |||
) | NVMEDIA_ICP_##_type_##_ERROR_##_error_ = _value_, |
Definition at line 73 of file nvmedia_icp.h.
#define NVMEDIA_ICP_HANDLER | ( | icpEx, | |
groupIdx | |||
) | (icpEx->icp[groupIdx].hIcp) |
Defines a macro that gets NvMediaICP handler from NvMediaICPEx handler.
[in] | icpEx | The NvMediaICPEx handler returned from NvMediaICPCreateEx. |
[in] | groupIdx | The index of the capture group instance. |
Definition at line 62 of file nvmedia_icp.h.
#define NVMEDIA_ICP_MAX_VIRTUAL_CHANNELS 3 |
Defines the maximum number of virtual channels per virtual group.
Definition at line 56 of file nvmedia_icp.h.
#define NVMEDIA_ICP_MAX_VIRTUAL_GROUPS 4 |
Defines the maximum number of virtual groups.
Definition at line 53 of file nvmedia_icp.h.
#define NVMEDIA_ICP_SETTINGS_HANDLER | ( | icpSettingsEx, | |
groupIdx, | |||
vcIdx | |||
) | (&icpSettingsEx.virtualGroups[groupIdx].virtualChannels[vcIdx].icpSettings) |
Defines a macro that gets the NvMediaICPSettings handler from the NvMediaICPSettingsEx object.
[in] | icpSettingsEx | NvMediaICPSettingsEx object passed to NvMediaICPCreateEx. |
[in] | groupIdx | The index of the capture group instance. |
[in] | vcIdx | The index of the capture virtual channel instance. |
Definition at line 70 of file nvmedia_icp.h.
#define NVMEDIA_ICP_VERSION_MAJOR 4 |
Major Version number.
Definition at line 42 of file nvmedia_icp.h.
#define NVMEDIA_ICP_VERSION_MINOR 7 |
Minor Version number.
Definition at line 44 of file nvmedia_icp.h.
#define NVMEDIA_IMAGE_CAPTURE_TIMEOUT_INFINITE |
Defines an infinite time-out for NvMediaICPGetFrameEx.
Definition at line 50 of file nvmedia_icp.h.
typedef void NvMediaICP |
Image capture object per virtual group.
Definition at line 243 of file nvmedia_icp.h.
enum NvMediaICPCsiPhyMode |
Specifies CSI phy mode.
Enumerator | |
---|---|
NVMEDIA_ICP_CSI_DPHY_MODE | |
NVMEDIA_ICP_CSI_CPHY_MODE |
Definition at line 166 of file nvmedia_icp.h.
Capture error status.
Definition at line 262 of file nvmedia_icp.h.
Determines the image capture input format type.
Definition at line 109 of file nvmedia_icp.h.
Determines the image capture interface type for CSI interface.
Definition at line 79 of file nvmedia_icp.h.
NvMediaICPEx* NvMediaICPCreateEx | ( | NvMediaICPSettingsEx * | settings | ) |
Creates an image capture object used to capture various formats of input into an NvMediaImage.
The supported surfaces must be obtained by NvMediaSurfaceFormatGetType() with:
[in] | settings | A pointer to the settings for the capture. |
void NvMediaICPDestroyEx | ( | NvMediaICPEx * | icpEx | ) |
Destroys the image capture object created by NvMediaICPCreateEx.
[in] | icpEx | A pointer to the image capture object to be destroyed. |
NvMediaStatus NvMediaICPFeedFrame | ( | NvMediaICP * | icp, |
NvMediaImage * | image, | ||
uint32_t | millisecondTimeout | ||
) |
Adds an image to the image capture pool.
The pool size is determined by NVMEDIA_MAX_CAPTURE_FRAME_BUFFERS.
[in] | icp | A pointer to the image capture object to be used. |
[in] | image | The image to be added to the pool. |
[in] | millisecondTimeout | Time-out in milliseconds |
NvMediaStatus NvMediaICPFeedImageGroup | ( | NvMediaICP * | icp, |
NvMediaImageGroup * | imageGrp, | ||
unsigned int | millisecondTimeout | ||
) |
Adds an image group to the image capture pool.
The pool size is determined by NVMEDIA_MAX_CAPTURE_FRAME_BUFFERS.
[in] | icp | The image capture object to be used. |
[in] | imageGrp | The NvMedia image group to be added to the pool. |
[in] | millisecondTimeout | Time-out in milliseconds |
NvMediaStatus NvMediaICPGetErrorInfo | ( | NvMediaICP * | icp, |
NvMediaICPErrorInfo * | icpErrorInfo | ||
) |
Gets the capture error information.
This function provides the capture error details such as CSI stream ID, frame ID and error status. You can use this information to determine a suitable response to a CSI capture error.
[in] | icp | A pointer to the image capture object to be used. |
[in] | icpErrorInfo | A pointer to the structure where information is to be filled. The info structure will not provide a meaningful value unless the retuned status is NVMEDIA_STATUS_OK |
NvMediaStatus NvMediaICPGetFrameEx | ( | NvMediaICP * | icp, |
uint32_t | millisecondTimeout, | ||
NvMediaImage ** | image | ||
) |
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_IMAGE_CAPTURE_TIMEOUT_INFINITE for millisecondTimeout. The returned NvMediaImage should be passed back to the NvMediaICP object using NvMediaICPFeedFrame after it has been processed if more image capture are required. NvMediaImage gets NULL if image capture object does not have sufficient buffers in the internal pool, meaning that too few NvMediaImage have been added to the capture object pool. When NvMediaICPGetFrameEx returns an NvMediaImage, that image is idle and ready for immediate use.
[in] | icp | A pointer to the image capture object to be used. |
[in] | millisecondTimeout | Time-out in milliseconds |
[in,out] | image | The image is ready for use. |
NvMediaStatus NvMediaICPGetImageGroup | ( | NvMediaICP * | icp, |
uint32_t | millisecondTimeout, | ||
NvMediaImageGroup ** | imageGrp | ||
) |
Gets a captured image group 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_IMAGE_CAPTURE_TIMEOUT_INFINITE for millisecondTimeout.
[in] | icp | A pointer to the image capture object to be used. |
[in] | millisecondTimeout | Time-out in milliseconds. |
[in,out] | imageGrp | An indirect pointer to the NvMedia image group that is ready for use. |
NvMediaStatus NvMediaICPGetVersion | ( | NvMediaVersion * | version | ) |
Checks the version compatibility for the NvMedia ICP library.
[in] | version | A pointer to a NvMediaVersion structure of the client. |
NvMediaStatus NvMediaICPReleaseFrame | ( | NvMediaICP * | icp, |
NvMediaImage ** | image | ||
) |
Gets a frame from the internal pool that the client previously supplied with NvMediaICPFeedFrame().
Call this function after the HW gives up on the capture. This function must be repeatedly called until it returns NVMEDIA_STATUS_ERROR or NVMEDIA_STATUS_NONE_PENDING.
[in] | icp | A pointer to the image capture object to be used. |
[in,out] | image | Image that the caller provided but on which the HW gave up trying to capture. |
NvMediaStatus NvMediaICPReleaseImageGroup | ( | NvMediaICP * | icp, |
NvMediaImageGroup ** | imageGrp | ||
) |
Gets an image group from the internal pool that the client previously supplied with NvMediaICPFeedImageGroup().
Call this function after the HW gives up on the capture. This function must be repeatedly called until it returns NVMEDIA_STATUS_ERROR.
[in] | icp | A pointer to the image capture object to be used. |
[in,out] | imageGrp | The image group was fed from user but HW gives up to capture. |
NvMediaStatus NvMediaICPResume | ( | NvMediaICP * | icp | ) |
Resumes the image capture.
This function resumes the capture process on the HW engine. This function returns NVMEDIA_STATUS_ERROR if the capture had not previously been stopped with NvMediaICPStop().
[in] | icp | A pointer to the image capture object to be used. |
NvMediaStatus NvMediaICPStop | ( | NvMediaICP * | icp | ) |
Stops the image capture.
This function stops the HW engine from capturing the image. To restart image capture:
[in] | icp | A pointer to the image capture object to be used. |