NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Image Capture

Detailed Description

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   8
 Minor Version number. More...
 
#define NVMEDIA_IMAGE_CAPTURE_TIMEOUT_INFINITE
 Defines an infinite time-out for NvMediaICPGetFrameEx. More...
 
#define NVMEDIA_ICP_MAX_VIRTUAL_GROUPS   4u
 Defines the maximum number of virtual groups. More...
 
#define NVMEDIA_ICP_MAX_VIRTUAL_CHANNELS   3u
 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_,
 Defines a macro that creates an enumerator in enum NvMediaICPErrorStatus. More...
 

Typedefs

typedef void NvMediaICP
 Image capture object per virtual group. More...
 

Enumerations

enum  NvMediaICPInterfaceType {
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_A,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_B,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_C,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_D,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_CD,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_E,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_F,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_EF,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_G,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_H,
  NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_GH
}
 Determines the image capture interface type for CSI interface. More...
 
enum  NvMediaICPInputFormatType {
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_YUV422,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_YUV422_10,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_YUV444,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RGB888,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW6,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW7,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW8,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW10,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW14,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW16,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW20,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_1,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_2,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_3,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_4,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_5,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_6,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_7,
  NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_8
}
 Determines the image capture input format type. More...
 
enum  NvMediaICPCsiPhyMode {
  NVMEDIA_ICP_CSI_DPHY_MODE = 0,
  NVMEDIA_ICP_CSI_CPHY_MODE
}
 Specifies CSI phy mode. More...
 
enum  NvMediaICPErrorStatus
 Defines codes that describe error status. More...
 

Functions

NvMediaStatus NvMediaICPGetVersion (NvMediaVersion *version)
 Checks the version compatibility for the NvMedia ICP library. More...
 
NvMediaICPExNvMediaICPCreateEx (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...
 
NvMediaStatus NvMediaICPWaitForSoF (NvMediaICP *icp)
 Waits for next SoF(Start of Frame). More...
 

Macro Definition Documentation

#define NVMEDIA_ICP_ERROR (   _type_,
  _error_,
  _value_,
  _desc_ 
)    NVMEDIA_ICP_##_type_##_ERROR_##_error_ = _value_,

Defines a macro that creates an enumerator in enum NvMediaICPErrorStatus.

Parameters
_type_The hardware module that originated the error: CSI or VI.
_error_A symbolic code that represents the error; used to construct the enumerator's symbol.
_value_A numeric value that represents the error.
_desc_A string that describes the error.

Definition at line 81 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.

Parameters
[in]icpExThe NvMediaICPEx handler returned from NvMediaICPCreateEx.
[in]groupIdxThe index of the capture group instance.

Definition at line 62 of file nvmedia_icp.h.

#define NVMEDIA_ICP_MAX_VIRTUAL_CHANNELS   3u

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   4u

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.

Parameters
[in]icpSettingsExNvMediaICPSettingsEx object passed to NvMediaICPCreateEx.
[in]groupIdxThe index of the capture group instance.
[in]vcIdxThe 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   8

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 Documentation

typedef void NvMediaICP

Image capture object per virtual group.

Definition at line 251 of file nvmedia_icp.h.

Enumeration Type Documentation

Specifies CSI phy mode.

Enumerator
NVMEDIA_ICP_CSI_DPHY_MODE 
NVMEDIA_ICP_CSI_CPHY_MODE 

Definition at line 174 of file nvmedia_icp.h.

Defines codes that describe error status.

Enumerators are defined by the NVMEDIA_ICP_ERROR macro. In the following table, Module, Type, and Code are parameters of macro. For example:

%NVMEDIA_ICP_ERROR(CSI, FS_FAULT, 0x0001, "A frame start occurred before previous frame end")


