NVIDIA DRIVE OS Linux SDK API Reference

5.2.0 Release
For Test and Development only

Detailed Description

The NvSciStream library is a layer on top of NvSciBuf and NvSciSync libraries that provides utilities for streaming sequences of data packets between multiple application modules to support a wide variety of use cases.

Data Structures

struct  NvSciStreamEvent
 Describes a component event. More...
 
struct  NvSciStreamElementAttr
 The following data structures are no longer used by any interfaces and are deprecated. More...
 
struct  NvSciStreamElementDesc
 
struct  NvSciStreamSyncAttr
 
struct  NvSciStreamSyncDesc
 
struct  NvSciStreamPayload
 

Typedefs

typedef uintptr_t NvSciStreamBlock
 Handle to a stream component. More...
 
typedef uintptr_t NvSciStreamPacket
 NvSciStream-assigned handle for a packet. More...
 
typedef uintptr_t NvSciStreamCookie
 Component-assigned cookie for a packet. More...
 

Enumerations

enum  NvSciStreamQueryableAttrib {
  NvSciStreamQueryableAttrib_MaxElements = 0x000000,
  NvSciStreamQueryableAttrib_MaxSyncObj = 0x000001,
  NvSciStreamQueryableAttrib_MaxMulticastOutputs = 0x000002
}
 Defines NvSciStream attributes that are queryable. More...
 
enum  NvSciStreamElementMode {
  NvSciStreamElementMode_Asynchronous = 0x000000,
  NvSciStreamElementMode_Immediate = 0x000001
}
 Defines packet element access modes. More...
 
enum  NvSciStreamEventType {
  NvSciStreamEventType_Connected = 0x004004,
  NvSciStreamEventType_Disconnected = 0x004005,
  NvSciStreamEventType_SyncAttr = 0x004010,
  NvSciStreamEventType_SyncCount = 0x004011,
  NvSciStreamEventType_SyncDesc = 0x004012,
  NvSciStreamEventType_PacketElementCountProducer = 0x004020,
  NvSciStreamEventType_PacketElementCountConsumer = 0x004021,
  NvSciStreamEventType_PacketElementCount = 0x004022,
  NvSciStreamEventType_PacketAttrProducer = 0x004023,
  NvSciStreamEventType_PacketAttrConsumer = 0x004024,
  NvSciStreamEventType_PacketAttr = 0x004025,
  NvSciStreamEventType_PacketCreate = 0x004030,
  NvSciStreamEventType_PacketElement = 0x004031,
  NvSciStreamEventType_PacketDelete = 0x004032,
  NvSciStreamEventType_PacketStatusProducer = 0x004033,
  NvSciStreamEventType_PacketStatusConsumer = 0x004034,
  NvSciStreamEventType_ElementStatusProducer = 0x004035,
  NvSciStreamEventType_ElementStatusConsumer = 0x004036,
  NvSciStreamEventType_PacketReady = 0x004040,
  NvSciStreamEventType_Error = 0x0040FF
}
 Defines component event types. More...
 

Variables

static const NvSciStreamPacket NvSciStreamPacket_Invalid = 0U
 Constant variable denoting invalid packet. More...
 
static const NvSciStreamCookie NvSciStreamCookie_Invalid = 0U
 Constant variable denoting invalid cookie. More...
 

Typedef Documentation

◆ NvSciStreamBlock

typedef uintptr_t NvSciStreamBlock

Handle to a stream component.

Definition at line 52 of file nvscistream_types.h.

◆ NvSciStreamCookie

typedef uintptr_t NvSciStreamCookie

Component-assigned cookie for a packet.

Definition at line 64 of file nvscistream_types.h.

◆ NvSciStreamPacket

typedef uintptr_t NvSciStreamPacket

NvSciStream-assigned handle for a packet.

Definition at line 58 of file nvscistream_types.h.

Enumeration Type Documentation

◆ NvSciStreamElementMode

Defines packet element access modes.

Enumerator
NvSciStreamElementMode_Asynchronous 

Written asynchronously, typically by hardware engine.

Requires waiting for associated syncpoints before reading.

NvSciStreamElementMode_Immediate 

Written synchronously, typically by CPU.

Available for reading immediately.

Definition at line 95 of file nvscistream_types.h.

