Declarations of entities to handle VPI versioning. More...
Macros | |
#define | NV_VPI_MAKE_VERSION4(major, minor, patch, tweak) ((major)*1000000 + (minor)*10000 + (patch)*100 + (tweak)) |
Make a VPI version identifier with four components. More... | |
#define | NV_VPI_MAKE_VERSION3(major, minor, patch) NV_VPI_MAKE_VERSION4(major, minor, patch, 0) |
Make a VPI version identifier with three components. More... | |
#define | NV_VPI_MAKE_VERSION2(major, minor) NV_VPI_MAKE_VERSION4(major, minor, 0, 0) |
Make a VPI version identifier with two components. More... | |
#define | NV_VPI_MAKE_VERSION1(major) NV_VPI_MAKE_VERSION4(major, 0, 0, 0) |
Make a VPI version identifier with one component. More... | |
#define | NV_VPI_MAKE_VERSION(major, minor, patch, tweak) |
Assemble an integer version from its components. More... | |
#define | NV_VPI_VERSION_MAJOR 2 |
Major version number component. More... | |
#define | NV_VPI_VERSION_MINOR 4 |
Minor version number component. More... | |
#define | NV_VPI_VERSION_PATCH 9 |
Patch version number component. More... | |
#define | NV_VPI_VERSION_TWEAK 0 |
Tweak version number component. More... | |
#define | NV_VPI_VERSION_SUFFIX |
Version suffix. More... | |
#define | NV_VPI_VERSION 2040900 |
VPI library version. More... | |
#define | NV_VPI_VERSION_STRING "2.4.9" |
VPI library version number represented as a string. | |
#define | NV_VPI_VERSION_API |
Selected API version to use. More... | |
#define | NV_VPI_VERSION_API_IS(major, minor) (NV_VPI_MAKE_VERSION(major,minor) == NV_VPI_VERSION_API) |
Conditionally enable code when selected API version is exactly given version. More... | |
#define | NV_VPI_VERSION_API_AT_LEAST(major, minor) (NV_VPI_MAKE_VERSION(major,minor) <= NV_VPI_VERSION_API) |
Conditionally enable code when selected API version is at least given version. More... | |
#define | NV_VPI_VERSION_API_AT_MOST(major, minor) (NV_VPI_MAKE_VERSION(major,minor) >= NV_VPI_VERSION_API) |
Conditionally enable code when selected API version is at most given version. More... | |
#define | NV_VPI_VERSION_API_IN_RANGE(min_major, min_minor, max_major, max_minor) (NV_VPI_VERSION_API_AT_LEAST(min_major, min_minor) && NV_VPI_VERSION_API_AT_MOST(max_major, max_minor)) |
Conditionally enable code when selected API version is between two versions. More... | |
Functions | |
int | vpiGetVersion (void) |
Retrieves the library's version number. More... | |
Declarations of entities to handle VPI versioning.
These utilities allow querying the VPI header and library versions and properly handle VPI forward- or backward-compatibility .
#define NV_VPI_MAKE_VERSION4 | ( | major, | |
minor, | |||
patch, | |||
tweak | |||
) | ((major)*1000000 + (minor)*10000 + (patch)*100 + (tweak)) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Make a VPI version identifier with four components.
[in] | major,minor,patch,tweak | Version components to be converted to a number. |
#define NV_VPI_MAKE_VERSION3 | ( | major, | |
minor, | |||
patch | |||
) | NV_VPI_MAKE_VERSION4(major, minor, patch, 0) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Make a VPI version identifier with three components.
The tweak version component is considered to be 0.
[in] | major,minor,patch | Version components to be converted to a number. |
#define NV_VPI_MAKE_VERSION2 | ( | major, | |
minor | |||
) | NV_VPI_MAKE_VERSION4(major, minor, 0, 0) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Make a VPI version identifier with two components.
The patch and tweak version components are considered to be 0.
[in] | major,minor | Version components to be converted to a number. |
#define NV_VPI_MAKE_VERSION1 | ( | major | ) | NV_VPI_MAKE_VERSION4(major, 0, 0, 0) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Make a VPI version identifier with one component.
The minor, patch and tweak version components are considered to be 0.
[in] | major | Major version component to be converted to a number. |
#define NV_VPI_MAKE_VERSION | ( | major, | |
minor, | |||
patch, | |||
tweak | |||
) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Assemble an integer version from its components.
This makes it easy to conditionally compile code for different VPI versions, e.g:
[in] | major | Major version component, mandatory. |
[in] | minor | Minor version component. If ommitted, it's considered to be 0. |
[in] | patch | Patch version component. If ommitted, it's considered to be 0. |
[in] | tweak | Tweak version component. If ommitted, it's considered to be 0. |
#define NV_VPI_VERSION_MAJOR 2 |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Major version number component.
This is incremented every time there's a incompatible ABI change. In the special case of major version 0, compatibility between minor versions is not guaranteed.
#define NV_VPI_VERSION_MINOR 4 |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Minor version number component.
This is incremented every time there's a new feature added to VPI that doesn't break backward compatibility. This number is reset to zero when major version changes.
#define NV_VPI_VERSION_PATCH 9 |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Patch version number component.
This is incremented every time a bug is fixed, but no new functionality is added to the library. This number is reset to zero when minor version changes.
#define NV_VPI_VERSION_TWEAK 0 |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Tweak version number component.
Incremented for packaging or documentation updates, etc. The library itself isn't updated. Gets reset to zero when patch version changes.
#define NV_VPI_VERSION_SUFFIX |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Version suffix.
String appended to version number to designate special builds.
#define NV_VPI_VERSION 2040900 |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
VPI library version.
It's an integer value computed from MAJOR*1000000 + MINOR*10000 + PATCH*100 + TWEAK
. Integer versions can be compared, recent versions are greater than older ones.
#define NV_VPI_VERSION_API |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Selected API version to use.
This macro selects which of the supported APIs the code will use.
By default this equals to the highest supported API, corresponding to the current major and minor versions of the library.
User can override the version by defining this macro before including VPI headers.
#define NV_VPI_VERSION_API_IS | ( | major, | |
minor | |||
) | (NV_VPI_MAKE_VERSION(major,minor) == NV_VPI_VERSION_API) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Conditionally enable code when selected API version is exactly given version.
[in] | major,minor | API version that will be considered. |
#define NV_VPI_VERSION_API_AT_LEAST | ( | major, | |
minor | |||
) | (NV_VPI_MAKE_VERSION(major,minor) <= NV_VPI_VERSION_API) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Conditionally enable code when selected API version is at least given version.
[in] | major,minor | Minimum API version that will be considered. |
#define NV_VPI_VERSION_API_AT_MOST | ( | major, | |
minor | |||
) | (NV_VPI_MAKE_VERSION(major,minor) >= NV_VPI_VERSION_API) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Conditionally enable code when selected API version is at most given version.
[in] | major,minor | Maximum API version that will be considered. |
#define NV_VPI_VERSION_API_IN_RANGE | ( | min_major, | |
min_minor, | |||
max_major, | |||
max_minor | |||
) | (NV_VPI_VERSION_API_AT_LEAST(min_major, min_minor) && NV_VPI_VERSION_API_AT_MOST(max_major, max_minor)) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Conditionally enable code when selected API version is between two versions.
[in] | min_major,min_minor | Minimum API version that will be considered. |
[in] | max_major,max_minor | Maximum API version that will be considered. |
int vpiGetVersion | ( | void | ) |
#include </opt/nvidia/vpi2/include/vpi/Version.h>
Retrieves the library's version number.
The number is represented as a integer. It may differ from NV_VPI_VERSION if header doesn't correspond to VPI binary. This can be used by user's program to handle semantic differences between library versions.