1/*
2 * Copyright (C) 2009 Splitted-Desktop Systems. All Rights Reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
14 * of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25#ifndef VA_VERSION_H
26#define VA_VERSION_H
27
28/**
29 * VA_MAJOR_VERSION:
30 *
31 * The major version of VA-API (1, if %VA_VERSION is 1.2.3)
32 */
33#define VA_MAJOR_VERSION    @VA_API_MAJOR_VERSION@
34
35/**
36 * VA_MINOR_VERSION:
37 *
38 * The minor version of VA-API (2, if %VA_VERSION is 1.2.3)
39 */
40#define VA_MINOR_VERSION    @VA_API_MINOR_VERSION@
41
42/**
43 * VA_MICRO_VERSION:
44 *
45 * The micro version of VA-API (3, if %VA_VERSION is 1.2.3)
46 */
47#define VA_MICRO_VERSION    @VA_API_MICRO_VERSION@
48
49/**
50 * VA_VERSION:
51 *
52 * The full version of VA-API, like 1.2.3
53 */
54#define VA_VERSION          @VA_API_VERSION@
55
56/**
57 * VA_VERSION_S:
58 *
59 * The full version of VA-API, in string form (suited for string
60 * concatenation)
61 */
62#define VA_VERSION_S       "@VA_API_VERSION@"
63
64/**
65 * VA_VERSION_HEX:
66 *
67 * Numerically encoded version of VA-API, like 0x010203
68 */
69#define VA_VERSION_HEX     ((VA_MAJOR_VERSION << 24) | \
70                            (VA_MINOR_VERSION << 16) | \
71                            (VA_MICRO_VERSION << 8))
72
73/**
74 * VA_CHECK_VERSION:
75 * @major: major version, like 1 in 1.2.3
76 * @minor: minor version, like 2 in 1.2.3
77 * @micro: micro version, like 3 in 1.2.3
78 *
79 * Evaluates to %TRUE if the version of VA-API is greater than
80 * @major, @minor and @micro
81 */
82#define VA_CHECK_VERSION(major,minor,micro) \
83        (VA_MAJOR_VERSION > (major) || \
84         (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION > (minor)) || \
85         (VA_MAJOR_VERSION == (major) && VA_MINOR_VERSION == (minor) && VA_MICRO_VERSION >= (micro)))
86
87#endif /* VA_VERSION_H */
88