NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_core.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2018, 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 7
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 
170 typedef struct {
172  double_t x;
174  double_t y;
176 
184 typedef struct {
186  int32_t left;
188  int32_t top;
190  int32_t right;
192  int32_t bottom;
193 } NvMediaROI;
194 
199 typedef enum {
228 } NvMediaStatus;
229 
235 typedef struct {
239  uint64_t endTimestamp;
241 
252 typedef struct {
254  uint8_t major;
256  uint8_t minor;
258 
270  NvMediaVersion *version
271 );
272 
284  NvMediaVersion *version
285 );
286 
305 typedef void NvMediaDevice;
306 
311 NvMediaDevice *
313  void
314 );
315 
320 void
322  NvMediaDevice *device
323 );
324 
329 /*
330  * \defgroup history_nvmedia_core History
331  * Provides change history for the NvMedia Common Types.
332  *
333  * \section history_nvmedia_core Version History
334  *
335  * <b> Version 1.0 </b> March 21, 2017
336  * - Initial release
337  *
338  * <b> Version 1.1 </b> April 18, 2017
339  * - NVMEDIA_VERSION_MAJOR is renamed to NVMEDIA_CORE_VERSION_MAJOR.
340  * - NVMEDIA_VERSION_MINOR is renamed to NVMEDIA_CORE_VERSION_MINOR.
341  * - NvMediaBool is now changed from "int" to "uint32_t" type.
342  * - NvMediaRect is now changed from "unsigned short" to "uint16_t".
343  * - All NvMedia data types are moved to standard data types from <stdint.h>
344  * - NvMediaVersionInfo is now deprecated. Use module specific GetVersion()
345  API to query the module versions.
346  * - NvMediaGetVersionInfo is now deprecated. Use NvMediaCoreGetVersion()
347  or NvMediaReleaseGetVersion()
348  * - NvMediaCheckVersion is now deprecated. Applications are expected
349  to check their version using above GetVersion() APIs.
350  * - NVMEDIA_SET_VERSION macro is now deprecated.
351  *
352  * <b> Version 1.2 </b> May 4, 2017
353  * - Added \ref NvMediaROI and \ref NvMediaTaskStatus.
354  *
355  * <b> Version 1.3 </b> May 17, 2017
356  * - Added macros to generate build warnings for deprecated APIs
357  * - Changed the size of \ref NvMediaPoint members
358  *
359  * <b> Version 1.4 </b> September 14, 2017
360  * - Added \ref NvMediaTimeBase
361  *
362  * <b> Version 1.5 </b> December 12, 2017
363  * - Deprecated the following palette related APIs:
364  * NvMediaPaletteCreate
365  * NvMediaPaletteDestroy
366  * NvMediaPaletteLoad
367  *
368  * <b> Version 1.6 </b> Sep 12, 2018
369  * - Add \ref NvMediaPointDouble
370  *
371  * <b> Version 1.7 </b> Dec 12, 2018
372  * - MISRA Rule 21.1 and 21.2 violations are fixed
373  *
374  */
375 
376 #ifdef __cplusplus
377 }; /* extern "C" */
378 #endif
379 
380 #endif /* NVMEDIA_CORE_H */
NvMediaDevice * NvMediaDeviceCreate(void)
Creates an NvMediaDevice.
Holda a Region of Interest.
Definition: nvmedia_core.h:184
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:154
uint8_t major
Major version.
Definition: nvmedia_core.h:254
Holds a double precision location of a 2-dimensional object.
Definition: nvmedia_core.h:170
double_t y
Vertical location of the point.
Definition: nvmedia_core.h:174
int32_t bottom
bottom row of a rectangle
Definition: nvmedia_core.h:192
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
Operation timed out.
Definition: nvmedia_core.h:207
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:205
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:252
uint8_t minor
Minor version.
Definition: nvmedia_core.h:256
A catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:215
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:235
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:199
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:237
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:225
Bad parameter was passed.
Definition: nvmedia_core.h:203
int32_t right
right column of a rectangle
Definition: nvmedia_core.h:190
double_t x
Horizontal location of the point.
Definition: nvmedia_core.h:172
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:305
uint64_t NvMediaGlobalTime
Media global time, measured in microseconds.
Definition: nvmedia_core.h:89
The operation completed successfully; no error.
Definition: nvmedia_core.h:201
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:186
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:217
uint64_t endTimestamp
Timestamp of end of operation.
Definition: nvmedia_core.h:239
float_t alpha
Alpha color component.
Definition: nvmedia_core.h:118
int32_t top
top row of a rectangle
Definition: nvmedia_core.h:188
float_t red
Red color component.
Definition: nvmedia_core.h:112