Module Type Code Manifest Constant Description
n/a NONE 0x000 NVMEDIA_ICP_CAPTURE_ERROR_NONE No error occurred, or error could not be translated.
CSI mux
frame errors
CSI FS_FAULT 0x001 NVMEDIA_ICP_CSI_ERROR_FS_FAULT Frame start occurred before previous frame end.
CSI FE_CSI_FAULT 0x002 NVMEDIA_ICP_CSI_ERROR_FE_CSI_FAULT NVCSI fault received at frame end.
CSI FE_FRAMEID_FAULT 0x003 NVMEDIA_ICP_CSI_ERROR_FE_FRAMEID_FAULT Frame ID for FE packet does not match that of FS packet.
CSI FE_FORCED_FAULT 0x004 NVMEDIA_ICP_CSI_ERROR_FE_FORCED_FAULT Frame end was injected by the CSI hardware.
CSI PXL_ENABLE_FAULT 0x005 NVMEDIA_ICP_CSI_ERROR_PXL_ENABLE_FAULT Illegal pixel encoding detected.
VI channel
selection faults
VI SHORT_FRAME 0x010 NVMEDIA_ICP_VI_ERROR_SHORT_FRAME FE packet arrived before the normal number of pixels appeared.
VI FAULT_FE 0x011 NVMEDIA_ICP_VI_ERROR_FAULT_FE Data specific fault occurred on a channel.
VI PXL_MISSING_LE 0x100 NVMEDIA_ICP_VI_ERROR_PXL_MISSING_LE Two LS packets detected without an LE packet between them.
VI PXL_RUNAWAY 0x101 NVMEDIA_ICP_VI_ERROR_PXL_RUNAWAY More lines received than expected.
VI PXL_SPURIOUS 0x102 NVMEDIA_ICP_VI_ERROR_PXL_SPURIOUS Pixel data packet was received without an LS packet first.
VI PXL_LONG_LINE 0x103 NVMEDIA_ICP_VI_ERROR_PXL_LONG_LINE More pixels received than expected in a line.
VI PXL_SHORT_LINE 0x104 NVMEDIA_ICP_VI_ERROR_PXL_SHORT_LINE Fewer pixels received than expected in a line.
VI EMB_MISSING_LE 0x105 NVMEDIA_ICP_VI_ERROR_EMB_MISSING_LE Two LS packets detected without an LE packet between them in emb data.
VI EMB_RUNAWAY 0x106 NVMEDIA_ICP_VI_ERROR_EMB_RUNAWAY More lines received than expected in emb data.
VI EMB_SPURIOUS 0x107 NVMEDIA_ICP_VI_ERROR_EMB_SPURIOUS Pixel data packet received without an LS packet first in emb data.
VI EMB_LONG_LINE 0x108 NVMEDIA_ICP_VI_ERROR_EMB_LONG_LINE More pixels received than expected in a line in emb data.
VI EMB_INFRINGE 0x109 NVMEDIA_ICP_VI_ERROR_EMB_INFRINGE Embedded data received on a frame where no embedded data was expected.
VI DTYPE_MISMATCH 0x10A NVMEDIA_ICP_VI_ERROR_DTYPE_MISMATCH Pixel datatype changed in the middle of a line.

Definition at line 302 of file nvmedia_icp.h.

Determines the image capture input format type.

Enumerator
NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_YUV422 

Input format type : YUV 4:2:2 8bits.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_YUV422_10 

Input format type : YUV 4:2:2 10bits.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_YUV444 

Input format type : YUV 4:4:4.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RGB888 

Input format type : RGBA.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW6 

Input format type: RAW 6.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW7 

Input format type: RAW 7.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW8 

Input format type: RAW 8.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW10 

Input format type: RAW 10.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW12 

Input format type: RAW 12.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW14 

Input format type: RAW 14.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW16 

Input format type: RAW 16.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_RAW20 

Input format type: RAW 20.

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_1 

Input format type : User defined 1 (0x30)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_2 

Input format type : User defined 2 (0x31)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_3 

Input format type : User defined 3 (0x32)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_4 

Input format type : User defined 4 (0x33)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_5 

Input format type : User defined 5 (0x34)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_6 

Input format type : User defined 6 (0x35)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_7 

Input format type : User defined 7 (0x36)

NVMEDIA_IMAGE_CAPTURE_INPUT_FORMAT_TYPE_USER_DEFINED_8 

Input format type : User defined 8 (0x37)

Definition at line 117 of file nvmedia_icp.h.

Determines the image capture interface type for CSI interface.

Enumerator
NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_A 

Interface: CSI, port: A.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_B 

Interface: CSI, port: B.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_AB 

Interface: CSI, port: AB.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_C 

Interface: CSI, port: C.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_D 

Interface: CSI, port: D.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_CD 

Interface: CSI, port: CD.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_E 

Interface: CSI, port: E.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_F 

Interface: CSI, port: F.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_EF 

Interface: CSI, port: EF.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_G 

Interface: CSI, port: G.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_H 

Interface: CSI, port: H.

NVMEDIA_IMAGE_CAPTURE_CSI_INTERFACE_TYPE_CSI_GH 

Interface: CSI, port: GH.

Definition at line 87 of file nvmedia_icp.h.

Function Documentation

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:

void NvMediaICPDestroyEx ( NvMediaICPEx icpEx)

Destroys the image capture object created by NvMediaICPCreateEx.

Parameters
[in]icpExA pointer to the image capture object to be destroyed.
Returns
void
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.

