NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.10.3 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_core.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, 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 
61 #define NVMEDIA_RELEASE_VERSION_MAJOR 2
62 
63 #define NVMEDIA_RELEASE_VERSION_MINOR 0
64 
66 #define NVMEDIA_CORE_VERSION_MAJOR 1
67 
68 #define NVMEDIA_CORE_VERSION_MINOR 5
69 
71 #define NVMEDIA_TRUE (0 == 0)
72 
73 #define NVMEDIA_FALSE (0 == 1)
74 
79 typedef uint32_t NvMediaBool;
80 
84 typedef struct timespec NvMediaTime;
85 
89 typedef uint64_t NvMediaGlobalTime;
90 
93 typedef enum {
101 
110 typedef struct {
112  float_t red;
114  float_t green;
116  float_t blue;
118  float_t alpha;
119 } NvMediaColor;
120 
123 typedef enum {
135 
146 typedef struct {
148  uint16_t x0;
150  uint16_t y0;
152  uint16_t x1;
154  uint16_t y1;
155 } NvMediaRect;
156 
160 typedef struct {
162  int32_t x;
164  int32_t y;
165 } NvMediaPoint;
166 
174 typedef struct {
176  int32_t left;
178  int32_t top;
180  int32_t right;
182  int32_t bottom;
183 } NvMediaROI;
184 
189 typedef enum {
218 } NvMediaStatus;
219 
225 typedef struct {
229  uint64_t endTimestamp;
231 
242 typedef struct {
244  uint8_t major;
246  uint8_t minor;
248 
260  NvMediaVersion *version
261 );
262 
274  NvMediaVersion *version
275 );
276 
295 typedef void NvMediaDevice;
296 
301 NvMediaDevice *
303  void
304 );
305 
310 void
312  NvMediaDevice *device
313 );
314 
319 /*
320  * \defgroup history_nvmedia_core History
321  * Provides change history for the NvMedia Common Types.
322  *
323  * \section history_nvmedia_core Version History
324  *
325  * <b> Version 1.0 </b> March 21, 2017
326  * - Initial release
327  *
328  * <b> Version 1.1 </b> April 18, 2017
329  * - NVMEDIA_VERSION_MAJOR is renamed to NVMEDIA_CORE_VERSION_MAJOR.
330  * - NVMEDIA_VERSION_MINOR is renamed to NVMEDIA_CORE_VERSION_MINOR.
331  * - NvMediaBool is now changed from "int" to "uint32_t" type.
332  * - NvMediaRect is now changed from "unsigned short" to "uint16_t".
333  * - All NvMedia data types are moved to standard data types from <stdint.h>
334  * - NvMediaVersionInfo is now deprecated. Use module specific GetVersion()
335  API to query the module versions.
336  * - NvMediaGetVersionInfo is now deprecated. Use NvMediaCoreGetVersion()
337  or NvMediaReleaseGetVersion()
338  * - NvMediaCheckVersion is now deprecated. Applications are expected
339  to check their version using above GetVersion() APIs.
340  * - NVMEDIA_SET_VERSION macro is now deprecated.
341  *
342  * <b> Version 1.2 </b> May 4, 2017
343  * - Added \ref NvMediaROI and \ref NvMediaTaskStatus.
344  *
345  * <b> Version 1.3 </b> May 17, 2017
346  * - Added macros to generate build warnings for deprecated APIs
347  * - Changed the size of \ref NvMediaPoint members
348  *
349  * <b> Version 1.4 </b> September 14, 2017
350  * - Added \ref NvMediaTimeBase
351  *
352  * <b> Version 1.5 </b> December 12, 2017
353  * - Deprecated the following palette related APIs:
354  * NvMediaPaletteCreate
355  * NvMediaPaletteDestroy
356  * NvMediaPaletteLoad
357  */
358 
359 #ifdef __cplusplus
360 }; /* extern "C" */
361 #endif
362 
363 #endif /* _NVMEDIA_CORE_H */
NvMediaDevice * NvMediaDeviceCreate(void)
Creates an NvMediaDevice.
Holda a Region of Interest.
Definition: nvmedia_core.h:174
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:154
uint8_t major
Major version.
Definition: nvmedia_core.h:244
int32_t bottom
bottom row of a rectangle
Definition: nvmedia_core.h:182
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
Operation timed out.
Definition: nvmedia_core.h:197
uint16_t y0
Top Y co-ordinate.
Definition: nvmedia_core.h:150
ITU BT.601 color standard extended range.
Definition: nvmedia_core.h:131
Holds a constant RGBA color.
Definition: nvmedia_core.h:110
Holds a location on a 2-dimensional object.
Definition: nvmedia_core.h:160
Operation has not finished yet.
Definition: nvmedia_core.h:195
void NvMediaDeviceDestroy(NvMediaDevice *device)
Destroys an NvMediaDevice.
ITU BT.709 color standard extended range.
Definition: nvmedia_core.h:133
struct timespec NvMediaTime
Holds the media time (timespec as defined by the POSIX specification).
Definition: nvmedia_core.h:84
Holds NvMedia Version information.
Definition: nvmedia_core.h:242
uint8_t minor
Minor version.
Definition: nvmedia_core.h:246
A catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:205
Kernel monotonic clock is used for base time calculation.
Definition: nvmedia_core.h:97
uint16_t x0
Left X co-ordinate.
Definition: nvmedia_core.h:148
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:123
ITU BT.601 color standard.
Definition: nvmedia_core.h:125
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:225
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:189
NvMediaStatus NvMediaCoreGetVersion(NvMediaVersion *version)
Gets the core version information for the NvMedia library.
SMTE 240M color standard.
Definition: nvmedia_core.h:129
User defined clock is used for base time calculation.
Definition: nvmedia_core.h:99
NvMediaStatus status
Holds actual status - NvMediaStatus.
Definition: nvmedia_core.h:227
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:146
Operation is cancelled when the hardware is timed out.
Definition: nvmedia_core.h:215
Bad parameter was passed.
Definition: nvmedia_core.h:193
int32_t right
right column of a rectangle
Definition: nvmedia_core.h:180
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:295
uint64_t NvMediaGlobalTime
Media global time, measured in microseconds.
Definition: nvmedia_core.h:89
The operation completed successfully; no error.
Definition: nvmedia_core.h:191
ITU BT.709 color standard.
Definition: nvmedia_core.h:127
float_t blue
Blue color component.
Definition: nvmedia_core.h:116
int32_t left
left column of a rectangle
Definition: nvmedia_core.h:176
float_t green
Green color component.
Definition: nvmedia_core.h:114
NvMediaTimeBase
Defines clock base for NvMediaTime.
Definition: nvmedia_core.h:93
uint16_t x1
Right X co-ordinate.
Definition: nvmedia_core.h:152
int32_t x
Horizontal location of the point.
Definition: nvmedia_core.h:162
int32_t y
Vertical location of the point.
Definition: nvmedia_core.h:164
PTP clock is used for base time calculation.
Definition: nvmedia_core.h:95
NvMediaStatus NvMediaReleaseGetVersion(NvMediaVersion *version)
Gets the release version information for the NvMedia library.
No operation is pending.
Definition: nvmedia_core.h:207
uint64_t endTimestamp
Timestamp of end of operation.
Definition: nvmedia_core.h:229
float_t alpha
Alpha color component.
Definition: nvmedia_core.h:118
int32_t top
top row of a rectangle
Definition: nvmedia_core.h:178
float_t red
Red color component.
Definition: nvmedia_core.h:112