NVIDIA DRIVE 5.0 Linux SDK API Reference

5.0.5.0 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 3
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 
99 typedef struct {
101  float_t red;
103  float_t green;
105  float_t blue;
107  float_t alpha;
108 } NvMediaColor;
109 
112 typedef enum {
124 
135 typedef struct {
137  uint16_t x0;
139  uint16_t y0;
141  uint16_t x1;
143  uint16_t y1;
144 } NvMediaRect;
145 
149 typedef struct {
151  int32_t x;
153  int32_t y;
154 } NvMediaPoint;
155 
163 typedef struct {
165  int32_t left;
167  int32_t top;
169  int32_t right;
171  int32_t bottom;
172 } NvMediaROI;
173 
178 typedef enum {
207 } NvMediaStatus;
208 
214 typedef struct {
218  uint64_t endTimestamp;
220 
231 typedef struct {
233  uint8_t major;
235  uint8_t minor;
237 
249  NvMediaVersion *version
250 );
251 
263  NvMediaVersion *version
264 );
265 
284 typedef void NvMediaDevice;
285 
290 NvMediaDevice *
292  void
293 );
294 
299 void
301  NvMediaDevice *device
302 );
303 
315 typedef void NvMediaPalette;
316 
323 NvMediaPalette *
325  NvMediaDevice *device
326 );
327 
332 void
334  NvMediaPalette *palette
335 );
336 
345 void
347  NvMediaDevice *device,
348  NvMediaPalette *palette,
349  uint32_t *rgba
350 );
351 
353 //Ends Palette
354 
357 /*
358  * \defgroup history_nvmedia_core History
359  * Provides change history for the NvMedia Common Types.
360  *
361  * \section history_nvmedia_core Version History
362  *
363  * <b> Version 1.0 </b> March 21, 2017
364  * - Initial release
365  *
366  * <b> Version 1.1 </b> April 18, 2017
367  * - NVMEDIA_VERSION_MAJOR is renamed to NVMEDIA_CORE_VERSION_MAJOR.
368  * - NVMEDIA_VERSION_MINOR is renamed to NVMEDIA_CORE_VERSION_MINOR.
369  * - NvMediaBool is now changed from "int" to "uint32_t" type.
370  * - NvMediaRect is now changed from "unsigned short" to "uint16_t".
371  * - All NvMedia data types are moved to standard data types from <stdint.h>
372  * - NvMediaVersionInfo is now deprecated. Use module specific GetVersion()
373  API to query the module versions.
374  * - NvMediaGetVersionInfo is now deprecated. Use NvMediaCoreGetVersion()
375  or NvMediaReleaseGetVersion()
376  * - NvMediaCheckVersion is now deprecated. Applications are expected
377  to check their version using above GetVersion() APIs.
378  * - NVMEDIA_SET_VERSION macro is now deprecated.
379  *
380  * <b> Version 1.2 </b> May 4, 2017
381  * - Added \ref NvMediaROI and \ref NvMediaTaskStatus.
382  *
383  * <b> Version 1.3 </b> May 17, 2017
384  * - Added macros to generate build warnings for deprecated APIs
385  * - Changed the size of \ref NvMediaPoint members
386  */
387 
388 #ifdef __cplusplus
389 }; /* extern "C" */
390 #endif
391 
392 #endif /* _NVMEDIA_CORE_H */
NvMediaDevice * NvMediaDeviceCreate(void)
Creates an NvMediaDevice.
Holda a Region of Interest.
Definition: nvmedia_core.h:163
uint16_t y1
Bottom Y co-ordinate.
Definition: nvmedia_core.h:143
uint8_t major
Major version.
Definition: nvmedia_core.h:233
int32_t bottom
bottom row of a rectangle
Definition: nvmedia_core.h:171
uint32_t NvMediaBool
A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.
Definition: nvmedia_core.h:79
Operation timed out.
Definition: nvmedia_core.h:186
uint16_t y0
Top Y co-ordinate.
Definition: nvmedia_core.h:139
void NvMediaPalette
A handle representing a palette object.
Definition: nvmedia_core.h:315
ITU BT.601 color standard extended range.
Definition: nvmedia_core.h:120
Holds a constant RGBA color.
Definition: nvmedia_core.h:99
Holds a location on a 2-dimensional object.
Definition: nvmedia_core.h:149
Operation has not finished yet.
Definition: nvmedia_core.h:184
void NvMediaDeviceDestroy(NvMediaDevice *device)
Destroys an NvMediaDevice.
ITU BT.709 color standard extended range.
Definition: nvmedia_core.h:122
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:231
uint8_t minor
Minor version.
Definition: nvmedia_core.h:235
void NvMediaPaletteDestroy(NvMediaPalette *palette)
Destroys a palette created by NvMediaPaletteCreate.
A catch-all error, used when no other error code applies.
Definition: nvmedia_core.h:194
uint16_t x0
Left X co-ordinate.
Definition: nvmedia_core.h:137
NvMediaColorStandard
Defines color standards.
Definition: nvmedia_core.h:112
ITU BT.601 color standard.
Definition: nvmedia_core.h:114
Holds status of latest operation for NvMedia managed data structure.
Definition: nvmedia_core.h:214
NvMediaStatus
The set of all possible error codes.
Definition: nvmedia_core.h:178
NvMediaStatus NvMediaCoreGetVersion(NvMediaVersion *version)
Gets the core version information for the NvMedia library.
SMTE 240M color standard.
Definition: nvmedia_core.h:118
NvMediaStatus status
Holds actual status - NvMediaStatus.
Definition: nvmedia_core.h:216
Holds a rectangular region of a surface.
Definition: nvmedia_core.h:135
Operation is cancelled when the hardware is timed out.
Definition: nvmedia_core.h:204
Bad parameter was passed.
Definition: nvmedia_core.h:182
int32_t right
right column of a rectangle
Definition: nvmedia_core.h:169
void NvMediaDevice
An opaque handle representing a NvMediaDevice object.
Definition: nvmedia_core.h:284
uint64_t NvMediaGlobalTime
Media global time, measured in microseconds.
Definition: nvmedia_core.h:89
The operation completed successfully; no error.
Definition: nvmedia_core.h:180
ITU BT.709 color standard.
Definition: nvmedia_core.h:116
float_t blue
Blue color component.
Definition: nvmedia_core.h:105
void NvMediaPaletteLoad(NvMediaDevice *device, NvMediaPalette *palette, uint32_t *rgba)
Upload the palette data.
int32_t left
left column of a rectangle
Definition: nvmedia_core.h:165
float_t green
Green color component.
Definition: nvmedia_core.h:103
uint16_t x1
Right X co-ordinate.
Definition: nvmedia_core.h:141
int32_t x
Horizontal location of the point.
Definition: nvmedia_core.h:151
int32_t y
Vertical location of the point.
Definition: nvmedia_core.h:153
NvMediaStatus NvMediaReleaseGetVersion(NvMediaVersion *version)
Gets the release version information for the NvMedia library.
No operation is pending.
Definition: nvmedia_core.h:196
NvMediaPalette * NvMediaPaletteCreate(NvMediaDevice *device)
Create a 256 element RGBA palette suitable for use with NvMediaVideoMixer.
uint64_t endTimestamp
Timestamp of end of operation.
Definition: nvmedia_core.h:218
float_t alpha
Alpha color component.
Definition: nvmedia_core.h:107
int32_t top
top row of a rectangle
Definition: nvmedia_core.h:167
float_t red
Red color component.
Definition: nvmedia_core.h:101