NVIDIA DRIVE OS Linux SDK API Reference

6.0.7 Release
nvmedia_core.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2022, NVIDIA CORPORATION. All rights reserved. All
3  * information contained herein is proprietary and confidential to NVIDIA
4  * Corporation. Any use, reproduction, or disclosure without the written
5  * permission of NVIDIA Corporation is prohibited.
6  */
7 
8 
16 #ifndef NVMEDIA_CORE_H
17 #define NVMEDIA_CORE_H
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 #include <math.h>
24 #include <stdint.h>
25 #include <time.h>
26 
27 #if !defined(NVM_DEPRECATED)
28  #if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 6)
29  /*
30  * deprecated as build time warnings to prompt developers to migrate
31  * from older API to new one gradually. Should be removed once API
32  * transition is done(ie: no warnings).
33  */
34 
35  #pragma GCC diagnostic warning "-Wdeprecated-declarations"
36  #define NVM_DEPRECATED_MSG(fmt) __attribute__((deprecated(fmt)))
37  #else
38  #define NVM_DEPRECATED
39  #define NVM_DEPRECATED_MSG(fmt) NVM_DEPRECATED
40  #endif
41 #else
42  #define NVM_DEPRECATED_MSG(fmt) NVM_DEPRECATED
43 #endif
44 
63 #define NVMEDIA_TRUE (0 == 0)
64 
66 #define NVMEDIA_FALSE (0 == 1)
67 
72 typedef uint32_t NvMediaBool;
73 
77 typedef struct timespec NvMediaTime;
78 
89 typedef struct {
91  uint16_t x0;
93  uint16_t y0;
95  uint16_t x1;
97  uint16_t y1;
98 } NvMediaRect;
99 
104 typedef enum {
139 } NvMediaStatus;
140 
147 typedef struct {
151  uint64_t endTimestamp;
153 
164 typedef struct {
166  uint8_t major;
168  uint8_t minor;
170  uint8_t patch;
172 
175 /*
176  ******* Definitions ******************
177  * SOFFence - Start of frame \ref NvSciSyncFence. An NvSciSyncFence
178  * whose expiry indicates that the processing has started.
179  * EOFFence - End of frame NvSciSyncFence. An NvSciSyncFence
180  * whose expiry indicates that the processing is done.
181  * PREFence - An NvSciSyncFence on which the start of processing is
182  * blocked until the expiry of the fence.
183  **************************************
184  */
185 
189 typedef enum {
198 
202 typedef enum {
224 
226 
227 /*
228  * \brief Defines all possible access modes.
229  * \note This definition is deprecated and will be removed in the next version.
230  */
231 typedef enum {
237 
254 typedef void NvMediaDevice;
255 
260 #ifdef __cplusplus
261 } /* extern "C" */
262 #endif
263 
264 #endif /* NVMEDIA_CORE_H */
NVMEDIA_ACCESS_MODE_READ
@ NVMEDIA_ACCESS_MODE_READ
Specifies read-only access mode.
Definition: nvmedia_core.h:233
NVMEDIA_STATUS_TIMED_OUT
@ NVMEDIA_STATUS_TIMED_OUT
Specifies that the operation timed out.
Definition: nvmedia_core.h:113
NVMEDIA_STATUS_OUT_OF_MEMORY
@ NVMEDIA_STATUS_OUT_OF_MEMORY
Specifies that the process is out of memory.
Definition: nvmedia_core.h:115
NVMEDIA_PRESYNCOBJ
@ NVMEDIA_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.
Definition: nvmedia_core.h:205
NVMEDIA_STATUS_OK
@ NVMEDIA_STATUS_OK
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:107
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:104
NvMediaNvSciSyncObjType
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:202
NvMediaNvSciSyncClientType
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:189
NVMEDIA_STATUS_PENDING
@ NVMEDIA_STATUS_PENDING
Specifies that the operation has not finished yet.
Definition: nvmedia_core.h:111
NVMEDIA_STATUS_UNDEFINED_STATE
@ NVMEDIA_STATUS_UNDEFINED_STATE
Specifies that the operation entered an undefined state.
Definition: nvmedia_core.h:134
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:164
NVMEDIA_STATUS_BAD_PARAMETER
@ NVMEDIA_STATUS_BAD_PARAMETER
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:109
NVMEDIA_STATUS_INCOMPATIBLE_VERSION
@ NVMEDIA_STATUS_INCOMPATIBLE_VERSION
Specifies that a library's version is incompatible with the application.
Definition: nvmedia_core.h:132
NVMEDIA_SIGNALER_WAITER
@ NVMEDIA_SIGNALER_WAITER
An NvMedia component acts as a signaler and waiter also for the same NvSciSyncObj.
Definition: nvmedia_core.h:196
NvMediaAccessMode
NvMediaAccessMode
Definition: nvmedia_core.h:231
NVMEDIA_STATUS_INVALID_STATE
@ NVMEDIA_STATUS_INVALID_STATE
Specifies that the module is in invalid state to perform the requested operation.
Definition: nvmedia_core.h:138
NvMediaVersion::patch
uint8_t patch
Holds NvMedia patch version number.
Definition: nvmedia_core.h:170
NvMediaTaskStatus::status
NvMediaStatus status
Holds actual status - NvMediaStatus.
Definition: nvmedia_core.h:149
NVMEDIA_STATUS_NONE_PENDING
@ NVMEDIA_STATUS_NONE_PENDING
Specifies that no operation is pending.
Definition: nvmedia_core.h:124
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:89
NvMediaVersion::major
uint8_t major
Holds NvMedia major version number.
Definition: nvmedia_core.h:166
NvMediaDevice
void NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:254
NVMEDIA_EOFSYNCOBJ
@ NVMEDIA_EOFSYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence.
Definition: nvmedia_core.h:208
NvMediaRect::x1
uint16_t x1
Right X co-ordinate.
Definition: nvmedia_core.h:95
NVMEDIA_SIGNALER
@ NVMEDIA_SIGNALER
An NvMedia component acts as a signaler.
Definition: nvmedia_core.h:191
NvMediaVersion::minor
uint8_t minor
Holds NvMedia minor version number.
Definition: nvmedia_core.h:168
NvMediaRect::y0
uint16_t y0
Top Y co-ordinate.
Definition: nvmedia_core.h:93
NVMEDIA_STATUS_INSUFFICIENT_BUFFERING
@ NVMEDIA_STATUS_INSUFFICIENT_BUFFERING
Specifies insufficient buffering.
Definition: nvmedia_core.h:126
NvMediaRect::y1
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:97
NvMediaTaskStatus
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:147
NVMEDIA_STATUS_INVALID_SIZE
@ NVMEDIA_STATUS_INVALID_SIZE
Specifies that the size of an object passed to a function was invalid.
Definition: nvmedia_core.h:129
NVMEDIA_ACCESS_MODE_READ_WRITE
@ NVMEDIA_ACCESS_MODE_READ_WRITE
Specifies read/write access mode.
Definition: nvmedia_core.h:235
NVMEDIA_SOF_PRESYNCOBJ
@ NVMEDIA_SOF_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence,...
Definition: nvmedia_core.h:223
NVMEDIA_WAITER
@ NVMEDIA_WAITER
An NvMedia component acts as a waiter.
Definition: nvmedia_core.h:193
NVMEDIA_SOFSYNCOBJ
@ NVMEDIA_SOFSYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence.
Definition: nvmedia_core.h:211
NvMediaTime
struct timespec NvMediaTime
Holds the media time in timespec format as defined by the POSIX specification.
Definition: nvmedia_core.h:77
NvMediaBool
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:72
NVMEDIA_STATUS_NOT_INITIALIZED
@ NVMEDIA_STATUS_NOT_INITIALIZED
Specifies that a component requred by the function call is not initialized.
Definition: nvmedia_core.h:118
NvMediaTaskStatus::endTimestamp
uint64_t endTimestamp
Holds timestamp of end of operation.
Definition: nvmedia_core.h:151
NVMEDIA_STATUS_NOT_SUPPORTED
@ NVMEDIA_STATUS_NOT_SUPPORTED
Specifies that the requested operation is not supported.
Definition: nvmedia_core.h:120
NvMediaRect::x0
uint16_t x0
Left X co-ordinate.
Definition: nvmedia_core.h:91
NVMEDIA_EOF_PRESYNCOBJ
@ NVMEDIA_EOF_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler,...
Definition: nvmedia_core.h:217
NVMEDIA_STATUS_ERROR
@ NVMEDIA_STATUS_ERROR
Specifies a catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:122
NVMEDIA_STATUS_PFSD_ERROR
@ NVMEDIA_STATUS_PFSD_ERROR
Specifies an error from Permanent Fault Software Diagnostic.
Definition: nvmedia_core.h:136