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... | |
NvSciError NvSciStreamAttributeQuery | ( | NvSciStreamQueryableAttrib const | attr, |
int32_t *const | value | ||
) |
Queries the value of one of the NvSciStreamQueryableAttrib.
Actions
Postconditions
[in] | attr | NvSciStreamQueryableAttrib to query. |
[out] | value | The value queried. |
Usage considerations
NvSciError NvSciStreamBlockConnect | ( | NvSciStreamBlock const | upstream, |
NvSciStreamBlock const | downstream | ||
) |
Establishes connection between two blocks referenced by the given NvSciStreamBlock(s).
Actions
Postconditions
[in] | upstream | NvSciStreamBlock which references an upstream block. Valid value: A valid NvSciStreamBlock which does not reference a Pool or Queue block. |
[in] | downstream | NvSciStreamBlock which references a downstream block. Valid value: A valid NvSciStreamBlock which does not reference a Pool or Queue block. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[out] | numConsumers | Pointer to location in which to store the count. |
Usage considerations
NvSciError NvSciStreamBlockDelete | ( | NvSciStreamBlock const | block | ) |
Schedules a block referenced by the given NvSciStreamBlock for destruction, disconnecting the block if this hasn't already occurred.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
Usage considerations
NvSciError NvSciStreamBlockDisconnect | ( | NvSciStreamBlock const | block | ) |
Disconnects an IpcSrc block referenced by the given NvSciStreamBlock.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references an IpcSrc block. |
Usage considerations
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).
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockType | Identifies the source of the element list. |
[in] | elemIndex | Index of the entry in the element list to query. |
[out] | userType | Pointer to location in which to store the type. |
[out] | bufAttrList | Pointer 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. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockType | Identifies the source of the element list. |
[in] | elemIndex | Index of the entry in the element list to query. |
[out] | userType | Pointer to location in which to store the type. |
[out] | bufAttrList | Pointer 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] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | userType | User-defined type to identify the element. |
[in] | bufAttrList | Buffer attribute list for element. NvSciStream will clone the attribute list, so the caller can safely free it once the function returns. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | userType | User-defined type to identify the element. |
[in] | bufAttrList | Buffer attribute list for element. NvSciStream will clone the attribute list, so the caller can safely free it once the function returns. |
[in,out] | crc | Pointer 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. |
Usage considerations
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).
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockType | Identifies the source of the element list. |
[out] | numElements | Pointer to location in which to store the count. |
Usage considerations
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.
Actions
Postconditions
[in] | pool | NvSciStreamBlock which references a pool. |
[in] | userType | User-defined type to identify the element. |
[in] | consumerIndex | Index of the consumer block. |
Usage considerations
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.
Actions None
Postconditions None
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockIndex | The 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] | elemIndex | Index of the entry in the sync object list to get. |
[in] | signalSyncObj | Location in which to return the sync object. |
Usage considerations
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.
Actions None
Postconditions None
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockIndex | The 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] | elemIndex | Index of the entry in the sync object list to get. |
[in] | signalSyncObj | Location in which to return the sync object. |
[in,out] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | elemIndex | Index of the entry in the sync object list to set. |
[in] | signalSyncObj | Signalling sync object. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | elemIndex | Index of the entry in the sync object list to set. |
[in] | signalSyncObj | Signalling sync object. |
[in,out] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | elemIndex | Index of the entry in the element list to set. |
[in] | used | Flag indicating whether the element is used. |
Usage considerations
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.
Actions None
Postconditions None
[in] | block | NvSciStreamBlock which references a block. |
[in] | elemIndex | Index of the entry in the attribute list to get. |
[in] | waitSyncAtttList | Location in which to return the requirements. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | elemIndex | Index of the entry in the attribute list to set. |
[in] | waitSyncAtttList | Attribute list with waiter requirments. |
Usage considerations
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.
Actions None
Postconditions None
[in] | block | NvSciStreamBlock which references a block. |
[out] | status | Pointer to location in which to store the error code. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | timeoutUsec | Timeout in microseconds (-1 to wait forever). |
[out] | event | Location in which to return the NvSciStreamEventType. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | eventService | Pointer to a NvSciEventService object. |
[out] | eventNotifier | To be filled with the pointer to the created NvSciEventNotifier object. |
Usage considerations
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.
Actions
Postconditions None.
[in] | block | NvSciStreamBlock which references a block. Only IpcSrc and IpcDst blocks are supproted. |
Usage considerations
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(),
Actions
Postconditions None.
[in] | block | NvSciStreamBlock which references a block. Only IpcSrc and IpcDst blocks are supproted. |
[in] | eventService | Pointer to a NvSciEventService object. |
[in,out] | notifierCount | On input, contains the size of the eventNotifierArray. On output, contains the number of returned NvSciEventNotifiers bound to this eventService. |
[out] | eventNotifierArray | To be filled with the pointers to the created NvSciEventNotifier objects. |
Usage considerations
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.
Actions
Postconditions None
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | elemIndex | Index of the element to query. |
[out] | bufObj | Location in which to store the buffer object handle. |
Usage considerations
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.
Actions
Postconditions None
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | elemIndex | Index of the element to query. |
[out] | bufObj | Location in which to store the buffer object handle. |
[in] | crcCount | Number of CRC values to be updated by this API. |
[in,out] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions None
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | queryBlockIndex | Index 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] | elemIndex | Index of the buffer for the fence. |
[out] | prefence | Location in which to return the fence. |
Usage considerations
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.
Actions
Postconditions None
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | queryBlockIndex | Index 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] | elemIndex | Index of the buffer for the fence. |
[out] | prefence | Location in which to return the fence. |
[in,out] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions None
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | elemIndex | Index of the buffer for the fence. |
[in] | postfence | The fence to save. |
Usage considerations
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.
Actions
Postconditions None
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | elemIndex | Index of the buffer for the fence. |
[in] | postfence | The fence to save. |
[in,out] | crc | Pointer 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. |
Usage considerations
NvSciError NvSciStreamBlockPacketNewHandleGet | ( | NvSciStreamBlock const | block, |
NvSciStreamPacket *const | handle | ||
) |
In producer and consumer blocks, queries the handle of a newly defined packet.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[out] | handle | Location in which to return the packet handle. |
Usage considerations
NvSciError NvSciStreamBlockPacketOldCookieGet | ( | NvSciStreamBlock const | block, |
NvSciStreamCookie *const | cookie | ||
) |
In producer and consumer blocks, queries the cookie of a recently deleted packet.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[out] | cookie | Location in which to return the packet cookie. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a producer or consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | cookie | Cookie to assign to the packet if it is accepted. |
[in] | status | Status value which is either NvSciError_Success to indicate acceptance, or any other value to indicate rejection. (But NvSciError_StreamInternalError is not allowed.) |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | setupType | Identifies the group of setup operations whose status is to be updated. |
[in] | completed | Provided for future support of dynamically reconfigurable streams. Currently must always be true. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockType | Indicates whether to query information from producer or consumer endpoint. |
[in] | queryBlockIndex | Index of the endpoint block to query. |
[in] | userType | User-defined type to query. |
[in,out] | dataSize | On 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] | data | Pointer to location in which to store the information. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | queryBlockType | Indicates whether to query information from producer or consumer endpoint. |
[in] | queryBlockIndex | Index of the endpoint block to query. |
[in] | userType | User-defined type to query. |
[in,out] | dataSize | On 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] | data | Pointer to location in which to store the information. |
[in,out] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | userType | User-defined type to identify the endpoint information. |
[in] | dataSize | Size of the provided data. |
[in] | data | Pointer to user-defined information. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
[in] | userType | User-defined type to identify the endpoint information. |
[in] | dataSize | Size of the provided data. |
[in] | data | Pointer to user-defined information. |
[in,out] | crc | Pointer 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. |
Usage considerations
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.
Actions
Postconditions
[in] | queue | NvSciStreamBlock which references a queue block to be associated with the consumer block. |
[out] | consumer | NvSciStreamBlock which references a new consumer block. |
Usage considerations
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.
Actions
Postconditions
[in] | queue | NvSciStreamBlock which references a queue block to be associated with the consumer block. |
[in] | crcValidate | Indicates whether validation step is required before switching to runtime. |
[out] | consumer | NvSciStreamBlock which references a new consumer block. |
Usage considerations
NvSciError NvSciStreamConsumerIndexGet | ( | NvSciStreamBlock const | consumer, |
uint32_t *const | index | ||
) |
Queries the index of the consumer block referenced by the given NvSciStreamBlock.
Actions
Postconditions
[in] | consumer | NvSciStreamBlock which references a consumer block. |
[out] | index | Location in which to return the consumer's index. |
Usage considerations
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.
Actions
Postconditions
[in] | consumer | NvSciStreamBlock which references a consumer block. |
[out] | cookie | NvSciStreamCookie identifying the packet. |
Usage considerations
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.
Actions
Postconditions
[in] | consumer | NvSciStreamBlock which references a consumer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
Usage considerations
NvSciError NvSciStreamFifoQueueCreate | ( | NvSciStreamBlock *const | queue | ) |
Creates an instance of FIFO queue block and returns a NvSciStreamBlock referencing the created FIFO queue block.
Actions
Postconditions
[out] | queue | NvSciStreamBlock which references a new FIFO queue block. |
Usage considerations
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.
Actions
Postconditions
[in] | ipcEndpoint | NvSciIpcEndpoint handle. |
[in] | syncModule | NvSciSyncModule 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] | bufModule | NvSciBufModule 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] | ipc | NvSciStreamBlock which references a new IpcDst block. |
Usage considerations
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 producer and consumer(s) are present in the same process, then there is no need for IPC or C2C block pairs.
Actions
Postconditions
[in] | ipcEndpoint | NvSciIpcEndpoint handle. |
[in] | syncModule | NvSciSyncModule 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] | bufModule | NvSciBufModule 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] | pool | NvSciStreamBlock that is used to enqueue the Packets received from C2CSrc block and send those packets downstream to . consumer block. |
[out] | ipc | NvSciStreamBlock which references a new IpcDst or C2CDst block. |
Usage considerations
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.
Actions
Postconditions
[in] | ipcEndpoint | NvSciIpcEndpoint handle. |
[in] | syncModule | NvSciSyncModule 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] | bufModule | NvSciBufModule 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] | ipc | NvSciStreamBlock which references a new IpcSrc block. |
Usage considerations
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 producer and consumer(s) are present in the same process, then there is no need for IPC or C2C block pairs.
Actions
Postconditions
[in] | ipcEndpoint | NvSciIpcEndpoint handle. |
[in] | syncModule | NvSciSyncModule 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] | bufModule | NvSciBufModule 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] | queue | NvSciStreamBlock that is used to enqueue the Packets from the Producer and send those packets downstream to C2CDst block. |
[out] | ipc | NvSciStreamBlock which references a new IpcSrc or C2CSrc block. |
Usage considerations
NvSciError NvSciStreamLimiterCreate | ( | uint32_t const | maxPackets, |
NvSciStreamBlock *const | limiter | ||
) |
Creates an instance of Limiter block and returns a NvSciStreamBlock referencing the created Limiter 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.
Actions
Postconditions
[in] | maxPackets | Number of packets allowed to be sent downstream to a consumer block. |
[out] | limiter | NvSciStreamBlock which references a new limiter block. |
Usage considerations
NvSciError NvSciStreamMailboxQueueCreate | ( | NvSciStreamBlock *const | queue | ) |
Creates an instance of mailbox queue block and returns a NvSciStreamBlock referencing the created mailbox queue block.
Actions
Postconditions
[out] | queue | NvSciStreamBlock which references a new mailbox queue block. |
Usage considerations
NvSciError NvSciStreamMulticastCreate | ( | uint32_t const | outputCount, |
NvSciStreamBlock *const | multicast | ||
) |
Creates an instance of multicast block and returns a NvSciStreamBlock referencing the created multicast block.
Actions
Postconditions
[in] | outputCount | Number of output blocks that will be connected. Valid value: 1 to NvSciStreamQueryableAttrib_MaxMulticastOutputs attribute value queried by successful call to NvSciStreamAttributeQuery() API. |
[out] | multicast | NvSciStreamBlock which references a new multicast block. |
Usage considerations
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.
Actions
Postconditions None
[in] | producer | NvSciStreamBlock which references a producer block. |
[in] | consumerIndex | The index of the queried consumer block. |
[out] | newConnected | true if the consumerIndex corresponds to newly connected consumer else false. |
Usage considerations
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.
Actions
Postconditions
[in] | block | NvSciStreamBlock which references a block. |
Usage considerations
NvSciError NvSciStreamPoolPacketComplete | ( | NvSciStreamBlock const | pool, |
NvSciStreamPacket const | handle | ||
) |
Marks a packet as complete and sends it to the rest of the stream.
Actions
Postconditions
[in] | pool | NvSciStreamBlock which references a pool block. |
[in] | handle | NvSciStreamPacket which references the packet. |
Usage considerations
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.
Actions
Postconditions
[in] | pool | NvSciStreamBlock which references a pool block. |
[in] | cookie | Pool's NvSciStreamCookie for the packet. Valid value: cookie != NvSciStreamCookie_Invalid. |
[out] | handle | NvSciStreamPacket which references the created packet. |
Usage considerations
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.
Actions
Postconditions
[in] | pool | NvSciStreamBlock which references a pool block. |
[in] | handle | NvSciStreamPacket which references the packet. |
Usage considerations
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.
Actions
Postconditions None
[in] | pool | NvSciStreamBlock which references a pool block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | index | Index of element within packet. Valid value: 0 to number of elements specifed - 1. |
[in] | bufObj | NvSciBufObj to be registered. |
Usage considerations
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.
Actions
Postconditions None
[in] | pool | NvSciStreamBlock which references a pool block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | index | Index of element within packet. Valid value: 0 to number of elements specifed - 1. |
[in] | bufObj | NvSciBufObj to be registered. |
[in,out] | crc | Pointer 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. |
Usage considerations
NvSciError NvSciStreamPoolPacketStatusAcceptGet | ( | NvSciStreamBlock const | pool, |
NvSciStreamPacket const | handle, | ||
bool *const | accepted | ||
) |
In pool, queries whether or not a packet has been accepted.
Actions None
Postconditions None
[in] | block | NvSciStreamBlock which references a pool block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[out] | accepted | Location in which to return the acceptance. |
Usage considerations
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.
Actions None
Postconditions None
[in] | block | NvSciStreamBlock which references a pool block. |
[in] | handle | NvSciStreamPacket which references the packet. |
[in] | queryBlockType | Indicates whether to query status from producer or consumer endpoint. |
[in] | queryBlockIndex | Index of the endpoint from which to query status. |
[out] | status | Location in which to return the status value. |
Usage considerations
NvSciError NvSciStreamPresentSyncCreate | ( | NvSciSyncModule const | syncModule, |
NvSciStreamBlock *const | presentSync | ||
) |
Creates an instance of PresentSync block and returns a NvSciStreamBlock referencing the created PresentSync block.
The primary usecase is to insert PresentSync block between producer and C2CSrc block.
Actions
Postconditions
[in] | syncModule | NvSciSyncModule that will be used during fence wait operations. |
[out] | presentSync | NvSciStreamBlock which references a new PresentSync block. |
Usage considerations
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.
Actions
Postconditions
[in] | pool | NvSciStreamBlock which references a pool block to be associated with the producer block. |
[out] | producer | NvSciStreamBlock which references a new producer block. |
Usage considerations
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.
Actions
Postconditions
[in] | pool | NvSciStreamBlock which references a pool block to be associated with the producer block. |
[in] | crcValidate | Indicates whether validation step is required before switching to runtime. |
[out] | producer | NvSciStreamBlock which references a new producer block. |
Usage considerations
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.
Actions
Postconditions
[in] | producer | NvSciStreamBlock which references a producer block. |
[out] | cookie | Location in which to return the packet's cookie. |
Usage considerations
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.
Actions
Postconditions
[in] | producer | NvSciStreamBlock which references a producer block. |
[in] | handle | NvSciStreamPacket which references the packet. |
Usage considerations
NvSciError NvSciStreamReturnSyncCreate | ( | NvSciSyncModule const | syncModule, |
NvSciStreamBlock *const | returnSync | ||
) |
Creates an instance of ReturnSync block and returns a NvSciStreamBlock referencing the created ReturnSync block.
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.
Actions
Postconditions
[in] | syncModule | NvSciSyncModule that will be used during fence wait operations. |
[out] | returnSync | NvSciStreamBlock which references a new ReturnSync block. |
Usage considerations
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.
Actions
Postconditions
[in] | numPackets | Number of packets. |
[out] | pool | NvSciStreamBlock which references a new pool block. |
Usage considerations