Resource Creation

Once the stream blocks are fully created, the next step is to create synchronization and buffer resources. The process of determining resource requirements and allocating them is much like that described in the simple single-buffer example at the beginning of this chapter. But all coordination between the producer and consumers is done through the stream, which automatically deals with any translations required to share the resources between processes, partitions, or systems.

Creation of synchronization and buffer resources can be done in either order or can be intermingled. The two are similar, but the process for synchronizing objects is a little simpler.

Progression of Resource Creation

Various setup operations are divided into key groups. Data for each group is gathered and sent together at once when the application indicates that it is done with the setup. This completion is signaled with a call to NvSciStreamBlockSetupStatusSet(). The completed parameter to this function is for future support of dynamically modifying streams (for non-safety usecases) and currently must always be true.

NvSciError
NvSciStreamBlockSetupStatusSet(
    NvSciStreamBlock  const block,
    NvSciStreamSetup  const setupType,
    bool const completed
)