Event Query#
Events can be queried from each block:
NvSciError
NvSciStreamBlockEventQuery(
NvSciStreamBlock const block,
int64_t const timeoutUsec,
NvSciStreamEventType *const eventType
)
If the block is not configured to use
NvSciEventService:* If no events are pending in the block's queue, a non-zero timeout causes it to wait the specified number of microseconds for an event to arrive. If a negative value is used, the call waits forever.
If the block is configured to use
NvSciEventService:* Non-zero timeout causes it to return an `NvSciError_BadParameter` error.
On success, a pending event is removed from the block’s queue, the output parameter is filled with the type of the event, and NvSciError_Success is returned. If no event is available before the timeout period ends, an NvSciError_Timeout error is returned.
After an event is queried from a block, certain NvSciStream APIs become operational on the block. Refer to the API Reference for NvSciStreamEventType for additionally information about the functions that become operational for each event type queried.