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 currently pending in the block's queue, a non-zero timeout causes it to wait the specified number of microseconds for one 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 NvSciError_BadParameter error.
  • The eventType parameter must point to an event structure the function fills in. Any previous contents of the structure are ignored and may be overwritten.

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 additionaly information about the functions that become operational for each event type queried.