1 | /******************************************************************************* |
---|---|
2 | * Copyright (C) 2023 Intel Corporation |
3 | * |
4 | * SPDX-License-Identifier: MIT |
5 | ******************************************************************************/ |
6 | |
7 | #ifndef VAS_COMMON_HPP |
8 | #define VAS_COMMON_HPP |
9 | |
10 | #include <cstdint> |
11 | |
12 | #define OT_VERSION_MAJOR 1 |
13 | #define OT_VERSION_MINOR 0 |
14 | #define OT_VERSION_PATCH 0 |
15 | |
16 | #define VAS_EXPORT //__attribute__((visibility("default"))) |
17 | |
18 | namespace vas { |
19 | |
20 | /** |
21 | * @class Version |
22 | * |
23 | * Contains version information. |
24 | */ |
25 | class Version { |
26 | public: |
27 | /** |
28 | * Constructor. |
29 | * |
30 | * @param[in] major Major version. |
31 | * @param[in] minor Minor version. |
32 | * @param[in] patch Patch version. |
33 | */ |
34 | explicit Version(uint32_t major, uint32_t minor, uint32_t patch) : major_(major), minor_(minor), patch_(patch) { |
35 | } |
36 | |
37 | /** |
38 | * Returns major version. |
39 | */ |
40 | uint32_t GetMajor() const noexcept { |
41 | return major_; |
42 | } |
43 | |
44 | /** |
45 | * Returns minor version. |
46 | */ |
47 | uint32_t GetMinor() const noexcept { |
48 | return minor_; |
49 | } |
50 | |
51 | /** |
52 | * Returns patch version. |
53 | */ |
54 | uint32_t GetPatch() const noexcept { |
55 | return patch_; |
56 | } |
57 | |
58 | private: |
59 | uint32_t major_; |
60 | uint32_t minor_; |
61 | uint32_t patch_; |
62 | }; |
63 | |
64 | /** |
65 | * @enum BackendType |
66 | * |
67 | * Represents HW backend types. |
68 | */ |
69 | enum class BackendType { |
70 | CPU, /**< CPU */ |
71 | GPU /**< GPU */ |
72 | }; |
73 | |
74 | /** |
75 | * @enum ColorFormat |
76 | * |
77 | * Represents Color formats. |
78 | */ |
79 | enum class ColorFormat { BGR, NV12, BGRX, GRAY, I420 }; |
80 | |
81 | }; // namespace vas |
82 | |
83 | #endif // VAS_COMMON_HPP |
84 |