NVIDIA DRIVE OS Linux SDK API Reference

5.1.9.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvscistream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2019 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_H
20 #define NVSCISTREAM_H
21 
22 #ifdef __cplusplus
23 #include <cstdint>
24 #else
25 #include <stdint.h>
26 #endif
27 
28 #include "nvscierror.h"
29 #include "nvscibuf.h"
30 #include "nvscisync.h"
31 #include "nvsciipc.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
49 typedef uintptr_t NvSciStreamBlock;
50 
52 typedef uintptr_t NvSciStreamPacket;
53 
55 typedef uintptr_t NvSciStreamCookie;
56 
58 static const NvSciStreamPacket NvSciStreamPacket_Invalid = 0U;
59 
61 static const NvSciStreamCookie NvSciStreamCookie_Invalid = 0U;
62 
64 typedef enum {
72 
74 typedef enum {
86 
88 typedef enum {
89 
100 
118 
142 
155 
168 
180 
192 
205 
231 
259 
283 
296 
313 
325 
340 
355 
372 
389 
399 
410 
412 
414 typedef struct {
417 
429 
443 
455 
467 
474  NvSciStreamPacket packetHandle;
475 
489  NvSciStreamCookie packetCookie;
490 
502  uint32_t count;
503 
516  uint32_t index;
517 
528 
540  uint32_t userData;
541 
552 
565 
567 
606  NvSciStreamBlock upstream,
607  NvSciStreamBlock downstream
608 );
609 
635  NvSciStreamBlock pool,
636  NvSciStreamBlock *producer
637 );
638 
664  NvSciStreamBlock queue,
665  NvSciStreamBlock *consumer
666 );
667 
705  uint32_t numPackets,
706  NvSciStreamBlock *pool
707 );
708 
748  NvSciStreamBlock *queue
749 );
750 
791  NvSciStreamBlock *queue
792 );
793 
829  uint32_t outputCount,
830  NvSciStreamBlock *multicast
831 );
832 
878  NvSciIpcEndpoint ipcEndpoint,
879  NvSciSyncModule syncModule,
880  NvSciBufModule bufModule,
881  NvSciStreamBlock *ipc
882 );
883 
929  NvSciIpcEndpoint ipcEndpoint,
930  NvSciSyncModule syncModule,
931  NvSciBufModule bufModule,
932  NvSciStreamBlock *ipc
933 );
934 
976  NvSciStreamBlock block,
977  int64_t timeoutUsec,
978  NvSciStreamEvent *event
979 );
980 
1016  NvSciStreamBlock block,
1017  bool synchronousOnly,
1018  NvSciSyncAttrList waitSyncAttrList
1019 );
1020 
1065  NvSciStreamBlock block,
1066  uint32_t count
1067 );
1068 
1112  NvSciStreamBlock block,
1113  uint32_t index,
1114  NvSciSyncObj syncObj
1115 );
1116 
1167  NvSciStreamBlock block,
1168  uint32_t count
1169 );
1170 
1236  NvSciStreamBlock block,
1237  uint32_t index,
1238  uint32_t type,
1239  NvSciStreamElementMode syncMode,
1240  NvSciBufAttrList bufAttrList
1241 );
1242 
1282  NvSciStreamBlock pool,
1283  NvSciStreamCookie cookie,
1284  NvSciStreamPacket *handle
1285 );
1286 
1326  NvSciStreamBlock pool,
1327  NvSciStreamPacket handle,
1328  uint32_t index,
1329  NvSciBufObj bufObj
1330 );
1331 
1374  NvSciStreamBlock pool,
1375  NvSciStreamPacket handle
1376 );
1377 
1427  NvSciStreamBlock block,
1428  NvSciStreamPacket handle,
1429  NvSciStreamCookie cookie,
1430  NvSciError err
1431 );
1432 
1478  NvSciStreamBlock block,
1479  NvSciStreamPacket handle,
1480  uint32_t index,
1481  NvSciError err
1482 );
1483 
1531  NvSciStreamBlock producer,
1532  NvSciStreamCookie *cookie,
1533  NvSciSyncFence *prefences
1534 );
1535 
1583  NvSciStreamBlock producer,
1584  NvSciStreamPacket handle,
1585  NvSciSyncFence *postfences
1586 );
1587 
1633  NvSciStreamBlock consumer,
1634  NvSciStreamCookie *cookie,
1635  NvSciSyncFence *prefences
1636 );
1637 
1684  NvSciStreamBlock consumer,
1685  NvSciStreamPacket handle,
1686  NvSciSyncFence *postfences
1687 );
1688 
1729  NvSciStreamBlock block
1730 );
1731 
1758  int32_t *value
1759 );
1760 
1767 typedef struct {
1768  uint32_t index;
1769  uint32_t type;
1773 
1774 typedef struct {
1775  uint32_t index;
1776  NvSciStreamPacket handle;
1779 
1780 typedef struct {
1784 
1785 typedef struct {
1786  uint32_t index;
1789 
1790 typedef struct {
1791  NvSciStreamCookie cookie;
1794 
1795 #ifdef __cplusplus
1796 }
1797 #endif
1798 
1799 #endif /* NVSCISTREAM_H */
NvSciError NvSciStreamProducerCreate(NvSciStreamBlock pool, NvSciStreamBlock *producer)
Creates a stream producer block.
NVIDIA Software Communications Interface (SCI) : NvSciBuf
NvSciError NvSciStreamBlockDelete(NvSciStreamBlock block)
Destroys a stream block.
Written asynchronously, typically by hardware engine.
Definition: nvscistream.h:79
NvSciBufAttrList bufAttrList
Used with events that specify buffer object attributes: PacketAttr PacketAttrProducer PacketAttrConsu...
Definition: nvscistream.h:442
NvSciError NvSciStreamPoolPacketCreate(NvSciStreamBlock pool, NvSciStreamCookie cookie, NvSciStreamPacket *handle)
Adds a new packet to the pool.
NvSciStreamEventType type
Holds the type of event.
Definition: nvscistream.h:416
NvSciError NvSciStreamIpcSrcCreate(NvSciIpcEndpoint ipcEndpoint, NvSciSyncModule syncModule, NvSciBufModule bufModule, NvSciStreamBlock *ipc)
Creates an IPC source block.
NvSciStreamElementMode
Defines packet element access modes.
Definition: nvscistream.h:74
NVIDIA Software Communications Interface (SCI): Error Handling
NvSciError NvSciStreamFifoQueueCreate(NvSciStreamBlock *queue)
Creates a FIFO queue block.
Specifies new packet element.
Definition: nvscistream.h:312
uint64_t NvSciIpcEndpoint
Handle to the IPC endpoint.
Definition: nvsciipc.h:62
NvSciError NvSciStreamProducerPacketPresent(NvSciStreamBlock producer, NvSciStreamPacket handle, NvSciSyncFence *postfences)
Inserts a data packet into the stream.
NvSciError NvSciStreamConsumerCreate(NvSciStreamBlock queue, NvSciStreamBlock *consumer)
Creates a stream consumer block.
NvSciStreamPacket packetHandle
Used with events that return a packet handle: PacketCreate.
Definition: nvscistream.h:474
NvSciError NvSciStreamPoolPacketInsertBuffer(NvSciStreamBlock pool, NvSciStreamPacket handle, uint32_t index, NvSciBufObj bufObj)
Registers a buffer to the packet.
NvSciError NvSciStreamBlockSyncRequirements(NvSciStreamBlock block, bool synchronousOnly, NvSciSyncAttrList waitSyncAttrList)
Sets block sync object requirements.
Specifies sync object requirements.
Definition: nvscistream.h:141
NvSciStreamCookie packetCookie
Used with events that indicate a packet operation: PacketDelete PacketElement PacketStatusProducer Pa...
Definition: nvscistream.h:489
NvSciBufAttrList bufAttr
Definition: nvscistream.h:1771
NvSciError NvSciStreamMulticastCreate(uint32_t outputCount, NvSciStreamBlock *multicast)
Creates a multicast block.
NvSciError NvSciStreamBlockPacketAccept(NvSciStreamBlock block, NvSciStreamPacket handle, NvSciStreamCookie cookie, NvSciError err)
Accepts a packet provided by the pool.
Specifies number of packets elements request from consumer.
Definition: nvscistream.h:191
NvSciError NvSciStreamBlockEventQuery(NvSciStreamBlock block, int64_t timeoutUsec, NvSciStreamEvent *event)
Queries for the next event from block's event queue.
Specifies the packet final settings from pool.
Definition: nvscistream.h:282
NvSciStreamQueryableAttrib
Defines NvSciStream attributes that are queryable.
Definition: nvscistream.h:64
NvSciError NvSciStreamBlockConnect(NvSciStreamBlock upstream, NvSciStreamBlock downstream)
Connects two stream blocks.
struct NvSciSyncAttrListRec * NvSciSyncAttrList
Holds a pointer to an opaque NvSciSync attribute list.
Definition: nvscisync.h:182
uintptr_t NvSciStreamCookie
Component-assigned cookie for a packet.
Definition: nvscistream.h:55
NvSciError NvSciStreamPoolPacketDelete(NvSciStreamBlock pool, NvSciStreamPacket handle)
Removes a packet from the pool.
Specifies a sync object sent from the opposite endpoint.
Definition: nvscistream.h:167
struct NvSciBufObjRefRec * NvSciBufObj
Holds a pointer to NvSciBufObjRefRec.
Definition: nvscibuf.h:1015
Specifies the packet capabilities from producer.
Definition: nvscistream.h:230
Indicates a failure not directly triggered by user action.
Definition: nvscistream.h:409
static const NvSciStreamCookie NvSciStreamCookie_Invalid
Constant variable denoting invalid cookie.
Definition: nvscistream.h:61
NvSciStreamCookie cookie
Definition: nvscistream.h:1791
Maximum number of elements allowed per packet.
Definition: nvscistream.h:66
uintptr_t NvSciStreamBlock
Handle to a stream component.
Definition: nvscistream.h:49
NvSciError error
Used with events that return an error: PacketStatus ElementStatus.
Definition: nvscistream.h:527
NvSciSyncAttrList waiterSyncAttr
Definition: nvscistream.h:1782
NvSciSyncObj syncObj
Used with events that provide a sync object: SyncDesc.
Definition: nvscistream.h:454
NvSciError NvSciStreamMailboxQueueCreate(NvSciStreamBlock *queue)
Creates a mailbox queue block.
NvSciStreamElementMode mode
Definition: nvscistream.h:1770
Indicates portions of the stream have disconnected such that no more useful work can be done with the...
Definition: nvscistream.h:117
NvSciStreamEventType
Defines component event types.
Definition: nvscistream.h:88
uintptr_t NvSciStreamPacket
NvSciStream-assigned handle for a packet.
Definition: nvscistream.h:52
struct NvSciBufAttrListRec * NvSciBufAttrList
Holds a pointer to NvSciBufAttrListRec.
Definition: nvscibuf.h:1024
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication ...
Describes a component event.
Definition: nvscistream.h:414
NvSciBufObj bufObj
Used with events that provide a buffer object: PacketElement.
Definition: nvscistream.h:466
Specifies the consumer-side status of packet element.
Definition: nvscistream.h:388
uint32_t userData
Used with events that require a user-defined data field: PacketAttr PacketAttrProducer PacketAttrCons...
Definition: nvscistream.h:540
NvSciError NvSciStreamConsumerPacketRelease(NvSciStreamBlock consumer, NvSciStreamPacket handle, NvSciSyncFence *postfences)
Returns a data packet to the stream.
NvSciSyncFence * prefences
Definition: nvscistream.h:1792
struct NvSciBufModuleRec * NvSciBufModule
Holds a pointer to NvSciBufModuleRec.
Definition: nvscibuf.h:994
NvSciError NvSciStreamIpcDstCreate(NvSciIpcEndpoint ipcEndpoint, NvSciSyncModule syncModule, NvSciBufModule bufModule, NvSciStreamBlock *ipc)
Creates an IPC destination block.
Specifies a packet is available for reuse or acquire.
Definition: nvscistream.h:398
enum NvSciErrorRec NvSciError
Return/error codes for all NvSci functions.
NvSciError NvSciStreamBlockPacketAttr(NvSciStreamBlock block, uint32_t index, uint32_t type, NvSciStreamElementMode syncMode, NvSciBufAttrList bufAttrList)
Sets block packet requirements/capabilities.
NvSciError NvSciStreamBlockSyncObject(NvSciStreamBlock block, uint32_t index, NvSciSyncObj syncObj)
Provides block's sync objects.
Specifies the number of packet elements determined by pool.
Definition: nvscistream.h:204
NvSciStreamElementMode syncMode
Used with events that specify a synchronization mode: PacketAttr PacketAttrProducer PacketAttrConsume...
Definition: nvscistream.h:564
NvSciSyncAttrList syncAttrList
Used with events that specify sync object attributes: SyncAttr.
Definition: nvscistream.h:428
Specifies number of packets elements request from producer.
Definition: nvscistream.h:179
NvSciError NvSciStreamBlockElementAccept(NvSciStreamBlock block, NvSciStreamPacket handle, uint32_t index, NvSciError err)
Accepts a packet element provided by the pool.
Specifies the producer-side status of packet.
Definition: nvscistream.h:339
uint32_t index
Used with events that require an index: SyncDesc PacketAttr PacketElement ElementStatusProducer Eleme...
Definition: nvscistream.h:516
NvSciError NvSciStreamConsumerPacketAcquire(NvSciStreamBlock consumer, NvSciStreamCookie *cookie, NvSciSyncFence *prefences)
Instructs the consumer to get a packet from the queue.
NvSciError NvSciStreamBlockPacketElementCount(NvSciStreamBlock block, uint32_t count)
Block sets the number of elements in a packet.
static const NvSciStreamPacket NvSciStreamPacket_Invalid
Constant variable denoting invalid packet.
Definition: nvscistream.h:58
Maximum number of multicast outputs allowed.
Definition: nvscistream.h:70
Indicates block has complete connection to producer and consumer endpoints.
Definition: nvscistream.h:99
NvSciSyncObj sync
Definition: nvscistream.h:1787
Specifies the discontinued packet object.
Definition: nvscistream.h:324
NvSciError NvSciStreamBlockSyncObjCount(NvSciStreamBlock block, uint32_t count)
Provides block's number of sync objects.
struct NvSciSyncObjRec * NvSciSyncObj
Holds a pointer to an opaque NvSciSync object.
Definition: nvscisync.h:173
Written synchronously, typically by CPU.
Definition: nvscistream.h:84
Specifies the number of sync objects sent from the opposite endpoint.
Definition: nvscistream.h:154
Specifies the producer-side status of packet element.
Definition: nvscistream.h:371
Specifies the packet requests from consumer.
Definition: nvscistream.h:258
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:140
NvSciStreamPacket handle
Definition: nvscistream.h:1776
NVIDIA Software Communications Interface (SCI) : NvSciSync
Maximum number of NvSciSync objects allowed.
Definition: nvscistream.h:68
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSync module.
Definition: nvscisync.h:111
uint32_t count
Used with events that require a count: SyncCount PacketElementCount PacketElementCountProducer Packet...
Definition: nvscistream.h:502
NvSciError NvSciStreamStaticPoolCreate(uint32_t numPackets, NvSciStreamBlock *pool)
Creates a static stream pool block.
The following data structures are no longer used by any interfaces and are deprecated.
Definition: nvscistream.h:1767
NvSciError NvSciStreamAttributeQuery(NvSciStreamQueryableAttrib attr, int32_t *value)
Queries NvSciStream attributes.
Specifies the consumer-side status of packet.
Definition: nvscistream.h:354
NvSciError NvSciStreamProducerPacketGet(NvSciStreamBlock producer, NvSciStreamCookie *cookie, NvSciSyncFence *prefences)
Instructs the producer to get a packet from the pool.
Indicates new packet object has been introduced by pool.
Definition: nvscistream.h:295
bool synchronousOnly
Used with events that specify sync object attributes: SyncAttr.
Definition: nvscistream.h:551