Argus API Argus Camera API

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
SensorPrivateMetadata.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
3 *
4 * NVIDIA CORPORATION and its licensors retain all intellectual property
5 * and proprietary rights in and to this software, related documentation
6 * and any modifications thereto. Any use, reproduction, disclosure or
7 * distribution of this software and related documentation without an express
8 * license agreement from NVIDIA CORPORATION is strictly prohibited.
9 */
10
11 #ifndef _ARGUS_SENSOR_PRIVATE_METADATA_H
12 #define _ARGUS_SENSOR_PRIVATE_METADATA_H
13
14 namespace Argus
15 {
16 /**
17 * The Ext::SensorPrivateMetadata extension adds sensor embedded metadata to the Argus API.
18 * This data is metadata that the sensor embeds inside the frame, the type and formating of
19 * embedding depends on the sensor. It is up to the user to correctly parse the data based
20 * on the specifics of the sensor used.
21 *
22 * - ISensorPrivateMetadataCaps: Used to check if a device is capable of
23 * private metadata output.
24 * - ISensorPrivateMetadataRequest: Used to enable private metadata output from a capture request.
25 * - ISensorPrivateMetadata: Used to access the sensor private metadata.
26 */
27 DEFINE_UUID(ExtensionName, EXT_SENSOR_PRIVATE_METADATA, 7acf4352,3a75,46e7,9af1,8d,71,da,83,15,23);
28
29 namespace Ext
30 {
31
32 /**
33 * @class ISensorPrivateMetadataCaps
34 *
35 * Interface used to query the availability and size in bytes of sensor private metadata.
36 *
37 * This interface is available from the CameraDevice class.
38 *
39 */
40 DEFINE_UUID(InterfaceID, IID_SENSOR_PRIVATE_METADATA_CAPS,
41 e492d2bf,5285,476e,94c5,ee,64,d5,3d,94,ef);
42
43 class ISensorPrivateMetadataCaps : public Interface
44 {
45 public:
46 static const InterfaceID& id() { return IID_SENSOR_PRIVATE_METADATA_CAPS; }
47
48 /**
49 * Returns the size in bytes of the private metadata.
50 */
51 virtual size_t getMetadataSize() const = 0;
52
53 protected:
54 ~ISensorPrivateMetadataCaps() {}
55 };
56
57 /**
58 * @class ISensorPrivateMetadataRequest
59 *
60 * Interface used enable the output of sensor private metadata for a request.
61 *
62 * Available from the Request class.
63 */
64 DEFINE_UUID(InterfaceID, IID_SENSOR_PRIVATE_METADATA_REQUEST,
65 5c868b69,42f5,4ec9,9b93,44,11,c9,6c,02,e3);
66
67 class ISensorPrivateMetadataRequest : public Interface
68 {
69 public:
70 static const InterfaceID& id() { return IID_SENSOR_PRIVATE_METADATA_REQUEST; }
71
72 /**
73 * Enables the sensor private metadata, will only work if the sensor supports embedded metadata.
74 * @param[in] enable whether to output embedded metadata.
75 */
76 virtual void setMetadataEnable(bool enable) = 0;
77
78 /**
79 * Returns if the metadata is enabled for this request.
80 */
81 virtual bool getMetadataEnable() const = 0;
82
83 protected:
84 ~ISensorPrivateMetadataRequest() {}
85 };
86
87 /**
88 * @class ISensorPrivateMetadata
89 *
90 * Interface used to access sensor private metadata from Argus.
91 *
92 * This interface is available from CaptureMetadata class.
93 *
94 */
95 DEFINE_UUID(InterfaceID, IID_SENSOR_PRIVATE_METADATA, 68cf6680,70d7,4b52,9a99,33,fb,65,81,a2,61);
96
97 class ISensorPrivateMetadata : public Interface
98 {
99 public:
100 static const InterfaceID& id() { return IID_SENSOR_PRIVATE_METADATA; }
101
102 /**
103 * Returns the size of the embedded metadata.
104 */
105 virtual size_t getMetadataSize() const = 0;
106
107 /**
108 * Copies back the metadata to the provided memory location.
109 * If the size of dst is smaller than the total size of the metadata, only the first
110 * bytes up to size will be copied.
111 * @param [in] dst The pointer to the location where the data will be copied.
112 * @param [in] size The size of the destination.
113 */
114 virtual Status getMetadata(void *dst, size_t size) const = 0;
115
116 protected:
117 ~ISensorPrivateMetadata() {}
118 };
119
120 } // namespace Ext
121
122 } // namespace Argus
123 #endif // _ARGUS_SENSOR_PRIVATE_METADATA_H