NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

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

Detailed Description

The NvMedia IEP NvSciSync API encompasses all NvMediaIEP NvSciSync handling functions.

Macros

#define NVMEDIA_IEP_NVSCISYNC_VERSION_MAJOR   1
 Major version number. More...
 
#define NVMEDIA_IEP_NVSCISYNC_VERSION_MINOR   1
 Minor version number. More...
 
#define NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES   (3)
 Specifies the maximum number of times NvMediaIEPInsertPreNvSciSyncFence() can be called before each call to NvMediaIEPFeedFrame(). More...
 

Functions

NvMediaStatus NvMediaIEPNvSciSyncGetVersion (NvMediaVersion *version)
 Returns the version information for the NvMedia IEP NvSciSync library. More...
 
NvMediaStatus NvMediaIEPFillNvSciSyncAttrList (const NvMediaIEP *encoder, NvSciSyncAttrList attrlist, NvMediaNvSciSyncClientType clienttype)
 Fills the NvMediaIEP specific NvSciSync attributes. More...
 
NvMediaStatus NvMediaIEPRegisterNvSciSyncObj (const NvMediaIEP *encoder, NvMediaNvSciSyncObjType syncobjtype, NvSciSyncObj nvscisync)
 Registers an NvSciSyncObj with NvMediaIEP. More...
 
NvMediaStatus NvMediaIEPUnregisterNvSciSyncObj (const NvMediaIEP *encoder, NvSciSyncObj nvscisync)
 Unregisters an NvSciSyncObj with NvMediaIEP. More...
 
NvMediaStatus NvMediaIEPSetNvSciSyncObjforEOF (const NvMediaIEP *encoder, NvSciSyncObj nvscisyncEOF)
 Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaIEPInsertPreNvSciSyncFence (const NvMediaIEP *encoder, const NvSciSyncFence *prenvscisyncfence)
 Sets an NvSciSyncFence as a prefence for an NvMediaIEPFeedFrame() NvSciSyncFence operation. More...
 
NvMediaStatus NvMediaIEPGetEOFNvSciSyncFence (const NvMediaIEP *encoder, NvSciSyncObj eofnvscisyncobj, NvSciSyncFence *eofnvscisyncfence)
 Gets EOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation. More...
 
NvMediaStatus NvMediaIEPSetNvSciSyncObjforSOF (const NvMediaIEP *encoder, NvSciSyncObj nvscisyncSOF)
 Specifies the NvSciSyncObj to be used for an SOF NvSciSyncFence. More...
 
NvMediaStatus NvMediaIEPGetSOFNvSciSyncFence (const NvMediaIEP *encoder, NvSciSyncObj sofnvscisyncobj, NvSciSyncFence *sofnvscisyncfence)
 Gets SOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation. More...
 

Macro Definition Documentation

#define NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES   (3)

Specifies the maximum number of times NvMediaIEPInsertPreNvSciSyncFence() can be called before each call to NvMediaIEPFeedFrame().

Definition at line 46 of file nvmedia_iep_nvscisync.h.

#define NVMEDIA_IEP_NVSCISYNC_VERSION_MAJOR   1

Major version number.

Definition at line 38 of file nvmedia_iep_nvscisync.h.

#define NVMEDIA_IEP_NVSCISYNC_VERSION_MINOR   1

Minor version number.

Definition at line 40 of file nvmedia_iep_nvscisync.h.

Function Documentation

NvMediaStatus NvMediaIEPFillNvSciSyncAttrList ( const NvMediaIEP encoder,
NvSciSyncAttrList  attrlist,
NvMediaNvSciSyncClientType  clienttype 
)

Fills the NvMediaIEP specific NvSciSync attributes.

This function assumes that attrlist is a valid NvSciSyncAttrList.

This function sets the public attribute:

The application must not set this attribute.

Parameters
[in]encoderAn NvMediaIEP device handle.
[out]attrlistA pointer to an NvSciSyncAttrList structure where NvMedia places NvSciSync attributes.
[in]clienttypeIndicates whether the NvSciSyncAttrList requested for an NvMediaIEP signaler or an NvMediaIEP waiter.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPGetEOFNvSciSyncFence ( const NvMediaIEP encoder,
NvSciSyncObj  eofnvscisyncobj,
NvSciSyncFence eofnvscisyncfence 
)

Gets EOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation.

The EOF NvSciSyncFence associated with an NvMediaIEPFeedFrame() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMediaIEPFeedFrame() operation has finished.

This function returns the EOF NvSciSyncFence associated with the last NvMediaIEPFeedFrame() call. NvMediaIEPGetEOFNvSciSyncFence() must be called after an NvMediaIEPFeedFrame() call.

For example, in this sequence of code:

nvmstatus = NvMediaIEPFeedFrame(handle, srcsurf, srcrect, picparams, instanceid);
nvmstatus = NvMediaIEPGetEOFNvSciSyncFence(handle, nvscisyncEOF, eofnvscisyncfence);

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

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]eofnvscisyncobjAn EOF NvSciSyncObj associated with the NvSciSyncFence which is being requested.
[out]eofnvscisyncfenceA pointer to the EOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPGetSOFNvSciSyncFence ( const NvMediaIEP encoder,
NvSciSyncObj  sofnvscisyncobj,
NvSciSyncFence sofnvscisyncfence 
)

