NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
nvscistream_api.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2022 NVIDIA Corporation. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property and
5  * proprietary rights in and to this software, related documentation and any
6  * modifications thereto. Any use, reproduction, disclosure or distribution
7  * of this software and related documentation without an express license
8  * agreement from NVIDIA Corporation is strictly prohibited.
9  */
19 #ifndef NVSCISTREAM_API_H
20 #define NVSCISTREAM_API_H
21 
22 #ifdef __cplusplus
23 #include <cstdint>
24 #else
25 #include <stdint.h>
26 #endif
27 #include "nvscierror.h"
28 #include "nvscibuf.h"
29 #include "nvscisync.h"
30 #include "nvsciipc.h"
31 #include "nvscievent.h"
32 #include "nvscistream_types.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
195  NvSciStreamBlock const upstream,
196  NvSciStreamBlock const downstream
197 );
198 
252  NvSciStreamBlock const pool,
253  NvSciStreamBlock *const producer
254 );
255 
309  NvSciStreamBlock const queue,
310  NvSciStreamBlock *const consumer
311 );
312 
361  uint32_t const numPackets,
362  NvSciStreamBlock *const pool
363 );
364 
415  NvSciStreamBlock *const queue
416 );
417 
467  NvSciStreamBlock *const queue
468 );
469 
519  uint32_t const outputCount,
520  NvSciStreamBlock *const multicast
521 );
522 
578  NvSciIpcEndpoint const ipcEndpoint,
579  NvSciSyncModule const syncModule,
580  NvSciBufModule const bufModule,
581  NvSciStreamBlock *const ipc
582 );
583 
663  NvSciIpcEndpoint const ipcEndpoint,
664  NvSciSyncModule const syncModule,
665  NvSciBufModule const bufModule,
666  NvSciStreamBlock const queue,
667  NvSciStreamBlock *const ipc
668 );
669 
725  NvSciIpcEndpoint const ipcEndpoint,
726  NvSciSyncModule const syncModule,
727  NvSciBufModule const bufModule,
728  NvSciStreamBlock *const ipc
729 );
730 
804  NvSciIpcEndpoint const ipcEndpoint,
805  NvSciSyncModule const syncModule,
806  NvSciBufModule const bufModule,
807  NvSciStreamBlock const pool,
808  NvSciStreamBlock *const ipc
809 );
810 
857  uint32_t const maxPackets,
858  NvSciStreamBlock *const limiter
859 );
860 
861 
908  NvSciSyncModule const syncModule,
909  NvSciStreamBlock *const returnSync
910 );
911 
957  NvSciSyncModule const syncModule,
958  NvSciStreamBlock *const presentSync
959 );
960 
1021  NvSciStreamBlock const block,
1022  int64_t const timeoutUsec,
1023  NvSciStreamEventType *const eventType
1024 );
1025 
1062 NvSciError
1064  NvSciStreamBlock const block,
1065  NvSciError* const status
1066 );
1067 
1106 NvSciError
1108  NvSciStreamBlock const block,
1109  uint32_t* const numConsumers
1110 );
1111 
1162 NvSciError
1164  NvSciStreamBlock const block,
1165  NvSciStreamSetup const setupType,
1166  bool const completed
1167 );
1168 
1228 NvSciError
1230  NvSciStreamBlock const block,
1231  uint32_t const userType,
1232  NvSciBufAttrList const bufAttrList
1233 );
1234 
1293 NvSciError
1295  NvSciStreamBlock const block,
1296  NvSciStreamBlockType const queryBlockType,
1297  uint32_t* const numElements
1298 );
1299 
1367 NvSciError
1369  NvSciStreamBlock const block,
1370  NvSciStreamBlockType const queryBlockType,
1371  uint32_t const elemIndex,
1372  uint32_t* const userType,
1373  NvSciBufAttrList* const bufAttrList
1374 );
1375 
1426 NvSciError
1428  NvSciStreamBlock const block,
1429  uint32_t const elemIndex,
1430  bool const used
1431 );
1432 
1483  NvSciStreamBlock const pool,
1484  NvSciStreamCookie const cookie,
1485  NvSciStreamPacket *const handle
1486 );
1487 
1528  NvSciStreamBlock const pool,
1529  NvSciStreamPacket const handle,
1530  uint32_t const index,
1531  NvSciBufObj const bufObj
1532 );
1533 
1568 NvSciError
1570  NvSciStreamBlock const pool,
1571  NvSciStreamPacket const handle
1572 );
1573 
1612 NvSciError
1614  NvSciStreamBlock const pool,
1615  NvSciStreamPacket const handle
1616 );
1617 
1657 NvSciError
1659  NvSciStreamBlock const block,
1660  NvSciStreamPacket* const handle
1661 );
1662 
1706 NvSciError
1708  NvSciStreamBlock const block,
1709  NvSciStreamPacket const handle,
1710  uint32_t const elemIndex,
1711  NvSciBufObj* const bufObj
1712 );
1713 
1752 NvSciError
1754  NvSciStreamBlock const block,
1755  NvSciStreamCookie* const cookie
1756 );
1757 
1803 NvSciError
1805  NvSciStreamBlock const block,
1806  NvSciStreamPacket const handle,
1807  NvSciStreamCookie const cookie,
1808  NvSciError const status
1809 );
1810 
1846 NvSciError
1848  NvSciStreamBlock const pool,
1849  NvSciStreamPacket const handle,
1850  bool* const accepted
1851 );
1852 
1894 NvSciError
1896  NvSciStreamBlock const pool,
1897  NvSciStreamPacket const handle,
1898  NvSciStreamBlockType const queryBlockType,
1899  uint32_t const queryBlockIndex,
1900  NvSciError* const status
1901 );
1902 
1948 NvSciError
1950  NvSciStreamBlock const block,
1951  uint32_t const elemIndex,
1952  NvSciSyncAttrList const waitSyncAttrList
1953 );
1954 
2002 NvSciError
2004  NvSciStreamBlock const block,
2005  uint32_t const elemIndex,
2006  NvSciSyncAttrList* const waitSyncAttrList
2007 );
2008 
2054 NvSciError
2056  NvSciStreamBlock const block,
2057  uint32_t const elemIndex,
2058  NvSciSyncObj const signalSyncObj
2059 );
2060 
2114 NvSciError
2116  NvSciStreamBlock const block,
2117  uint32_t const queryBlockIndex,
2118  uint32_t const elemIndex,
2119  NvSciSyncObj* const signalSyncObj
2120 );
2121 
2167  NvSciStreamBlock const producer,
2168  NvSciStreamCookie *const cookie
2169 );
2170 
2208  NvSciStreamBlock const producer,
2209  NvSciStreamPacket const handle
2210 );
2211 
2257  NvSciStreamBlock const consumer,
2258  NvSciStreamCookie *const cookie
2259 );
2260 
2298  NvSciStreamBlock const consumer,
2299  NvSciStreamPacket const handle
2300 );
2301 
2344 NvSciError
2346  NvSciStreamBlock const block,
2347  NvSciStreamPacket const handle,
2348  uint32_t const elemIndex,
2349  NvSciSyncFence const *const postfence
2350 );
2351 
2399 NvSciError
2401  NvSciStreamBlock const block,
2402  NvSciStreamPacket const handle,
2403  uint32_t const queryBlockIndex,
2404  uint32_t const elemIndex,
2405  NvSciSyncFence* const prefence
2406 );
2407 
2455  NvSciStreamBlock const block
2456 );
2457 
2492  NvSciStreamQueryableAttrib const attr,
2493  int32_t *const value
2494 );
2495 
2550  NvSciStreamBlock const block,
2551  NvSciEventService *const eventService,
2552  NvSciEventNotifier **const eventNotifier
2553 );
2554 
2598 NvSciError
2600  NvSciStreamBlock const block,
2601  uint32_t const userType,
2602  uint32_t const dataSize,
2603  void const* const data);
2604 
2661 NvSciError
2663  NvSciStreamBlock const block,
2664  NvSciStreamBlockType const queryBlockType,
2665  uint32_t const queryBlockIndex,
2666  uint32_t const userType,
2667  uint32_t* const dataSize,
2668  void* const data);
2669 
2670 #ifdef __cplusplus
2671 }
2672 #endif
2673 
2675 #endif /* NVSCISTREAM_API_H */
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 referen...
NvSciError
NvSciError
Return/error codes for all NvSci functions.
Definition: nvscierror.h:45
nvscievent.h
NVIDIA Software Communications Interface (SCI) : NvSci Event Service
NvSciStreamPoolPacketDelete
NvSciError NvSciStreamPoolPacketDelete(NvSciStreamBlock const pool, NvSciStreamPacket const handle)
Removes a packet referenced by the given NvSciStreamPacket from the pool block referenced by the give...
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,...
NvSciStreamBlockPacketNewHandleGet
NvSciError NvSciStreamBlockPacketNewHandleGet(NvSciStreamBlock const block, NvSciStreamPacket *const handle)
In producer and consumer blocks, queries the handle of a newly defined packet.
NvSciStreamConsumerPacketRelease
NvSciError NvSciStreamConsumerPacketRelease(NvSciStreamBlock const consumer, NvSciStreamPacket const handle)
Instructs the consumer referenced by consumer to release the packet referenced by handle into the str...
NvSciStreamBlock
uintptr_t NvSciStreamBlock
Handle to a block.
Definition: nvscistream_types.h:52
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 blo...
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 ...
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...
NvSciStreamPoolPacketComplete
NvSciError NvSciStreamPoolPacketComplete(NvSciStreamBlock const pool, NvSciStreamPacket const handle)
Marks a packet as complete and sends it to the rest of the stream.
NvSciStreamAttributeQuery
NvSciError NvSciStreamAttributeQuery(NvSciStreamQueryableAttrib const attr, int32_t *const value)
Queries the value of one of the NvSciStreamQueryableAttrib.
NvSciStreamProducerPacketGet
NvSciError NvSciStreamProducerPacketGet(NvSciStreamBlock const producer, NvSciStreamCookie *const cookie)
Instructs the producer referenced by producer to retrieve a packet from the pool.
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 NvSc...
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,...
NvSciStreamLimiterCreate
NvSciError NvSciStreamLimiterCreate(uint32_t const maxPackets, NvSciStreamBlock *const limiter)
Creates an instance of Limiter block and returns a NvSciStreamBlock referencing the created Limiter b...
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 ...
NvSciStreamConsumerPacketAcquire
NvSciError NvSciStreamConsumerPacketAcquire(NvSciStreamBlock const consumer, NvSciStreamCookie *const cookie)
Instructs the consumer referenced by consumer to retrieve a packet from the queue.
NvSciStreamFifoQueueCreate
NvSciError NvSciStreamFifoQueueCreate(NvSciStreamBlock *const queue)
Creates an instance of FIFO queue block and returns a NvSciStreamBlock referencing the created FIFO q...
NvSciStreamProducerCreate
NvSciError NvSciStreamProducerCreate(NvSciStreamBlock const pool, NvSciStreamBlock *const producer)
Creates an instance of producer block, associates the given pool referenced by the given NvSciStreamB...
NvSciStreamReturnSyncCreate
NvSciError NvSciStreamReturnSyncCreate(NvSciSyncModule const syncModule, NvSciStreamBlock *const returnSync)
Creates an instance of ReturnSync block and returns a NvSciStreamBlock referencing the created Return...
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 ...
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:314
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
A memory object is a container holding the reconciled NvSciBufAttrList defining constraints of the bu...
Definition: nvscibuf.h:2578
NvSciEventNotifier
An abstract interface to notify event to event consumer and to register event handler of the event co...
Definition: nvscievent.h:309
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.
nvscisync.h
NVIDIA Software Communications Interface (SCI) : NvSciSync
NvSciStreamQueryableAttrib
NvSciStreamQueryableAttrib
Defines NvSciStream attributes that are queryable.
Definition: nvscistream_types.h:143
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.
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 ind...
NvSciStreamMulticastCreate
NvSciError NvSciStreamMulticastCreate(uint32_t const outputCount, NvSciStreamBlock *const multicast)
Creates an instance of multicast block and returns a NvSciStreamBlock referencing the created multica...
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 ...
NvSciStreamSetup
NvSciStreamSetup
Setup information will be broken into several distinct groups, ! with restrictions on when they can b...
Definition: nvscistream_types.h:172
nvsciipc.h
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication
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...
NvSciStreamCookie
uintptr_t NvSciStreamCookie
Application assigned cookie for a NvSciStreamPacket.
Definition: nvscistream_types.h:60
NvSciIpcEndpoint
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
Definition: nvsciipc.h:230
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.
nvscistream_types.h
NVIDIA Software Communications Interface (SCI) : NvSciStream
NvSciStreamProducerPacketPresent
NvSciError NvSciStreamProducerPacketPresent(NvSciStreamBlock const producer, NvSciStreamPacket const handle)
Instructs the producer referenced by producer to insert the packet referenced by handle into the stre...
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 signa...
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 ...
NvSciStreamPacket
uintptr_t NvSciStreamPacket
NvSciStream assigned handle for a packet.
Definition: nvscistream_types.h:55
NvSciBufModule
struct NvSciBufModuleRec * NvSciBufModule
top-level container for the following set of resources: NvSciBufAttrLists, memory objects,...
Definition: nvscibuf.h:2537
NvSciBufAttrList
struct NvSciBufAttrListRec * NvSciBufAttrList
A container constituting an attribute list which contains.
Definition: nvscibuf.h:2596
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.
NvSciStreamPresentSyncCreate
NvSciError NvSciStreamPresentSyncCreate(NvSciSyncModule const syncModule, NvSciStreamBlock *const presentSync)
Creates an instance of PresentSync block and returns a NvSciStreamBlock referencing the created Prese...
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 blo...
NvSciStreamMailboxQueueCreate
NvSciError NvSciStreamMailboxQueueCreate(NvSciStreamBlock *const queue)
Creates an instance of mailbox queue block and returns a NvSciStreamBlock referencing the created mai...
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 ...
NvSciSyncFence
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:240
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.
nvscibuf.h
NVIDIA Software Communications Interface (SCI) : NvSciBuf
NvSciStreamPoolPacketStatusAcceptGet
NvSciError NvSciStreamPoolPacketStatusAcceptGet(NvSciStreamBlock const pool, NvSciStreamPacket const handle, bool *const accepted)
In pool, queries whether or not a packet has been accepted.
NvSciStreamEventType
NvSciStreamEventType
Defines event types for the blocks.
Definition: nvscistream_types.h:324
NvSciStreamBlockDelete
NvSciError NvSciStreamBlockDelete(NvSciStreamBlock const block)
Schedules a block referenced by the given NvSciStreamBlock for destruction, disconnecting the block i...
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.
NvSciStreamBlockConnect
NvSciError NvSciStreamBlockConnect(NvSciStreamBlock const upstream, NvSciStreamBlock const downstream)
Establishes connection between two blocks referenced by the given NvSciStreamBlock(s).
NvSciStreamBlockPacketOldCookieGet
NvSciError NvSciStreamBlockPacketOldCookieGet(NvSciStreamBlock const block, NvSciStreamCookie *const cookie)
In producer and consumer blocks, queries the cookie of a recently deleted packet.
NvSciSyncModule
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSyncModule.
Definition: nvscisync.h:195
NvSciStreamBlockEventQuery
NvSciError NvSciStreamBlockEventQuery(NvSciStreamBlock const block, int64_t const timeoutUsec, NvSciStreamEventType *const eventType)
Queries for the next event from block referenced by the given NvSciStreamBlock, optionally waiting wh...
nvscierror.h
NvSciStreamBlockErrorGet
NvSciError NvSciStreamBlockErrorGet(NvSciStreamBlock const block, NvSciError *const status)
Queries the error code for an error event.
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 ...
NvSciStreamConsumerCreate
NvSciError NvSciStreamConsumerCreate(NvSciStreamBlock const queue, NvSciStreamBlock *const consumer)
Creates an instance of consumer block, associates the given queue block referenced by the given NvSci...
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:295
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...
NvSciStreamBlockType
NvSciStreamBlockType
Most queries on one block request information received from ! another block.
Definition: nvscistream_types.h:156
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,...
NvSciEventService
An abstract interface for a program's event handling infrastructure.
Definition: nvscievent.h:161