NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
nvmedia_core.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2017-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
20 #ifndef NVMEDIA_CORE_H
21 #define NVMEDIA_CORE_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <math.h>
28 #include <stdint.h>
29 #include <time.h>
30 
31 #if !defined(NVM_DEPRECATED)
32  #if defined(__GNUC__) && (__GNUC__ > 6)
33  /*
34  * deprecated as build time warnings to prompt developers to migrate
35  * from older API to new one gradually. Should be removed once API
36  * transition is done(ie: no warnings).
37  */
38 
39  #pragma GCC diagnostic warning "-Wdeprecated-declarations"
40  #define NVM_DEPRECATED_MSG(fmt) __attribute__((deprecated(fmt)))
41  #else
42  #define NVM_DEPRECATED
43  #define NVM_DEPRECATED_MSG(fmt) NVM_DEPRECATED
44  #endif
45 #else
46  #define NVM_DEPRECATED_MSG(fmt) NVM_DEPRECATED
47 #endif
48 
67 #define NVMEDIA_TRUE (0 == 0)
68 
70 #define NVMEDIA_FALSE (0 == 1)
71 
76 typedef uint32_t NvMediaBool;
77 
81 typedef struct timespec NvMediaTime;
82 
93 typedef struct {
95  uint16_t x0;
97  uint16_t y0;
99  uint16_t x1;
101  uint16_t y1;
102 } NvMediaRect;
103 
108 typedef enum {
143 } NvMediaStatus;
144 
151 typedef struct {
155  uint64_t endTimestamp;
157 
168 typedef struct {
170  uint8_t major;
172  uint8_t minor;
174  uint8_t patch;
176 
179 /*
180  ******* Definitions ******************
181  * SOFFence - Start of frame \ref NvSciSyncFence. An NvSciSyncFence
182  * whose expiry indicates that the processing has started.
183  * EOFFence - End of frame NvSciSyncFence. An NvSciSyncFence
184  * whose expiry indicates that the processing is done.
185  * PREFence - An NvSciSyncFence on which the start of processing is
186  * blocked until the expiry of the fence.
187  **************************************
188  */
189 
193 typedef enum {
202 
206 typedef enum {
228 
230 
231 /*
232  * \brief Defines all possible access modes.
233  */
234 typedef enum {
240 
257 typedef void NvMediaDevice;
258 
263 #ifdef __cplusplus
264 } /* extern "C" */
265 #endif
266 
267 #endif /* NVMEDIA_CORE_H */
NVMEDIA_ACCESS_MODE_READ
@ NVMEDIA_ACCESS_MODE_READ
Specifies read-only access mode.
Definition: nvmedia_core.h:236
NVMEDIA_STATUS_TIMED_OUT
@ NVMEDIA_STATUS_TIMED_OUT
Specifies that the operation timed out.
Definition: nvmedia_core.h:117
NVMEDIA_STATUS_OUT_OF_MEMORY
@ NVMEDIA_STATUS_OUT_OF_MEMORY
Specifies that the process is out of memory.
Definition: nvmedia_core.h:119
NVMEDIA_PRESYNCOBJ
@ NVMEDIA_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.
Definition: nvmedia_core.h:209
NVMEDIA_STATUS_OK
@ NVMEDIA_STATUS_OK
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:111
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:108
NvMediaNvSciSyncObjType
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:206
NvMediaNvSciSyncClientType
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:193
NVMEDIA_STATUS_PENDING
@ NVMEDIA_STATUS_PENDING
Specifies that the operation has not finished yet.
Definition: nvmedia_core.h:115
NVMEDIA_STATUS_UNDEFINED_STATE
@ NVMEDIA_STATUS_UNDEFINED_STATE
Specifies that the operation entered an undefined state.
Definition: nvmedia_core.h:138
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:168
NVMEDIA_STATUS_BAD_PARAMETER
@ NVMEDIA_STATUS_BAD_PARAMETER
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:113
NVMEDIA_STATUS_INCOMPATIBLE_VERSION
@ NVMEDIA_STATUS_INCOMPATIBLE_VERSION
Specifies that a library's version is incompatible with the application.
Definition: nvmedia_core.h:136
NVMEDIA_SIGNALER_WAITER
@ NVMEDIA_SIGNALER_WAITER
An NvMedia component acts as a signaler and waiter also for the same NvSciSyncObj.
Definition: nvmedia_core.h:200
NvMediaAccessMode
NvMediaAccessMode
Definition: nvmedia_core.h:234
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:142
NvMediaVersion::patch
uint8_t patch
Holds NvMedia patch version number.
Definition: nvmedia_core.h:174
NvMediaTaskStatus::status
NvMediaStatus status
Holds actual status - NvMediaStatus.
Definition: nvmedia_core.h:153
NVMEDIA_STATUS_NONE_PENDING
@ NVMEDIA_STATUS_NONE_PENDING
Specifies that no operation is pending.
Definition: nvmedia_core.h:128
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:93
NvMediaVersion::major
uint8_t major
Holds NvMedia major version number.
Definition: nvmedia_core.h:170
NvMediaDevice
void NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:257
NVMEDIA_EOFSYNCOBJ
@ NVMEDIA_EOFSYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence.
Definition: nvmedia_core.h:212
NvMediaRect::x1
uint16_t x1
Right X co-ordinate.
Definition: nvmedia_core.h:99
NVMEDIA_SIGNALER
@ NVMEDIA_SIGNALER
An NvMedia component acts as a signaler.
Definition: nvmedia_core.h:195
NvMediaVersion::minor
uint8_t minor
Holds NvMedia minor version number.
Definition: nvmedia_core.h:172
NvMediaRect::y0
uint16_t y0
Top Y co-ordinate.
Definition: nvmedia_core.h:97
NVMEDIA_STATUS_INSUFFICIENT_BUFFERING
@ NVMEDIA_STATUS_INSUFFICIENT_BUFFERING
Specifies insufficient buffering.
Definition: nvmedia_core.h:130
NvMediaRect::y1
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:101
NvMediaTaskStatus
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:151
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:133
NVMEDIA_ACCESS_MODE_READ_WRITE
@ NVMEDIA_ACCESS_MODE_READ_WRITE
Specifies read/write access mode.
Definition: nvmedia_core.h:238
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:227
NVMEDIA_WAITER
@ NVMEDIA_WAITER
An NvMedia component acts as a waiter.
Definition: nvmedia_core.h:197
NVMEDIA_SOFSYNCOBJ
@ NVMEDIA_SOFSYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence.
Definition: nvmedia_core.h:215
NvMediaTime
struct timespec NvMediaTime
Holds the media time in timespec format as defined by the POSIX specification.
Definition: nvmedia_core.h:81
NvMediaBool
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:76
NVMEDIA_STATUS_NOT_INITIALIZED
@ NVMEDIA_STATUS_NOT_INITIALIZED
Specifies that a component requred by the function call is not initialized.
Definition: nvmedia_core.h:122
NvMediaTaskStatus::endTimestamp
uint64_t endTimestamp
Holds timestamp of end of operation.
Definition: nvmedia_core.h:155
NVMEDIA_STATUS_NOT_SUPPORTED
@ NVMEDIA_STATUS_NOT_SUPPORTED
Specifies that the requested operation is not supported.
Definition: nvmedia_core.h:124
NvMediaRect::x0
uint16_t x0
Left X co-ordinate.
Definition: nvmedia_core.h:95
NVMEDIA_EOF_PRESYNCOBJ
@ NVMEDIA_EOF_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler,...
Definition: nvmedia_core.h:221
NVMEDIA_STATUS_ERROR
@ NVMEDIA_STATUS_ERROR
Specifies a catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:126
NVMEDIA_STATUS_PFSD_ERROR
@ NVMEDIA_STATUS_PFSD_ERROR
Specifies an error from Permanent Fault Software Diagnostic.
Definition: nvmedia_core.h:140