NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.4 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 14
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  float_t x;
162  float_t y;
164 
169 typedef struct {
171  double_t x;
173  double_t y;
175 
180 typedef enum {
213 } NvMediaStatus;
214 
220 typedef struct {
224  uint64_t endTimestamp;
226 
237 typedef struct {
239  uint8_t major;
241  uint8_t minor;
243 
244 /*
245  ******* Definitions ******************
246  * SOFFence - Start of frame \ref NvSciSyncFence. An NvSciSyncFence
247  * whose expiry indicates that the processing has started.
248  * EOFFence - End of frame NvSciSyncFence. An NvSciSyncFence
249  * whose expiry indicates that the processing is done.
250  * PREFence - An NvSciSyncFence on which the start of processing is
251  * blocked until the expiry of the fence.
252  **************************************
253  */
254 
258 typedef enum {
267 
271 typedef enum {
293 
295 
296 /*
297  * \brief Defines all possible access modes.
298  */
299 typedef enum {
305 
315  NvMediaVersion *version
316 );
317 
327  NvMediaVersion *version
328 );
329 
349 
361  void
362 );
363 
372 void
374  NvMediaDevice *device
375 );
376 
381 /*
382  * \defgroup history_nvmedia_core History
383  * Provides change history for the NvMedia Common Types.
384  *
385  * \section history_nvmedia_core Version History
386  *
387  * <b> Version 1.0 </b> March 21, 2017
388  * - Initial release
389  *
390  * <b> Version 1.1 </b> April 18, 2017
391  * - NVMEDIA_VERSION_MAJOR is renamed to NVMEDIA_CORE_VERSION_MAJOR.
392  * - NVMEDIA_VERSION_MINOR is renamed to NVMEDIA_CORE_VERSION_MINOR.
393  * - NvMediaBool is now changed from "int" to "uint32_t" type.
394  * - NvMediaRect is now changed from "unsigned short" to "uint16_t".
395  * - All NvMedia data types are moved to standard data types from <stdint.h>
396  * - NvMediaVersionInfo is now deprecated. Use module specific GetVersion()
397  API to query the module versions.
398  * - NvMediaGetVersionInfo is now deprecated. Use NvMediaCoreGetVersion()
399  or NvMediaReleaseGetVersion()
400  * - NvMediaCheckVersion is now deprecated. Applications are expected
401  to check their version using above GetVersion() APIs.
402  * - NVMEDIA_SET_VERSION macro is now deprecated.
403  *
404  * <b> Version 1.2 </b> May 4, 2017
405  * - Added \ref NvMediaROI and \ref NvMediaTaskStatus.
406  *
407  * <b> Version 1.3 </b> May 17, 2017
408  * - Added macros to generate build warnings for deprecated APIs
409  * - Changed the size of \ref NvMediaPoint members
410  *
411  * <b> Version 1.4 </b> September 14, 2017
412  * - Added \ref NvMediaTimeBase
413  *
414  * <b> Version 1.5 </b> December 12, 2017
415  * - Deprecated the following palette related APIs:
416  * NvMediaPaletteCreate
417  * NvMediaPaletteDestroy
418  * NvMediaPaletteLoad
419  *
420  * <b> Version 1.6 </b> Sep 12, 2018
421  * - Add \ref NvMediaPointDouble
422  *
423  * <b> Version 1.7 </b> Dec 12, 2018
424  * - MISRA Rule 21.1 and 21.2 violations are fixed
425  *
426  * <b> Version 1.8 </b> Feb 4, 2019
427  * - Removed \ref NvMediaROI
428  * - Moved \ref NvMediaColor to nvmedia_vmp.h
429  * - Changed \ref NvMediaDevice type from void to struct
430  *
431  * <b> Version 1.9 </b> March 7, 2019
432  * - Added \ref NvMediaNvSciSyncClientType and \ref NvMediaNvSciSyncObjType.
433  *
434  * <b> Version 1.10 </b> March 18, 2019
435  * - Added /ref NvMediaAccessMode
436  *
437  * <b> Version 1.11 </b> March 25, 2019
438  * - Removed enum value NVMEDIA_STATUS_CANCELLED from \ref NvMediaStatus
439  *
440  * <b> Version 1.12 </b> April 2, 2019
441  * - Added enum value NVMEDIA_STATUS_PFSD_ERROR to \ref NvMediaStatus
442  *
443  * <b> Version 1.13 </b> August 1, 2019
444  * - Added manual enumeration for backward compatibility to \ref NvMediaStatus
445  *
446  * <b> Version 1.14 </b> November 06, 2019
447  * - Add \ref NvMediaPointFloat
448  *
449  */
450 
451 #ifdef __cplusplus
452 }; /* extern "C" */
453 #endif
454 
455 #endif /* NVMEDIA_CORE_H */
NvMediaDevice * NvMediaDeviceCreate(void)
Creates an instance of the NvMediaDevice structure.
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:141
uint8_t major
Holds NvMedia major version number.
Definition: nvmedia_core.h:239
Defines the double-precision location of a point on a two-dimensional object.
Definition: nvmedia_core.h:169
double_t y
Holds the vertical location of the point.
Definition: nvmedia_core.h:173
NvMediaNvSciSyncObjType
Defines NvMedia NvSciSyncObj types.
Definition: nvmedia_core.h:271
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:189
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence...
Definition: nvmedia_core.h:280
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:205
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:187
Specifies that the process is out of memory.
Definition: nvmedia_core.h:191
void NvMediaDeviceDestroy(NvMediaDevice *device)
Destroys an NvMediaDevice instance.
Specifies ITU BT.709 color standard extended range.
Definition: nvmedia_core.h:120
struct timespec NvMediaTime
Holds the media time in timespec format as defined by the POSIX specification.
Definition: nvmedia_core.h:85
Specifies that the operation entered an undefined state.
Definition: nvmedia_core.h:210
NvMediaAccessMode
Definition: nvmedia_core.h:299
Holds NvMedia version information.
Definition: nvmedia_core.h:237
uint8_t minor
Holds NvMedia minor version number.
Definition: nvmedia_core.h:241
struct NvMediaDevice NvMediaDevice
An opaque handle representing an NvMediaDevice object.
Definition: nvmedia_core.h:348
Specifies a catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:198
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:303
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:220
NvMediaNvSciSyncClientType
NvMedia NvSciSync Client Type.
Definition: nvmedia_core.h:258
NvMediaStatus
Defines all possible error codes.
Definition: nvmedia_core.h:180
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:222
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:194
Specifies that a bad parameter was passed.
Definition: nvmedia_core.h:185
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence...
Definition: nvmedia_core.h:292
Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence...
Definition: nvmedia_core.h:277
Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler, signaling EOFFence, and as a waiter.
Definition: nvmedia_core.h:286
Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.
Definition: nvmedia_core.h:274
Defines the float-precision location of a point on a two-dimensional object.
Definition: nvmedia_core.h:158
double_t x
Holds the horizontal location of the point.
Definition: nvmedia_core.h:171
uint64_t NvMediaGlobalTime
Media global time, measured in microseconds.
Definition: nvmedia_core.h:90
An NvMedia component acts as a waiter.
Definition: nvmedia_core.h:262
Specifies that the operation completed successfully (with no error).
Definition: nvmedia_core.h:183
Specifies read-only access mode.
Definition: nvmedia_core.h:301
float_t x
Holds the horizontal location of the point.
Definition: nvmedia_core.h:160
Specifies ITU BT.709 color standard.
Definition: nvmedia_core.h:112
An NvMedia component acts as a signaler.
Definition: nvmedia_core.h:260
float_t y
Holds the vertical location of the point.
Definition: nvmedia_core.h:162
Specifies that a library's version is incompatible with the application.
Definition: nvmedia_core.h:208
Specifies an error from Permanent Fault Software Diagnostic.
Definition: nvmedia_core.h:212
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
An NvMedia component acts as a signaler and waiter also for the same NvSciSyncObj.
Definition: nvmedia_core.h:265
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:200
uint64_t endTimestamp
Holds timestamp of end of operation.
Definition: nvmedia_core.h:224
Specifies that the requested operation is not supported.
Definition: nvmedia_core.h:196
Specifies insufficient buffering.
Definition: nvmedia_core.h:202