◆ NvSciStreamEventType

Defines component event types.

Enumerator
NvSciStreamEventType_Connected 

Indicates block has complete connection to producer and consumer endpoints.

The user may now proceed to perform other operations on the block.

Received by all blocks.

No event data fields are used.

NvSciStreamEventType_Disconnected 

Indicates portions of the stream have disconnected such that no more useful work can be done with the block.

Note that this event is not always triggered immediately when any disconnect occurs. For instance:

  • If a consumer still has payloads waiting in its queue when a producer is destroyed, it will not be informed of the disconnection until all payloads are acquired.
  • If one consumer in a multicast stream is destroyed, the producer will not be informed of the disconnection as long as other consumers are still able to receive payloads.

Received by all blocks.

No event data fields are used.

NvSciStreamEventType_SyncAttr 

Specifies sync object requirements.

Received by producer and consumer blocks.

The following event fields will be set: syncAttrList Provides an attribute list which the recipient can combine with its own requirements to create sync objects that will be used to signal the other endpoint. synchronousOnly If set, sync objects cannot be used by the other side. The recipient should not create sync objects, and should instead perform CPU waits before posting or returning payloads.

The values in the fields may not exactly match those sent from the other endpoint. The stream may transform them as they pass through. In particular, multi-cast components combine the requirements of all consumers before passing them to the producer, and IPC components may replace the requirements if they need to wait for the data to be ready before performing a copy step.

NvSciStreamEventType_SyncCount 

Specifies the number of sync objects sent from the opposite endpoint.

Received by producer and consumer blocks.

The following event fields will be set: count Indicates the number of sync objects that will be provided by the other side. The recipient can expect this many SyncDesc events to follow.

NvSciStreamEventType_SyncDesc 

Specifies a sync object sent from the opposite endpoint.

Received by producer and consumer blocks.

The following event fields will be set:
  index
    Specifies an index within the array of sync objects.
  syncObj
    Provides a handle to a sync object which the recipient should
    map into the libraries which will operate on stream data.
NvSciStreamEventType_PacketElementCountProducer 

Specifies number of packets elements request from producer.

Received by pool block.

The following event fields will be set:
 count
    Indicates the number of packet element types that the producer
    is capable of generating. The recipient can expect this many
    PacketAttrProducer events.
NvSciStreamEventType_PacketElementCountConsumer 

Specifies number of packets elements request from consumer.

Received by pool block.

The following event fields will be set:
 count
    Indicates the number of packet element types that the consumer
    wishes to receive. The recipient can expect this many
    PacketAttrConsumer events.
NvSciStreamEventType_PacketElementCount 

Specifies the number of packet elements determined by pool.

Received by producer and consumer blocks.

The following event fields will be set:
 count
    Indicates the number of packet element buffers that the pool
    will provide for each packet. The recipient can expect this
    many PacketAttr events and this many PacketElement events for
    each packet.
NvSciStreamEventType_PacketAttrProducer 

Specifies the packet capabilities from producer.

Received by pool block.

The following event fields will be set:
 index
    Index within the list of elements provided by the producer.
 userData
    A user-defined type which applications use to identify the
    element and allow elements provided by the producer to be
    matched with those desired by the consumer. At most one
    element of any given type can be specified.
 bufAttrList
    Provides an attribute list which the recipient can combine
    with its own requirements and those of the consumer to allocate
    buffers which all parties can use.
 syncMode
    Indicates whether the buffer data will be available immediately
    when the producer provides a payload or if the user must wait
    for the producer's sync objects first.

The values in the fields may not exactly match those sent from the
  producer. The stream may transform them as they pass through.
NvSciStreamEventType_PacketAttrConsumer 

Specifies the packet requests from consumer.

Received by pool block.

The following event fields will be set:
 index
    Index within the list of elements requested by the consumer.
 userData
    A user-defined type which applications use to identify the
    element and allow elements provided by the producer to be
    matched with those desired by the consumer. At most one
    element of any given type can be specified.
 bufAttrList
    Provides an attribute list which the recipient can combine
    with its own requirements and those of the producer to allocate
    buffers which all parties can use.
 syncMode
    Indicates whether the consumer desires the buffer data to be
    available immediately when the payload is acquired or if it can
    wait until the producer's sync objects have triggered.

