NVIDIA DRIVE OS Linux SDK API Reference

5.1.15.0 Release
For Test and Development only
nvscistream.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-2020 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 
52 typedef uintptr_t NvSciStreamBlock;
53 
58 typedef uintptr_t NvSciStreamPacket;
59 
64 typedef uintptr_t NvSciStreamCookie;
65 
71 
77 
82 typedef enum {
90 
95 typedef enum {
107 
112 typedef enum {
113 
124 
142 
166 
179 
192 
204 
216 
229 
255 
283 
307 
320 
337 
349 
364 
379 
396 
413 
423 
434 
436 
441 typedef struct {
444 
456 
470 
482 
494 
502 
517 
529  uint32_t count;
530 
543  uint32_t index;
544 
555 
567  uint32_t userData;
568 
579 
592 
594 
635  NvSciStreamBlock const upstream,
636  NvSciStreamBlock const downstream
637 );
638 
674  NvSciStreamBlock const pool,
675  NvSciStreamBlock *const producer
676 );
677 
713  NvSciStreamBlock const queue,
714  NvSciStreamBlock *const consumer
715 );
716 
758  uint32_t const numPackets,
759  NvSciStreamBlock *const pool
760 );
761 
803  NvSciStreamBlock *const queue
804 );
805 
848  NvSciStreamBlock *const queue
849 );
850 
888  uint32_t const outputCount,
889  NvSciStreamBlock *const multicast
890 );
891 
939  NvSciIpcEndpoint const ipcEndpoint,
940  NvSciSyncModule const syncModule,
941  NvSciBufModule const bufModule,
942  NvSciStreamBlock *const ipc
943 );
944 
992  NvSciIpcEndpoint const ipcEndpoint,
993  NvSciSyncModule const syncModule,
994  NvSciBufModule const bufModule,
995  NvSciStreamBlock *const ipc
996 );
997 
1040  NvSciStreamBlock const block,
1041  int64_t const timeoutUsec,
1042  NvSciStreamEvent *const event
1043 );
1044 
1082  NvSciStreamBlock const block,
1083  bool const synchronousOnly,
1084  NvSciSyncAttrList const waitSyncAttrList
1085 );
1086 
1133  NvSciStreamBlock const block,
1134  uint32_t const count
1135 );
1136 
1183  NvSciStreamBlock const block,
1184  uint32_t const index,
1185  NvSciSyncObj const syncObj
1186 );
1187 
1240  NvSciStreamBlock const block,
1241  uint32_t const count
1242 );
1243 
1312  NvSciStreamBlock const block,
1313  uint32_t const index,
1314  uint32_t const type,
1315  NvSciStreamElementMode const syncMode,
1316  NvSciBufAttrList const bufAttrList
1317 );
1318 
1360  NvSciStreamBlock const pool,
1361  NvSciStreamCookie const cookie,
1362  NvSciStreamPacket *const handle
1363 );
1364 
1405  NvSciStreamBlock const pool,
1406  NvSciStreamPacket const handle,
1407  uint32_t const index,
1408  NvSciBufObj const bufObj
1409 );
1410 
1455  NvSciStreamBlock const pool,
1456  NvSciStreamPacket const handle
1457 );
1458 
1510  NvSciStreamBlock const block,
1511  NvSciStreamPacket const handle,
1512  NvSciStreamCookie const cookie,
1513  NvSciError const err
1514 );
1515 
1563  NvSciStreamBlock const block,
1564  NvSciStreamPacket const handle,
1565  uint32_t const index,
1566  NvSciError const err
1567 );
1568 
1618  NvSciStreamBlock const producer,
1619  NvSciStreamCookie *const cookie,
1620  NvSciSyncFence *const prefences
1621 );
1622 
1672  NvSciStreamBlock const producer,
1673  NvSciStreamPacket const handle,
1674  NvSciSyncFence const *const postfences
1675 );
1676 
1724  NvSciStreamBlock const consumer,
1725  NvSciStreamCookie *const cookie,
1726  NvSciSyncFence *const prefences
1727 );
1728 
1777  NvSciStreamBlock const consumer,
1778  NvSciStreamPacket const handle,
1779  NvSciSyncFence const *const postfences
1780 );
1781 
1824  NvSciStreamBlock const block
1825 );
1826 
1854  NvSciStreamQueryableAttrib const attr,
1855  int32_t *const value
1856 );
1857 
1864 typedef struct {
1865  uint32_t index;
1866  uint32_t type;
1870 
1871 typedef struct {
1872  uint32_t index;
1876 
1877 typedef struct {
1881 
1882 typedef struct {
1883  uint32_t index;
1886 
1887 typedef struct {
1891 
1892 #ifdef __cplusplus
1893 }
1894 #endif
1895 
1896 #endif /* NVSCISTREAM_H */
NvSciStreamEvent::bufAttrList
NvSciBufAttrList bufAttrList
Used with events that specify buffer object attributes: PacketAttr PacketAttrProducer PacketAttrConsu...
Definition: nvscistream.h:469
NvSciError
NvSciError
Return/error codes for all NvSci functions.
Definition: nvscierror.h:45
NvSciStreamElementAttr::type
uint32_t type
Definition: nvscistream.h:1866
NvSciStreamEventType_PacketElementCountProducer
@ NvSciStreamEventType_PacketElementCountProducer
Specifies number of packets elements request from producer.
Definition: nvscistream.h:203
NvSciStreamQueryableAttrib_MaxSyncObj
@ NvSciStreamQueryableAttrib_MaxSyncObj
Maximum number of NvSciSync objects allowed.
Definition: nvscistream.h:86
NvSciStreamSyncDesc::sync
NvSciSyncObj sync
Definition: nvscistream.h:1884
NvSciStreamPoolPacketInsertBuffer
NvSciError NvSciStreamPoolPacketInsertBuffer(NvSciStreamBlock const pool, NvSciStreamPacket const handle, uint32_t const index, NvSciBufObj const bufObj)
Registers a buffer to the packet.
NvSciStreamEventType_PacketElementCountConsumer
@ NvSciStreamEventType_PacketElementCountConsumer
Specifies number of packets elements request from consumer.
Definition: nvscistream.h:215
NvSciStreamMailboxQueueCreate
NvSciError NvSciStreamMailboxQueueCreate(NvSciStreamBlock *const queue)
Creates a mailbox queue block.
NvSciStreamEventType_ElementStatusProducer
@ NvSciStreamEventType_ElementStatusProducer
Specifies the producer-side status of packet element.
Definition: nvscistream.h:395
NvSciStreamIpcSrcCreate
NvSciError NvSciStreamIpcSrcCreate(NvSciIpcEndpoint const ipcEndpoint, NvSciSyncModule const syncModule, NvSciBufModule const bufModule, NvSciStreamBlock *const ipc)
Creates an IPC source block.
NvSciStreamEvent::packetCookie
NvSciStreamCookie packetCookie
Used with events that indicate a packet operation: PacketDelete PacketElement PacketStatusProducer Pa...
Definition: nvscistream.h:516
NvSciStreamPayload::cookie
NvSciStreamCookie cookie
Definition: nvscistream.h:1888
NvSciStreamSyncAttr
Definition: nvscistream.h:1877
NvSciStreamBlockPacketAccept
NvSciError NvSciStreamBlockPacketAccept(NvSciStreamBlock const block, NvSciStreamPacket const handle, NvSciStreamCookie const cookie, NvSciError const err)
Accepts a packet provided by the pool.
NvSciStreamMulticastCreate
NvSciError NvSciStreamMulticastCreate(uint32_t const outputCount, NvSciStreamBlock *const multicast)
Creates a multicast block.
NvSciStreamEvent::syncObj
NvSciSyncObj syncObj
Used with events that provide a sync object: SyncDesc.
Definition: nvscistream.h:481
NvSciStreamProducerPacketPresent
NvSciError NvSciStreamProducerPacketPresent(NvSciStreamBlock const producer, NvSciStreamPacket const handle, NvSciSyncFence const *const postfences)
Inserts a data packet into the stream.
NvSciStreamEventType_PacketStatusProducer
@ NvSciStreamEventType_PacketStatusProducer
Specifies the producer-side status of packet.
Definition: nvscistream.h:363
NvSciStreamPacket_Invalid
static const NvSciStreamPacket NvSciStreamPacket_Invalid
Constant variable denoting invalid packet.
Definition: nvscistream.h:70
NvSciStreamElementDesc::buffer
NvSciBufObj buffer
Definition: nvscistream.h:1874
NvSciStreamEvent::type
NvSciStreamEventType type
Holds the type of event.
Definition: nvscistream.h:443
NvSciStreamEvent::error
NvSciError error
Used with events that return an error: PacketStatus ElementStatus.
Definition: nvscistream.h:554
NvSciSyncAttrList
struct NvSciSyncAttrListRec * NvSciSyncAttrList
A container constituting an NvSciSyncAttrList which contains:
Definition: nvscisync.h:295
NvSciStreamConsumerCreate
NvSciError NvSciStreamConsumerCreate(NvSciStreamBlock const queue, NvSciStreamBlock *const consumer)
Creates a stream consumer block.
NvSciBufObj
struct NvSciBufObjRefRec * NvSciBufObj
A memory object is a container holding the reconciled NvSciBufAttrList defining constraints of the bu...
Definition: nvscibuf.h:1290
NvSciStreamBlockPacketElementCount
NvSciError NvSciStreamBlockPacketElementCount(NvSciStreamBlock const block, uint32_t const count)
Block sets the number of elements in a packet.
NvSciStreamEventType_PacketAttrProducer
@ NvSciStreamEventType_PacketAttrProducer
Specifies the packet capabilities from producer.
Definition: nvscistream.h:254
nvscisync.h
NVIDIA Software Communications Interface (SCI) : NvSciSync
NvSciStreamEvent::packetHandle
NvSciStreamPacket packetHandle
Used with events that return a packet handle: PacketCreate.
Definition: nvscistream.h:501
NvSciStreamElementDesc
Definition: nvscistream.h:1871
NvSciStreamEventType_Error
@ NvSciStreamEventType_Error
Indicates a failure not directly triggered by user action.
Definition: nvscistream.h:433
NvSciStreamElementMode_Immediate
@ NvSciStreamElementMode_Immediate
Written synchronously, typically by CPU.
Definition: nvscistream.h:105
NvSciStreamElementAttr::bufAttr
NvSciBufAttrList bufAttr
Definition: nvscistream.h:1868
NvSciStreamEventType_PacketReady
@ NvSciStreamEventType_PacketReady
Specifies a packet is available for reuse or acquire.
Definition: nvscistream.h:422
NvSciStreamEventType_SyncDesc
@ NvSciStreamEventType_SyncDesc
Specifies a sync object sent from the opposite endpoint.
Definition: nvscistream.h:191
NvSciStreamProducerCreate
NvSciError NvSciStreamProducerCreate(NvSciStreamBlock const pool, NvSciStreamBlock *const producer)
Creates a stream producer block.
NvSciStreamSyncAttr::synchronousOnly
bool synchronousOnly
Definition: nvscistream.h:1878
NvSciStreamBlockEventQuery
NvSciError NvSciStreamBlockEventQuery(NvSciStreamBlock const block, int64_t const timeoutUsec, NvSciStreamEvent *const event)
Queries for the next event from block's event queue, optionally waiting, and returns it to the caller...
NvSciStreamEventType_PacketCreate
@ NvSciStreamEventType_PacketCreate
Indicates new packet object has been introduced by pool.
Definition: nvscistream.h:319
type
int const char int type
Definition: drm-nvdc-docs.h:1479
NvSciStreamEvent::bufObj
NvSciBufObj bufObj
Used with events that provide a buffer object: PacketElement.
Definition: nvscistream.h:493
NvSciStreamProducerPacketGet
NvSciError NvSciStreamProducerPacketGet(NvSciStreamBlock const producer, NvSciStreamCookie *const cookie, NvSciSyncFence *const prefences)
Instructs the producer to get a packet from the pool.
NvSciStreamBlockSyncObjCount
NvSciError NvSciStreamBlockSyncObjCount(NvSciStreamBlock const block, uint32_t const count)
Provides block's number of sync objects.
NvSciStreamConsumerPacketAcquire
NvSciError NvSciStreamConsumerPacketAcquire(NvSciStreamBlock const consumer, NvSciStreamCookie *const cookie, NvSciSyncFence *const prefences)
Instructs the consumer to get a packet from the queue.
NvSciStreamEvent::syncMode
NvSciStreamElementMode syncMode
Used with events that specify a synchronization mode: PacketAttr PacketAttrProducer PacketAttrConsume...
Definition: nvscistream.h:591
NvSciStreamEvent::userData
uint32_t userData
Used with events that require a user-defined data field: PacketAttr PacketAttrProducer PacketAttrCons...
Definition: nvscistream.h:567
NvSciStreamElementAttr::mode
NvSciStreamElementMode mode
Definition: nvscistream.h:1867
NvSciStreamEventType_PacketStatusConsumer
@ NvSciStreamEventType_PacketStatusConsumer
Specifies the consumer-side status of packet.
Definition: nvscistream.h:378
NvSciStreamFifoQueueCreate
NvSciError NvSciStreamFifoQueueCreate(NvSciStreamBlock *const queue)
Creates a FIFO queue block.
NvSciIpcEndpoint
uint64_t NvSciIpcEndpoint
Handle to the NvSciIpc endpoint.
Definition: nvsciipc.h:82
nvsciipc.h
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication
NvSciStreamPayload::prefences
NvSciSyncFence * prefences
Definition: nvscistream.h:1889
NvSciStreamIpcDstCreate
NvSciError NvSciStreamIpcDstCreate(NvSciIpcEndpoint const ipcEndpoint, NvSciSyncModule const syncModule, NvSciBufModule const bufModule, NvSciStreamBlock *const ipc)
Creates an IPC destination block.
NvSciStreamBlockSyncRequirements
NvSciError NvSciStreamBlockSyncRequirements(NvSciStreamBlock const block, bool const synchronousOnly, NvSciSyncAttrList const waitSyncAttrList)
Sets block sync object requirements.
NvSciStreamElementAttr::index
uint32_t index
Definition: nvscistream.h:1865
NvSciStreamElementMode
NvSciStreamElementMode
Defines packet element access modes.
Definition: nvscistream.h:95
NvSciStreamEventType_Disconnected
@ NvSciStreamEventType_Disconnected
Indicates portions of the stream have disconnected such that no more useful work can be done with the...
Definition: nvscistream.h:141
NvSciStreamPayload
Definition: nvscistream.h:1887
NvSciStreamElementMode_Asynchronous
@ NvSciStreamElementMode_Asynchronous
Written asynchronously, typically by hardware engine.
Definition: nvscistream.h:100
NvSciStreamEventType_PacketAttr
@ NvSciStreamEventType_PacketAttr
Specifies the packet final settings from pool.
Definition: nvscistream.h:306
NvSciStreamBlockDelete
NvSciError NvSciStreamBlockDelete(NvSciStreamBlock const block)
Destroys a stream block.
NvSciStreamEventType_PacketAttrConsumer
@ NvSciStreamEventType_PacketAttrConsumer
Specifies the packet requests from consumer.
Definition: nvscistream.h:282
NvSciBufModule
struct NvSciBufModuleRec * NvSciBufModule
top-level container for the following set of resources: NvSciBufAttrLists, buffers,...
Definition: nvscibuf.h:1250
NvSciStreamEvent::index
uint32_t index
Used with events that require an index: SyncDesc PacketAttr PacketElement ElementStatusProducer Eleme...
Definition: nvscistream.h:543
NvSciBufAttrList
struct NvSciBufAttrListRec * NvSciBufAttrList
A container constituting an attribute list which contains.
Definition: nvscibuf.h:1303
NvSciStreamEventType_SyncAttr
@ NvSciStreamEventType_SyncAttr
Specifies sync object requirements.
Definition: nvscistream.h:165
NvSciStreamQueryableAttrib_MaxMulticastOutputs
@ NvSciStreamQueryableAttrib_MaxMulticastOutputs
Maximum number of multicast outputs allowed.
Definition: nvscistream.h:88
NvSciStreamSyncDesc
Definition: nvscistream.h:1882
NvSciStreamAttributeQuery
NvSciError NvSciStreamAttributeQuery(NvSciStreamQueryableAttrib const attr, int32_t *const value)
Queries NvSciStream attributes.
NvSciStreamEventType_PacketDelete
@ NvSciStreamEventType_PacketDelete
Specifies the discontinued packet object.
Definition: nvscistream.h:348
NvSciStreamCookie
uintptr_t NvSciStreamCookie
Component-assigned cookie for a packet.
Definition: nvscistream.h:64
NvSciSyncFence
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:227
NvSciStreamBlockSyncObject
NvSciError NvSciStreamBlockSyncObject(NvSciStreamBlock const block, uint32_t const index, NvSciSyncObj const syncObj)
Provides block's sync object.
NvSciStreamPoolPacketCreate
NvSciError NvSciStreamPoolPacketCreate(NvSciStreamBlock const pool, NvSciStreamCookie const cookie, NvSciStreamPacket *const handle)
Adds a new packet to the pool.
nvscibuf.h
NVIDIA Software Communications Interface (SCI) : NvSciBuf
NvSciStreamElementAttr
The following data structures are no longer used by any interfaces and are deprecated.
Definition: nvscistream.h:1864
NvSciStreamStaticPoolCreate
NvSciError NvSciStreamStaticPoolCreate(uint32_t const numPackets, NvSciStreamBlock *const pool)
Creates a static stream pool block.
NvSciStreamConsumerPacketRelease
NvSciError NvSciStreamConsumerPacketRelease(NvSciStreamBlock const consumer, NvSciStreamPacket const handle, NvSciSyncFence const *const postfences)
Returns a data packet to the stream.
NvSciStreamQueryableAttrib
NvSciStreamQueryableAttrib
Defines NvSciStream attributes that are queryable.
Definition: nvscistream.h:82
NvSciStreamEvent::syncAttrList
NvSciSyncAttrList syncAttrList
Used with events that specify sync object attributes: SyncAttr.
Definition: nvscistream.h:455
NvSciStreamEventType_PacketElementCount
@ NvSciStreamEventType_PacketElementCount
Specifies the number of packet elements determined by pool.
Definition: nvscistream.h:228
NvSciStreamBlock
uintptr_t NvSciStreamBlock
Handle to a stream component.
Definition: nvscistream.h:52
NvSciStreamEventType_SyncCount
@ NvSciStreamEventType_SyncCount
Specifies the number of sync objects sent from the opposite endpoint.
Definition: nvscistream.h:178
NvSciStreamEventType_Connected
@ NvSciStreamEventType_Connected
Indicates block has complete connection to producer and consumer endpoints.
Definition: nvscistream.h:123
NvSciStreamBlockPacketAttr
NvSciError NvSciStreamBlockPacketAttr(NvSciStreamBlock const block, uint32_t const index, uint32_t const type, NvSciStreamElementMode const syncMode, NvSciBufAttrList const bufAttrList)
Sets block packet requirements/capabilities.
NvSciSyncModule
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSyncModule.
Definition: nvscisync.h:183
NvSciStreamBlockConnect
NvSciError NvSciStreamBlockConnect(NvSciStreamBlock const upstream, NvSciStreamBlock const downstream)
Connects two stream blocks.
NvSciStreamElementDesc::index
uint32_t index
Definition: nvscistream.h:1872
NvSciStreamSyncAttr::waiterSyncAttr
NvSciSyncAttrList waiterSyncAttr
Definition: nvscistream.h:1879
NvSciStreamEventType_ElementStatusConsumer
@ NvSciStreamEventType_ElementStatusConsumer
Specifies the consumer-side status of packet element.
Definition: nvscistream.h:412
NvSciStreamElementDesc::handle
NvSciStreamPacket handle
Definition: nvscistream.h:1873
nvscierror.h
NvSciStreamPacket
uintptr_t NvSciStreamPacket
NvSciStream-assigned handle for a packet.
Definition: nvscistream.h:58
NvSciStreamEvent
Describes a component event.
Definition: nvscistream.h:441
NvSciStreamCookie_Invalid
static const NvSciStreamCookie NvSciStreamCookie_Invalid
Constant variable denoting invalid cookie.
Definition: nvscistream.h:76
NvSciStreamPoolPacketDelete
NvSciError NvSciStreamPoolPacketDelete(NvSciStreamBlock const pool, NvSciStreamPacket const handle)
Removes a packet from the pool.
NvSciStreamEvent::count
uint32_t count
Used with events that require a count: SyncCount PacketElementCount PacketElementCountProducer Packet...
Definition: nvscistream.h:529
NvSciSyncObj
struct NvSciSyncObjRec * NvSciSyncObj
A Synchronization Object is a container holding the reconciled NvSciSyncAttrList defining constraints...
Definition: nvscisync.h:282
NvSciStreamSyncDesc::index
uint32_t index
Definition: nvscistream.h:1883
NvSciStreamEvent::synchronousOnly
bool synchronousOnly
Used with events that specify sync object attributes: SyncAttr.
Definition: nvscistream.h:578
NvSciStreamQueryableAttrib_MaxElements
@ NvSciStreamQueryableAttrib_MaxElements
Maximum number of elements allowed per packet.
Definition: nvscistream.h:84
NvSciStreamEventType_PacketElement
@ NvSciStreamEventType_PacketElement
Specifies new packet element.
Definition: nvscistream.h:336
NvSciStreamBlockElementAccept
NvSciError NvSciStreamBlockElementAccept(NvSciStreamBlock const block, NvSciStreamPacket const handle, uint32_t const index, NvSciError const err)
Accepts a packet element provided by the pool.
NvSciStreamEventType
NvSciStreamEventType
Defines component event types.
Definition: nvscistream.h:112