Receiving Requirements
Pool, producer, and consumer each receive a single
NvSciStreamEvent_Elements
event. The pool receives the event after the producer and
all consumers finish specifying their element support. After the pool finishes specifying the
final packet element layout, the producer and consumers receive this event. After this event
is queried from pool, the following functions become operational on the pool block:
NvSciStreamBlockElementCountGet()
NvSciStreamBlockElementAttrGet()
NvSciStreamBlockElementAttrSet()
After the producer and consumers query the event, the following functions become operational on the producer and consumer blocks:
NvSciStreamBlockElementCountGet()
NvSciStreamBlockElementAttrGet()
NvSciStreamBlockElementUsageSet() (consumer only)
NvSciStreamBlockElementWaiterAttrSet()
As with synchronization requirements, the attributes received by the pool may not exactly match those sent by the producer and consumer endpoints. For the multicast case, the pool receives a combined list with one element for each type of attribute the consumers requested. Elements with the same type arrive as a single event with their attribute lists merged. The stream may also transform attributes to handle cross-process or cross-system cases. When querying the elements, consumers can choose not to use all of them. A consumer can inform NvSciStream that an element will not be used by calling NvSciStreamBlockElementUsageSet() with <used> set to false. This will allow NvSciStream to optimize by not sharing the relevant buffers with the consumer. This function can be called with <used> set to true, but this is the default, and the call is not necessary. Therefore, most existing applications will not need to add this call.
After querying element information and (for the consumer) indicating which elements they will
support, the producer and consumer(s) must call
NvSciStreamBlockSetupStatusSet()
function with a value of
NvSciStreamSetup_ElementImport
. This allows them to begin receiving packets
from the pool.
Any secondary pools connected to IPC blocks also receive events for the producer and consumer elements. However, the producer events are delayed until the primary pool determines the final packet layout (discussed below). The producer element attributes the secondary pools receive are those sent by the primary pool.
NvSciError
NvSciStreamBlockElementCountGet(
NvSciStreamBlock const block,
NvSciStreamBlockType const queryBlockType,
uint32_t* const numElements
)
NvSciError
NvSciStreamBlockElementAttrGet(
NvSciStreamBlock const block,
NvSciStreamBlockType const queryBlockType,
uint32_t const elemIndex,
uint32_t* const userType,
NvSciBufAttrList* const bufAttrList
)
NvSciError
NvSciStreamBlockElementUsageSet(
NvSciStreamBlock const block,
uint32_t const elemIndex,
bool const used
)