The values in the fields may not exactly match those sent from the
  consumer. The stream may transform them as they pass through.
  In particular, multi-cast components combine the requirements of
  all consumers before passing them to the pool.
NvSciStreamEventType_PacketAttr 

Specifies the packet final settings from pool.

Received by producer and consumer blocks.

The following event fields will be set:
 index
    Index within the list of elements allocated by the pool.
 userData
    A user-defined type which applications use to identify the
    element and allow elements provided by the producer to be
    matched with those desired by the consumer. At most one
    element of any given type can be specified.
 bufAttrList
    Provides the combined attribute list used by the pool to
    allocate the element.
 syncMode
    Indicates the synchronization mode that the producer should use
    and the consumer should expect.

The values in the fields may not exactly match those sent from the
  pool. The stream may transform them as they pass through.
NvSciStreamEventType_PacketCreate 

Indicates new packet object has been introduced by pool.

Received by producer and consumer blocks.

The following event fields will be set: packetHandle Contains the handle for the new packet. This should be used whenever the component references the packet in the future.

NvSciStreamEventType_PacketElement 

Specifies new packet element.

Received by producer and consumer blocks.

The following event fields will be set: packetCookie Contains the cookie which the recipient provided to identify its data structure for the packet upon accepting it. index Index within the list of the packet's elements. bufObj Provides a handle to a buffer object which the recipient should map into the libraries which will operate on stream data.

NvSciStreamEventType_PacketDelete 

Specifies the discontinued packet object.

Received by producer and consumer blocks.

The following event fields will be set: packetCookie Contains the cookie which the recipient provided to identify its data structure for the packet upon accepting it.

NvSciStreamEventType_PacketStatusProducer 

Specifies the producer-side status of packet.

Received by pool block.

The following event fields will be set: packetCookie Contains the cookie which the pool provided to identify its data structure for the packet upon creating it. error An error code indicating whether the producer was able to add the new packet.

NvSciStreamEventType_PacketStatusConsumer 

Specifies the consumer-side status of packet.

Received by pool block.

The following event fields will be set: packetCookie Contains the cookie which the pool provided to identify its data structure for the packet upon creating it. error An error code indicating whether the consumer was able to add the new packet.

NvSciStreamEventType_ElementStatusProducer 

Specifies the producer-side status of packet element.

Received by pool block.

The following event fields will be set: packetCookie Contains the cookie which the pool provided to identify its data structure for the packet upon creating it. index Index of packet element for which status is provided. error An error code indicating whether the producer was able to map in the element buffer.

NvSciStreamEventType_ElementStatusConsumer 

Specifies the consumer-side status of packet element.

Received by pool block.

The following event fields will be set: packetCookie Contains the cookie which the pool provided to identify its data structure for the packet upon creating it. index Index of packet element for which status is provided. error An error code indicating whether the consumer was able to map in the element buffer.

NvSciStreamEventType_PacketReady 

Specifies a packet is available for reuse or acquire.

Received by producer and consumer block.

The following event fields will be set: None

NvSciStreamEventType_Error 

Indicates a failure not directly triggered by user action.

Received by any block.

The following event fields will be set: error An error code providing information about what went wrong.

Definition at line 112 of file nvscistream_types.h.

◆ NvSciStreamQueryableAttrib

Defines NvSciStream attributes that are queryable.

Enumerator
NvSciStreamQueryableAttrib_MaxElements 

Maximum number of elements allowed per packet.

NvSciStreamQueryableAttrib_MaxSyncObj 

Maximum number of NvSciSync objects allowed.

NvSciStreamQueryableAttrib_MaxMulticastOutputs 

Maximum number of multicast outputs allowed.

Definition at line 82 of file nvscistream_types.h.

Variable Documentation

◆ NvSciStreamCookie_Invalid

const NvSciStreamCookie NvSciStreamCookie_Invalid = 0U
static

Constant variable denoting invalid cookie.

Definition at line 76 of file nvscistream_types.h.

◆ NvSciStreamPacket_Invalid

const NvSciStreamPacket NvSciStreamPacket_Invalid = 0U
static

Constant variable denoting invalid packet.

Definition at line 70 of file nvscistream_types.h.