Loading [MathJax]/extensions/tex2jax.js
  • <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • NVIDIA DRIVE OS Linux SDK API Reference

    6.0.9 Release
    All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

    Detailed Description

    Methods to setup and stream sequences of data packets.

    Functions

    NvSciError NvSciStreamBlockConnect (NvSciStreamBlock const upstream, NvSciStreamBlock const downstream)
     Establishes connection between two blocks referenced by the given NvSciStreamBlock(s). More...
     
    NvSciError NvSciStreamProducerCreate (NvSciStreamBlock const pool, NvSciStreamBlock *const producer)
     Creates an instance of producer block, associates the given pool referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created producer block. More...
     
    NvSciError NvSciStreamProducerCreate2 (NvSciStreamBlock const pool, bool const crcValidate, NvSciStreamBlock *const producer)
     Creates an instance of producer block, associates the given pool referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created producer block. More...
     
    NvSciError NvSciStreamConsumerCreate (NvSciStreamBlock const queue, NvSciStreamBlock *const consumer)
     Creates an instance of consumer block, associates the given queue block referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created consumer block. More...
     
    NvSciError NvSciStreamConsumerCreate2 (NvSciStreamBlock const queue, bool const crcValidate, NvSciStreamBlock *const consumer)
     Creates an instance of consumer block, associates the given queue block referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created consumer block. More...
     
    NvSciError NvSciStreamStaticPoolCreate (uint32_t const numPackets, NvSciStreamBlock *const pool)
     Creates an instance of static pool block and returns a NvSciStreamBlock referencing the created pool block. More...
     
    NvSciError NvSciStreamMailboxQueueCreate (NvSciStreamBlock *const queue)
     Creates an instance of mailbox queue block and returns a NvSciStreamBlock referencing the created mailbox queue block. More...
     
    NvSciError NvSciStreamFifoQueueCreate (NvSciStreamBlock *const queue)
     Creates an instance of FIFO queue block and returns a NvSciStreamBlock referencing the created FIFO queue block. More...
     
    NvSciError NvSciStreamMulticastCreate (uint32_t const outputCount, NvSciStreamBlock *const multicast)
     Creates an instance of multicast block and returns a NvSciStreamBlock referencing the created multicast block. More...
     
    NvSciError NvSciStreamIpcSrcCreate (NvSciIpcEndpoint const ipcEndpoint, NvSciSyncModule const syncModule, NvSciBufModule const bufModule, NvSciStreamBlock *const ipc)
     Creates an instance of IpcSrc block and returns a NvSciStreamBlock referencing the created IpcSrc block. More...
     
    NvSciError NvSciStreamIpcSrcCreate2 (NvSciIpcEndpoint const ipcEndpoint, NvSciSyncModule const syncModule, NvSciBufModule const bufModule, NvSciStreamBlock const queue, NvSciStreamBlock *const ipc)
     Creates an instance of IpcSrc or C2CSrc block and returns a NvSciStreamBlock referencing the created block. More...
     
    NvSciError NvSciStreamIpcDstCreate (NvSciIpcEndpoint const ipcEndpoint, NvSciSyncModule const syncModule, NvSciBufModule const bufModule, NvSciStreamBlock *const ipc)
     Creates an instance of IpcDst block and returns a NvSciStreamBlock referencing the created IpcDst block. More...
     
    NvSciError NvSciStreamIpcDstCreate2 (NvSciIpcEndpoint const ipcEndpoint, NvSciSyncModule const syncModule, NvSciBufModule const bufModule, NvSciStreamBlock const pool, NvSciStreamBlock *const ipc)
     Creates an instance of IpcDst or C2CDst block and returns a NvSciStreamBlock referencing the created block. More...
     
    NvSciError NvSciStreamLimiterCreate (uint32_t const maxPackets, NvSciStreamBlock *const limiter)
     Creates an instance of Limiter block and returns a NvSciStreamBlock referencing the created Limiter block. More...
     
    NvSciError NvSciStreamReturnSyncCreate (NvSciSyncModule const syncModule, NvSciStreamBlock *const returnSync)
     Creates an instance of ReturnSync block and returns a NvSciStreamBlock referencing the created ReturnSync block. More...
     
    NvSciError NvSciStreamPresentSyncCreate (NvSciSyncModule const syncModule, NvSciStreamBlock *const presentSync)
     Creates an instance of PresentSync block and returns a NvSciStreamBlock referencing the created PresentSync block. More...
     
    NvSciError NvSciStreamBlockEventQuery (NvSciStreamBlock const block, int64_t const timeoutUsec, NvSciStreamEventType *const event)
     Queries for the next event from block referenced by the given NvSciStreamBlock, optionally waiting when the an event is not yet available, then removes the event from the priority queue and returns the event type to the caller. More...
     
    NvSciError NvSciStreamBlockErrorGet (NvSciStreamBlock const block, NvSciError *const status)
     Queries the error code for an error event. More...
     
    NvSciError NvSciStreamBlockConsumerCountGet (NvSciStreamBlock const block, uint32_t *const numConsumers)
     Queries the number of consumers downstream of the block referenced by the given NvSciStreamBlock (or 1 if the block itself is a consumer). More...
     
    NvSciError NvSciStreamBlockSetupStatusSet (NvSciStreamBlock const block, NvSciStreamSetup const setupType, bool const completed)
     Indicates a group of setup operations identified by setupType on block are complete. More...
     
    NvSciError NvSciStreamBlockElementAttrSet (NvSciStreamBlock const block, uint32_t const userType, NvSciBufAttrList const bufAttrList)
     Adds an element with the specified userType and bufAttrList to the list of elements defined by block. More...
     
    NvSciError NvSciStreamBlockElementCountGet (NvSciStreamBlock const block, NvSciStreamBlockType const queryBlockType, uint32_t *const numElements)
     Queries the number of elements received at the block from the source identified by queryBlockType. More...
     
    NvSciError NvSciStreamBlockElementAttrGet (NvSciStreamBlock const block, NvSciStreamBlockType const queryBlockType, uint32_t const elemIndex, uint32_t *const userType, NvSciBufAttrList *const bufAttrList)
     Queries the user-defined type and/or buffer attribute list for an entry, referenced by elemIndex, in list of elements received at the block from the source identified by queryBlockType. More...
     
    NvSciError NvSciStreamBlockElementNotVisible (NvSciStreamBlock const pool, uint32_t const userType, uint32_t const consumerIndex)
     Indicates the entry with userType in the list of allocated elements will be visible to the consumer block at @consumerIndex. More...
     
    NvSciError NvSciStreamBlockElementUsageSet (NvSciStreamBlock const block, uint32_t const elemIndex, bool const used)
     Indicates whether the entry at elemIndex in the list of allocated elements will be used by the block. More...
     
    NvSciError NvSciStreamPoolPacketCreate (NvSciStreamBlock const pool, NvSciStreamCookie const cookie, NvSciStreamPacket *const handle)
     Creates a new packet and adds it to the pool block referenced by the given NvSciStreamBlock, associates the given NvSciStreamCookie with the packet and returns a NvSciStreamPacket which references the created packet. More...
     
    NvSciError NvSciStreamPoolPacketInsertBuffer (NvSciStreamBlock const pool, NvSciStreamPacket const handle, uint32_t const index, NvSciBufObj const bufObj)
     Registers an NvSciBufObj as the indexed element of the referenced NvSciStreamPacket owned by the pool block. More...
     
    NvSciError NvSciStreamPoolPacketComplete (NvSciStreamBlock const pool, NvSciStreamPacket const handle)
     Marks a packet as complete and sends it to the rest of the stream. More...
     
    NvSciError NvSciStreamPoolPacketDelete (NvSciStreamBlock const pool, NvSciStreamPacket const handle)
     Removes a packet referenced by the given NvSciStreamPacket from the pool block referenced by the given NvSciStreamBlock. More...
     
    NvSciError NvSciStreamBlockPacketNewHandleGet (NvSciStreamBlock const block, NvSciStreamPacket *const handle)
     In producer and consumer blocks, queries the handle of a newly defined packet. More...
     
    NvSciError NvSciStreamBlockPacketBufferGet (NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const elemIndex, NvSciBufObj *const bufObj)
     In producer and consumer blocks, queries an indexed buffer from a packet. More...
     
    NvSciError NvSciStreamBlockPacketOldCookieGet (NvSciStreamBlock const block, NvSciStreamCookie *const cookie)
     In producer and consumer blocks, queries the cookie of a recently deleted packet. More...
     
    NvSciError NvSciStreamBlockPacketStatusSet (NvSciStreamBlock const block, NvSciStreamPacket const handle, NvSciStreamCookie const cookie, NvSciError const status)
     In producer and consumer blocks, either accepts a packet, providing a cookie to be used in subsequent operations, or rejects it, providing an error value to be reported to the pool. More...
     
    NvSciError NvSciStreamPoolPacketStatusAcceptGet (NvSciStreamBlock const pool, NvSciStreamPacket const handle, bool *const accepted)
     In pool, queries whether or not a packet has been accepted. More...
     
    NvSciError NvSciStreamPoolPacketStatusValueGet (NvSciStreamBlock const pool, NvSciStreamPacket const handle, NvSciStreamBlockType const queryBlockType, uint32_t const queryBlockIndex, NvSciError *const status)
     In pool, queries the status value for a given packet returned by a specified endpoint. More...
     
    NvSciError NvSciStreamBlockElementWaiterAttrSet (NvSciStreamBlock const block, uint32_t const elemIndex, NvSciSyncAttrList const waitSyncAttrList)
     Specifies block's NvSciSync requirements to be able to wait for sync objects provided by the opposing endpoint(s) for the element referenced by elemIndex. More...
     
    NvSciError NvSciStreamBlockElementWaiterAttrGet (NvSciStreamBlock const block, uint32_t const elemIndex, NvSciSyncAttrList *const waitSyncAttrList)
     Retrieves the opposing endpoints' NvSciSync requirements to be be able to wait for sync objects signalled by block for the element referenced by elemIndex. More...
     
    NvSciError NvSciStreamBlockElementSignalObjSet (NvSciStreamBlock const block, uint32_t const elemIndex, NvSciSyncObj const signalSyncObj)
     Specifies block's NvSciSync object used to signal when it is done writing or reading a buffer referenced by elemIndex. More...
     
    NvSciError NvSciStreamBlockElementSignalObjGet (NvSciStreamBlock const block, uint32_t const queryBlockIndex, uint32_t const elemIndex, NvSciSyncObj *const signalSyncObj)
     Retrieves an opposing endpoint's NvSciSync object which it uses to signal when it is done writing or readying a buffer referenced by elemIndex. More...
     
    NvSciError NvSciStreamProducerPacketGet (NvSciStreamBlock const producer, NvSciStreamCookie *const cookie)
     Instructs the producer referenced by producer to retrieve a packet from the pool. More...
     
    NvSciError NvSciStreamProducerPacketPresent (NvSciStreamBlock const producer, NvSciStreamPacket const handle)
     Instructs the producer referenced by producer to insert the packet referenced by handle into the stream for consumer processing. More...
     
    NvSciError NvSciStreamConsumerPacketAcquire (NvSciStreamBlock const consumer, NvSciStreamCookie *const cookie)
     Instructs the consumer referenced by consumer to retrieve a packet from the queue. More...
     
    NvSciError NvSciStreamConsumerPacketRelease (NvSciStreamBlock const consumer, NvSciStreamPacket const handle)
     Instructs the consumer referenced by consumer to release the packet referenced by handle into the stream for producer reuse. More...
     
    NvSciError NvSciStreamBlockPacketFenceSet (NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const elemIndex, NvSciSyncFence const *const postfence)
     Sets the postfence which indicates when the application controlling will be done operating on the indexed buffer of a packet. More...
     
    NvSciError NvSciStreamBlockPacketFenceGet (NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const queryBlockIndex, uint32_t const elemIndex, NvSciSyncFence *const prefence)
     Retrieves the prefence which indicates when the the indexed opposing endpoint will be done operating on the indexed buffer of a packet. More...
     
    NvSciError NvSciStreamNewConsumerGet (NvSciStreamBlock const producer, uint32_t const consumerIndex, bool *const newConnected)
     Queries whether the indexed consumer is a newly connected consumer. More...
     
    NvSciError NvSciStreamBlockDelete (NvSciStreamBlock const block)
     Schedules a block referenced by the given NvSciStreamBlock for destruction, disconnecting the block if this hasn't already occurred. More...
     
    NvSciError NvSciStreamBlockDisconnect (NvSciStreamBlock const block)
     Disconnects an IpcSrc block referenced by the given NvSciStreamBlock. More...
     
    NvSciError NvSciStreamAttributeQuery (NvSciStreamQueryableAttrib const attr, int32_t *const value)
     Queries the value of one of the NvSciStreamQueryableAttrib. More...
     
    NvSciError NvSciStreamBlockEventServiceSetup (NvSciStreamBlock const block, NvSciEventService *const eventService, NvSciEventNotifier **const eventNotifier)
     Sets up the NvSciEventService on a block referenced by the given NvSciStreamBlock by creating an NvSciEventNotifier to report the occurrence of any events on that block. More...
     
    NvSciError NvSciStreamBlockInternalEventServiceSetup (NvSciStreamBlock const block, NvSciEventService *const eventService, uint32_t *const notifierCount, NvSciEventNotifier **const eventNotifierArray)
     Configures a block referenced by the given NvSciStreamBlock to use the user-provided NvSciEventService to wait for internal events on this block. More...
     
    NvSciError NvSciStreamBlockHandleInternalEvents (NvSciStreamBlock const block)
     Handle NvSciStream internal events on a block referenced by the given NvSciStreamBlock. More...
     
    NvSciError NvSciStreamBlockUserInfoSet (NvSciStreamBlock const block, uint32_t const userType, uint32_t const dataSize, void const *const data)
     Provides user-defined information at the producer and consumer with the specified userType, which can be queried by other blocks after the stream is fully connected. More...
     
    NvSciError NvSciStreamBlockUserInfoGet (NvSciStreamBlock const block, NvSciStreamBlockType const queryBlockType, uint32_t const queryBlockIndex, uint32_t const userType, uint32_t *const dataSize, void *const data)
     Queries the user-defined information with userType in list of endpoint information at the block from the source identified by queryBlockType and queryBlockIndex. More...
     
    NvSciError NvSciStreamBlockUserInfoSetWithCrc (NvSciStreamBlock const block, uint32_t const userType, uint32_t const dataSize, void const *const data, uint32_t *const crc)
     Provides user-defined information at the producer and consumer with the specified userType, which can be queried by other blocks after the stream is fully connected. More...
     
    NvSciError NvSciStreamBlockUserInfoGetWithCrc (NvSciStreamBlock const block, NvSciStreamBlockType const queryBlockType, uint32_t const queryBlockIndex, uint32_t const userType, uint32_t *const dataSize, void *const data, uint32_t *const crc)
     Queries the user-defined information with userType in list of endpoint information at the block from the source identified by queryBlockType and queryBlockIndex. More...
     
    NvSciError NvSciStreamBlockElementAttrSetWithCrc (NvSciStreamBlock const block, uint32_t const userType, NvSciBufAttrList const bufAttrList, uint32_t *const crc)
     Adds an element with the specified userType and bufAttrList to the list of elements defined by block. More...
     
    NvSciError NvSciStreamBlockElementAttrGetWithCrc (NvSciStreamBlock const block, NvSciStreamBlockType const queryBlockType, uint32_t const elemIndex, uint32_t *const userType, NvSciBufAttrList *const bufAttrList, uint32_t *const crc)
     Queries the user-defined type and/or buffer attribute list for an entry, referenced by elemIndex, in list of elements received at the block from the source identified by queryBlockType. More...
     
    NvSciError NvSciStreamPoolPacketInsertBufferWithCrc (NvSciStreamBlock const pool, NvSciStreamPacket const handle, uint32_t const index, NvSciBufObj const bufObj, uint32_t *const crc)
     Registers an NvSciBufObj as the indexed element of the referenced NvSciStreamPacket owned by the pool block. More...
     
    NvSciError NvSciStreamBlockPacketBufferGetWithCrc (NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const elemIndex, NvSciBufObj *const bufObj, size_t const crcCount, uint32_t *const crc)
     In producer and consumer blocks, queries an indexed buffer from a packet. More...
     
    NvSciError NvSciStreamBlockElementSignalObjSetWithCrc (NvSciStreamBlock const block, uint32_t const elemIndex, NvSciSyncObj const signalSyncObj, uint32_t *const crc)
     Specifies block's NvSciSync object used to signal when it is done writing or reading a buffer referenced by elemIndex. More...
     
    NvSciError NvSciStreamBlockElementSignalObjGetWithCrc (NvSciStreamBlock const block, uint32_t const queryBlockIndex, uint32_t const elemIndex, NvSciSyncObj *const signalSyncObj, uint32_t *const crc)
     Retrieves an opposing endpoint's NvSciSync object which it uses to signal when it is done writing or readying a buffer referenced by elemIndex. More...
     
    NvSciError NvSciStreamBlockPacketFenceSetWithCrc (NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const elemIndex, NvSciSyncFence const *const postfence, uint32_t *const crc)
     Sets the postfence which indicates when the application controlling will be done operating on the indexed buffer of a packet. More...
     
    NvSciError NvSciStreamBlockPacketFenceGetWithCrc (NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const queryBlockIndex, uint32_t const elemIndex, NvSciSyncFence *const prefence, uint32_t *const crc)
     Retrieves the prefence which indicates when the the indexed opposing endpoint will be done operating on the indexed buffer of a packet. More...
     
    NvSciError NvSciStreamConsumerIndexGet (NvSciStreamBlock const consumer, uint32_t *const index)
     Queries the index of the consumer block referenced by the given NvSciStreamBlock. More...
     
    NvSciError NvSciStreamPacketSendSync (NvSciStreamBlock const block)
     Enables the synchronous payload transfer during runtime. More...
     

    Function Documentation

    ◆ NvSciStreamAttributeQuery()

    NvSciError NvSciStreamAttributeQuery ( NvSciStreamQueryableAttrib const  attr,
    int32_t *const  value 
    )

    Queries the value of one of the NvSciStreamQueryableAttrib.

    Precondition
    • None.

    Actions

    • NvSciStream looks up the value for the given NvSciStreamQueryableAttrib and returns it.

    Postconditions

    • None.
    Parameters
    [in]attrNvSciStreamQueryableAttrib to query.
    [out]valueThe value queried.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockConnect()

    NvSciError NvSciStreamBlockConnect ( NvSciStreamBlock const  upstream,
    NvSciStreamBlock const  downstream 
    )

    Establishes connection between two blocks referenced by the given NvSciStreamBlock(s).

    • Connects an available output of one block with an available input of another block.
    • Each input and output can only have one connection. A stream is operational when all inputs and outputs of all blocks in the stream have a connection.
    Precondition
    • The upstream block has an available output connection.
    • The downstream block has an available input connection.

    Actions

    • Establish a connection between the two blocks.

    Postconditions

    • When a block has a connection to producer as well as connection to every consumer(s) in the stream, it will receive a NvSciStreamEventType_Connected event.
    Parameters
    [in]upstreamNvSciStreamBlock which references an upstream block. Valid value: A valid NvSciStreamBlock which does not reference a Pool or Queue block.
    [in]downstreamNvSciStreamBlock which references a downstream block. Valid value: A valid NvSciStreamBlock which does not reference a Pool or Queue block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockConsumerCountGet()

    NvSciError NvSciStreamBlockConsumerCountGet ( NvSciStreamBlock const  block,
    uint32_t *const  numConsumers 
    )

    Queries the number of consumers downstream of the block referenced by the given NvSciStreamBlock (or 1 if the block itself is a consumer).

    Used primarily by producer to determine the number of signaller sync objects and corresponding fences that must be waited for before reusing packet buffers.

    Precondition
    • Block must have received NvSciStreamEventType_Connected event indicating that the stream is fully connected.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [out]numConsumersPointer to location in which to store the count.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockDelete()

    NvSciError NvSciStreamBlockDelete ( NvSciStreamBlock const  block)

    Schedules a block referenced by the given NvSciStreamBlock for destruction, disconnecting the block if this hasn't already occurred.

    • The block's handle may no longer be used for any function calls.
    • Resources associated with the block may not be freed immediately.
    • Any pending packets downstream of the destroyed block will still be available for the consumer to acquire.
    • No new packets upstream of the destroyed block can be presented. Once packets are released, they will be freed.
    Precondition
    • None.

    Actions

    • The block is scheduled for destruction.
    • A NvSciStreamEventType_Disconnected event is sent to all upstream and downstream blocks, if they haven't received one already.

    Postconditions

    • The referenced NvSciStreamBlock is no longer valid.
    • If there is an NvSciEventNotifier bound to the referenced NvSciStreamBlock, it is unbound.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockDisconnect()

    NvSciError NvSciStreamBlockDisconnect ( NvSciStreamBlock const  block)

    Disconnects an IpcSrc block referenced by the given NvSciStreamBlock.

    • This API can be used to disconnect any dead consumer process during normal operational state.
    Precondition
    • Block must be in the normal operational state after receiving an NvSciStreamEventType_SetupComplete event.

    Actions

    • A NvSciStreamEventType_Disconnected event is sent to all upstream and downstream blocks, if they haven't received one already.

    Postconditions

    • None
    Parameters
    [in]blockNvSciStreamBlock which references an IpcSrc block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockElementAttrGet()

    NvSciError NvSciStreamBlockElementAttrGet ( NvSciStreamBlock const  block,
    NvSciStreamBlockType const  queryBlockType,
    uint32_t const  elemIndex,
    uint32_t *const  userType,
    NvSciBufAttrList *const  bufAttrList 
    )

    Queries the user-defined type and/or buffer attribute list for an entry, referenced by elemIndex, in list of elements received at the block from the source identified by queryBlockType.

    At least one of userType or bufAttrList must be non-NULL, but if the caller is only interested in one of the values, the other can be NULL.

    When called on a producer or consumer block, queryBlockType must be NvSciStreamBlockType_Pool, and the query is for the list of allocated elements sent from the pool. When called on a primary pool block, queryBlockType may be either NvSciStreamBlockType_Producer or NvSciStreamBlockType_Consumer, and the query is for the list of supported elements sent from the referenced endpoint(s). When called on a secondary pool block, queryBlockType may be either NvSciStreamBlockType_Producer or NvSciStreamBlockType_Consumer. If queryBlockType is NvSciStreamBlockType_Producer, the query is for the list of allocated elements sent from the primary pool. If the element is unused by the consumer, an NULL NvSciBufAttrList is returned. If queryBlockType is NvSciStreamBlockType_Consumer, the query is for referenced the list of supported elements sent from consumer(s).

    Precondition
    • Block must be in the phase where element import is available, after receiving an NvSciStreamEventType_Elements event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementImport.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockTypeIdentifies the source of the element list.
    [in]elemIndexIndex of the entry in the element list to query.
    [out]userTypePointer to location in which to store the type.
    [out]bufAttrListPointer to location in which to store the attribute list. The caller owns the attribute list handle received and should free it when it is no longer needed.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementAttrGetWithCrc()

    NvSciError NvSciStreamBlockElementAttrGetWithCrc ( NvSciStreamBlock const  block,
    NvSciStreamBlockType const  queryBlockType,
    uint32_t const  elemIndex,
    uint32_t *const  userType,
    NvSciBufAttrList *const  bufAttrList,
    uint32_t *const  crc 
    )

    Queries the user-defined type and/or buffer attribute list for an entry, referenced by elemIndex, in list of elements received at the block from the source identified by queryBlockType.

    At least one of userType or bufAttrList must be non-NULL, but if the caller is only interested in one of the values, the other can be NULL.

    When called on a producer or consumer block, queryBlockType must be NvSciStreamBlockType_Pool, and the query is for the list of allocated elements sent from the pool. When called on a primary pool block, queryBlockType may be either NvSciStreamBlockType_Producer or NvSciStreamBlockType_Consumer, and the query is for the list of supported elements sent from the referenced endpoint(s). When called on a secondary pool block, queryBlockType may be either NvSciStreamBlockType_Producer or NvSciStreamBlockType_Consumer. If queryBlockType is NvSciStreamBlockType_Producer, the query is for the list of allocated elements sent from the primary pool. If the element is unused by the consumer, an NULL NvSciBufAttrList is returned. If queryBlockType is NvSciStreamBlockType_Consumer, the query is for referenced the list of supported elements sent from consumer(s).

    A wrapper function which calls the NvSciStreamBlockElementAttrGet() API and updates the crc value.

    Precondition
    • Block must be in the phase where element import is available, after receiving an NvSciStreamEventType_Elements event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementImport.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockTypeIdentifies the source of the element list.
    [in]elemIndexIndex of the entry in the element list to query.
    [out]userTypePointer to location in which to store the type.
    [out]bufAttrListPointer to location in which to store the attribute list. The caller owns the attribute list handle received and should free it when it is no longer needed.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementAttrSet()

    NvSciError NvSciStreamBlockElementAttrSet ( NvSciStreamBlock const  block,
    uint32_t const  userType,
    NvSciBufAttrList const  bufAttrList 
    )

    Adds an element with the specified userType and bufAttrList to the list of elements defined by block.

    When called on a producer or consumer block, it adds to the list of elements which that endpoint is capable of supporting. When called on a pool block, it adds to the list of elements which will be used for the final packet layout. This interface is not supported on the secondary pools.

    Precondition
    • The block must be in the phase where element export is available. For producer and consumer blocks, this begins after receiving the NvSciStreamEventType_Connected event. For pool blocks, this begins after receiving the NvSciStreamEventType_Elements event. In all cases, this phase ends after a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementExport.

    Actions

    • Appends the specified element to the current list.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]userTypeUser-defined type to identify the element.
    [in]bufAttrListBuffer attribute list for element. NvSciStream will clone the attribute list, so the caller can safely free it once the function returns.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementAttrSetWithCrc()

    NvSciError NvSciStreamBlockElementAttrSetWithCrc ( NvSciStreamBlock const  block,
    uint32_t const  userType,
    NvSciBufAttrList const  bufAttrList,
    uint32_t *const  crc 
    )

    Adds an element with the specified userType and bufAttrList to the list of elements defined by block.

    When called on a producer or consumer block, it adds to the list of elements which that endpoint is capable of supporting. When called on a pool block, it adds to the list of elements which will be used for the final packet layout. This interface is not supported on the secondary pools.

    A wrapper function which calls the NvSciStreamBlockElementAttrSet() API and updates the crc value.

    Precondition
    • The block must be in the phase where element export is available. For producer and consumer blocks, this begins after receiving the NvSciStreamEventType_Connected event. For pool blocks, this begins after receiving the NvSciStreamEventType_Elements event. In all cases, this phase ends after a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementExport.

    Actions

    • Appends the specified element to the current list.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]userTypeUser-defined type to identify the element.
    [in]bufAttrListBuffer attribute list for element. NvSciStream will clone the attribute list, so the caller can safely free it once the function returns.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementCountGet()

    NvSciError NvSciStreamBlockElementCountGet ( NvSciStreamBlock const  block,
    NvSciStreamBlockType const  queryBlockType,
    uint32_t *const  numElements 
    )

    Queries the number of elements received at the block from the source identified by queryBlockType.

    When called on a producer or consumer block, queryBlockType must be NvSciStreamBlockType_Pool, and the query is for the list of allocated elements sent from the pool. When called on a primary pool block, queryBlockType may be either NvSciStreamBlockType_Producer or NvSciStreamBlockType_Consumer, and the query is for the list of supported elements sent from the referenced endpoint(s). When called on a secondary pool block, queryBlockType may be either NvSciStreamBlockType_Producer or NvSciStreamBlockType_Consumer. If queryBlockType is NvSciStreamBlockType_Producer, the query is for the list of allocated elements sent from the primary pool. If queryBlockType is NvSciStreamBlockType_Consumer, the query is for referenced the list of supported elements sent from consumer(s).

    Precondition
    • Block must be in the phase where element import is available, after receiving an NvSciStreamEventType_Elements event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementImport.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockTypeIdentifies the source of the element list.
    [out]numElementsPointer to location in which to store the count.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementNotVisible()

    NvSciError NvSciStreamBlockElementNotVisible ( NvSciStreamBlock const  pool,
    uint32_t const  userType,
    uint32_t const  consumerIndex 
    )

    Indicates the entry with userType in the list of allocated elements will be visible to the consumer block at @consumerIndex.

    By default, all entries are visible, so this is only necessary if an element will not be visible to indexed consumer.

    This is only supported for pool blocks.

    For any elements that not visible to the consumer, any waiter NvSciSyncAttrLists that it provides (or fails to provide) will be ignored when consolidating with other attribute lists and passing to the producer. Additionally, NvSciStream may optimize buffer resources and not share the element buffers with the consumer.

    Precondition
    • Block must be in the phase where element export is available, after receiving an NvSciStreamEventType_Elements event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementExport.

    Actions

    • Marks the element not visible by the consumer.

    Postconditions

    • None.
    Parameters
    [in]poolNvSciStreamBlock which references a pool.
    [in]userTypeUser-defined type to identify the element.
    [in]consumerIndexIndex of the consumer block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementSignalObjGet()

    NvSciError NvSciStreamBlockElementSignalObjGet ( NvSciStreamBlock const  block,
    uint32_t const  queryBlockIndex,
    uint32_t const  elemIndex,
    NvSciSyncObj *const  signalSyncObj 
    )

    Retrieves an opposing endpoint's NvSciSync object which it uses to signal when it is done writing or readying a buffer referenced by elemIndex.

    If the value is NULL, the opposing endpoint either does not use the buffer or uses it synchronously, and all operations on the buffer will be completed by the time the packet is received. The received sync object is owned by the caller, and should be freed when it is no longer needed.

    Note: In the late-/re-attach usecase, when the producer retrieves consumer's NvSciSync object, this returns NULL to indicate no change for the early consumers. It only returns NvSciSync object for the new late-/re-attach consumers.

    This is only supported for producer and consumer blocks.

    Precondition
    • Block must be in the phase where signal object import is available, after receiving an NvSciStreamEventType_SignalObj event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_SignalObjImport.

    Actions None

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockIndexThe index of the opposing block to query. When querying producer sync objects from the consumer, this is always 0. When querying consumer sync objects from the producer, this is the index of the consumer.
    [in]elemIndexIndex of the entry in the sync object list to get.
    [in]signalSyncObjLocation in which to return the sync object.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementSignalObjGetWithCrc()

    NvSciError NvSciStreamBlockElementSignalObjGetWithCrc ( NvSciStreamBlock const  block,
    uint32_t const  queryBlockIndex,
    uint32_t const  elemIndex,
    NvSciSyncObj *const  signalSyncObj,
    uint32_t *const  crc 
    )

    Retrieves an opposing endpoint's NvSciSync object which it uses to signal when it is done writing or readying a buffer referenced by elemIndex.

    If the value is NULL, the opposing endpoint either does not use the buffer or uses it synchronously, and all operations on the buffer will be completed by the time the packet is received. The received sync object is owned by the caller, and should be freed when it is no longer needed.

    Note: In the late-/re-attach usecase, when the producer retrieves consumer's NvSciSync object, this returns NULL to indicate no change for the early consumers. It only returns NvSciSync object for the new late-/re-attach consumers.

    This is only supported for producer and consumer blocks.

    A wrapper function which calls the NvSciStreamBlockElementSignalObjGet() API and updates the crc value.

    Precondition
    • Block must be in the phase where signal object import is available, after receiving an NvSciStreamEventType_SignalObj event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_SignalObjImport.

    Actions None

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockIndexThe index of the opposing block to query. When querying producer sync objects from the consumer, this is always 0. When querying consumer sync objects from the producer, this is the index of the consumer.
    [in]elemIndexIndex of the entry in the sync object list to get.
    [in]signalSyncObjLocation in which to return the sync object.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementSignalObjSet()

    NvSciError NvSciStreamBlockElementSignalObjSet ( NvSciStreamBlock const  block,
    uint32_t const  elemIndex,
    NvSciSyncObj const  signalSyncObj 
    )

    Specifies block's NvSciSync object used to signal when it is done writing or reading a buffer referenced by elemIndex.

    By default, the value is NULL, indicating that the buffer is either unused or is used synchronously and all operations will have completed by the time the endpoint returns the packet to the stream.

    This is only supported for producer and consumer blocks.

    Precondition
    • Block must be in the phase where signal object export is available, after receiving an NvSciStreamEventType_WaiterAttr event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_SignalObjExport.

    Actions

    • Saves the sync object for the element.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]elemIndexIndex of the entry in the sync object list to set.
    [in]signalSyncObjSignalling sync object.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementSignalObjSetWithCrc()

    NvSciError NvSciStreamBlockElementSignalObjSetWithCrc ( NvSciStreamBlock const  block,
    uint32_t const  elemIndex,
    NvSciSyncObj const  signalSyncObj,
    uint32_t *const  crc 
    )

    Specifies block's NvSciSync object used to signal when it is done writing or reading a buffer referenced by elemIndex.

    By default, the value is NULL, indicating that the buffer is either unused or is used synchronously and all operations will have completed by the time the endpoint returns the packet to the stream.

    This is only supported for producer and consumer blocks.

    A wrapper function which calls the NvSciStreamBlockElementSignalObjSet() API and updates the crc value.

    Precondition
    • Block must be in the phase where signal object export is available, after receiving an NvSciStreamEventType_WaiterAttr event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_SignalObjExport.

    Actions

    • Saves the sync object for the element.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]elemIndexIndex of the entry in the sync object list to set.
    [in]signalSyncObjSignalling sync object.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementUsageSet()

    NvSciError NvSciStreamBlockElementUsageSet ( NvSciStreamBlock const  block,
    uint32_t const  elemIndex,
    bool const  used 
    )

    Indicates whether the entry at elemIndex in the list of allocated elements will be used by the block.

    By default, all entries are are assumed to be used, so this is only necessary if an entry will not be used.

    This is only supported for consumer blocks. Producers are expected to provide all elements defined by the pool.

    For any elements that a consumer indicates it will not use, any waiter NvSciSyncAttrLists that it provides (or fails to provide) will be ignored when consolidating with other attribute lists and passing to the producer. Additionally, NvSciStream may optimize buffer resources and not share the element buffers with the consumer.

    Precondition
    • Block must be in the phase where element import is available, after receiving an NvSciStreamEventType_Elements event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_ElementImport.

    Actions

    • Marks the element as unused by the consumer.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]elemIndexIndex of the entry in the element list to set.
    [in]usedFlag indicating whether the element is used.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementWaiterAttrGet()

    NvSciError NvSciStreamBlockElementWaiterAttrGet ( NvSciStreamBlock const  block,
    uint32_t const  elemIndex,
    NvSciSyncAttrList *const  waitSyncAttrList 
    )

    Retrieves the opposing endpoints' NvSciSync requirements to be be able to wait for sync objects signalled by block for the element referenced by elemIndex.

    If the value is NULL, the opposing endpoint expects this block to write or read the element synchronously, and not provide any sync object. The received attribute list is owned by the caller, and should be freed when it is no longer needed.

    This is only supported for producer and consumer blocks.

    Precondition
    • Block must be in the phase where waiter attr import is available, after receiving an NvSciStreamEventType_WaiterAttr event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_WaiterAttrImport.

    Actions None

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]elemIndexIndex of the entry in the attribute list to get.
    [in]waitSyncAtttListLocation in which to return the requirements.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockElementWaiterAttrSet()

    NvSciError NvSciStreamBlockElementWaiterAttrSet ( NvSciStreamBlock const  block,
    uint32_t const  elemIndex,
    NvSciSyncAttrList const  waitSyncAttrList 
    )

    Specifies block's NvSciSync requirements to be able to wait for sync objects provided by the opposing endpoint(s) for the element referenced by elemIndex.

    By default, the value is NULL, indicating the opposing endpoint(s) must write or read the element synchronously, unless this endpoint marked it as unused.

    This is only supported for producer and consumer blocks.

    Precondition
    • Block must be in the phase where waiter attr export is available, after receiving an NvSciStreamEventType_Elements event and before a call to NvSciStreamBlockSetupStatusSet() with NvSciStreamSetup_WaiterAttrExport.

    Actions

    • Saves the attribute list for the element.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]elemIndexIndex of the entry in the attribute list to set.
    [in]waitSyncAtttListAttribute list with waiter requirments.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockErrorGet()

    NvSciError NvSciStreamBlockErrorGet ( NvSciStreamBlock const  block,
    NvSciError *const  status 
    )

    Queries the error code for an error event.

    If multiple errors occur before this query, only return the first error code. All subsequent errors are ignored until the error code is queried, with the assumption that they are side effects of the first one.

    Precondition
    None

    Actions None

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [out]statusPointer to location in which to store the error code.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockEventQuery()

    NvSciError NvSciStreamBlockEventQuery ( NvSciStreamBlock const  block,
    int64_t const  timeoutUsec,
    NvSciStreamEventType *const  event 
    )

    Queries for the next event from block referenced by the given NvSciStreamBlock, optionally waiting when the an event is not yet available, then removes the event from the priority queue and returns the event type to the caller.

    Additional information about the event can be queried through the appropriate block functions.

    If the block is set up to use NvSciEventService, applications should call this API with zero timeout after waking up from waiting on the NvSciEventNotifier obtained from NvSciStreamBlockEventServiceSetup() interface, and applications should query all the events in the block after waking up. Wake up due to spurious events is possible, and in that case calling this function will return no event.

    Precondition
    • The block to query has been created.

    Actions

    • If the block is not set up to use NvSciEventService, wait until an event is pending on the block or the specified timeout period is reached, whichever comes first.
    • Retrieves the next event (if any) from the block, returning the NvSciStreamEventType.

    Postconditions

    • As defined for each NvSciStreamEventType, dequeuing an event may allow other operations on the block to proceed.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]timeoutUsecTimeout in microseconds (-1 to wait forever).
    [out]eventLocation in which to return the NvSciStreamEventType.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockEventServiceSetup()

    NvSciError NvSciStreamBlockEventServiceSetup ( NvSciStreamBlock const  block,
    NvSciEventService *const  eventService,
    NvSciEventNotifier **const  eventNotifier 
    )

    Sets up the NvSciEventService on a block referenced by the given NvSciStreamBlock by creating an NvSciEventNotifier to report the occurrence of any events on that block.

    The NvSciEventNotifier is bound to the input NvSciEventService and NvSciStreamBlock. Users can wait for events on the block using the NvSciEventService API and then retrieve event details using NvSciStreamBlockEventQuery(). Binding one or more blocks in a stream to an NvSciEventService is optional. If not bound to an NvSciEventService, users may instead wait for events on a block by specifying a non-zero timeout in NvSciStreamBlockEventQuery(). If blocks in the same stream within the same process are bound to different NvSciEventService, behavior is undefined. The user is responsible for destroying the NvSciEventNotifier when it's no longer needed.

    Precondition
    • After the input block is created, before calling this API, no NvSciStream API shall be called on the block.

    Actions

    • Sets up the input block to use the input NvSciEventService for event signaling.
    • Creates an NvSciEventNotifier object and returns the pointer to the object via eventNotifier.

    Postconditions

    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]eventServicePointer to a NvSciEventService object.
    [out]eventNotifierTo be filled with the pointer to the created NvSciEventNotifier object.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockHandleInternalEvents()

    NvSciError NvSciStreamBlockHandleInternalEvents ( NvSciStreamBlock const  block)

    Handle NvSciStream internal events on a block referenced by the given NvSciStreamBlock.

    This is only supported for IpcSrc and IpcDst blocks to process the I/O messages in the internal NvSciIpc channel.

    NvSciStream processes the NvSciIpc READ/WRITE message when it receives notification on the NvSciIpc endpoint. In the case that the application disables the IPC notification using NvSciIpcEnableNotification(), the application needs to explicitly call this interface to inform NvSciStream to process the pending internal I/O message on the IpcSrc/IpcDst block.

    Precondition
    • None

    Actions

    • Handles internal event on the block.

    Postconditions None.

    Parameters
    [in]blockNvSciStreamBlock which references a block. Only IpcSrc and IpcDst blocks are supproted.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockInternalEventServiceSetup()

    NvSciError NvSciStreamBlockInternalEventServiceSetup ( NvSciStreamBlock const  block,
    NvSciEventService *const  eventService,
    uint32_t *const  notifierCount,
    NvSciEventNotifier **const  eventNotifierArray 
    )

    Configures a block referenced by the given NvSciStreamBlock to use the user-provided NvSciEventService to wait for internal events on this block.

    Returns an array of internal NvSciEventNotifiers that are bound to the input NvSciEventService. Users must wait for events on these NvSciEventNotifiers. Once there's new internal event, the internal callback will be triggered automatically to handle the event.

    Without the user-provided NvSciEventService, NvSciStream creates an NvSciEventService internally and spawns a thread to handle the internal events.

    When called on an ipcsrc or ipcdst block, the notifiers are associated with internal NvSciIpc events and messages. The internal callback is to process message I/O. 3 notifiers are returned in eventNotifierArray, NvSciIpc notifier, internal write notifier and disconnect notifier.

    The user is responsible for destroying the NvSciEventNotifier and NvSciEventService when it's no longer needed. The NvSciIpc event notifier should be deleted before calling NvSciIpcCloseEndpointSafe(),

    Precondition
    • This API and NvSciStreamBlockEventServiceSetup should be called after the input block is created and before connecting it to other block.

    Actions

    • Sets up the input block to use the user-provided NvSciEventService to handle internal messages.
    • Creates NvSciEventNotifier objects and returns an array of pointers to the objects via eventNotifierArray.

    Postconditions None.

    Parameters
    [in]blockNvSciStreamBlock which references a block. Only IpcSrc and IpcDst blocks are supproted.
    [in]eventServicePointer to a NvSciEventService object.
    [in,out]notifierCountOn input, contains the size of the eventNotifierArray. On output, contains the number of returned NvSciEventNotifiers bound to this eventService.
    [out]eventNotifierArrayTo be filled with the pointers to the created NvSciEventNotifier objects.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockPacketBufferGet()

    NvSciError NvSciStreamBlockPacketBufferGet ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    uint32_t const  elemIndex,
    NvSciBufObj *const  bufObj 
    )

    In producer and consumer blocks, queries an indexed buffer from a packet.

    The resulting NvSciBufObj is owned by the caller and should be freed when it is no longer needed.

    Precondition
    • Block must not have rejected the packet, and must still be in packet import phase.

    Actions

    • Returns an NvSciBufObj owned by the caller.

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]elemIndexIndex of the element to query.
    [out]bufObjLocation in which to store the buffer object handle.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockPacketBufferGetWithCrc()

    NvSciError NvSciStreamBlockPacketBufferGetWithCrc ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    uint32_t const  elemIndex,
    NvSciBufObj *const  bufObj,
    size_t const  crcCount,
    uint32_t *const  crc 
    )

    In producer and consumer blocks, queries an indexed buffer from a packet.

    The resulting NvSciBufObj is owned by the caller and should be freed when it is no longer needed.

    A wrapper function which calls the NvSciStreamBlockPacketBufferGet() API and updates the crc value.

    Precondition
    • Block must not have rejected the packet, and must still be in packet import phase.

    Actions

    • Returns an NvSciBufObj owned by the caller.

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]elemIndexIndex of the element to query.
    [out]bufObjLocation in which to store the buffer object handle.
    [in]crcCountNumber of CRC values to be updated by this API.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockPacketFenceGet()

    NvSciError NvSciStreamBlockPacketFenceGet ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    uint32_t const  queryBlockIndex,
    uint32_t const  elemIndex,
    NvSciSyncFence *const  prefence 
    )

    Retrieves the prefence which indicates when the the indexed opposing endpoint will be done operating on the indexed buffer of a packet.

    Precondition
    • The packet must be held by the application.

    Actions

    • The fence is copied from the packet.

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]queryBlockIndexIndex of the opposing block to query. When querying producer fences from the consumer, this is always 0. When querying consumer fences from the producer, this is the index of the consumer.
    [in]elemIndexIndex of the buffer for the fence.
    [out]prefenceLocation in which to return the fence.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockPacketFenceGetWithCrc()

    NvSciError NvSciStreamBlockPacketFenceGetWithCrc ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    uint32_t const  queryBlockIndex,
    uint32_t const  elemIndex,
    NvSciSyncFence *const  prefence,
    uint32_t *const  crc 
    )

    Retrieves the prefence which indicates when the the indexed opposing endpoint will be done operating on the indexed buffer of a packet.

    A wrapper function which calls the NvSciStreamBlockPacketFenceGet() API and updates the crc value.

    Precondition
    • The packet must be held by the application.

    Actions

    • The fence is copied from the packet.

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]queryBlockIndexIndex of the opposing block to query. When querying producer fences from the consumer, this is always 0. When querying consumer fences from the producer, this is the index of the consumer.
    [in]elemIndexIndex of the buffer for the fence.
    [out]prefenceLocation in which to return the fence.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockPacketFenceSet()

    NvSciError NvSciStreamBlockPacketFenceSet ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    uint32_t const  elemIndex,
    NvSciSyncFence const *const  postfence 
    )

    Sets the postfence which indicates when the application controlling will be done operating on the indexed buffer of a packet.

    Precondition
    • The packet must be held by the application.

    Actions

    • The fence is saved in the packet until it is returned to the stream.

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]elemIndexIndex of the buffer for the fence.
    [in]postfenceThe fence to save.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockPacketFenceSetWithCrc()

    NvSciError NvSciStreamBlockPacketFenceSetWithCrc ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    uint32_t const  elemIndex,
    NvSciSyncFence const *const  postfence,
    uint32_t *const  crc 
    )

    Sets the postfence which indicates when the application controlling will be done operating on the indexed buffer of a packet.

    A wrapper function which calls the NvSciStreamBlockPacketFenceSet() API and updates the crc value.

    Precondition
    • The packet must be held by the application.

    Actions

    • The fence is saved in the packet until it is returned to the stream.

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]elemIndexIndex of the buffer for the fence.
    [in]postfenceThe fence to save.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamBlockPacketNewHandleGet()

    NvSciError NvSciStreamBlockPacketNewHandleGet ( NvSciStreamBlock const  block,
    NvSciStreamPacket *const  handle 
    )

    In producer and consumer blocks, queries the handle of a newly defined packet.

    Precondition
    • Must follow receipt of a NvSciStreamEventType_PacketCreate event for which the handle has not yet been retrieved.

    Actions

    • Dequeues the pending handle.

    Postconditions

    • The packet can now be queried and accepted or rejected.
    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [out]handleLocation in which to return the packet handle.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockPacketOldCookieGet()

    NvSciError NvSciStreamBlockPacketOldCookieGet ( NvSciStreamBlock const  block,
    NvSciStreamCookie *const  cookie 
    )

    In producer and consumer blocks, queries the cookie of a recently deleted packet.

    Precondition
    • Must follow receipt of a NvSciStreamEventType_PacketDelete event for which the cookie has not yet been retrieved.

    Actions

    • Dequeues the pending cookie and frees packet resources.

    Postconditions

    • The packet's handle can no longer be used for any operations on the block.
    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [out]cookieLocation in which to return the packet cookie.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockPacketStatusSet()

    NvSciError NvSciStreamBlockPacketStatusSet ( NvSciStreamBlock const  block,
    NvSciStreamPacket const  handle,
    NvSciStreamCookie const  cookie,
    NvSciError const  status 
    )

    In producer and consumer blocks, either accepts a packet, providing a cookie to be used in subsequent operations, or rejects it, providing an error value to be reported to the pool.

    Precondition
    • The packet has not yet been accepted or rejected.

    Actions

    • Binds the cookie, if any, to the packet, and informs the pool of the status.

    Postconditions

    • If rejected, the packet handle can no longer be used for any operations.
    Parameters
    [in]blockNvSciStreamBlock which references a producer or consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]cookieCookie to assign to the packet if it is accepted.
    [in]statusStatus value which is either NvSciError_Success to indicate acceptance, or any other value to indicate rejection. (But NvSciError_StreamInternalError is not allowed.)
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockSetupStatusSet()

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

    Indicates a group of setup operations identified by setupType on block are complete.

    The relevant information will be transmitted to the rest of the stream, triggering events and becoming available for query where appropriate.

    Precondition
    • See descriptions for specific NvSciStreamSetup enum values.

    Actions

    • See descriptions for specific NvSciStreamSetup enum values.

    Postconditions

    • See descriptions for specific NvSciStreamSetup enum values.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]setupTypeIdentifies the group of setup operations whose status is to be updated.
    [in]completedProvided for future support of dynamically reconfigurable streams. Currently must always be true.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockUserInfoGet()

    NvSciError NvSciStreamBlockUserInfoGet ( NvSciStreamBlock const  block,
    NvSciStreamBlockType const  queryBlockType,
    uint32_t const  queryBlockIndex,
    uint32_t const  userType,
    uint32_t *const  dataSize,
    void *const  data 
    )

    Queries the user-defined information with userType in list of endpoint information at the block from the source identified by queryBlockType and queryBlockIndex.

    The dataSize contains the size of the input data. If data is NULL, store the total size of the queried information in dataSize. If not, copy the queried information into data and store the size of the data copied into data.

    Precondition
    • Block must have received NvSciStreamEventType_Connected event indicating that the stream is fully connected and before receiving NvSciStreamEventType_SetupComplete event indicating setup of the stream is complete.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockTypeIndicates whether to query information from producer or consumer endpoint.
    [in]queryBlockIndexIndex of the endpoint block to query.
    [in]userTypeUser-defined type to query.
    [in,out]dataSizeOn input, contains the size of the memory referenced by data. On output, contains the amount of data copied into data, or the total size of the queried information if data is NULL.
    [out]dataPointer to location in which to store the information.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockUserInfoGetWithCrc()

    NvSciError NvSciStreamBlockUserInfoGetWithCrc ( NvSciStreamBlock const  block,
    NvSciStreamBlockType const  queryBlockType,
    uint32_t const  queryBlockIndex,
    uint32_t const  userType,
    uint32_t *const  dataSize,
    void *const  data,
    uint32_t *const  crc 
    )

    Queries the user-defined information with userType in list of endpoint information at the block from the source identified by queryBlockType and queryBlockIndex.

    The dataSize contains the size of the input data. If data is NULL, store the total size of the queried information in dataSize. If not, copy the queried information into data and store the size of the data copied into data.

    A wrapper function which calls the NvSciStreamBlockUserInfoGet() API and updates the crc value.

    Precondition
    • Block must have received NvSciStreamEventType_Connected event indicating that the stream is fully connected and before receiving NvSciStreamEventType_SetupComplete event indicating setup of the stream is complete.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]queryBlockTypeIndicates whether to query information from producer or consumer endpoint.
    [in]queryBlockIndexIndex of the endpoint block to query.
    [in]userTypeUser-defined type to query.
    [in,out]dataSizeOn input, contains the size of the memory referenced by data. On output, contains the amount of data copied into data, or the total size of the queried information if data is NULL.
    [out]dataPointer to location in which to store the information.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockUserInfoSet()

    NvSciError NvSciStreamBlockUserInfoSet ( NvSciStreamBlock const  block,
    uint32_t const  userType,
    uint32_t const  dataSize,
    void const *const  data 
    )

    Provides user-defined information at the producer and consumer with the specified userType, which can be queried by other blocks after the stream is fully connected.

    When called on a producer or consumer block, it adds to its list of user-defined information.

    Precondition
    • The block is created but not connected to any other block.

    Actions

    • Appends the specified user-defined information to the information list.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]userTypeUser-defined type to identify the endpoint information.
    [in]dataSizeSize of the provided data.
    [in]dataPointer to user-defined information.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamBlockUserInfoSetWithCrc()

    NvSciError NvSciStreamBlockUserInfoSetWithCrc ( NvSciStreamBlock const  block,
    uint32_t const  userType,
    uint32_t const  dataSize,
    void const *const  data,
    uint32_t *const  crc 
    )

    Provides user-defined information at the producer and consumer with the specified userType, which can be queried by other blocks after the stream is fully connected.

    When called on a producer or consumer block, it adds to its list of user-defined information.

    A wrapper function which calls the NvSciStreamBlockUserInfoSet() API and updates the crc value.

    Precondition
    • The block is created but not connected to any other block.

    Actions

    • Appends the specified user-defined information to the information list.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    [in]userTypeUser-defined type to identify the endpoint information.
    [in]dataSizeSize of the provided data.
    [in]dataPointer to user-defined information.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamConsumerCreate()

    NvSciError NvSciStreamConsumerCreate ( NvSciStreamBlock const  queue,
    NvSciStreamBlock *const  consumer 
    )

    Creates an instance of consumer block, associates the given queue block referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created consumer block.

    • Creates a block for the consumer end of a stream. All streams require at least one consumer block. A consumer block must have a queue associated with it for managing pending packets. Consumer blocks have one input connection and no output connections.
    • Once the stream is operational, this block can be used to exchange NvSciSync information with the producer and NvSciBuf information with the pool.
    Precondition
    • None.

    Actions

    • Creates a new instance of consumer block.
    • Associates the given queue block with the consumer block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    • The block can be queried for events.
    Parameters
    [in]queueNvSciStreamBlock which references a queue block to be associated with the consumer block.
    [out]consumerNvSciStreamBlock which references a new consumer block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamConsumerCreate2()

    NvSciError NvSciStreamConsumerCreate2 ( NvSciStreamBlock const  queue,
    bool const  crcValidate,
    NvSciStreamBlock *const  consumer 
    )

    Creates an instance of consumer block, associates the given queue block referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created consumer block.

    • Enables the exporting the CRC data for validation with producer to switch to runtime if crcValidate is true.
    • Creates a block for the consumer end of a stream. All streams require at least one consumer block. A consumer block must have a queue associated with it for managing pending packets. Consumer blocks have one input connection and no output connections.
    • Waits for CRC data provided by the application before switching to runtime if crcValidate is true.
    • Once the stream is operational, this block can be used to exchange NvSciSync information with the producer and NvSciBuf information with the pool.
    Precondition
    • None.

    Actions

    • Creates a new instance of consumer block.
    • Associates the given queue block with the consumer block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    • The block can be queried for events.
    Parameters
    [in]queueNvSciStreamBlock which references a queue block to be associated with the consumer block.
    [in]crcValidateIndicates whether validation step is required before switching to runtime.
    [out]consumerNvSciStreamBlock which references a new consumer block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamConsumerIndexGet()

    NvSciError NvSciStreamConsumerIndexGet ( NvSciStreamBlock const  consumer,
    uint32_t *const  index 
    )

    Queries the index of the consumer block referenced by the given NvSciStreamBlock.

    Precondition
    • Block must have received NvSciStreamEventType_Connected event indicating that the stream is fully connected.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]consumerNvSciStreamBlock which references a consumer block.
    [out]indexLocation in which to return the consumer's index.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamConsumerPacketAcquire()

    NvSciError NvSciStreamConsumerPacketAcquire ( NvSciStreamBlock const  consumer,
    NvSciStreamCookie *const  cookie 
    )

    Instructs the consumer referenced by consumer to retrieve a packet from the queue.

    If a packet is available for consumer processing, its consumer fences will be cleared, ownership will be moved to the application, and its cookie will be returned.

    The consumer may hold multiple packets and is not required to return them in the order they were obtained.

    Precondition
    • All packets have been accepted by the producer and the consumer(s).
    • The consumer block must have received the NvSciStreamEventType_PacketReady event from queue for processing the next available packet.

    Actions

    • Retrieves an available packet for consumer processing and returns it to the caller.

    Postconditions

    • Packet is held by the consumer application.
    Parameters
    [in]consumerNvSciStreamBlock which references a consumer block.
    [out]cookieNvSciStreamCookie identifying the packet.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamConsumerPacketRelease()

    NvSciError NvSciStreamConsumerPacketRelease ( NvSciStreamBlock const  consumer,
    NvSciStreamPacket const  handle 
    )

    Instructs the consumer referenced by consumer to release the packet referenced by handle into the stream for producer reuse.

    Precondition
    • The packet must be held by the consumer application.

    Actions

    • The packet is sent upstream, where it will be processed according to the stream's configuration.

    Postconditions

    • The packet is no longer held by the consumer application.
    Parameters
    [in]consumerNvSciStreamBlock which references a consumer block.
    [in]handleNvSciStreamPacket which references the packet.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamFifoQueueCreate()

    NvSciError NvSciStreamFifoQueueCreate ( NvSciStreamBlock *const  queue)

    Creates an instance of FIFO queue block and returns a NvSciStreamBlock referencing the created FIFO queue block.

    • Creates a block for tracking the list of packets available to be acquired by the consumer. This is one of the two available types of queue block. Every consumer must be associated with a queue block, provided at the time the consumer is created.
    • A FIFO queue can hold up to the complete set of packets created, which will be acquired in the order they were presented.
    • This type of queue is intended for consumer applications which require processing of every packet that is presented.
    • Once connected, the application does not directly interact with this block. The consumer block will communicate with it to obtain new packets.
    Precondition
    • None.

    Actions

    • Initialize a queue to manage waiting packets.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [out]queueNvSciStreamBlock which references a new FIFO queue block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamIpcDstCreate()

    NvSciError NvSciStreamIpcDstCreate ( NvSciIpcEndpoint const  ipcEndpoint,
    NvSciSyncModule const  syncModule,
    NvSciBufModule const  bufModule,
    NvSciStreamBlock *const  ipc 
    )

    Creates an instance of IpcDst block and returns a NvSciStreamBlock referencing the created IpcDst block.

    • Creates the downstream half of an IPC block pair which allows stream information to be transmitted between processes.If producer and consumer(s) present in the same process, then there is no need for IPC block pair.
    • IpcDst block has one output connection and no input connection.
    • An IpcDst block connects to upstream through the NvSciIpcEndpoint used to create the block.
    Precondition
    • None.

    Actions

    • Establishes connection through NvSciIpcEndpoint.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]ipcEndpointNvSciIpcEndpoint handle.
    [in]syncModuleNvSciSyncModule that is used to import a NvSciSyncAttrList across an IPC boundary. This must be the module associated with the NvSciSyncAttrList that is used in specifying the NvSciSyncObj waiter requirements.
    [in]bufModuleNvSciBufModule that is used to import a NvSciBufAttrList across an IPC boundary. This must be the module associated with the NvSciBufAttrList that is used in specifying the packet element information.
    [out]ipcNvSciStreamBlock which references a new IpcDst block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamIpcDstCreate2()

    NvSciError NvSciStreamIpcDstCreate2 ( NvSciIpcEndpoint const  ipcEndpoint,
    NvSciSyncModule const  syncModule,
    NvSciBufModule const  bufModule,
    NvSciStreamBlock const  pool,
    NvSciStreamBlock *const  ipc 
    )

    Creates an instance of IpcDst or C2CDst block and returns a NvSciStreamBlock referencing the created block.

    • If input NvSciIpcEndpoint is of type IPC, then this API Creates the downstream half of an IPC block pair which allows stream information to be transmitted between processes.
    • If input NvSciIpcEndpoint is of type C2C, then this API Creates the downstream half of an C2C block pair which allows stream information to be transmitted between chips.

    If producer and consumer(s) are present in the same process, then there is no need for IPC or C2C block pairs.

    • IpcDst/C2CDst block has one output connection and no input connection.
    • An IpcDst/C2CDst block connects to downstream through the NvSciIpcEndpoint used to create the block.
    Precondition
    • None.

    Actions

    • Establishes connection through NvSciIpcEndpoint.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]ipcEndpointNvSciIpcEndpoint handle.
    [in]syncModuleNvSciSyncModule that is used to import a NvSciSyncAttrList across an IPC boundary. This must be the module associated with the NvSciSyncAttrList that is used in specifying the NvSciSyncObj waiter requirements.
    [in]bufModuleNvSciBufModule that is used to import a NvSciBufAttrList across an IPC boundary. This must be the module associated with the NvSciBufAttrList that is used in specifying the packet element information.
    [in]poolNvSciStreamBlock that is used to enqueue the Packets received from C2CSrc block and send those packets downstream to . consumer block.
    [out]ipcNvSciStreamBlock which references a new IpcDst or C2CDst block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamIpcSrcCreate()

    NvSciError NvSciStreamIpcSrcCreate ( NvSciIpcEndpoint const  ipcEndpoint,
    NvSciSyncModule const  syncModule,
    NvSciBufModule const  bufModule,
    NvSciStreamBlock *const  ipc 
    )

    Creates an instance of IpcSrc block and returns a NvSciStreamBlock referencing the created IpcSrc block.

    • Creates the upstream half of an IPC block pair which allows stream information to be transmitted between processes. If producer and consumer(s) present in the same process, then there is no need for IPC block pair.
    • IpcSrc block has one input connection and no output connection.
    • An IpcSrc block connects to downstream through the NvSciIpcEndpoint used to create the block.
    Precondition
    • None.

    Actions

    • Establishes connection through NvSciIpcEndpoint.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]ipcEndpointNvSciIpcEndpoint handle.
    [in]syncModuleNvSciSyncModule that is used to import a NvSciSyncAttrList across an IPC boundary. This must be the module associated with the NvSciSyncAttrList that is used in specifying the NvSciSyncObj waiter requirements.
    [in]bufModuleNvSciBufModule that is used to import a NvSciBufAttrList across an IPC boundary. This must be the module associated with the NvSciBufAttrList that is used in specifying the packet element information.
    [out]ipcNvSciStreamBlock which references a new IpcSrc block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamIpcSrcCreate2()

    NvSciError NvSciStreamIpcSrcCreate2 ( NvSciIpcEndpoint const  ipcEndpoint,
    NvSciSyncModule const  syncModule,
    NvSciBufModule const  bufModule,
    NvSciStreamBlock const  queue,
    NvSciStreamBlock *const  ipc 
    )

    Creates an instance of IpcSrc or C2CSrc block and returns a NvSciStreamBlock referencing the created block.

    • If input NvSciIpcEndpoint is of type IPC, then this API Creates the upstream half of an IPC block pair which allows stream information to be transmitted between processes.
    • If input NvSciIpcEndpoint is of type C2C, then this API Creates the upstream half of an C2C block pair which allows stream information to be transmitted between chips.
    • If input NvSciIpcEndpoint is of type C2C and queue is not provided by application, driver creates and binds a default FIFO queue with C2CSrc block. Note that this default queue block is not visible to application.

    If producer and consumer(s) are present in the same process, then there is no need for IPC or C2C block pairs.

    • IpcSrc/C2CSrc block has one input connection and no output connection.
    • An IpcSrc/C2CSrc block connects to downstream through the NvSciIpcEndpoint used to create the block.
    Precondition
    • None.

    Actions

    • Establishes connection through NvSciIpcEndpoint.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]ipcEndpointNvSciIpcEndpoint handle.
    [in]syncModuleNvSciSyncModule that is used to import a NvSciSyncAttrList across an IPC boundary. This must be the module associated with the NvSciSyncAttrList that is used in specifying the NvSciSyncObj waiter requirements.
    [in]bufModuleNvSciBufModule that is used to import a NvSciBufAttrList across an IPC boundary. This must be the module associated with the NvSciBufAttrList that is used in specifying the packet element information.
    [in]queueNvSciStreamBlock that is used to enqueue the Packets from the Producer and send those packets downstream to C2CDst block.
    [out]ipcNvSciStreamBlock which references a new IpcSrc or C2CSrc block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamLimiterCreate()

    NvSciError NvSciStreamLimiterCreate ( uint32_t const  maxPackets,
    NvSciStreamBlock *const  limiter 
    )

    Creates an instance of Limiter block and returns a NvSciStreamBlock referencing the created Limiter block.

    • Creates a block to limit the number of packets allowed to be sent downstream to a consumer block.
    • A limiter block can be inserted anywhere in the stream between the Producer and Consumer Blocks, but its primary intent is to be inserted between a Multicast block and a Consumer.

      Precondition
    • None.

    Actions

    • Creates a new instance of Limiter block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]maxPacketsNumber of packets allowed to be sent downstream to a consumer block.
    [out]limiterNvSciStreamBlock which references a new limiter block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamMailboxQueueCreate()

    NvSciError NvSciStreamMailboxQueueCreate ( NvSciStreamBlock *const  queue)

    Creates an instance of mailbox queue block and returns a NvSciStreamBlock referencing the created mailbox queue block.

    • Creates a block for managing the packets that are ready to be acquired by the consumer. This is one of the two available types of queue block. Every consumer must be associated with a queue block, provided at the time the consumer is created.
    • A mailbox queue holds a single packet. If a new packet arrives, the packet currently being held is replaced and returned to the pool for reuse.
    • This type of queue is intended for consumer applications which don't need to process every packet and always wish to have the latest input available.
    • Once connected, the application does not directly interact with this block. The consumer block will communicate with the queue block to obtain new packets.
    Precondition
    • None.

    Actions

    • Initialize a queue to hold a single packet for acquire.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [out]queueNvSciStreamBlock which references a new mailbox queue block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamMulticastCreate()

    NvSciError NvSciStreamMulticastCreate ( uint32_t const  outputCount,
    NvSciStreamBlock *const  multicast 
    )

    Creates an instance of multicast block and returns a NvSciStreamBlock referencing the created multicast block.

    • Creates a block allowing for one input and one or more outputs.
    • Multicast block broadcasts messages sent from upstream to all of the downstream blocks.
    • Mulitcast block aggregates messages of the same type from downstream into a single message before sending it upstream.
    Precondition
    • None.

    Actions

    • Initializes a block that takes one input and one or more outputs.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]outputCountNumber of output blocks that will be connected. Valid value: 1 to NvSciStreamQueryableAttrib_MaxMulticastOutputs attribute value queried by successful call to NvSciStreamAttributeQuery() API.
    [out]multicastNvSciStreamBlock which references a new multicast block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamNewConsumerGet()

    NvSciError NvSciStreamNewConsumerGet ( NvSciStreamBlock const  producer,
    uint32_t const  consumerIndex,
    bool *const  newConnected 
    )

    Queries whether the indexed consumer is a newly connected consumer.

    This API can only be used when application uses late-attach/re-attach consumer feature.

    Precondition
    • The application must have received the NvSciStreamEventType_Connected event corresponding to the new consumer attach.

    Actions

    • None

    Postconditions None

    Parameters
    [in]producerNvSciStreamBlock which references a producer block.
    [in]consumerIndexThe index of the queried consumer block.
    [out]newConnectedtrue if the consumerIndex corresponds to newly connected consumer else false.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPacketSendSync()

    NvSciError NvSciStreamPacketSendSync ( NvSciStreamBlock const  block)

    Enables the synchronous payload transfer during runtime.

    The NvSciStreamEventType_PacketReady and NvSciStreamEventType_DisConnected events will be sent in this calling thread instead of in a dispatch thread, assuming that there's always available writable frames in the NvSciIpc channel.

    NOTE: Configure the NvSciIpc channel with enough frames. Otherwise, NvSciStreamProducerPacketPresent/NvSciStreamConsumerPacketRelease will return an error and could not continue streaming. This API is supported only for IpcSrc/C2CSrc and IpcDst/C2CDst.

    Precondition
    • After the input block is created, before calling this API, no NvSciStream API shall be called on the block.

    Actions

    • None.

    Postconditions

    • None.
    Parameters
    [in]blockNvSciStreamBlock which references a block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketComplete()

    NvSciError NvSciStreamPoolPacketComplete ( NvSciStreamBlock const  pool,
    NvSciStreamPacket const  handle 
    )

    Marks a packet as complete and sends it to the rest of the stream.

    Precondition
    • The packet has not yet been marked as completed.

    Actions

    • The packet is complete.

    Postconditions

    • Status for the packet can be received.
    Parameters
    [in]poolNvSciStreamBlock which references a pool block.
    [in]handleNvSciStreamPacket which references the packet.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketCreate()

    NvSciError NvSciStreamPoolPacketCreate ( NvSciStreamBlock const  pool,
    NvSciStreamCookie const  cookie,
    NvSciStreamPacket *const  handle 
    )

    Creates a new packet and adds it to the pool block referenced by the given NvSciStreamBlock, associates the given NvSciStreamCookie with the packet and returns a NvSciStreamPacket which references the created packet.

    Precondition
    • Pool must have successfully completed NvSciStreamSetup_ElementExport phase.
    • For static pool, the number of packets already created has not reached the number of packets which was set when the static pool was created.

    Actions

    • A new NvSciStreamPacket is assigned to the created packet and returned to the caller.

    Postconditions

    • The application can register NvSciBufObj(s) to the created packet.
    Parameters
    [in]poolNvSciStreamBlock which references a pool block.
    [in]cookiePool's NvSciStreamCookie for the packet. Valid value: cookie != NvSciStreamCookie_Invalid.
    [out]handleNvSciStreamPacket which references the created packet.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketDelete()

    NvSciError NvSciStreamPoolPacketDelete ( NvSciStreamBlock const  pool,
    NvSciStreamPacket const  handle 
    )

    Removes a packet referenced by the given NvSciStreamPacket from the pool block referenced by the given NvSciStreamBlock.

    If the packet is currently in the pool, it is removed right away. Otherwise this is deferred until the packet returns to the pool.

    Precondition
    • Specified packet must exist.

    Actions

    • If the pool holds the specified packet or when it is returned to the pool, the pool releases resources associated with it and sends a NvSciStreamEventType_PacketDelete event to the producer and consumer endpoint(s).

    Postconditions

    • The packet may no longer be used for pool operations.
    Parameters
    [in]poolNvSciStreamBlock which references a pool block.
    [in]handleNvSciStreamPacket which references the packet.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketInsertBuffer()

    NvSciError NvSciStreamPoolPacketInsertBuffer ( NvSciStreamBlock const  pool,
    NvSciStreamPacket const  handle,
    uint32_t const  index,
    NvSciBufObj const  bufObj 
    )

    Registers an NvSciBufObj as the indexed element of the referenced NvSciStreamPacket owned by the pool block.

    Precondition
    • The packet has not yet been marked as completed.

    Actions

    • The NvSciBufObj is registered to the given packet element.

    Postconditions None

    Parameters
    [in]poolNvSciStreamBlock which references a pool block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]indexIndex of element within packet. Valid value: 0 to number of elements specifed - 1.
    [in]bufObjNvSciBufObj to be registered.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketInsertBufferWithCrc()

    NvSciError NvSciStreamPoolPacketInsertBufferWithCrc ( NvSciStreamBlock const  pool,
    NvSciStreamPacket const  handle,
    uint32_t const  index,
    NvSciBufObj const  bufObj,
    uint32_t *const  crc 
    )

    Registers an NvSciBufObj as the indexed element of the referenced NvSciStreamPacket owned by the pool block.

    A wrapper function which calls the NvSciStreamPoolPacketInsertBuffer() API and updates the crc value.

    Precondition
    • The packet has not yet been marked as completed.

    Actions

    • The NvSciBufObj is registered to the given packet element.

    Postconditions None

    Parameters
    [in]poolNvSciStreamBlock which references a pool block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]indexIndex of element within packet. Valid value: 0 to number of elements specifed - 1.
    [in]bufObjNvSciBufObj to be registered.
    [in,out]crcPointer to the location in which to store the CRC value. On input, contains the initial CRC value. On output, when operation was successful, contains the updated CRC value; otherwise, contains the initial input CRC value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketStatusAcceptGet()

    NvSciError NvSciStreamPoolPacketStatusAcceptGet ( NvSciStreamBlock const  pool,
    NvSciStreamPacket const  handle,
    bool *const  accepted 
    )

    In pool, queries whether or not a packet has been accepted.

    Precondition
    None

    Actions None

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a pool block.
    [in]handleNvSciStreamPacket which references the packet.
    [out]acceptedLocation in which to return the acceptance.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPoolPacketStatusValueGet()

    NvSciError NvSciStreamPoolPacketStatusValueGet ( NvSciStreamBlock const  pool,
    NvSciStreamPacket const  handle,
    NvSciStreamBlockType const  queryBlockType,
    uint32_t const  queryBlockIndex,
    NvSciError *const  status 
    )

    In pool, queries the status value for a given packet returned by a specified endpoint.

    Used when a packet is rejected to learn more about which endpoint(s) rejected it and why.

    Precondition
    None

    Actions None

    Postconditions None

    Parameters
    [in]blockNvSciStreamBlock which references a pool block.
    [in]handleNvSciStreamPacket which references the packet.
    [in]queryBlockTypeIndicates whether to query status from producer or consumer endpoint.
    [in]queryBlockIndexIndex of the endpoint from which to query status.
    [out]statusLocation in which to return the status value.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamPresentSyncCreate()

    NvSciError NvSciStreamPresentSyncCreate ( NvSciSyncModule const  syncModule,
    NvSciStreamBlock *const  presentSync 
    )

    Creates an instance of PresentSync block and returns a NvSciStreamBlock referencing the created PresentSync block.

    • Creates a block to wait for the fences for the packets received from producer before sending them downstream.
    • The primary usecase is to insert PresentSync block between producer and C2CSrc block.

      Precondition
    • None.

    Actions

    • Creates a new instance of PresentSync block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]syncModuleNvSciSyncModule that will be used during fence wait operations.
    [out]presentSyncNvSciStreamBlock which references a new PresentSync block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamProducerCreate()

    NvSciError NvSciStreamProducerCreate ( NvSciStreamBlock const  pool,
    NvSciStreamBlock *const  producer 
    )

    Creates an instance of producer block, associates the given pool referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created producer block.

    • Creates a block for the producer end of a stream. All streams require one producer block. A producer block must have a pool associated with it for managing available packets. Producer blocks have one output connection and no input connections.
    • Once the stream is operational, this block can be used to exchange NvSciSync information with the consumer and NvSciBuf information with the pool.
    Precondition
    • None.

    Actions

    • Creates a new instance of producer block.
    • Associates the given pool block with the producer block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    • The block can be queried for events.
    Parameters
    [in]poolNvSciStreamBlock which references a pool block to be associated with the producer block.
    [out]producerNvSciStreamBlock which references a new producer block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamProducerCreate2()

    NvSciError NvSciStreamProducerCreate2 ( NvSciStreamBlock const  pool,
    bool const  crcValidate,
    NvSciStreamBlock *const  producer 
    )

    Creates an instance of producer block, associates the given pool referenced by the given NvSciStreamBlock with it and returns a NvSciStreamBlock referencing the created producer block.

    • Creates a block for the producer end of a stream. All streams require one producer block. A producer block must have a pool associated with it for managing available packets. Producer blocks have one output connection and no input connections.
    • Waits for the CRC validation done by applications before switching to runtime if crcValidate is set to true.
    • Once the stream is operational, this block can be used to exchange NvSciSync information with the consumer and NvSciBuf information with the pool.
    Precondition
    • None.

    Actions

    • Creates a new instance of producer block.
    • Associates the given pool block with the producer block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    • The block can be queried for events.
    Parameters
    [in]poolNvSciStreamBlock which references a pool block to be associated with the producer block.
    [in]crcValidateIndicates whether validation step is required before switching to runtime.
    [out]producerNvSciStreamBlock which references a new producer block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamProducerPacketGet()

    NvSciError NvSciStreamProducerPacketGet ( NvSciStreamBlock const  producer,
    NvSciStreamCookie *const  cookie 
    )

    Instructs the producer referenced by producer to retrieve a packet from the pool.

    If a packet is available for producer processing, its producer fences will be cleared, ownership will be moved to the application, and its cookie will be returned.

    The producer may hold multiple packets and is not required to present them in the order they were obtained.

    Precondition
    • All packets have been accepted by the producer and the consumer(s).
    • The producer block must have received the NvSciStreamEventType_PacketReady event from pool for processing the next available packet.

    Actions

    • Retrieves an available packet for producer processing and returns it to the caller.

    Postconditions

    • Packet is held by the producer application.
    Parameters
    [in]producerNvSciStreamBlock which references a producer block.
    [out]cookieLocation in which to return the packet's cookie.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamProducerPacketPresent()

    NvSciError NvSciStreamProducerPacketPresent ( NvSciStreamBlock const  producer,
    NvSciStreamPacket const  handle 
    )

    Instructs the producer referenced by producer to insert the packet referenced by handle into the stream for consumer processing.

    Precondition
    • The packet must be held by the producer application.

    Actions

    • The packet is sent downstream, where it will be processed according to the stream's configuration.

    Postconditions

    • The packet is no longer held by the producer application.
    Parameters
    [in]producerNvSciStreamBlock which references a producer block.
    [in]handleNvSciStreamPacket which references the packet.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Async
    • Required privileges: None
    • API group
      • Init: No
      • Runtime: Yes
      • De-Init: No

    ◆ NvSciStreamReturnSyncCreate()

    NvSciError NvSciStreamReturnSyncCreate ( NvSciSyncModule const  syncModule,
    NvSciStreamBlock *const  returnSync 
    )

    Creates an instance of ReturnSync block and returns a NvSciStreamBlock referencing the created ReturnSync block.

    • Creates a block to wait for the fences for the packets received from consumer before sending them upstream.
    • A ReturnSync block can be inserted anywhere in the stream between the Producer and Consumer Blocks, but its primary intent is to be inserted between a limiter block and a Consumer.

      Precondition
    • None.

    Actions

    • Creates a new instance of ReturnSync block.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    Parameters
    [in]syncModuleNvSciSyncModule that will be used during fence wait operations.
    [out]returnSyncNvSciStreamBlock which references a new ReturnSync block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No

    ◆ NvSciStreamStaticPoolCreate()

    NvSciError NvSciStreamStaticPoolCreate ( uint32_t const  numPackets,
    NvSciStreamBlock *const  pool 
    )

    Creates an instance of static pool block and returns a NvSciStreamBlock referencing the created pool block.

    • Creates a block for management of a stream's packet pool. Every producer must be associated with a pool block, provided at the producer's creation.
    • A static pool has a fixed number of packets which must be created and accepted before the first free packet is acquired by the producer block.
    • Once the stream is operational and the application has determined the packet requirements(packet element count and packet element buffer attributes), this block can be used to register NvSciBufObj(s) to each packet.
    Precondition
    • None.

    Actions

    • Allocates data structures to describe packets.
    • Initializes queue of available packets.

    Postconditions

    • The block is ready to be connected to other stream blocks.
    • The block can be queried for events.
    Parameters
    [in]numPacketsNumber of packets.
    [out]poolNvSciStreamBlock which references a new pool block.
    Returns
    NvSciError, the completion code of this operation.


    Usage considerations

    • Allowed context for the API call
      • Interrupt handler: No
      • Signal handler: No
      • Thread-safe: Yes
      • Re-entrant: No
      • Async/Sync: Sync
    • Required privileges: None
    • API group
      • Init: Yes
      • Runtime: No
      • De-Init: No
    人人超碰97caoporen国产