NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
nvmedia_core.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2017-2026 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 
68 #define NVMEDIA_TRUE (0 == 0)
69 
72 #define NVMEDIA_FALSE (0 == 1)
73 
79 typedef uint32_t NvMediaBool;
80 
85 typedef struct timespec NvMediaTime;
86 
98 typedef struct {
100  uint16_t x0;
102  uint16_t y0;
104  uint16_t x1;
106  uint16_t y1;
107 } NvMediaRect;
108 
114 typedef enum {
149 } NvMediaStatus;
150 
158 typedef struct {
162  uint64_t endTimestamp;
164 
176 typedef struct {
178  uint8_t major;
180  uint8_t minor;
182  uint8_t patch;
184 
187 /*
188  ******* Definitions ******************
189  * SOFFence - Start of frame \ref NvSciSyncFence. An NvSciSyncFence
190  * whose expiry indicates that the processing has started.
191  * EOFFence - End of frame NvSciSyncFence. An NvSciSyncFence
192  * whose expiry indicates that the processing is done.
193  * PREFence - An NvSciSyncFence on which the start of processing is
194  * blocked until the expiry of the fence.
195  **************************************
196  */
197 
202 typedef enum {
211 
216 typedef enum {
238 
240 
241 /*
242  * \brief Defines all possible access modes.
243  * - Maturity: GA
244  */
245 typedef enum {
251 
269 typedef void NvMediaDevice;
270 
275 #ifdef __cplusplus
276 } /* extern "C" */
277 #endif
278 
279 #endif /* NVMEDIA_CORE_H */
NvMediaBool
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
NvMediaNvSciSyncObjType
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:216
NVMEDIA_STATUS_INCOMPATIBLE_VERSION
@ NVMEDIA_STATUS_INCOMPATIBLE_VERSION
Specifies that a library's version is incompatible with the application.
Definition: nvmedia_core.h:142
NVMEDIA_SIGNALER_WAITER
@ NVMEDIA_SIGNALER_WAITER
An NvMedia component acts as a signaler and waiter also for the same NvSciSyncObj.
Definition: nvmedia_core.h:209
NVMEDIA_STATUS_PFSD_ERROR
@ NVMEDIA_STATUS_PFSD_ERROR
Specifies an error from Permanent Fault Software Diagnostic.
Definition: nvmedia_core.h:146
NVMEDIA_STATUS_OK
@ NVMEDIA_STATUS_OK
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:117
NVMEDIA_STATUS_NOT_SUPPORTED
@ NVMEDIA_STATUS_NOT_SUPPORTED
Specifies that the requested operation is not supported.
Definition: nvmedia_core.h:130
NvMediaNvSciSyncClientType
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:202
NVMEDIA_WAITER
@ NVMEDIA_WAITER
An NvMedia component acts as a waiter.
Definition: nvmedia_core.h:206
NVMEDIA_STATUS_UNDEFINED_STATE
@ NVMEDIA_STATUS_UNDEFINED_STATE
Specifies that the operation entered an undefined state.
Definition: nvmedia_core.h:144
NVMEDIA_ACCESS_MODE_READ
@ NVMEDIA_ACCESS_MODE_READ
Specifies read-only access mode.
Definition: nvmedia_core.h:247
NVMEDIA_STATUS_BAD_PARAMETER
@ NVMEDIA_STATUS_BAD_PARAMETER
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:119
NVMEDIA_STATUS_TIMED_OUT
@ NVMEDIA_STATUS_TIMED_OUT
Specifies that the operation timed out.
Definition: nvmedia_core.h:123
NvMediaVersion
Holds NvMedia version information.
Definition: nvmedia_core.h:176
NvMediaTime
struct timespec NvMediaTime
Holds the media time in timespec format as defined by the POSIX specification.
Definition: nvmedia_core.h:85
NVMEDIA_SOFSYNCOBJ
@ NVMEDIA_SOFSYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence.
Definition: nvmedia_core.h:225
NVMEDIA_PRESYNCOBJ
@ NVMEDIA_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.
Definition: nvmedia_core.h:219
NvMediaVersion::patch
uint8_t patch
Holds NvMedia patch version number.
Definition: nvmedia_core.h:182
NvMediaTaskStatus::status
NvMediaStatus status
Holds actual status - NvMediaStatus.
Definition: nvmedia_core.h:160
NVMEDIA_ACCESS_MODE_READ_WRITE
@ NVMEDIA_ACCESS_MODE_READ_WRITE
Specifies read/write access mode.
Definition: nvmedia_core.h:249
NvMediaRect
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:98
NvMediaVersion::major
uint8_t major
Holds NvMedia major version number.
Definition: nvmedia_core.h:178
NvMediaAccessMode
NvMediaAccessMode
Definition: nvmedia_core.h:245
NvMediaDevice
void NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:269
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:148
NvMediaRect::x1
uint16_t x1
Right X co-ordinate.
Definition: nvmedia_core.h:104
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:139
NVMEDIA_STATUS_INSUFFICIENT_BUFFERING
@ NVMEDIA_STATUS_INSUFFICIENT_BUFFERING
Specifies insufficient buffering.
Definition: nvmedia_core.h:136
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:237
NVMEDIA_STATUS_ERROR
@ NVMEDIA_STATUS_ERROR
Specifies a catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:132
NVMEDIA_STATUS_NOT_INITIALIZED
@ NVMEDIA_STATUS_NOT_INITIALIZED
Specifies that a component requred by the function call is not initialized.
Definition: nvmedia_core.h:128
NvMediaVersion::minor
uint8_t minor
Holds NvMedia minor version number.
Definition: nvmedia_core.h:180
NvMediaRect::y0
uint16_t y0
Top Y co-ordinate.
Definition: nvmedia_core.h:102
NVMEDIA_EOFSYNCOBJ
@ NVMEDIA_EOFSYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence.
Definition: nvmedia_core.h:222
NvMediaStatus
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:114
NVMEDIA_STATUS_PENDING
@ NVMEDIA_STATUS_PENDING
Specifies that the operation has not finished yet.
Definition: nvmedia_core.h:121
NvMediaRect::y1
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:106
NvMediaTaskStatus
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:158
NVMEDIA_EOF_PRESYNCOBJ
@ NVMEDIA_EOF_PRESYNCOBJ
Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler,...
Definition: nvmedia_core.h:231
NVMEDIA_SIGNALER
@ NVMEDIA_SIGNALER
An NvMedia component acts as a signaler.
Definition: nvmedia_core.h:204
NVMEDIA_STATUS_OUT_OF_MEMORY
@ NVMEDIA_STATUS_OUT_OF_MEMORY
Specifies that the process is out of memory.
Definition: nvmedia_core.h:125
NvMediaTaskStatus::endTimestamp
uint64_t endTimestamp
Holds timestamp of end of operation.
Definition: nvmedia_core.h:162
NVMEDIA_STATUS_NONE_PENDING
@ NVMEDIA_STATUS_NONE_PENDING
Specifies that no operation is pending.
Definition: nvmedia_core.h:134
NvMediaRect::x0
uint16_t x0
Left X co-ordinate.
Definition: nvmedia_core.h:100