Parameters
[in]icpA pointer to the image capture object to be used.
[in]imageThe image to be added to the pool.
[in]millisecondTimeoutTime-out in milliseconds
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_ERROR
NVMEDIA_STATUS_TIMED_OUT
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.

Parameters
[in]icpThe image capture object to be used.
[in]imageGrpThe NvMedia image group to be added to the pool.
[in]millisecondTimeoutTime-out in milliseconds
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_ERROR
NVMEDIA_STATUS_TIMED_OUT
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.

Parameters
[in]icpA pointer to the image capture object to be used.
[in]icpErrorInfoA 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
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK if info is populated and can be read
NVMEDIA_STATUS_BAD_PARAMETER if icp or icpErrorInfo is NULL
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.

Parameters
[in]icpA pointer to the image capture object to be used.
[in]millisecondTimeoutTime-out in milliseconds
[in,out]imageThe image is ready for use.
Returns
NvMediaStatus The completion status of the operation.
NVMEDIA_STATUS_OK : image has valid value, it is good to use.
NVMEDIA_STATUS_NONE_PENDING : image is NULL, there is no fed frame, internel pool is empty.
NVMEDIA_STATUS_TIMED_OUT : image is NULL, the frame is not ready for use.
NVMEDIA_STATUS_ERROR : image is NULL, HW gives up to capture anymore. Please remove the frames from pool with NvMediaICPReleaseFrame().
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.

Parameters
[in]icpA pointer to the image capture object to be used.
[in]millisecondTimeoutTime-out in milliseconds.
[in,out]imageGrpAn indirect pointer to the NvMedia image group that is ready for use.
Returns
NvMediaStatus Completion status of the operation.
NVMEDIA_STATUS_OK : image has valid value, it is good to use.
NVMEDIA_STATUS_NONE_PENDING : image is NULL, there is no fed frame, internel pool is empty.
NVMEDIA_STATUS_TIMED_OUT : image is NULL, the frame is not ready for use.
NVMEDIA_STATUS_ERROR : image is NULL, HW gives up to capture anymore.
NvMediaStatus NvMediaICPGetVersion ( NvMediaVersion version)

Checks the version compatibility for the NvMedia ICP library.

Parameters
[in]versionA pointer to a NvMediaVersion structure of the client.
Returns
NvMediaStatus The status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if the pointer is invalid.
NVMEDIA_STATUS_INCOMPATIBLE_VERSION if the client version does not match with the core version.
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.

Parameters
[in]icpA pointer to the image capture object to be used.
[in,out]imageImage that the caller provided but on which the HW gave up trying to capture.
Returns
NvMediaStatus Completion status of the operation.
NVMEDIA_STATUS_OK : returning the frame that user fed.
NVMEDIA_STATUS_ERROR : error while returning the frame.
NVMEDIA_STATUS_NONE_PENDING : nothing to return.
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.

Parameters
[in]icpA pointer to the image capture object to be used.
[in,out]imageGrpThe image group was fed from user but HW gives up to capture.
Returns
NvMediaStatus The completion status of the operation.
NVMEDIA_STATUS_OK : returning the image group that user fed.
NVMEDIA_STATUS_ERROR : error while returning the image group.
NVMEDIA_STATUS_NONE_PENDING : nothing to return.
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().

Parameters
[in]icpA pointer to the image capture object to be used.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if icp is NULL
NVMEDIA_STATUS_ERROR if the capture engine hasn't stopped.
NvMediaStatus NvMediaICPStop ( NvMediaICP icp)

Stops the image capture.

This function stops the HW engine from capturing the image. To restart image capture:

  1. Call NvMediaICPReleaseFrame().
  2. Call NvMediaICPResume().
Parameters
[in]icpA pointer to the image capture object to be used.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK
NVMEDIA_STATUS_BAD_PARAMETER if icp is NULL
NVMEDIA_STATUS_ERROR if the image capture pool is not empty yet.
NvMediaStatus NvMediaICPWaitForSoF ( NvMediaICP icp)

Waits for next SoF(Start of Frame).

This function blocks until the next SoF event is received. This function works only if the capture pool is not empty. If the pool is empty NVMEDIA_STATUS_NONE_PENDING error is returned.

Parameters
[in]icpA pointer to the image capture object to be used.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NVMEDIA_STATUS_OK : if upcoming SoF is received.
NVMEDIA_STATUS_BAD_PARAMETER : if icp is NULL.
NVMEDIA_STATUS_NONE_PENDING : if there is no fed frame, so the internal capture pool is empty.
NVMEDIA_STATUS_ERROR : error while waiting for SoF excluding the above error cases.