Data Packets

In the previous examples, only 2D buffers containing single frames of image data are considered. For many use cases, that is all that is required. However, NvSciStream supports more arbitrary data. In the sections below, "buffers" are generalized to "packets", and "frames" to "payloads".

A packet is a set of indexed buffers that contains images, tensors, metadata, or other information. These buffers are referred to as the "elements" of a packet. Each stream may use one or more packets. For a given stream, all packets have the same number of elements, and the ith element of all packets is allocated with the same NvSciBuf attributes. As a result, all packets have uniform memory requirements and signatures. Producers and consumers send and receive entire packets at a time, along with associated fences to indicate when the payloads they contain are ready.

In addition to the NvSciBuf attributes used to allocate them, the elements of each packet also have a type and NvSciSync attributes associated with them, which help applications coordinate how the elements are used. These are described in the next sections.

media/image10.png