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
Lens Distortion Correction Synchronization

Detailed Description

The NvMedia LDC NvSciSync API encompasses all NvMediaLDC NvSciSync handling functions.

Macros

#define NVMEDIA_LDC_NVSCISYNC_VERSION_MAJOR   1
 Major version number. More...
 
#define NVMEDIA_LDC_NVSCISYNC_VERSION_MINOR   0
 Minor version number. More...
 
#define NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES   (3)
 Maximum number of times NvMediaLDCInsertPreNvSciSyncFence() can be called before each NvMediaLDCProcess() call. More...
 

Functions

NvMediaStatus NvMediaLDCNvSciSyncGetVersion (NvMediaVersion *version)
 Gets version information for the NvMedia LDC NvSciSync library. More...
 
NvMediaStatus NvMediaLDCFillNvSciSyncAttrList (NvMediaLDC *ldc, NvSciSyncAttrList attrlist, NvMediaNvSciSyncClientType clienttype)
 Gets NvMediaLDC specific NvSciSync attributes. More...
 
NvMediaStatus NvMediaLDCRegisterNvSciSyncObj (NvMediaLDC *ldc, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj nvscisync)
 Registers an NvSciSyncObj with NvMediaLDC. More...
 
NvMediaStatus NvMediaLDCUnregisterNvSciSyncObj (NvMediaLDC *ldc, NvSciSyncObj nvscisync)
 Unregisters an NvSciSyncObj with NvMediaLDC. More...
 
NvMediaStatus NvMediaLDCSetNvSciSyncObjforEOF (NvMediaLDC *ldc, NvSciSyncObj nvscisyncEOF)
 Sets an NvSciSyncObj to be used for a EOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaLDCInsertPreNvSciSyncFence (NvMediaLDC *ldc, const NvSciSyncFence *prenvscisyncfence)
 Sets an NvSciSyncFence as a prefence for an NvMediaLDCProcess() operation. More...
 
NvMediaStatus NvMediaLDCGetEOFNvSciSyncFence (NvMediaLDC *ldc, NvSciSyncObj eofnvscisyncobj, NvSciSyncFence *eofnvscisyncfence)
 Get EOF NvSciSyncFence for an NvMediaLDCProcess() operation. More...
 

Macro Definition Documentation

#define NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES   (3)

Maximum number of times NvMediaLDCInsertPreNvSciSyncFence() can be called before each NvMediaLDCProcess() call.

Definition at line 46 of file nvmedia_ldc_nvscisync.h.

#define NVMEDIA_LDC_NVSCISYNC_VERSION_MAJOR   1

Major version number.

Definition at line 38 of file nvmedia_ldc_nvscisync.h.

#define NVMEDIA_LDC_NVSCISYNC_VERSION_MINOR   0

Minor version number.

Definition at line 40 of file nvmedia_ldc_nvscisync.h.

Function Documentation

NvMediaStatus NvMediaLDCFillNvSciSyncAttrList ( NvMediaLDC ldc,
NvSciSyncAttrList  attrlist,
NvMediaNvSciSyncClientType  clienttype 
)

Gets NvMediaLDC specific NvSciSync attributes.

This function sets the following public attributes:

The application must not set this attribute.

Parameters
[in]ldcAn NvMedia LDC device handle.
[out]attrlistA pointer to a structure where NvSciSync attributes are to be placed.
[in]clienttypeIndicates whether the attributes in attrlist are requested for an NvMediaLDC signaler or a waiter.
Return values
NVMEDIA_STATUS_OKindicates that the operation 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 is not enough memory to perform the requested operation.
NvMediaStatus NvMediaLDCGetEOFNvSciSyncFence ( NvMediaLDC ldc,
NvSciSyncObj  eofnvscisyncobj,
NvSciSyncFence eofnvscisyncfence 
)

Get EOF NvSciSyncFence for an NvMediaLDCProcess() operation.

The EOF NvSciSyncFence associated with an NvMediaLDCBlit() operation is an NvSciSyncFence, and its expiry indicates that the corresponding NvMediaLDCBlit() operation has finished. NvMediaLDCGetEOFNvSciSyncFence() returns the EOF NvSciSyncFence associated with the last NvMediaLDCProcess() call.

If you use NvMediaLDCGetEOFNvSciSyncFence(), you must be call it after calling NvMediaLDCProcess().

For example, in this sequence of code:

nvmstatus = NvMediaLDCProcess(nvmldchdl, ...);
nvmstatus = NvMediaLDCGetEOFNvSciSyncFence(nvmldchdl, nvscisyncEOF, eofnvscisyncfence);

expiry of eofnvscisyncfence indicates that the preceding NvMediaLDCBlit() operation has finished.

