NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.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-2019, 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 
62 #define NVMEDIA_RELEASE_VERSION_MAJOR 2
63 
64 #define NVMEDIA_RELEASE_VERSION_MINOR 0
65 
67 #define NVMEDIA_CORE_VERSION_MAJOR 1
68 
69 #define NVMEDIA_CORE_VERSION_MINOR 13
70 
72 #define NVMEDIA_TRUE (0 == 0)
73 
74 #define NVMEDIA_FALSE (0 == 1)
75 
80 typedef uint32_t NvMediaBool;
81 
85 typedef struct timespec NvMediaTime;
86 
90 typedef uint64_t NvMediaGlobalTime;
91 
94 typedef enum {
105 
108 typedef enum {
122 
133 typedef struct {
135  uint16_t x0;
137  uint16_t y0;
139  uint16_t x1;
141  uint16_t y1;
142 } NvMediaRect;
143 
147 typedef struct {
149  int32_t x;
151  int32_t y;
152 } NvMediaPoint;
153 
158 typedef struct {
160  double_t x;
162  double_t y;
164 
169 typedef enum {
202 } NvMediaStatus;
203 
209 typedef struct {
213  uint64_t endTimestamp;
215 
226 typedef struct {
228  uint8_t major;
230  uint8_t minor;
232 
247 typedef enum {
248  /* An NvMedia component acts as a signaler. */
250  /* An NvMedia component acts as a waiter. */
252  /* An NvMedia component acts as a signaler and waiter also for the same
253  \ref NvSciSyncObj. */
256 
260 typedef enum {
282 
284 
285 /*
286  * \brief Defines all possible access modes.
287  */
288 typedef enum {
294 
304  NvMediaVersion *version
305 );
306 
316  NvMediaVersion *version
317 );
318 
338 
345  void
346 );
347 
352 void
354  NvMediaDevice *device
355 );
356 
361 /*
362  * \defgroup history_nvmedia_core History
363  * Provides change history for the NvMedia Common Types.
364  *
365  * \section history_nvmedia_core Version History
366  *
367  * <b> Version 1.0 </b> March 21, 2017
368  * - Initial release
369  *
370  * <b> Version 1.1 </b> April 18, 2017
371  * - NVMEDIA_VERSION_MAJOR is renamed to NVMEDIA_CORE_VERSION_MAJOR.
372  * - NVMEDIA_VERSION_MINOR is renamed to NVMEDIA_CORE_VERSION_MINOR.
373  * - NvMediaBool is now changed from "int" to "uint32_t" type.
374  * - NvMediaRect is now changed from "unsigned short" to "uint16_t".
375  * - All NvMedia data types are moved to standard data types from <stdint.h>
376  * - NvMediaVersionInfo is now deprecated. Use module specific GetVersion()
377  API to query the module versions.
378  * - NvMediaGetVersionInfo is now deprecated. Use NvMediaCoreGetVersion()
379  or NvMediaReleaseGetVersion()
380  * - NvMediaCheckVersion is now deprecated. Applications are expected
381  to check their version using above GetVersion() APIs.
382  * - NVMEDIA_SET_VERSION macro is now deprecated.
383  *
384  * <b> Version 1.2 </b> May 4, 2017
385  * - Added \ref NvMediaROI and \ref NvMediaTaskStatus.
386  *
387  * <b> Version 1.3 </b> May 17, 2017
388  * - Added macros to generate build warnings for deprecated APIs
389  * - Changed the size of \ref NvMediaPoint members
390  *
391  * <b> Version 1.4 </b> September 14, 2017
392  * - Added \ref NvMediaTimeBase
393  *
394  * <b> Version 1.5 </b> December 12, 2017
395  * - Deprecated the following palette related APIs:
396  * NvMediaPaletteCreate
397  * NvMediaPaletteDestroy
398  * NvMediaPaletteLoad
399  *
400  * <b> Version 1.6 </b> Sep 12, 2018
401  * - Add \ref NvMediaPointDouble
402  *
403  * <b> Version 1.7 </b> Dec 12, 2018
404  * - MISRA Rule 21.1 and 21.2 violations are fixed
405  *
406  * <b> Version 1.8 </b> Feb 4, 2019
407  * - Removed \ref NvMediaROI
408  * - Moved \ref NvMediaColor to nvmedia_vmp.h
409  * - Changed \ref NvMediaDevice type from void to struct
410  *
411  * <b> Version 1.9 </b> March 7, 2019
412  * - Added \ref NvMediaNvSciSyncClientType and \ref NvMediaNvSciSyncObjType.
413  *
414  * <b> Version 1.10 </b> March 18, 2019
415  * - Added /ref NvMediaAccessMode
416  *
417  * <b> Version 1.11 </b> March 25, 2019
418  * - Removed enum value NVMEDIA_STATUS_CANCELLED from \ref NvMediaStatus
419  *
420  * <b> Version 1.12 </b> April 2, 2019
421  * - Added enum value NVMEDIA_STATUS_PFSD_ERROR to \ref NvMediaStatus
422  *
423  * <b> Version 1.13 </b> August 1, 2019
424  * - Added manual enumeration for backward compatibility to \ref NvMediaStatus
425  */
426 
427 #ifdef __cplusplus
428 }; /* extern "C" */
429 #endif
430 
431 #endif /* NVMEDIA_CORE_H */
NvMediaDevice * NvMediaDeviceCreate(void)
Creates an NvMediaDevice.
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:141
uint8_t major
Holds NvMedia major version number.
Definition: nvmedia_core.h:228
Defines the double-precision location of a point on a two-dimensional object.
Definition: nvmedia_core.h:158
double_t y
Holds the vertical location of the point.
Definition: nvmedia_core.h:162
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:260
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:80
Specifies that the operation timed out.
Definition: nvmedia_core.h:178
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence...
Definition: nvmedia_core.h:269
uint16_t y0
Top Y co-ordinate.
Definition: nvmedia_core.h:137
Specifies ITU BT.601 color standard extended range.
Definition: nvmedia_core.h:117
Specifies that the size of an object passed to a function was invalid.
Definition: nvmedia_core.h:194
Defines the location of a point on a two-dimensional object.
Definition: nvmedia_core.h:147
Specifies that the operation has not finished yet.
Definition: nvmedia_core.h:176
Specifies that the process is out of memory.
Definition: nvmedia_core.h:180
void NvMediaDeviceDestroy(NvMediaDevice *device)
Destroys an NvMediaDevice.
Specifies ITU BT.709 color standard extended range.
Definition: nvmedia_core.h:120
struct timespec NvMediaTime
Holds the media time (timespec as defined by the POSIX specification).
Definition: nvmedia_core.h:85
Specifies that the operation entered an undefined state.
Definition: nvmedia_core.h:199
NvMediaAccessMode
Definition: nvmedia_core.h:288
Holds NvMedia version information.
Definition: nvmedia_core.h:226
uint8_t minor
Holds NvMedia minor version number.
Definition: nvmedia_core.h:230
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:337
Specifies a catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:187
Specifies that kernel monotonic clock is used for base time calculation.
Definition: nvmedia_core.h:100
uint16_t x0
Left X co-ordinate.
Definition: nvmedia_core.h:135
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:108
Specifies ITU BT.601 color standard.
Definition: nvmedia_core.h:110
Specifies read/write access mode.
Definition: nvmedia_core.h:292
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:209
NvMediaNvSciSyncClientType
Definitions ****************** SOFFence - Start of frame NvSciSyncFence.
Definition: nvmedia_core.h:247
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:169
NvMediaStatus NvMediaCoreGetVersion(NvMediaVersion *version)
Gets the core version information for the NvMedia library.
Specifies SMTE 240M color standard.
Definition: nvmedia_core.h:114
Specifies that a user defined clock is used for base time calculation.
Definition: nvmedia_core.h:103
NvMediaStatus status
Holds actual status - NvMediaStatus.
Definition: nvmedia_core.h:211
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:133
Specifies that a component requred by the function call is not initialized.
Definition: nvmedia_core.h:183
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:174
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence...
Definition: nvmedia_core.h:281
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence...
Definition: nvmedia_core.h:266
Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler, signaling EOFFence, and as a waiter.
Definition: nvmedia_core.h:275
Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.
Definition: nvmedia_core.h:263
double_t x
Holds the horizontal location of the point.
Definition: nvmedia_core.h:160
uint64_t NvMediaGlobalTime
Media global time, measured in microseconds.
Definition: nvmedia_core.h:90
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:172
Specifies read-only access mode.
Definition: nvmedia_core.h:290
Specifies ITU BT.709 color standard.
Definition: nvmedia_core.h:112
Specifies that a library's version is incompatible with the application.
Definition: nvmedia_core.h:197
Specifies an error from Permanent Fault Software Diagnostic.
Definition: nvmedia_core.h:201
NvMediaTimeBase
Defines clock base for NvMediaTime.
Definition: nvmedia_core.h:94
uint16_t x1
Right X co-ordinate.
Definition: nvmedia_core.h:139
int32_t x
Holds the horizontal location of the point.
Definition: nvmedia_core.h:149
int32_t y
Holds the vertical location of the point.
Definition: nvmedia_core.h:151
Specifies that PTP clock is used for base time calculation.
Definition: nvmedia_core.h:97
NvMediaStatus NvMediaReleaseGetVersion(NvMediaVersion *version)
Gets the release version information for the NvMedia library.
Specifies that no operation is pending.
Definition: nvmedia_core.h:189
uint64_t endTimestamp
Holds timestamp of end of operation.
Definition: nvmedia_core.h:213
Specifies that the requested operation is not supported.
Definition: nvmedia_core.h:185
Specifies insufficient buffering.
Definition: nvmedia_core.h:191