The NvMedia 2D NvSciSync API encompasses all NvMedia 2D NvSciSync handling functions.
Modules | |
History | |
Provides change history for the NvMedia 2D NvSciSync API. | |
Macros | |
#define | NVMEDIA_2D_NVSCISYNC_VERSION_MAJOR 1 |
Major version number of NvMedia 2D NvSciSync header. More... | |
#define | NVMEDIA_2D_NVSCISYNC_VERSION_MINOR 0 |
Minor version number of NvMedia 2D NvSciSync header. More... | |
#define | NVMEDIA_2D_MAX_PRENVSCISYNCFENCES (3u) |
Maximum number of NvSciSync pre-fences. More... | |
#define NVMEDIA_2D_MAX_PRENVSCISYNCFENCES (3u) |
Maximum number of NvSciSync pre-fences.
This defines the maximum number of NvSciSync objects that can be used as pre-fences to a single NvMedia 2D operation. So this directly maps to the maximum number of times that NvMedia2DInsertPreNvSciSyncFence() can be called before the call to NvMedia2DBlitEx().
Definition at line 63 of file nvmedia_2d_nvscisync.h.
#define NVMEDIA_2D_NVSCISYNC_VERSION_MAJOR 1 |
Major version number of NvMedia 2D NvSciSync header.
This defines the major version of the API defined in this header. This is intended to be used when validating the version number returned by the NvMedia2DNvSciSyncGetVersion() function.
Definition at line 42 of file nvmedia_2d_nvscisync.h.
#define NVMEDIA_2D_NVSCISYNC_VERSION_MINOR 0 |
Minor version number of NvMedia 2D NvSciSync header.
This defines the minor version of the API defined in this header. This is intended to be used when validating the version number returned by the NvMedia2DNvSciSyncGetVersion() function.
Definition at line 52 of file nvmedia_2d_nvscisync.h.
NvMediaStatus NvMedia2DFillNvSciSyncAttrList | ( | const NvMedia2D * | i2d, |
NvSciSyncAttrList | attrlist, | ||
NvMediaNvSciSyncClientType | clienttype | ||
) |
Fills the NvMedia 2D specific NvSciSync attributes.
This function sets the public attributes:
The application must not set this attribute.
[in] | i2d | Pointer to the NvMedia2D context. |
[out] | attrlist | Pointer to an NvSciSyncAttrList struct that will be populated with the NvSciSync attributes. |
[in] | clienttype | An NvMediaNvSciSyncClientType, to indicate whether the attributes filled should be for a waiter or a signaller. The value should be either:
|
NVMEDIA_STATUS_OK | Attributes filled successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The attributes have already been filled, or one of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_ERROR | An internal failure occured when trying to populate the attribute list. |
Usage considerations
NvMediaStatus NvMedia2DGetEOFNvSciSyncFence | ( | const 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, and its expiry indicates that the corresponding NvMedia2DBlitEx() operation has finished.
NvMedia2DGetEOFNvSciSyncFence() returns the EOF NvSciSyncFence associated with the last NvMedia2DBlitEx() call. If you use NvMedia2DGetEOFNvSciSyncFence(), you must call it after calling NvMedia2DBlitEx().
For example, in this sequence of code:
expiry of eofnvscisyncfence indicates that the preceding NvMedia2DBlitEx() operation has finished.
[in] | i2d | Pointer to the NvMedia2D context. |
[in] | eofvvscisyncobj | The NvSciSyncObj that was set for the EOF event. |
[out] | eofnvscisyncfence | Pointer to an NvSciSyncFence that will be populated with the version information. |
NVMEDIA_STATUS_OK | EOF fence returned successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The sync object is not registered as an EOF type with NvMedia 2D, or one of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_ERROR | The sync object has not yet been used by an NvMedia2DBlitEx() operation. |
Usage considerations
NvMediaStatus NvMedia2DInsertPreNvSciSyncFence | ( | const NvMedia2D * | i2d, |
const NvSciSyncFence * | prenvscisyncfence | ||
) |
Insert an NvSciSyncFence as a pre-fence.
If you use NvMedia2DInsertPreNvSciSyncFence(), you must call it before calling 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 | Pointer to the NvMedia2D context. |
[in] | prenvscisyncfence | Pointer to an NvSciSyncFence. |
NVMEDIA_STATUS_OK | Pre-fence inserted successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The sync object is not registered as an PRESYNC type with NvMedia 2D, or one of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_NOT_SUPPORTED | Maximum number of registered pre-fences has been reached. |
Usage considerations
NvMediaStatus NvMedia2DNvSciSyncGetVersion | ( | NvMediaVersion * | version | ) |
Returns the version number of the NvMedia 2D NvSciSync library.
This function returns the major and minor version number of the NvMedia 2D NvSciSync library. The client must pass an NvMediaVersion struct to this function, and the version information will be returned in this struct.
This allows the client to verify that the version of the library matches and is compatible with the the version number of the header file they are using.
Usage considerations
[out] | version | Pointer to an NvMediaVersion struct that will be populated with the version information. |
NVMEDIA_STATUS_OK | Version information returned successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | version parameter is NULL. |
NvMediaStatus NvMedia2DRegisterNvSciSyncObj | ( | const NvMedia2D * | i2d, |
NvMediaNvSciSyncObjType | syncobjtype, | ||
NvSciSyncObj | nvscisync | ||
) |
Register an NvSciSyncObj with NvMedia 2D.
Every NvSciSyncObj (even duplicate objects) used by NvMedia 2D 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 | Pointer to the NvMedia2D context. |
[in] | syncobjtype | An NvMediaNvSciSyncClientType, to indicate what event the sync object will represent. |
[in] | nvscisync | The NvSciSyncObj to be registered. |
NVMEDIA_STATUS_OK | Sync object registered successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | One of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_NOT_SUPPORTED | The primitive type of the sync object is not supported by NvMedia 2D. |
NVMEDIA_STATUS_ERROR | The sync object cannot be registered due to:
|
Usage considerations
NvMediaStatus NvMedia2DSetNvSciSyncObjforEOF | ( | const NvMedia2D * | i2d, |
NvSciSyncObj | nvscisyncEOF | ||
) |
Specifies the NvSciSyncObj to be used for EOF event.
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 | Pointer to the NvMedia2D context. |
[in] | nvscisyncEOF | The NvSciSyncObj to be used for the EOF fence. |
NVMEDIA_STATUS_OK | EOF fence set successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | The sync object is not registered as an EOF event type with NvMedia 2D, or one of the parameters has an invalid value. This could be:
|
Usage considerations
NvMediaStatus NvMedia2DUnregisterNvSciSyncObj | ( | const 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 | Pointer to the NvMedia2D context. |
[in] | nvscisync | The NvSciSyncObj to be unregistered. |
NVMEDIA_STATUS_OK | Sync object unregistered successfully. |
NVMEDIA_STATUS_BAD_PARAMETER | One of the parameters has an invalid value. This could be:
|
NVMEDIA_STATUS_ERROR | An internal failure occured when trying to unregister the sync object. |
Usage considerations