Parameters
[in]ldcAn NvMedia LDC device handle.
[in]eofnvscisyncobjAn EOF NvSciSyncObj associated with the NvSciSyncFence being requested.
[out]eofnvscisyncfenceA pointer to an EOF NvSciSyncFence.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that ldc was not a valid LDC handle, eofnvscisyncfence was NULL, or eofnvscisyncobj was not registered with LDC as type NVMEDIA_EOFSYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ type.
NVMEDIA_STATUS_ERRORindicates that this function was called before NvMediaLDCProcess() was called.
NvMediaStatus NvMediaLDCInsertPreNvSciSyncFence ( NvMediaLDC ldc,
const NvSciSyncFence prenvscisyncfence 
)

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

If you use NvMediaLDCInsertPreNvSciSyncFence(), you must call it before calling NvMediaLDCProcess(). The following NvMediaLDCProcess() operation is assured to be started only after the expiry of the prenvscisyncfence.

For example, in this sequence of code:

nvmstatus = NvMediaLDCInsertPreNvSciSyncFence(nvmldchdl, prenvscisyncfence);
nvmstatus = NvMediaLDCProcess(nvmldchdl, ...);

The NvMediaLDCProcess() operation is assured to start only after the expiry of prenvscisyncfence.

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

Parameters
[in]ldcAnd NvMedia LDC device handle.
[in]prenvscisyncfenceA pointer to an NvSciSyncFence.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that ldc was not a valid LDC handle, prenvscisyncfence was NULL, or prenvscisyncfence was not generated with an NvSciSyncObj which was registered with LDC as either type NVMEDIA_PRESYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that this function was already called NVMEDIA_LDC_MAX_PRENVSCISYNCFENCES or more times with the same LDC handle before an NvMediaLDCProcess() call.
NvMediaStatus NvMediaLDCNvSciSyncGetVersion ( NvMediaVersion version)

Gets version information for the NvMedia LDC NvSciSync library.

Parameters
[out]versionA pointer to a structure where version information is to be put.
Returns
A status code; NVMEDIA_STATUS_OK if successful, or NVMEDIA_STATUS_BAD_PARAMETER if version is invalid.
NvMediaStatus NvMediaLDCRegisterNvSciSyncObj ( NvMediaLDC ldc,
NvMediaNvSciSyncObjType  syncobjtype,
NvSciSyncObj  nvscisync 
)

Registers an NvSciSyncObj with NvMediaLDC.

Every NvSciSyncObj (even duplicate objects) used by NvMediaLDC must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj may be passed in NvMediaLDCSetNvSciSyncObjforEOF(), NvMediaLDCGetEOFNvSciSyncFence(), and NvMediaLDCUnregisterNvSciSyncObj().

For a given NvMediaLDC handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only. For each NvMediaNvSciSyncObjType a maximum of 16 NvSciSyncObjs can be registered.

Parameters
[in]ldcAn NvMedia LDC device handle.
[in]syncobjtypeDetermines how nvscisync is to be used by LDC.
[in]nvscisyncAn NvSciSyncObj to be registered with LDC.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that ldc was NULL or syncobjtype was not a valid NvMediaNvSciSyncObjType.
NVMEDIA_STATUS_NOT_SUPPORTEDindicates that nvscisync is not a compatible NvSciSyncObj which NvMediaLDC can support.
NVMEDIA_STATUS_ERRORindicates that the maximum number of NvSciSyncObj objects are already registered for the given syncobjtype, or nvscisync is already registered for a different syncobjtype with the same LDC handle.
NvMediaStatus NvMediaLDCSetNvSciSyncObjforEOF ( NvMediaLDC ldc,
NvSciSyncObj  nvscisyncEOF 
)

Sets an NvSciSyncObj to be used for a EOF NvSciSyncFence.

To use NvMediaLDCGetEOFNvSciSyncFence(), the application must call this function before it calls NvMediaLDCProcess().

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

Parameters
[in]ldcAn NvMedia LDC device handle.
[in]nvscisyncEOFA registered NvSciSyncObj which is to be associated with EOF NvSciSyncFence.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that ldc was NULL or that nvscisyncEOF was not registered with LDC as either type NVMEDIA_EOFSYNCOBJ or type NVMEDIA_EOF_PRESYNCOBJ.
NvMediaStatus NvMediaLDCUnregisterNvSciSyncObj ( NvMediaLDC ldc,
NvSciSyncObj  nvscisync 
)

Unregisters an NvSciSyncObj with NvMediaLDC.

Every NvSciSyncObj registered with NvMediaLDC through NvMediaLDCRegisterNvSciSyncObj() must be unregistered before it may be destroyed by a call to NvMediaLDCDestroy(). Before the application calls this function it must ensure that any NvMediaLDCProcess() operation which uses this NvSciSyncObj has completed. The function's behavior is undefined if it is called while the NvSciSyncObj is in use by an NvMediaLDCProcess() operation.

Parameters
[in]ldcAn NvMedia LDC device handle.
[in]nvscisyncAn NvSciSyncObj to be unregistered with LDC.
Return values
NVMEDIA_STATUS_OKindicates that the operation was successful.
NVMEDIA_STATUS_BAD_PARAMETERindicates that ldc was NULL or nvscisync was not registered with LDC.
NVMEDIA_STATUS_ERRORindicates that ldc has been destroyed.