NVIDIA DRIVE OS Linux API Reference

5.1.6.1 Release
For Test and Development only

 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 typedef enum {
64 
66 typedef enum {
78 
80 typedef struct {
84  uint32_t index;
90  uint32_t type;
99 
103 typedef struct {
105  uint32_t index;
109  NvSciStreamPacket handle;
113 
117 typedef struct {
121  NvSciStreamCookie cookie;
140 
145 typedef struct {
156 
161 typedef struct {
169  uint32_t index;
173 
175 typedef enum {
178 
181 
184 
187 
190 
193 
196 
199 
202 
205 
208 
211 
214 
217 
220 
223 
226 
229 
232 
235 
239 
241 typedef struct {
244 
262 
277 
298 
311  NvSciStreamPacket packetCreate;
312 
323 
329  NvSciStreamCookie packetCookie;
330 
337 
344  uint32_t index;
345 
360  uint32_t count;
362 
401  NvSciStreamBlock upstream,
402  NvSciStreamBlock downstream
403 );
404 
430  NvSciStreamBlock pool,
431  NvSciStreamBlock *producer
432 );
433 
459  NvSciStreamBlock queue,
460  NvSciStreamBlock *consumer
461 );
462 
500  uint32_t numPackets,
501  NvSciStreamBlock *pool
502 );
503 
543  NvSciStreamBlock *queue
544 );
545 
586  NvSciStreamBlock *queue
587 );
588 
634  NvSciIpcEndpoint ipcEndpoint,
635  NvSciSyncModule syncModule,
636  NvSciBufModule bufModule,
637  NvSciStreamBlock *ipc
638 );
639 
685  NvSciIpcEndpoint ipcEndpoint,
686  NvSciSyncModule syncModule,
687  NvSciBufModule bufModule,
688  NvSciStreamBlock *ipc
689 );
690 
732  NvSciStreamBlock block,
733  int64_t timeoutUsec,
734  NvSciStreamEvent *event
735 );
736 
772  NvSciStreamBlock block,
773  const NvSciStreamSyncAttr *attr
774 );
775 
820  NvSciStreamBlock block,
821  uint32_t count
822 );
823 
866  NvSciStreamBlock block,
867  const NvSciStreamSyncDesc *sync
868 );
869 
920  NvSciStreamBlock block,
921  uint32_t count
922 );
923 
986  NvSciStreamBlock block,
987  const NvSciStreamElementAttr *attr
988 );
989 
1029  NvSciStreamBlock pool,
1030  NvSciStreamCookie cookie,
1031  NvSciStreamPacket *handle
1032 );
1033 
1072  NvSciStreamBlock pool,
1073  const NvSciStreamElementDesc *desc
1074 );
1075 
1118  NvSciStreamBlock pool,
1119  NvSciStreamPacket handle
1120 );
1121 
1171  NvSciStreamBlock block,
1172  NvSciStreamPacket handle,
1173  NvSciStreamCookie cookie,
1174  NvSciError err
1175 );
1176 
1222  NvSciStreamBlock block,
1223  NvSciStreamPacket handle,
1224  uint32_t index,
1225  NvSciError err
1226 );
1227 
1271  NvSciStreamBlock producer,
1272  NvSciStreamPayload *payload
1273 );
1274 
1322  NvSciStreamBlock producer,
1323  NvSciStreamPacket handle,
1324  NvSciSyncFence *postfences
1325 );
1326 
1369  NvSciStreamBlock consumer,
1370  NvSciStreamPayload *payload
1371 );
1372 
1419  NvSciStreamBlock consumer,
1420  NvSciStreamPacket handle,
1421  NvSciSyncFence *postfences
1422 );
1423 
1464  NvSciStreamBlock block
1465 );
1466 
1493  int32_t *value
1494 );
1495 
1496 #ifdef __cplusplus
1497 }
1498 #endif
1499 
1500 #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:71
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:243
NvSciStreamSyncAttr syncAttr
Used with SyncAttr events.
Definition: nvscistream.h:261
NvSciError NvSciStreamIpcSrcCreate(NvSciIpcEndpoint ipcEndpoint, NvSciSyncModule syncModule, NvSciBufModule bufModule, NvSciStreamBlock *ipc)
Creates an IPC source block.
NvSciStreamElementMode
Defines packet element access modes.
Definition: nvscistream.h:66
NvSciBufObj buffer
Refers to the NvSciBuf object belonging to this element.
Definition: nvscistream.h:111
NVIDIA Software Communications Interface (SCI): Error Handling
bool synchronousOnly
Indicates endpoint cannot process sync objects of any kind and data must be published synchronously...
Definition: nvscistream.h:150
NvSciError NvSciStreamFifoQueueCreate(NvSciStreamBlock *queue)
Creates a FIFO queue block.
Specifies the new packet element.
Definition: nvscistream.h:213
uint64_t NvSciIpcEndpoint
Handle to the IPC endpoint.
Definition: nvsciipc.h:67
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.
Describes a single sync object that will be sent to or received from the other endpoint.
Definition: nvscistream.h:161
Specifies sync object requirements.
Definition: nvscistream.h:183
NvSciStreamCookie packetCookie
Used with PacketDelete, PacketStatus, and PacketElement events.
Definition: nvscistream.h:329
NvSciBufAttrList bufAttr
Holds memory buffer allocation requirements for this element.
Definition: nvscistream.h:97
NvSciError NvSciStreamBlockPacketAttr(NvSciStreamBlock block, const NvSciStreamElementAttr *attr)
Sets block packet requirements/capabilities.
NvSciError NvSciStreamBlockPacketAccept(NvSciStreamBlock block, NvSciStreamPacket handle, NvSciStreamCookie cookie, NvSciError err)
Accepts a packet provided by the pool.
Specifies number of packets elements requirement from consumer.
Definition: nvscistream.h:195
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:207
NvSciStreamElementAttr packetAttr
Used with PacketAttrConsumer, PacketAttrProducer, and PacketAttr.
Definition: nvscistream.h:297
NvSciStreamQueryableAttrib
Defines NvSciStream attributes that are queryable.
Definition: nvscistream.h:58
NvSciError NvSciStreamBlockConnect(NvSciStreamBlock upstream, NvSciStreamBlock downstream)
Connects two stream blocks.
NvSciStreamElementDesc packetElement
Used with PacketElement events.
Definition: nvscistream.h:322
struct NvSciSyncAttrListRec * NvSciSyncAttrList
Holds a pointer to an opaque NvSciSync attribute list.
Definition: nvscisync.h:183
uintptr_t NvSciStreamCookie
Component-assigned cookie for a packet.
Definition: nvscistream.h:55
Indicates complete upstream connection to producer.
Definition: nvscistream.h:180
NvSciError NvSciStreamPoolPacketDelete(NvSciStreamBlock pool, NvSciStreamPacket handle)
Removes a packet from the pool.
Specifies a sync object sent from the opposite endpoint.
Definition: nvscistream.h:189
struct NvSciBufObjRefRec * NvSciBufObj
Holds a pointer to NvSciBufObjRefRec.
Definition: nvscibuf.h:919
Specifies the packet capabilities from producer.
Definition: nvscistream.h:201
uint32_t index
Zero-based index of the sync object.
Definition: nvscistream.h:169
NvSciStreamCookie cookie
Holds the recipient's cookie for the packet.
Definition: nvscistream.h:121
Maximum number of elements allowed per packet.
Definition: nvscistream.h:60
uintptr_t NvSciStreamBlock
Handle to a stream component.
Definition: nvscistream.h:49
NvSciError error
Used with PacketStatus and ElementStatus events.
Definition: nvscistream.h:336
NvSciSyncAttrList waiterSyncAttr
Holds requirements for UMDs, as an NvSciSyncAttrList object.
Definition: nvscistream.h:154
uint32_t index
Zero-based index of this packet element in a packet.
Definition: nvscistream.h:84
NvSciError NvSciStreamMailboxQueueCreate(NvSciStreamBlock *queue)
Creates a mailbox queue block.
NvSciStreamElementMode mode
Holds the mode with which data will be written/accessed.
Definition: nvscistream.h:92
NvSciError NvSciStreamProducerPacketGet(NvSciStreamBlock producer, NvSciStreamPayload *payload)
Instructs the producer to get a packet from the pool.
Structure representing a packet element.
Definition: nvscistream.h:103
NvSciStreamEventType
Defines component event types.
Definition: nvscistream.h:175
uintptr_t NvSciStreamPacket
NvSciStream-assigned handle for a packet.
Definition: nvscistream.h:52
struct NvSciBufAttrListRec * NvSciBufAttrList
Holds a pointer to NvSciBufAttrListRec.
Definition: nvscibuf.h:928
NVIDIA Software Communications Interface (SCI) : NvSci Inter-Process Communication ...
Defines a "frame" of data sent to the consumer or returned to the producer.
Definition: nvscistream.h:117
Describes a component event.
Definition: nvscistream.h:241
NvSciError NvSciStreamConsumerPacketAcquire(NvSciStreamBlock consumer, NvSciStreamPayload *payload)
Instructs the consumer to get a packet from the queue.
Specifies the status of element.
Definition: nvscistream.h:228
NvSciError NvSciStreamBlockSyncRequirements(NvSciStreamBlock block, const NvSciStreamSyncAttr *attr)
Sets block sync object requirements.
NvSciError NvSciStreamConsumerPacketRelease(NvSciStreamBlock consumer, NvSciStreamPacket handle, NvSciSyncFence *postfences)
Returns a data packet to the stream.
NvSciSyncFence * prefences
Pointer array in which prefences will be written.
Definition: nvscistream.h:138
struct NvSciBufModuleRec * NvSciBufModule
Holds a pointer to NvSciBufModuleRec.
Definition: nvscibuf.h:898
NvSciError NvSciStreamIpcDstCreate(NvSciIpcEndpoint ipcEndpoint, NvSciSyncModule syncModule, NvSciBufModule bufModule, NvSciStreamBlock *ipc)
Creates an IPC destination block.
Specifies the packet available for reuse or acquire.
Definition: nvscistream.h:231
enum NvSciErrorRec NvSciError
Return/error codes for all NvSci functions.
NvSciError NvSciStreamPoolPacketInsertBuffer(NvSciStreamBlock pool, const NvSciStreamElementDesc *desc)
Registers a buffer to the packet.
Specifies the number of packet elements determined by pool.
Definition: nvscistream.h:198
Specifies number of packets elements request from producer.
Definition: nvscistream.h:192
NvSciError NvSciStreamBlockElementAccept(NvSciStreamBlock block, NvSciStreamPacket handle, uint32_t index, NvSciError err)
Accepts a packet element provided by the pool.
uint32_t index
Zero-based index of this buffer in the packet.
Definition: nvscistream.h:105
NvSciStreamSyncDesc syncDesc
Used with SyncDesc events.
Definition: nvscistream.h:276
NvSciStreamPacket packetCreate
Used with PacketCreate events.
Definition: nvscistream.h:311
Specifies the status of packet.
Definition: nvscistream.h:219
uint32_t index
Used with events that require an index.
Definition: nvscistream.h:344
NvSciError NvSciStreamBlockPacketElementCount(NvSciStreamBlock block, uint32_t count)
Block sets the number of elements in a packet.
NvSciSyncObj sync
Handle to sync object.
Definition: nvscistream.h:171
Specifies the discontinued packet object.
Definition: nvscistream.h:216
NvSciError NvSciStreamBlockSyncObjCount(NvSciStreamBlock block, uint32_t count)
Provides block's number of sync objects.
Defines the requirements for an endpoint to be able to read sync objects provided by the other endpoi...
Definition: nvscistream.h:145
NvSciError NvSciStreamBlockSyncObject(NvSciStreamBlock block, const NvSciStreamSyncDesc *sync)
Provides block's sync objects.
Indicates a downstream component has been destroyed.
Definition: nvscistream.h:234
struct NvSciSyncObjRec * NvSciSyncObj
Holds a pointer to an opaque NvSciSync object.
Definition: nvscisync.h:174
Written synchronously, typically by CPU.
Definition: nvscistream.h:76
Specifies the number of sync objects sent from the opposite endpoint.
Definition: nvscistream.h:186
Specifies the status of element.
Definition: nvscistream.h:225
Specifies the packet requests from consumer.
Definition: nvscistream.h:204
Defines the opaque NvSciSyncFence.
Definition: nvscisync.h:141
NvSciStreamPacket handle
Handle for the packet.
Definition: nvscistream.h:109
NVIDIA Software Communications Interface (SCI) : NvSciSync
Maximum number of NvSciSync objects allowed.
Definition: nvscistream.h:62
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSync module.
Definition: nvscisync.h:112
uint32_t count
Used with events that require a count.
Definition: nvscistream.h:360
NvSciError NvSciStreamStaticPoolCreate(uint32_t numPackets, NvSciStreamBlock *pool)
Creates a static stream pool block.
Defines attributes of a packet element.
Definition: nvscistream.h:80
Indicates complete downstream connection to consumer.
Definition: nvscistream.h:177
Indicates an upstream component has been destroyed.
Definition: nvscistream.h:237
NvSciError NvSciStreamAttributeQuery(NvSciStreamQueryableAttrib attr, int32_t *value)
Queries NvSciStream attributes.
Specifies the status of packet.
Definition: nvscistream.h:222
Specifies the new packet object.
Definition: nvscistream.h:210
uint32_t type
Application-defined type to identify the required data.
Definition: nvscistream.h:90