![]() |
NVIDIA DRIVE OS Linux SDK API Reference5.1.6.0 Release |
The NvMedia 2D NvSciSync API encompasses all NvMedia2D NvSciSync handling functions.
Macros | |
#define | NVMEDIA_2D_NVSCISYNC_VERSION_MAJOR 1 |
Major Version number. More... | |
#define | NVMEDIA_2D_NVSCISYNC_VERSION_MINOR 0 |
Minor Version number. More... | |
#define | NVMEDIA_2D_MAX_PRENVSCISYNCFENCES (3) |
NvMedia2DInsertPreNvSciSyncFence API can be called at most NVMEDIA_2D_MAX_PRENVSCISYNCFENCES times before each call to NvMedia2DBlitEx(). More... | |
#define NVMEDIA_2D_MAX_PRENVSCISYNCFENCES (3) |
NvMedia2DInsertPreNvSciSyncFence API can be called at most NVMEDIA_2D_MAX_PRENVSCISYNCFENCES times before each call to NvMedia2DBlitEx().
Definition at line 47 of file nvmedia_2d_nvscisync.h.
#define NVMEDIA_2D_NVSCISYNC_VERSION_MAJOR 1 |
Major Version number.
Definition at line 38 of file nvmedia_2d_nvscisync.h.
#define NVMEDIA_2D_NVSCISYNC_VERSION_MINOR 0 |
Minor Version number.
Definition at line 40 of file nvmedia_2d_nvscisync.h.
NvMediaStatus NvMedia2DFillNvSciSyncAttrList | ( | NvMedia2D * | i2d, |
NvSciSyncAttrList | attrlist, | ||
NvMediaNvSciSyncClientType | clienttype | ||
) |
Fills the NvMedia2D 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.
[in] | i2d | An NvMedia2D device handle. |
[out] | attrlist | A pointer to an NvSciSyncAttrList structure where NvMedia places NvSciSync attributes. |
[in] | clienttype | Indicates the NvSciSyncAttrList requested for an NvMedia2D signaler or waiter. |
NVMEDIA_STATUS_OK | if the function is successful. |
NVMEDIA_STATUS_BAD_PARAMETER | if attrlist is NULL, or any of the public attributes listed above are already set. |
NVMEDIA_STATUS_OUT_OF_MEMORY | if there is not enough memory for the requested operation. |
NvMediaStatus NvMedia2DGetEOFNvSciSyncFence | ( | NvMedia2D * | i2d, |
NvSciSyncObj | eofnvscisyncobj, | ||
NvSciSyncFence * | eofnvscisyncfence | ||
) |
Gets an EOF NvSciSyncFence for an NvMedia2DBlitEx() operation.
The EOF NvSciSyncFence associated with an NvMedia2DBlitEx() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMedia2DBlitEx() operation has finished.
NvMedia2DGetEOFNvSciSyncFence() returns the EOF NvSciSyncFence associated with the last NvMedia2DBlitEx() call. NvMedia2DGetEOFNvSciSyncFence() must be called after an NvMedia2DBlitEx() call.
For example, in this sequence of code:
expiry of eofnvscisyncfence indicates that the preceding NvMedia2DBlitEx() operation has finished.
[in] | i2d | An NvMedia 2D device handle. |
[in] | eofnvscisyncobj | EOF NvSciSyncObj associated with the NvSciSyncFence which is being requested. |
[out] | eofnvscisyncfence | A pointer to the EOF NvSciSyncFence. |
NVMEDIA_STATUS_OK | indicates that the call was successful. |
NVMEDIA_STATUS_BAD_PARAMETER | indicates that i2d is not a valid NvMedia2D handle, eofnvscisyncfence is NULL, or eofnvscisyncobj is not registered with i2d as type NVMEDIA_EOFSYNCOBJ or NVMEDIA_EOF_PRESYNCOBJ. |
NVMEDIA_STATUS_ERROR | indicates that the function was called before NvMedia2DBlitEx() was called. |
NvMediaStatus NvMedia2DInsertPreNvSciSyncFence | ( | NvMedia2D * | i2d, |
const NvSciSyncFence * | prenvscisyncfence | ||
) |
Sets an NvSciSyncFence as a prefence for an NvMedia2DBlitEx() NvSciSyncFence operation.
You must call NvMedia2DInsertPreNvSciSyncFence() before you call NvMedia2DBlitEx(). The NvMedia2DBlitEx() operation is started only after the expiry of the prenvscisyncfence.
For example, in this sequence of code:
the NvMedia2DBlitEx() operation is assured to start only after the expiry of prenvscisyncfence.
You can set a maximum of NVMEDIA_2D_MAX_PRENVSCISYNCFENCES prefences by calling NvMedia2DInsertPreNvSciSyncFence() before NvMedia2DBlitEx(). After the call to NvMedia2DBlitEx(), all NvSciSyncFences previously inserted by NvMedia2DInsertPreNvSciSyncFence() are removed, and they are not reused for the subsequent NvMedia2DBlitEx() calls.
[in] | i2d | An NvMedia 2D NvMedia2D device handle. |
[in] | prenvscisyncfence | A pointer to an NvSciSyncFence. |
NVMEDIA_STATUS_OK | if the function is successful. |
NVMEDIA_STATUS_BAD_PARAMETER | if i2d is not a valid NvMedia2D handle, prenvscisyncfence is NULL, or prenvscisyncfence was not generated with an NvSciSyncObj that was registered with i2d as either NVMEDIA_PRESYNCOBJ or NVMEDIA_EOF_PRESYNCOBJ type. |
NVMEDIA_STATUS_NOT_SUPPORTED | if NvMedia2DInsertPreNvSciSyncFence() has already been called at least NVMEDIA_2D_MAX_PRENVSCISYNCFENCES times with the same i2d handle before an NvMedia2DBlitEx() call. |
NvMediaStatus NvMedia2DNvSciSyncGetVersion | ( | NvMediaVersion * | version | ) |
Returns the version information for the NvMedia 2D NvSciSync library.
[out] | version | A pointer to an NvMediaVersion structure filled by the 2D NvSciSync library. |
NvMediaStatus NvMedia2DRegisterNvSciSyncObj | ( | NvMedia2D * | i2d, |
NvMediaNvSciSyncObjType | syncobjtype, | ||
NvSciSyncObj | nvscisync | ||
) |
Register an NvSciSyncObj with NvMedia2D.
Every NvSciSyncObj (even duplicate objects) used by NvMedia2D must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj can be passed to NvMedia2DSetNvSciSyncObjforEOF(), NvMedia2DGetEOFNvSciSyncFence(), or NvMedia2DUnregisterNvSciSyncObj().
For a given NvMedia2D handle, one NvSciSyncObj can be registered as one NvMediaNvSciSyncObjType only. For each NvMediaNvSciSyncObjType a maximum of 16 NvSciSyncObjs can be registered.
[in] | i2d | NvMedia 2D NvMedia2D device handle. |
[in] | syncobjtype | Determines how nvscisync is used by i2d. |
[in] | nvscisync | The NvSciSyncObj to be registered with i2d. |
NVMEDIA_STATUS_OK | if the function is successful. |
NVMEDIA_STATUS_BAD_PARAMETER | if i2d is NULL or syncobjtype is not a valid NvMediaNvSciSyncObjType. |
NVMEDIA_STATUS_NOT_SUPPORTED | if nvscisync is not a compatible NvSciSyncObj which NvMedia2D can support. |
NVMEDIA_STATUS_ERROR | if the maximum number of NvSciScynObjs are already registered for the given syncobjtype, or if nvscisync is already registered with the same i2d handle for a different syncobjtype. |
NvMediaStatus NvMedia2DSetNvSciSyncObjforEOF | ( | NvMedia2D * | i2d, |
NvSciSyncObj | nvscisyncEOF | ||
) |
Specifies the NvSciSyncObj to be used for a EOF NvSciSyncFence.
To use NvMedia2DGetEOFNvSciSyncFence(), the application must call NvMedia2DSetNvSciSyncObjforEOF() before it calls NvMedia2DBlitEx().
NvMedia2DSetNvSciSyncObjforEOF() currently may be called only once before each call to NvMedia2DBlitEx(). The application may choose to call this function only once before the first call to NvMedia2DBlitEx().
[in] | i2d | An NvMedia 2D NvMedia2D device handle. |
[in] | nvscisyncEOF | A registered NvSciSyncObj object which is to be associated with EOF NvSciSyncFence. |
NvMediaStatus NvMedia2DUnregisterNvSciSyncObj | ( | NvMedia2D * | i2d, |
NvSciSyncObj | nvscisync | ||
) |
Unregisters an NvSciSyncObj with NvMedia2D.
Every NvSciSyncObj registered with NvMedia2D by NvMedia2DRegisterNvSciSyncObj() must be unregistered before you call NvMedia2DDestroy().
Before the application calls this function, it must ensure that any NvMedia2DBlitEx() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any NvMedia2DBlitEx() operation, behavior is undefined.
[in] | i2d | An NvMedia 2D NvMedia2D device handle. |
[in] | nvscisync | An NvSciSyncObj to be unregistered with i2d. |
NVMEDIA_STATUS_OK | if the call is successful. |
NVMEDIA_STATUS_BAD_PARAMETER | if i2d is NULL or nvscisync is not registered with i2d. |
NVMEDIA_STATUS_ERROR | if i2d was destroyed before this function was called. |