NVIDIA DRIVE OS Linux SDK API Reference

6.0.3 Release
Basic NvMedia Types and Structures

Detailed Description

Defines basic types used throughout the NvMedia API.

6

Data Structures

struct  NvMediaRect
 Holds a rectangular region of a surface. More...
 
struct  NvMediaPoint
 Defines the location of a point on a two-dimensional object. More...
 
struct  NvMediaPointFloat
 Defines the float-precision location of a point on a two-dimensional object. More...
 
struct  NvMediaPointDouble
 Defines the double-precision location of a point on a two-dimensional object. More...
 
struct  NvMediaTaskStatus
 Holds status of latest operation for NvMedia managed data structure. More...
 

Modules

 Version Information
 Provides version information for the NvMedia library.
 

Macros

#define NVMEDIA_RELEASE_VERSION_MAJOR   2
 Release major version number. More...
 
#define NVMEDIA_RELEASE_VERSION_MINOR   0
 Release minor version number. More...
 
#define NVMEDIA_CORE_VERSION_MAJOR   1
 Core major version number. More...
 
#define NVMEDIA_CORE_VERSION_MINOR   16
 Core minor version number. More...
 
#define NVMEDIA_TRUE   (0 == 0)
 A true NvMediaBool value. More...
 
#define NVMEDIA_FALSE   (0 == 1)
 A false NvMediaBool value. More...
 

Typedefs

typedef uint32_t NvMediaBool
 A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE. More...
 
typedef struct timespec NvMediaTime
 Holds the media time in timespec format as defined by the POSIX specification. More...
 
typedef uint64_t NvMediaGlobalTime
 Media global time, measured in microseconds. More...
 

Enumerations

enum  NvMediaTimeBase {
  NVMEDIA_TIME_BASE_CLOCK_PTP,
  NVMEDIA_TIME_BASE_CLOCK_MONOTONIC,
  NVMEDIA_TIME_BASE_CLOCK_USER_DEFINED,
  NVMEDIA_TIME_BASE_CLOCK_PTP,
  NVMEDIA_TIME_BASE_CLOCK_MONOTONIC,
  NVMEDIA_TIME_BASE_CLOCK_USER_DEFINED
}
 Defines clock base for NvMediaTime. More...
 
enum  NvMediaColorStandard {
  NVMEDIA_COLOR_STANDARD_ITUR_BT_601,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_709,
  NVMEDIA_COLOR_STANDARD_SMPTE_240M,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_601_ER,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_709_ER,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_601,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_709,
  NVMEDIA_COLOR_STANDARD_SMPTE_240M,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_601_ER,
  NVMEDIA_COLOR_STANDARD_ITUR_BT_709_ER
}
 Defines color standards. More...
 
enum  NvMediaStatus {
  NVMEDIA_STATUS_OK = 0,
  NVMEDIA_STATUS_BAD_PARAMETER = 1,
  NVMEDIA_STATUS_PENDING = 2,
  NVMEDIA_STATUS_TIMED_OUT = 3,
  NVMEDIA_STATUS_OUT_OF_MEMORY = 4,
  NVMEDIA_STATUS_NOT_INITIALIZED = 5,
  NVMEDIA_STATUS_NOT_SUPPORTED = 6,
  NVMEDIA_STATUS_ERROR = 7,
  NVMEDIA_STATUS_NONE_PENDING = 8,
  NVMEDIA_STATUS_INSUFFICIENT_BUFFERING = 9,
  NVMEDIA_STATUS_INVALID_SIZE = 10,
  NVMEDIA_STATUS_INCOMPATIBLE_VERSION = 11,
  NVMEDIA_STATUS_UNDEFINED_STATE = 13,
  NVMEDIA_STATUS_PFSD_ERROR = 14,
  NVMEDIA_STATUS_OK = 0,
  NVMEDIA_STATUS_BAD_PARAMETER = 1,
  NVMEDIA_STATUS_PENDING = 2,
  NVMEDIA_STATUS_TIMED_OUT = 3,
  NVMEDIA_STATUS_OUT_OF_MEMORY = 4,
  NVMEDIA_STATUS_NOT_INITIALIZED = 5,
  NVMEDIA_STATUS_NOT_SUPPORTED = 6,
  NVMEDIA_STATUS_ERROR = 7,
  NVMEDIA_STATUS_NONE_PENDING = 8,
  NVMEDIA_STATUS_INSUFFICIENT_BUFFERING = 9,
  NVMEDIA_STATUS_INVALID_SIZE = 10,
  NVMEDIA_STATUS_INCOMPATIBLE_VERSION = 11,
  NVMEDIA_STATUS_UNDEFINED_STATE = 13,
  NVMEDIA_STATUS_PFSD_ERROR = 14
}
 Defines all possible error codes. More...
 
enum  NvMediaNvSciSyncClientType {
  NVMEDIA_SIGNALER,
  NVMEDIA_WAITER,
  NVMEDIA_SIGNALER_WAITER,
  NVMEDIA_SIGNALER,
  NVMEDIA_WAITER,
  NVMEDIA_SIGNALER_WAITER
}
 NvMedia NvSciSync Client Type. More...
 
enum  NvMediaNvSciSyncObjType {
  NVMEDIA_PRESYNCOBJ,
  NVMEDIA_EOFSYNCOBJ,
  NVMEDIA_SOFSYNCOBJ,
  NVMEDIA_EOF_PRESYNCOBJ,
  NVMEDIA_SOF_PRESYNCOBJ,
  NVMEDIA_PRESYNCOBJ,
  NVMEDIA_EOFSYNCOBJ,
  NVMEDIA_SOFSYNCOBJ,
  NVMEDIA_EOF_PRESYNCOBJ,
  NVMEDIA_SOF_PRESYNCOBJ
}
 Defines NvMedia NvSciSyncObj types. More...
 
enum  NvMediaAccessMode {
  NVMEDIA_ACCESS_MODE_READ,
  NVMEDIA_ACCESS_MODE_READ_WRITE,
  NVMEDIA_ACCESS_MODE_READ,
  NVMEDIA_ACCESS_MODE_READ_WRITE
}
 

Functions

NvMediaStatus NvMediaReleaseGetVersion (NvMediaVersion *version)
 Gets the release version information for the NvMedia library. More...
 
NvMediaStatus NvMediaCoreGetVersion (NvMediaVersion *version)
 Gets the core version information for the NvMedia library. More...
 

Macro Definition Documentation

◆ NVMEDIA_CORE_VERSION_MAJOR

#define NVMEDIA_CORE_VERSION_MAJOR   1

Core major version number.

Definition at line 72 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NVMEDIA_CORE_VERSION_MINOR

#define NVMEDIA_CORE_VERSION_MINOR   16

Core minor version number.

Definition at line 75 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NVMEDIA_FALSE

#define NVMEDIA_FALSE   (0 == 1)

A false NvMediaBool value.

Definition at line 82 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NVMEDIA_RELEASE_VERSION_MAJOR

#define NVMEDIA_RELEASE_VERSION_MAJOR   2

Release major version number.

Note
This definition is deprecated and will be removed in the next version.

Definition at line 64 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NVMEDIA_RELEASE_VERSION_MINOR

#define NVMEDIA_RELEASE_VERSION_MINOR   0

Release minor version number.

Note
This definition is deprecated and will be removed in the next version.

Definition at line 68 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NVMEDIA_TRUE

#define NVMEDIA_TRUE   (0 == 0)

A true NvMediaBool value.

Definition at line 79 of file nvmedia/core/inc/public/nvmedia_core.h.

Typedef Documentation

◆ NvMediaBool

typedef uint32_t NvMediaBool

A boolean value, holding NVMEDIA_TRUE or NVMEDIA_FALSE.

Definition at line 88 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaGlobalTime

typedef uint64_t NvMediaGlobalTime

Media global time, measured in microseconds.

Note
This definition is deprecated and will be removed in the next version.

Definition at line 99 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaTime

typedef struct timespec NvMediaTime

Holds the media time in timespec format as defined by the POSIX specification.

Definition at line 93 of file nvmedia/core/inc/public/nvmedia_core.h.

Enumeration Type Documentation

◆ NvMediaAccessMode

Enumerator
NVMEDIA_ACCESS_MODE_READ 

Specifies read-only access mode.

NVMEDIA_ACCESS_MODE_READ_WRITE 

Specifies read/write access mode.

NVMEDIA_ACCESS_MODE_READ 

Specifies read-only access mode.

NVMEDIA_ACCESS_MODE_READ_WRITE 

Specifies read/write access mode.

Definition at line 319 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaColorStandard

Defines color standards.

Note
This definition is deprecated and will be removed in the next version.
Enumerator
NVMEDIA_COLOR_STANDARD_ITUR_BT_601 

Specifies ITU BT.601 color standard.

NVMEDIA_COLOR_STANDARD_ITUR_BT_709 

Specifies ITU BT.709 color standard.

NVMEDIA_COLOR_STANDARD_SMPTE_240M 

Specifies SMTE 240M color standard.

NVMEDIA_COLOR_STANDARD_ITUR_BT_601_ER 

Specifies ITU BT.601 color standard extended range.

NVMEDIA_COLOR_STANDARD_ITUR_BT_709_ER 

Specifies ITU BT.709 color standard extended range.

NVMEDIA_COLOR_STANDARD_ITUR_BT_601 

Specifies ITU BT.601 color standard.

NVMEDIA_COLOR_STANDARD_ITUR_BT_709 

Specifies ITU BT.709 color standard.

NVMEDIA_COLOR_STANDARD_SMPTE_240M 

Specifies SMTE 240M color standard.

NVMEDIA_COLOR_STANDARD_ITUR_BT_601_ER 

Specifies ITU BT.601 color standard extended range.

NVMEDIA_COLOR_STANDARD_ITUR_BT_709_ER 

Specifies ITU BT.709 color standard extended range.

Definition at line 119 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaNvSciSyncClientType

NvMedia NvSciSync Client Type.

Enumerator
NVMEDIA_SIGNALER 

An NvMedia component acts as a signaler.

NVMEDIA_WAITER 

An NvMedia component acts as a waiter.

NVMEDIA_SIGNALER_WAITER 

An NvMedia component acts as a signaler and waiter also for the same NvSciSyncObj.

NVMEDIA_SIGNALER 

An NvMedia component acts as a signaler.

NVMEDIA_WAITER 

An NvMedia component acts as a waiter.

NVMEDIA_SIGNALER_WAITER 

An NvMedia component acts as a signaler and waiter also for the same NvSciSyncObj.

Definition at line 277 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaNvSciSyncObjType

Defines NvMedia NvSciSyncObj types.

Enumerator
NVMEDIA_PRESYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.

NVMEDIA_EOFSYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence.

NVMEDIA_SOFSYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence.

NVMEDIA_EOF_PRESYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler, signaling EOFFence, and as a waiter.

Use this type in use cases where a EOFfence from an NvMedia component handle in one iteration is used as a PREfence for the same handle in the next iteration.

NVMEDIA_SOF_PRESYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence, as a waiter.

Use this type in use cases where a SOFfence from an NvMedia component handle in one iteration is used as a PREfence for the same handle in the next iteration.

NVMEDIA_PRESYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a waiter.

NVMEDIA_EOFSYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling EOFFence.

NVMEDIA_SOFSYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence.

NVMEDIA_EOF_PRESYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts both as a signaler, signaling EOFFence, and as a waiter.

Use this type in use cases where a EOFfence from an NvMedia component handle in one iteration is used as a PREfence for the same handle in the next iteration.

NVMEDIA_SOF_PRESYNCOBJ 

Specifies an NvSciSyncObj type for which an NvMedia component acts as a signaler, signaling SOFFence, as a waiter.

Use this type in use cases where a SOFfence from an NvMedia component handle in one iteration is used as a PREfence for the same handle in the next iteration.

Definition at line 290 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaStatus

Defines all possible error codes.

Enumerator
NVMEDIA_STATUS_OK 

Specifies that the operation completed successfully (with no error).

NVMEDIA_STATUS_BAD_PARAMETER 

Specifies that a bad parameter was passed.

NVMEDIA_STATUS_PENDING 

Specifies that the operation has not finished yet.

NVMEDIA_STATUS_TIMED_OUT 

Specifies that the operation timed out.

NVMEDIA_STATUS_OUT_OF_MEMORY 

Specifies that the process is out of memory.

NVMEDIA_STATUS_NOT_INITIALIZED 

Specifies that a component requred by the function call is not initialized.

NVMEDIA_STATUS_NOT_SUPPORTED 

Specifies that the requested operation is not supported.

NVMEDIA_STATUS_ERROR 

Specifies a catch-all error, used when no other error code applies.

NVMEDIA_STATUS_NONE_PENDING 

Specifies that no operation is pending.

NVMEDIA_STATUS_INSUFFICIENT_BUFFERING 

Specifies insufficient buffering.

NVMEDIA_STATUS_INVALID_SIZE 

Specifies that the size of an object passed to a function was invalid.

NVMEDIA_STATUS_INCOMPATIBLE_VERSION 

Specifies that a library's version is incompatible with the application.

NVMEDIA_STATUS_UNDEFINED_STATE 

Specifies that the operation entered an undefined state.

NVMEDIA_STATUS_PFSD_ERROR 

Specifies an error from Permanent Fault Software Diagnostic.

NVMEDIA_STATUS_OK 

Specifies that the operation completed successfully (with no error).

NVMEDIA_STATUS_BAD_PARAMETER 

Specifies that a bad parameter was passed.

NVMEDIA_STATUS_PENDING 

Specifies that the operation has not finished yet.

NVMEDIA_STATUS_TIMED_OUT 

Specifies that the operation timed out.

NVMEDIA_STATUS_OUT_OF_MEMORY 

Specifies that the process is out of memory.

NVMEDIA_STATUS_NOT_INITIALIZED 

Specifies that a component requred by the function call is not initialized.

NVMEDIA_STATUS_NOT_SUPPORTED 

Specifies that the requested operation is not supported.

NVMEDIA_STATUS_ERROR 

Specifies a catch-all error, used when no other error code applies.

NVMEDIA_STATUS_NONE_PENDING 

Specifies that no operation is pending.

NVMEDIA_STATUS_INSUFFICIENT_BUFFERING 

Specifies insufficient buffering.

NVMEDIA_STATUS_INVALID_SIZE 

Specifies that the size of an object passed to a function was invalid.

NVMEDIA_STATUS_INCOMPATIBLE_VERSION 

Specifies that a library's version is incompatible with the application.

NVMEDIA_STATUS_UNDEFINED_STATE 

Specifies that the operation entered an undefined state.

NVMEDIA_STATUS_PFSD_ERROR 

Specifies an error from Permanent Fault Software Diagnostic.

Definition at line 194 of file nvmedia/core/inc/public/nvmedia_core.h.

◆ NvMediaTimeBase

Defines clock base for NvMediaTime.

Note
This definition is deprecated and will be removed in the next version.
Enumerator
NVMEDIA_TIME_BASE_CLOCK_PTP 

Specifies that PTP clock is used for base time calculation.

NVMEDIA_TIME_BASE_CLOCK_MONOTONIC 

Specifies that kernel monotonic clock is used for base time calculation.

NVMEDIA_TIME_BASE_CLOCK_USER_DEFINED 

Specifies that a user defined clock is used for base time calculation.

NVMEDIA_TIME_BASE_CLOCK_PTP 

Specifies that PTP clock is used for base time calculation.

NVMEDIA_TIME_BASE_CLOCK_MONOTONIC 

Specifies that kernel monotonic clock is used for base time calculation.

NVMEDIA_TIME_BASE_CLOCK_USER_DEFINED 

Specifies that a user defined clock is used for base time calculation.

Definition at line 104 of file nvmedia/core/inc/public/nvmedia_core.h.

Function Documentation

◆ NvMediaCoreGetVersion()

NvMediaStatus NvMediaCoreGetVersion ( NvMediaVersion version)

Gets the core version information for the NvMedia library.

Parameters
[in,out]versionA valid non-NULL pointer to a NvMediaVersion structure to be filled by the function.
Return values
NVMEDIA_STATUS_OKif the operation was successful
NVMEDIA_STATUS_BAD_PARAMETERif version was invalid.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: Yes
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No

◆ NvMediaReleaseGetVersion()

NvMediaStatus NvMediaReleaseGetVersion ( NvMediaVersion version)

Gets the release version information for the NvMedia library.

Parameters
[in,out]versionA valid non-NULL pointer to a NvMediaVersion structure to be filled by the function.
Return values
NVMEDIA_STATUS_OKif the operation was successful
NVMEDIA_STATUS_BAD_PARAMETERif version was invalid.


Usage considerations

  • Allowed context for the API call
    • Thread-safe: Yes
  • API group
    • Init: Yes
    • Runtime: No
    • De-Init: No
Note
This definition is deprecated and will be removed in the next version.