NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.0 Release

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

Detailed Description

The NvMedia ICP NvSciSync API encompasses all NvMediaICP NvSciSync handling functions.

Macros

#define NVMEDIA_ICP_NVSCISYNC_VERSION_MAJOR   1
 Major version number. More...
 
#define NVMEDIA_ICP_NVSCISYNC_VERSION_MINOR   0
 Minor version number. More...
 
#define NVMEDIA_ICP_MAX_PRENVSCISYNCFENCES   (3)
 Maximum number of times NvMediaICPInsertPreNvSciSyncFence() may be called before each NvMediaICPFeedImageGroup call. More...
 

Functions

NvMediaStatus NvMediaICPNvSciSyncGetVersion (NvMediaVersion *version)
 Returns version information for the NvMedia ICP NvSciSync library. More...
 
NvMediaStatus NvMediaICPFillNvSciSyncAttrList (NvMediaICP *icp, NvSciSyncAttrList attrlist, NvMediaNvSciSyncClientType clienttype)
 Fills the NvMediaICP specific NvSciSync attributes. More...
 
NvMediaStatus NvMediaICPRegisterNvSciSyncObj (NvMediaICP *icp, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj syncobj, uint32_t channelId)
 Registers an NvSciSyncObj with NvMediaICP. More...
 
NvMediaStatus NvMediaICPUnregisterNvSciSyncObj (NvMediaICP *icp, NvSciSyncObj syncobj, uint32_t channelId)
 Unregisters an NvSciSyncObj with NvMediaICP. More...
 
NvMediaStatus NvMediaICPSetNvSciSyncObjforEOF (NvMediaICP *icp, NvSciSyncObj nvscisyncEOF, uint32_t channelId)
 Set NvSciSyncObj to be used for a EOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaICPGetEOFNvSciSyncFence (NvMediaICP *icp, const NvSciSyncObj eofnvscisyncobj, uint32_t channelId, NvSciSyncFence *eofnvscisyncfence)
 Gets EOFNvSciSyncFence for a NvMediaICPFeedImageGroup() operation. More...
 
NvMediaStatus NvMediaICPSetNvSciSyncObjforSOF (NvMediaICP *icp, NvSciSyncObj nvscisyncSOF, uint32_t channelId)
 Sets the NvSciSyncObj to be used for a SOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaICPGetSOFNvSciSyncFence (NvMediaICP *icp, const NvSciSyncObj sofnvscisyncobj, uint32_t channelId, NvSciSyncFence *sofnvscisyncfence)
 Gets SOF NvSciSyncFence for an NvMediaFeedImageGroup() operation. More...
 
NvMediaStatus NvMediaICPInsertPreNvSciSyncFence (NvMediaICP *icp, const NvSciSyncFence *prenvscisyncfence, uint32_t channelId)
 Sets an NvSciSyncFence as a prefence for an NvMediaICPFeedImageGroup() operation. More...
 

Macro Definition Documentation

#define NVMEDIA_ICP_MAX_PRENVSCISYNCFENCES   (3)

Maximum number of times NvMediaICPInsertPreNvSciSyncFence() may be called before each NvMediaICPFeedImageGroup call.

Definition at line 44 of file nvmedia_icp_nvscisync.h.

#define NVMEDIA_ICP_NVSCISYNC_VERSION_MAJOR   1

Major version number.

Definition at line 38 of file nvmedia_icp_nvscisync.h.

#define NVMEDIA_ICP_NVSCISYNC_VERSION_MINOR   0

Minor version number.

Definition at line 40 of file nvmedia_icp_nvscisync.h.

Function Documentation

NvMediaStatus NvMediaICPFillNvSciSyncAttrList ( NvMediaICP icp,
NvSciSyncAttrList  attrlist,
NvMediaNvSciSyncClientType  clienttype 
)

Fills the NvMediaICP specific NvSciSync attributes.

This function assumes that attrlist is a valid NvSciSyncAttrList.

This function sets the public attributes:

The application must not set this attribute.

Parameters
[in]icpAn NvMedia ICP device handle.
[out]attrlistA pointer to a structure to be filled with the NvSciSync attributes.
[in]clienttypeIndicates whether attrlist is requested for an NvMediaICP signaler or an NvMediaICP waiter.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that attrlist was NULL, or any of the public attributes listed above were already set.
NVMEDIA_STATUS_OUT_OF_MEMORYindicates that there was not enough memory for the requested operation.
NvMediaStatus NvMediaICPGetEOFNvSciSyncFence ( NvMediaICP icp,
const NvSciSyncObj  eofnvscisyncobj,
uint32_t  channelId,
NvSciSyncFence eofnvscisyncfence 
)

Gets EOFNvSciSyncFence for a NvMediaICPFeedImageGroup() operation.