Gets SOF NvSciSyncFence for an NvMediaIEPFeedFrame() operation.

This function is not supported.

The SOF NvSciSyncFence associated with an NvMediaIEPFeedFrame() operation is an NvSciSyncFence. Its expiry indicates that the corresponding NvMediaIEPFeedFrame() operation has started.

This function returns the SOF NvSciSyncFence associated with the last NvMediaIEPFeedFrame() call. NvMediaIEPGetSOFNvSciSyncFence() must be called after an NvMediaIEPFeedFrame() call.

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]sofnvscisyncobjAn SOF NvSciSyncObj associated with the NvSciSyncFence which is being requested.
[out]sofnvscisyncfenceA pointer to the SOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPInsertPreNvSciSyncFence ( const NvMediaIEP encoder,
const NvSciSyncFence prenvscisyncfence 
)

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

You must call NvMediaIEPInsertPreNvSciSyncFence() before you call NvMediaIEPFeedFrame(). The NvMediaIEPFeedFrame() operation is started only after the expiry of the prenvscisyncfence.

For example, in this sequence of code:

nvmstatus = NvMediaIEPInsertPreNvSciSyncFence(handle, prenvscisyncfence);
nvmstatus = NvMediaIEPFeedFrame(handle, srcsurf, srcrect, picparams, instanceid);

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

You can set a maximum of NVMEDIA_IEP_MAX_PRENVSCISYNCFENCES prefences by calling NvMediaIEPInsertPreNvSciSyncFence() before NvMediaIEPFeedFrame(). After the call to NvMediaIEPFeedFrame(), all NvSciSyncFences previously inserted by NvMediaIEPInsertPreNvSciSyncFence() are removed, and they are not reused for the subsequent NvMediaIEPFeedFrame() calls.

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]prenvscisyncfenceA pointer to NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPNvSciSyncGetVersion ( NvMediaVersion version)

Returns the version information for the NvMedia IEP NvSciSync library.

Parameters
[out]versionA pointer to an NvMediaVersion structure filled by the IEP NvSciSync library.
Returns
NvMediaStatus The completion status of the operation. Possible values are:
NvMediaStatus NvMediaIEPRegisterNvSciSyncObj ( const NvMediaIEP encoder,
NvMediaNvSciSyncObjType  syncobjtype,
NvSciSyncObj  nvscisync 
)

Registers an NvSciSyncObj with NvMediaIEP.

Every NvSciSyncObj(even duplicate objects) used by NvMediaIEP must be registered by a call to this function before it is used. Only the exact same registered NvSciSyncObj can be passed to NvMediaIEPSetNvSciSyncObjforEOF(), NvMediaIEPGetEOFNvSciSyncFence(), or NvMediaIEPUnregisterNvSciSyncObj().

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

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]syncobjtypeDetermines how nvscisync is used by encoder.
[in]nvscisyncThe NvSciSyncObj to be registered with encoder.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPSetNvSciSyncObjforEOF ( const NvMediaIEP encoder,
NvSciSyncObj  nvscisyncEOF 
)

Specifies the NvSciSyncObj to be used for an EOF NvSciSyncFence.

To use NvMediaIEPGetEOFNvSciSyncFence(), the application must call NvMediaIEPSetNvSciSyncObjforEOF() before it calls NvMediaIEPFeedFrame().

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

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]nvscisyncEOFA registered NvSciSyncObj which is to be associated with EOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPSetNvSciSyncObjforSOF ( const NvMediaIEP encoder,
NvSciSyncObj  nvscisyncSOF 
)

Specifies the NvSciSyncObj to be used for an SOF NvSciSyncFence.

This function is not supported.

To use NvMediaIEPGetSOFNvSciSyncFence(), the application must call NvMediaIEPSetNvSciSyncObjforSOF() before it calls NvMediaIEPFeedFrame().

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

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]nvscisyncSOFA registered NvSciSyncObj which is to be associated with SOF NvSciSyncFence.
Returns
NvMediaStatus The status of the operation. Possible values are:
NvMediaStatus NvMediaIEPUnregisterNvSciSyncObj ( const NvMediaIEP encoder,
NvSciSyncObj  nvscisync 
)

Unregisters an NvSciSyncObj with NvMediaIEP.

Every NvSciSyncObj registered with NvMediaIEP by NvMediaIEPRegisterNvSciSyncObj() must be unregistered before calling NvMediaIEPDestroy().

Before the application calls this function, it must ensure that any NvMediaIEPFeedFrame() operation that uses the NvSciSyncObj has completed. If this function is called while NvSciSyncObj is still in use by any NvMediaIEPFeedFrame() operation, the behavior is undefined.

Parameters
[in]encoderAn NvMediaIEP device handle.
[in]nvscisyncAn NvSciSyncObj to be unregistered with encoder.
Returns
NvMediaStatus The status of the operation. Possible values are: