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 value causes the call to wait for an event to arrive for up to the specified number of microseconds.
If a negative timeout value is specified, the call waits indefinitely until an event arrives.
If the block is configured to use
NvSciEventService:A non-zero timeout value causes it to return an
NvSciError_BadParametererror.
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.