The EOFNvSciSyncFence associated with an NvMediaICPFeedImageGroup() operation is an NvSciSyncFence. Its expiry indicates that the corresponding frame capture operation has finished. NvMediaICPGetEOFNvSciSyncFence() returns the EOFNvSciSyncFence associated with the last NvMediaICPFeedImageGroup() call. NvMediaICPGetEOFNvSciSyncFence() must be called after NvMediaICPFeedImageGroup(). For example, in the below sequence of code: the last NvMediaICPFeedImageGroup() call. NvMediaICPGetEOFNvSciSyncFence() must be called after an NvMediaICPFeedImageGroup() call. For example, in the below sequence of code,

nvmstatus = NvMediaICPFeedImageGroup(icp, imageGrp, timeout);
nvmstatus = NvMediaICPGetEOFNvSciSyncFence(icp, nvscisyncEOF, eofnvscisyncfence);

expiry of eofnvscisyncfence indicates that the preceding frame capture has finished.

Parameters
[in]icpAn NvMedia ICP device handle.
[in]eofnvscisyncobjEOF NvSciSyncObj associated with the NvSciSyncFence being requested.
[in]channelIdChannel ID for HDR capture.
[out]eofnvscisyncfenceA pointer to eof NvSciSyncFence.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp was not a valid NvMediaICP handle, or that eofnvscisyncfence was NULL.
NVMEDIA_STATUS_ERRORindicates that the function was called before NvMediaICPFeedImageGroup().
NvMediaStatus NvMediaICPGetSOFNvSciSyncFence ( NvMediaICP icp,
const NvSciSyncObj  sofnvscisyncobj,
uint32_t  channelId,
NvSciSyncFence sofnvscisyncfence 
)

Gets SOF NvSciSyncFence for an NvMediaFeedImageGroup() operation.

The SOF NvSciSyncFence associated with an NvMediaICPFeedImageGroup() operation is an NvSciSyncFence. Its expiry indicates that the corresponding frame capture operation has started. NvMediaICPGetSOFNvSciSyncFence() returns the SOFNvSciSyncFence associated with the last NvMediaICPFeedImageGroup() call. You must call NvMediaICPGetSOFNvSciSyncFence() after NvMediaICPFeedImageGroup(). For example, in the below sequence of code:

nvmstatus = NvMediaICPFeedImageGroup(icp, imageGrp, timeout);
nvmstatus = NvMediaICPGetSOFNvSciSyncFence(icp, nvscisyncSOF, sofnvscisyncfence);

expiry of sofnvscisyncfence indicates that the preceding camera capture operation has started.

Parameters
[in]icpAn NvMedia ICP device handle.
[in]sofnvscisyncobjThe SOF NvSciSyncObj associated with the NvSciSyncFence that is being requested.
[in]channelIdThe channel ID for HDR capture.
[out]sofnvscisyncfenceA pointer to an NvSciSyncFence where SOFfence will be stored.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp is not a valid NvMediaICP handle, sofnvscisyncfence was NULL, or sofnvscisyncobj was not registered with icp as type NVMEDIA_SOFSYNCOBJ or type NVMEDIA_SOF_PRESYNCOBJ.
NVMEDIA_STATUS_ERRORindicates that this function was called before NvMediaICPFeedImageGroup().
NvMediaStatus NvMediaICPInsertPreNvSciSyncFence ( NvMediaICP icp,
const NvSciSyncFence prenvscisyncfence,
uint32_t  channelId 
)

Sets an NvSciSyncFence as a prefence for an NvMediaICPFeedImageGroup() operation.

NvMediaICPInsertPreNvSciSyncFence() must be called before NvMediaICPFeedImageGroup() is called. The following capture operation is assured to be started only after the expiry of the prenvscisyncfence. For example, in the below sequence of code:

nvmstatus = NvMediaICPInsertPreNvSciSyncFence(icp, prenvscisyncfence);
nvmstatus = NvMediaICPFeedImageGroup(icp, imageGrp, timeout);

The image capture operation may start only after the expiry of prenvscisyncfence.

You can set a maximum of NVMEDIA_ICP_MAX_PRENVSCISYNCFENCES prefences by calling NvMediaICPInsertPreNvSciSyncFence() before calling NvMediaICPFeedImageGroup(). After the call to NvMediaICPFeedImageGroup(), all of the NvSciSyncFence objects previously inserted by NvMediaICPInsertPreNvSciSyncFence() are removed, and are not reused for the subsequent NvMediaICPFeedImageGroup() calls.

Parameters
[in]icpNvMedia ICP device handle.
[in]prenvscisyncfenceA pointer to NvSciSyncFence.
[in]channelIdChannel ID for HDR capture.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp was not a valid NvMediaICP handle, or that prenvscisyncfence was NULL.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that NvMediaICPInsertPreNvSciSyncFence() has already been called NVMEDIA_ICP_MAX_PRENVSCISYNCFENCES or more times with the same NvMediaICP handle before a call to NvMediaICPFeedImageGroup().
NvMediaStatus NvMediaICPNvSciSyncGetVersion ( NvMediaVersion version)

