Receiving Objects

On the other endpoint receves the NvSciStreamEventType_SignalObj.

NvSciStreamBlockElementSignalObjGet() is operational on the endpoint receiving the event.


NvSciError
NvSciStreamBlockElementSignalObjGet(
    NvSciStreamBlock const block,
    Uint32_t         const queryBlockIndex,
    Uint32_t         const elemIndex,
    NvSciSyncObj*    const SignalSyncObj
)

Ownership of the retrieved NvSciSyncObj handle belongs to the application calling the function, and it must free the sync object when it is no longer required. The application must map these into the drivers and use them to interpret fences received from the stream.

As with the requirements, the synchronization objects received may not match those sent. If there is more than one consumer, the stream combines their synchronization objects into a single list per element before passing it to the producer. The stream may also replace the synchronization objects with its own if it must perform intermediate copy operations to pass the data from one endpoint to the other.

Synchronization specified for each element requires care. If a consumer requires synchronous access (Producer receives NULL NvSciSyncObj handle by NvSciStreamBlockElementSignalObjGet()) but the producer normally generates this data asynchronously, then an extra burden is placed on the producer application. During streaming the producer application waits for that element to finish being generated before it inserts the payload into the stream.

After receiving all the synchronization objects they care about, the endpoint applications call the NvSciStreamBlockSetupStatusSet() function with a value of NvSciStreamSetup_SignalObjImport.