Returns version information for the NvMedia ICP NvSciSync library.

Parameters
[out]versionA pointer to a structure to be filled with version information.
Returns
A status code; NVMEDIA_STATUS_OK if the call was successful, or NVMEDIA_STATUS_BAD_PARAMETER if version was invalid.
NvMediaStatus NvMediaICPRegisterNvSciSyncObj ( NvMediaICP icp,
NvMediaNvSciSyncObjType  syncobjtype,
NvSciSyncObj  syncobj,
uint32_t  channelId 
)

Registers an NvSciSyncObj with NvMediaICP.

Every NvSciSyncObj used by NvMediaICP (including duplicate objects) must be registered in advance by a call to this function. Only the exact same registered NvSciSyncObj can be used as an argument in NvMediaICPSetNvSciSyncObjforEOF(), NvMediaICPGetEOFNvSciSyncFence(), and NvMediaICPUnregisterNvSciSyncObj(). One NvSciSyncObj can be registered as only one NvMediaNvSciSyncObjType (see nvmedia_core.h) for a given NvMediaICP handle. A maximum of 16 NvSciSyncObj objects can be registered for each NvMediaSciSyncObjType.

Parameters
[in]icpAn NvMedia ICP device handle.
[in]syncobjtypeSpecifies how syncobj is to be used by ICP.
[in]syncobjAn NvSciSyncObj to be registered with ICP.
[in]channelIdChannel ID for HDR capture.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp was NULL, or syncobjtype was not a valid NvMediaSciSyncObjType.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that syncobj was not a compatible NvSciSyncObj which NvMediaICP could support.
NVMEDIA_STATUS_ERRORindicates that the maximum allowed number of NvSciScynObj objects were already registered for the given syncobjtype, or that syncobj was already registered with the same ICP handle for a different syncobjtype.
NvMediaStatus NvMediaICPSetNvSciSyncObjforEOF ( NvMediaICP icp,
NvSciSyncObj  nvscisyncEOF,
uint32_t  channelId 
)

Set NvSciSyncObj to be used for a EOF NvSciSyncFence.

To use NvMediaICPGetEOFNvSciSyncFence(), the application must call NvMediaICPSetNvSciSyncObjforEOF() before NvMediaICPFeedImageGroup().

This function currently may be called only once before each call to NvMediaICPFeedImageGroup(). The application may choose to call this function only once before the first call to NvMediaICPFeedImageGroup().

Parameters
[in]icpAn NvMediaICP device handle.
[in]nvscisyncEOFA preregistered NvSciSyncObj to be associated with EOF NvSciSyncFence.
[in]channelIdA channel ID for HDR capture.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp was NULL, or that nvscisyncEOF was not registered with ICP as either type NVMEDIA_EOFSYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ.
NvMediaStatus NvMediaICPSetNvSciSyncObjforSOF ( NvMediaICP icp,
NvSciSyncObj  nvscisyncSOF,
uint32_t  channelId 
)

Sets the NvSciSyncObj to be used for a SOF NvSciSyncFence.

To use NvMediaICPGetSOFNvSciSyncFence(), the application must call this function before calling NvMediaICPFeedImageGroup().

This function currently may be called only once before a call to NvMediaICPFeedImageGroup(). The application may call this function only once before the first call to NvMediaICPFeedImageGroup().

Parameters
[in]icpAn NvMedia ICP device handle.
[in]nvscisyncSOFA preregistered NvSciSyncObj to be associated with SOFfence.
[in]channelIdChannel ID for HDR capture.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp was NULL, or that nvscisyncSOF was not registered with ICP as either type NVMEDIA_SOFSYNCOBJ or type NVMEDIA_SOF_PRESYNCOBJ.
NvMediaStatus NvMediaICPUnregisterNvSciSyncObj ( NvMediaICP icp,
NvSciSyncObj  syncobj,
uint32_t  channelId 
)

Unregisters an NvSciSyncObj with NvMediaICP.

Every NvSciSyncObj registered with NvMediaICP must be unregistered before you call NvMediaICPDestroy(). Before the application calls this function, it must ensure that the NvMediaICPGetImageGroup operation which uses the NvSciSyncObj being unregistered has completed. If this function is called while the NvSciSyncObj is still in use by an ICP operation, the result is undefined.

Parameters
[in]icpAn NvMedia ICP device handle.
[in]syncobjAn NvSciSyncObj to be unregistered with ICP.
[in]channelIdA channel ID for HDR capture.
Return values
NVMEDIA_STATUS_OKindicates that the call was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that icp was NULL, or that syncobj was not registered.
NVMEDIA_STATUS_ERRORindicates that icp has been destroyed.